From: Joshua Rüsweg Date: Wed, 5 Jul 2017 19:51:59 +0000 (+0200) Subject: Add trophy list page X-Git-Tag: 3.1.0_Alpha_1~298 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2c1e49571a375a1e2583e5b50461d0bc5298230c;p=GitHub%2FWoltLab%2FWCF.git Add trophy list page See #2315 --- diff --git a/com.woltlab.wcf/acpMenu.xml b/com.woltlab.wcf/acpMenu.xml index 7e221ac89d..f8395b3ca2 100644 --- a/com.woltlab.wcf/acpMenu.xml +++ b/com.woltlab.wcf/acpMenu.xml @@ -313,6 +313,12 @@ module_trophy fa-plus + + wcf\acp\page\TrophyListPage + wcf.acp.menu.link.trophy + admin.trophy.canManageTrophy + module_trophy + diff --git a/wcfsetup/install/files/acp/templates/trophyList.tpl b/wcfsetup/install/files/acp/templates/trophyList.tpl new file mode 100644 index 0000000000..5f42ba77ab --- /dev/null +++ b/wcfsetup/install/files/acp/templates/trophyList.tpl @@ -0,0 +1,87 @@ +{include file='header' pageTitle='wcf.acp.menu.link.trophy.list'} + + + +
+
+

{lang}wcf.acp.menu.link.trophy.list{/lang}

+
+ + +
+{hascontent} +
+ {content} + {pages print=true assign=pagesLinks controller='TrophyList' link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder"} + {/content} +
+{/hascontent} + +{if $objects|count} +
+ + + + + + + + + {event name='columnHeads'} + + + + + {foreach from=$objects item=trophy} + + + + + + + + {event name='columns'} + + {/foreach} + +
{lang}wcf.global.objectID{/lang}{lang}wcf.global.title{/lang}{lang}wcf.acp.trophy.category{/lang}
+ + + + {@$trophy->trophyID}{@$trophy->renderTrophy(32)}{$trophy->getTitle()}{$trophy->getCategory()->getTitle()}
+ +
+ + +{else} +

{lang}wcf.global.noItems{/lang}

+{/if} + +{include file='footer'} diff --git a/wcfsetup/install/files/lib/acp/page/TrophyListPage.class.php b/wcfsetup/install/files/lib/acp/page/TrophyListPage.class.php new file mode 100644 index 0000000000..9a93bc9434 --- /dev/null +++ b/wcfsetup/install/files/lib/acp/page/TrophyListPage.class.php @@ -0,0 +1,50 @@ + + * @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']; +} diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index e3aec1dfd1..e183d78b46 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -850,6 +850,7 @@ + @@ -3576,6 +3577,11 @@ Die E-Mail-Adresse des neuen Benutzers lautet: {@$user->email}

Quelle: Mustervorlage.net

]]>
+ + + {trophy->getTitle()} wirklich löschen?]]> + + + @@ -3563,6 +3564,11 @@ Open the link below to access the user profile:

Source: Mustervorlage.net

]]>
+ + + {$trophy->getTitle()}?]]> + +