Update for admin list view and edit add forms. (amenity)
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 17 Jun 2016 20:56:36 +0000 (16:56 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 21 Jun 2016 21:37:53 +0000 (17:37 -0400)
For the edit add amenity forms commenting out the description and short
description fields.
For the list view commenting out description and short description.
For the list view adding the groups column to show which groups the
amenity is in.

views/admin/settings/amenities.html

index 397e09c..729531e 100644 (file)
@@ -24,6 +24,7 @@
                             <input type="text" name="name" class="glm-form-text-input">
                         </td>
                     </tr>
+                    <!--
                     <tr>
                         <th>Description:</th>
                         <td>
@@ -36,6 +37,7 @@
                             <input type="text" name="short_descr" class="glm-form-text-input">
                         </td>
                     </tr>
+                    -->
                     <tr>
                         <td colspan="2">
                             <table style="width: 100%;">
                             <input id="editAmenityName" type="text" name="name" class="glm-form-text-input">
                         </td>
                     </tr>
+                    <!--
                     <tr>
                         <th>Description:</th>
                         <td>
                             <input id="editAmenityShortDescr" type="text" name="short_descr" class="glm-form-text-input">
                         </td>
                     </tr>
+                    -->
                     <tr>
                         <td colspan="2">
                             <table style="width: 100%;">
                 <tr>
                     <th>Amenity</th>
                     <th>Used With</th>
+                    <th>Groups</th>
+                    <!--
                     <th>Description</th>
                     <th>Short Description</th>
+                    -->
                     <th>&nbsp;</th>
                 </tr>
             </thead>
                             <td id="editAmenityRefType_{$t.id}">
                                 {$t.ref_type.name}
                             </td>
+                            <td id="editAmenityGroups">
+                                {foreach $t.groups as $group}
+                                {$groups[$group.group_id].name}
+                                {/foreach}
+                            </td>
+                            <!--
                             <td id="editAmenityDescr_{$t.id}">
                                 {$t.descr}
                             </td>
                             <td id="editAmenityShortDescr_{$t.id}">
                                 {$t.short_descr}
                             </td>
+                            -->
                             <td>
                                 <div class="deleteAmenityButton button button-secondary glm-button-small glm-right" data-amenityID="{$t.id}">Delete</div>
                             </td>
             $('#editAmenityName').val(amenityName.trim());
             $('#editAmenityRef').val(amenityRefTypeID);
             $('#editAmenityUsesValue').prop('checked', amenityUsesValue);
-            $('#editAmenityDescr').val(amenityDescr.trim());
-            $('#editAmenityShortDescr').val(amenityShortDescr.trim());
+            //$('#editAmenityDescr').val(amenityDescr.trim());
+            //$('#editAmenityShortDescr').val(amenityShortDescr.trim());
             $('.amenityGroup').each(function(){
                 $(this).prop('checked', false);
             });