<options>module_trophy</options>
<icon>fa-plus</icon>
</acpmenuitem>
+ <acpmenuitem name="wcf.acp.menu.link.trophy.list">
+ <controller>wcf\acp\page\TrophyListPage</controller>
+ <parent>wcf.acp.menu.link.trophy</parent>
+ <permissions>admin.trophy.canManageTrophy</permissions>
+ <options>module_trophy</options>
+ </acpmenuitem>
<!-- /trophy -->
<!-- /user -->
--- /dev/null
+{include file='header' pageTitle='wcf.acp.menu.link.trophy.list'}
+
+<script data-relocate="true">
+ //<![CDATA[
+ $(function() {
+ new WCF.Action.Delete('wcf\\data\\trophy\\TrophyAction', '.trophyRow');
+ new WCF.Action.Toggle('wcf\\data\\trophy\\TrophyAction', '.trophyRow');
+ });
+ //]]>
+</script>
+
+<header class="contentHeader">
+ <div class="contentHeaderTitle">
+ <h1 class="contentTitle">{lang}wcf.acp.menu.link.trophy.list{/lang}</h1>
+ </div>
+
+ <nav class="contentHeaderNavigation">
+ <ul>
+ <li><a href="{link controller='TrophyAdd'}{/link}" class="button"><span class="icon icon16 fa-plus"></span> <span>{lang}wcf.acp.menu.link.trophy.add{/lang}</span></a></li>
+
+ {event name='contentHeaderNavigation'}
+ </ul>
+ </nav>
+</header>
+{hascontent}
+ <div class="paginationTop">
+ {content}
+ {pages print=true assign=pagesLinks controller='TrophyList' link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder"}
+ {/content}
+ </div>
+{/hascontent}
+
+{if $objects|count}
+ <div class="section tabularBox">
+
+ <table class="table">
+ <thead>
+ <tr>
+ <th class="columnID columnTrophyID{if $sortField == 'trophyID'} active {@$sortOrder}{/if}" colspan="2"><a href="{link controller='TrophyList'}pageNo={@$pageNo}&sortField=trophyID&sortOrder={if $sortField == 'trophyID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
+ <th class="columnTitle{if $sortField == 'title'} active {@$sortOrder}{/if}" colspan="2"><a href="{link controller='TrophyList'}pageNo={@$pageNo}&sortField=title&sortOrder={if $sortField == 'title' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.title{/lang}</a></th>
+ <th class="columnText columnCategory{if $sortField == 'categoryID'} active {@$sortOrder}{/if}"><a href="{link controller='TrophyList'}pageNo={@$pageNo}&sortField=categoryID&sortOrder={if $sortField == 'categoryID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.trophy.category{/lang}</a></th>
+
+ {event name='columnHeads'}
+ </tr>
+ </thead>
+
+ <tbody>
+ {foreach from=$objects item=trophy}
+ <tr class="trophyRow">
+ <td class="columnIcon">
+ <span class="icon icon16 fa-{if !$trophy->isDisabled}check-{/if}square-o jsToggleButton jsTooltip pointer" title="{lang}wcf.global.button.{if !$trophy->isDisabled}disable{else}enable{/if}{/lang}" data-object-id="{@$trophy->getObjectID()}"></span>
+ <a href="{link controller='TrophyEdit' id=$trophy->getObjectID()}{/link}" data-tooltip="{lang}wcf.global.edit{/lang}"><span class="icon icon16 fa-pencil"></span></a>
+ <span class="icon icon16 fa-times pointer jsDeleteButton" data-confirm-message-html="{lang __encode=true}wcf.acp.trophy.delete.confirmMessage{/lang}" data-object-id="{@$trophy->getObjectID()}" data-tooltip="{lang}wcf.global.delete{/lang}"></span>
+ </td>
+ <td class="columnID columnTrophyID">{@$trophy->trophyID}</td>
+ <td class="columnIcon">{@$trophy->renderTrophy(32)}</td>
+ <td class="columnTitle columnTrophyTitle"><a href="{link controller='TrophyEdit' id=$trophy->getObjectID()}{/link}" data-tooltip="{lang}wcf.global.edit{/lang}">{$trophy->getTitle()}</a></td>
+ <td class="columnText columnCategory">{$trophy->getCategory()->getTitle()}</td>
+
+ {event name='columns'}
+ </tr>
+ {/foreach}
+ </tbody>
+ </table>
+
+ </div>
+
+ <footer class="contentFooter">
+ {hascontent}
+ <div class="paginationBottom">
+ {content}{@$pagesLinks}{/content}
+ </div>
+ {/hascontent}
+
+ <nav class="contentFooterNavigation">
+ <ul>
+ <li><a href="{link controller='TrophyAdd'}{/link}" class="button"><span class="icon icon16 fa-plus"></span> <span>{lang}wcf.acp.menu.link.trophy.add{/lang}</span></a></li>
+
+ {event name='contentHeaderNavigation'}
+ </ul>
+ </nav>
+ </footer>
+{else}
+ <p class="info">{lang}wcf.global.noItems{/lang}</p>
+{/if}
+
+{include file='footer'}
--- /dev/null
+<?php
+namespace wcf\acp\page;
+use wcf\data\trophy\TrophyList;
+use wcf\page\SortablePage;
+
+/**
+ * Trophy list page.
+ *
+ * @author Joshua Ruesweg
+ * @copyright 2001-2017 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\Acp\Page
+ * @since 3.1
+ */
+class TrophyListPage extends SortablePage {
+ /**
+ * @inheritDoc
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.trophy.list';
+
+ /**
+ * @inheritDoc
+ */
+ public $neededModules = ['MODULE_TROPHY'];
+
+ /**
+ * @inheritDoc
+ */
+ public $neededPermissions = ['admin.trophy.canManageTrophy'];
+
+ /**
+ * @inheritDoc
+ */
+ public $defaultSortField = 'trophyID';
+
+ /**
+ * @inheritDoc
+ */
+ public $defaultSortOrder = 'DESC';
+
+ /**
+ * @inheritDoc
+ */
+ public $objectListClassName = TrophyList::class;
+
+ /**
+ * @inheritDoc
+ */
+ public $validSortFields = ['trophyID', 'title', 'categoryID'];
+}
<item name="wcf.acp.menu.link.trophy"><![CDATA[Trophäen]]></item>
<item name="wcf.acp.menu.link.trophy.category.list"><![CDATA[Kategorien]]></item>
<item name="wcf.acp.menu.link.trophy.category.add"><![CDATA[Kategorie hinzufügen]]></item>
+ <item name="wcf.acp.menu.link.trophy.list"><![CDATA[Trophäen]]></item>
</category>
<category name="wcf.acp.notice">
<p><small><em>Quelle: <a href="http://www.mustervorlage.net/disclaimer-muster" class="externalURL">Mustervorlage.net</a></em></small></p>]]></item>
</category>
+ <category name="wcf.acp.trophy">
+ <item name="wcf.acp.trophy.category"><![CDATA[Kategorie]]></item>
+ <item name="wcf.acp.trophy.delete.confirmMessage"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} die Trophäe <span class="confirmationObject">{trophy->getTitle()}</span> wirklich löschen?]]></item>
+ </category>
+
<category name="wcf.user.usersOnline">
<item name="wcf.user.usersOnline"><![CDATA[Benutzer online]]></item>
<item name="wcf.user.usersOnline.detail"><![CDATA[
<item name="wcf.acp.menu.link.trophy"><![CDATA[Trophies]]></item>
<item name="wcf.acp.menu.link.trophy.category.list"><![CDATA[Categories]]></item>
<item name="wcf.acp.menu.link.trophy.category.add"><![CDATA[Add Category]]></item>
+ <item name="wcf.acp.menu.link.trophy.list"><![CDATA[Trophies]]></item>
</category>
<category name="wcf.acp.notice">
<p><small><em>Source: <a href="http://www.mustervorlage.net/disclaimer-muster" class="externalURL">Mustervorlage.net</a></em></small></p>]]></item>
</category>
+ <category name="wcf.acp.trophy">
+ <item name="wcf.acp.trophy.category"><![CDATA[Category]]></item>
+ <item name="wcf.acp.trophy.delete.confirmMessage"><![CDATA[Do you really want to delete the trophy <span class="confirmationObject">{$trophy->getTitle()}</span>?]]></item>
+ </category>
+
<category name="wcf.user.usersOnline">
<item name="wcf.user.usersOnline"><![CDATA[Users Online]]></item>
<item name="wcf.user.usersOnline.detail"><![CDATA[