From bfe11d27679526257c451c864aa5493f020e1c89 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 21 Mar 2021 09:54:16 +0100 Subject: [PATCH] Use `Ui/Object/Action/Delete` in more places in ACP --- .../files/acp/templates/attachmentList.tpl | 7 ++- .../files/acp/templates/categoryList.tpl | 7 +-- .../templates/paidSubscriptionUserList.tpl | 7 ++- .../files/acp/templates/userTrophyList.tpl | 43 +++++++++---------- 4 files changed, 29 insertions(+), 35 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/attachmentList.tpl b/wcfsetup/install/files/acp/templates/attachmentList.tpl index 748f7f4e0a..dfbf480c92 100644 --- a/wcfsetup/install/files/acp/templates/attachmentList.tpl +++ b/wcfsetup/install/files/acp/templates/attachmentList.tpl @@ -4,7 +4,6 @@ {include file='imageViewer'} @@ -82,7 +81,7 @@ {if $objects|count}
- +
@@ -98,9 +97,9 @@ {foreach from=$objects item=attachment} - + diff --git a/wcfsetup/install/files/acp/templates/categoryList.tpl b/wcfsetup/install/files/acp/templates/categoryList.tpl index 31f89aedf0..ad8da0d806 100644 --- a/wcfsetup/install/files/acp/templates/categoryList.tpl +++ b/wcfsetup/install/files/acp/templates/categoryList.tpl @@ -7,9 +7,6 @@ new WCF.ACP.Category.Collapsible('wcf\\data\\category\\CategoryAction', {@$collapsibleObjectTypeID}); {/if} - {if $objectType->getProcessor()->canDeleteCategory()} - new WCF.Action.NestedDelete('wcf\\data\\category\\CategoryAction', '.jsCategory'); - {/if} {if $objectType->getProcessor()->canEditCategory()} var sortableNodes = $('.sortableNode'); sortableNodes.each(function(index, node) { @@ -119,14 +116,14 @@ {/if} {if $objectType->getProcessor()->canDeleteCategory()} - + {objectAction action="delete" objectTitle=$category->getTitle()} {/if} {event name='itemButtons'} -
    {if !$categoryNodeList->current()->hasChildren()}
{/if} +
    {if !$categoryNodeList->current()->hasChildren()}
{/if} {assign var=oldDepth value=$categoryNodeList->getDepth()} {/foreach} {section name=i loop=$oldDepth}{/section} diff --git a/wcfsetup/install/files/acp/templates/paidSubscriptionUserList.tpl b/wcfsetup/install/files/acp/templates/paidSubscriptionUserList.tpl index b1e229f09b..f276d2ada7 100644 --- a/wcfsetup/install/files/acp/templates/paidSubscriptionUserList.tpl +++ b/wcfsetup/install/files/acp/templates/paidSubscriptionUserList.tpl @@ -2,7 +2,6 @@ @@ -69,7 +68,7 @@ {if $objects|count}
-
{lang}wcf.global.objectID{/lang}
- + {objectAction action="delete" objectTitle=$attachment->filename|tableWordwrap} {event name='rowButtons'}
+
@@ -83,14 +82,14 @@ {foreach from=$objects item=subscriptionUser} - + diff --git a/wcfsetup/install/files/acp/templates/userTrophyList.tpl b/wcfsetup/install/files/acp/templates/userTrophyList.tpl index e591a4b32b..ad8635a286 100644 --- a/wcfsetup/install/files/acp/templates/userTrophyList.tpl +++ b/wcfsetup/install/files/acp/templates/userTrophyList.tpl @@ -4,7 +4,6 @@ // @@ -77,8 +76,8 @@ {if $objects|count}
- -
{lang}wcf.global.objectID{/lang}
{if $subscriptionUser->endDate} {else} {/if} - + {objectAction action="delete" confirmMessage='wcf.acp.paidSubscription.user.delete.confirmMessage'} {event name='itemButtons'}
+ +
@@ -91,25 +90,25 @@ - {foreach from=$objects item=userTrophy} - - - - - - - - {event name='columns'} - - {/foreach} + {foreach from=$objects item=userTrophy} + + + + + + + + {event name='columns'} + + {/foreach}
{lang}wcf.global.objectID{/lang}
- {if $userTrophy->getTrophy()->awardAutomatically} - - - {else} - - - {/if} - {@$userTrophy->userTrophyID}{$userTrophy->getUserProfile()->username}{$userTrophy->getTrophy()->getTitle()}{@$userTrophy->time|time}
+ {if $userTrophy->getTrophy()->awardAutomatically} + + + {else} + + {objectAction action="delete" confirmMessage='wcf.acp.trophy.userTrophy.delete.confirmMessage'} + {/if} + {@$userTrophy->userTrophyID}{$userTrophy->getUserProfile()->username}{$userTrophy->getTrophy()->getTitle()}{@$userTrophy->time|time}
-- 2.20.1