Update package list to allow deletion of packages.
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 3 Oct 2019 18:14:29 +0000 (14:14 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 3 Oct 2019 18:14:29 +0000 (14:14 -0400)
This will allow packages to be deleted that have no members.

models/admin/packaging/index.php
views/admin/packaging/index.html

index 407ba0c..79285a7 100644 (file)
@@ -369,4 +369,3 @@ class GlmMembersAdmin_packaging_index extends GlmDataPackages
     }
 }
 
-?>
index eaa2a73..4cd584d 100644 (file)
                 <th>Start</th>
                 <th>End</th>
                 <th>Expire</th>
+                <th>&nbsp;</th>
+                <th>&nbsp;</th>
             </tr>
         </thead>
         <tbody>
                 </td>
                 <td>
                     {if $p.status.value == 10}
-                    <a href="{$siteBaseUrl}{$settings.canonical_package_page}/{$p.package_slug}/" target="_blank">View Package</a>
+                        <a href="{$siteBaseUrl}{$settings.canonical_package_page}/{$p.package_slug}/" target="_blank">View Package</a>
+                    {/if}
+                </td>
+                <td>
+                    {if !$lockedToMember}
+                        <a
+                            class="button button-secondary glm-button-small"
+                            href="{$thisUrl}?page={$thisPage}&glm_action=index&option=delete&packageID={$p.id}"
+                        >Delete</a>
                     {/if}
                 </td>
             </tr>