Commit | Line | Data |
---|---|---|
dcc2332d MW |
1 | {include file='header' pageTitle='wcf.acp.smiley.list'} |
2 | ||
3 | {if $objects|count} | |
9543d9fe | 4 | <script data-relocate="true"> |
d5a0a8ff AE |
5 | require(['WoltLabSuite/Core/Ui/Sortable/List'], function (UiSortableList) { |
6 | new UiSortableList({ | |
7 | containerId: 'smileyList', | |
8 | className: 'wcf\\data\\smiley\\SmileyAction', | |
9 | offset: {@$startIndex} | |
10 | }); | |
11 | }); | |
12 | ||
dcc2332d MW |
13 | $(function() { |
14 | new WCF.Action.Delete('wcf\\data\\smiley\\SmileyAction', $('.smileyRow')); | |
dcc2332d | 15 | }); |
dcc2332d MW |
16 | </script> |
17 | {/if} | |
18 | ||
95961bdf | 19 | <header class="contentHeader"> |
b5c94e9e AE |
20 | <div class="contentHeaderTitle"> |
21 | <h1 class="contentTitle">{lang}wcf.acp.smiley.list{/lang}</h1> | |
22 | </div> | |
dcc2332d | 23 | |
b5c94e9e | 24 | <nav class="contentHeaderNavigation"> |
dcc2332d | 25 | <ul> |
f2b50825 | 26 | <li><a href="{link controller='SmileyAdd'}{/link}" class="button"><span class="icon icon16 fa-plus"></span> <span>{lang}wcf.acp.smiley.add{/lang}</span></a></li> |
dcc2332d | 27 | |
b5c94e9e | 28 | {event name='contentHeaderNavigation'} |
dcc2332d MW |
29 | </ul> |
30 | </nav> | |
b5c94e9e AE |
31 | </header> |
32 | ||
33 | {hascontent} | |
34 | <div class="paginationTop"> | |
35 | {content}{pages print=true assign=pagesLinks controller="SmileyList" object=$category link="pageNo=%d"}{/content} | |
36 | </div> | |
37 | {/hascontent} | |
38 | ||
dcc2332d | 39 | {if $smileyCount} |
340d8c50 MW |
40 | <div class="section tabMenuContainer staticTabMenuContainer"> |
41 | <nav class="tabMenu"> | |
dcc2332d MW |
42 | <ul> |
43 | {foreach from=$categories item=categoryLoop} | |
340d8c50 | 44 | <li{if (!$category && !$categoryLoop->categoryID) || ($category && $category->categoryID == $categoryLoop->categoryID)} class="active"{/if}><a href="{if $categoryLoop->categoryID}{link controller='SmileyList' object=$categoryLoop}{/link}{else}{link controller='SmileyList'}{/link}{/if}">{$categoryLoop->title|language}</a></li> |
dcc2332d MW |
45 | {/foreach} |
46 | </ul> | |
47 | </nav> | |
340d8c50 MW |
48 | <div class="tabMenuContent"> |
49 | <section id="smileyList" class="sortableListContainer"> | |
50 | {if $objects|count} | |
51 | <ol class="sortableList" data-object-id="0" start="{@($pageNo - 1) * $itemsPerPage + 1}"> | |
52 | {foreach from=$objects item=smiley} | |
53 | <li class="sortableNode sortableNoNesting smileyRow" data-object-id="{@$smiley->smileyID}"> | |
54 | <span class="sortableNodeLabel"> | |
d4da0d92 | 55 | <a href="{link controller='SmileyEdit' id=$smiley->smileyID}{/link}">{@$smiley->getHtml()} {lang}{$smiley->smileyTitle}{/lang}</a> <span class="badge">{$smiley->smileyCode}</span>{foreach from=$smiley->getAliases() item='alias'} <span class="badge" style="margin-left: 5px">{$alias}</span>{/foreach} |
dcc2332d | 56 | |
340d8c50 | 57 | <span class="statusDisplay sortableButtonContainer"> |
d5a0a8ff | 58 | <span class="icon icon16 fa-arrows sortableNodeHandle"></span> |
340d8c50 MW |
59 | <a href="{link controller='SmileyEdit' id=$smiley->smileyID}{/link}"><span title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip icon icon16 fa-pencil"></a> |
60 | <span title="{lang}wcf.global.button.delete{/lang}" class="jsDeleteButton jsTooltip icon icon16 fa-times" data-object-id="{@$smiley->smileyID}" data-confirm-message-html="{lang __encode=true}wcf.acp.smiley.delete.sure{/lang}"> | |
61 | ||
62 | {event name='itemButtons'} | |
63 | </span> | |
dcc2332d | 64 | </span> |
340d8c50 MW |
65 | <ol class="sortableList" data-object-id="{@$smiley->smileyID}"></ol> |
66 | </li> | |
67 | {/foreach} | |
68 | </ol> | |
69 | <div class="formSubmit"> | |
70 | <button class="button" data-type="submit">{lang}wcf.global.button.submit{/lang}</button> | |
71 | </div> | |
72 | {else} | |
73 | <p class="info">{lang}wcf.global.noItems{/lang}</p> | |
74 | {/if} | |
75 | </section> | |
fe17bd5f | 76 | </div> |
dcc2332d | 77 | </div> |
0181a6fb MW |
78 | |
79 | <footer class="contentFooter"> | |
80 | {hascontent} | |
81 | <div class="paginationBottom"> | |
82 | {content}{@$pagesLinks}{/content} | |
83 | </div> | |
84 | {/hascontent} | |
85 | ||
86 | {hascontent} | |
87 | <nav class="contentFooterNavigation"> | |
88 | <ul> | |
89 | {content} | |
90 | {event name='contentFooterNavigation'} | |
91 | {/content} | |
92 | </ul> | |
93 | </nav> | |
94 | {/hascontent} | |
95 | </footer> | |
dcc2332d | 96 | {else} |
1e3626d5 | 97 | <p class="info">{lang}wcf.global.noItems{/lang}</p> |
dcc2332d MW |
98 | {/if} |
99 | ||
100 | {include file='footer'} |