Commit | Line | Data |
---|---|---|
04c06e85 MW |
1 | {include file='header' pageTitle='wcf.acp.tag.list'} |
2 | ||
9543d9fe | 3 | <script data-relocate="true"> |
a13f3b15 | 4 | require(['WoltLabSuite/Core/Controller/Clipboard', 'WoltLabSuite/Core/Language'], (ControllerClipboard, Language) => { |
9f663473 | 5 | Language.add('wcf.acp.tag.setAsSynonyms', '{jslang}wcf.acp.tag.setAsSynonyms{/jslang}'); |
38748c5e | 6 | |
a13f3b15 MS |
7 | ControllerClipboard.setup({ |
8 | pageClassName: 'wcf\\acp\\page\\TagListPage', | |
9 | hasMarkedItems: {if $hasMarkedItems}true{else}false{/if}, | |
10 | }); | |
ea3185a0 MS |
11 | |
12 | new WCF.ACP.Tag.SetAsSynonymsHandler(); | |
04c06e85 | 13 | }); |
04c06e85 MW |
14 | </script> |
15 | ||
95961bdf | 16 | <header class="contentHeader"> |
b5c94e9e | 17 | <div class="contentHeaderTitle"> |
0edfe081 | 18 | <h1 class="contentTitle">{lang}wcf.acp.tag.list{/lang}{if $items} <span class="badge badgeInverse">{#$items}</span>{/if}</h1> |
b5c94e9e AE |
19 | </div> |
20 | ||
21 | <nav class="contentHeaderNavigation"> | |
22 | <ul> | |
ab43711a | 23 | <li><a href="{link controller='TagAdd'}{/link}" class="button">{icon name='plus'} <span>{lang}wcf.acp.tag.add{/lang}</span></a></li> |
b5c94e9e AE |
24 | |
25 | {event name='contentHeaderNavigation'} | |
26 | </ul> | |
27 | </nav> | |
04c06e85 MW |
28 | </header> |
29 | ||
b54fdcc0 | 30 | {include file='shared_formError'} |
ee629b22 | 31 | |
04c06e85 | 32 | {if $items} |
f762ea4f | 33 | <form action="{link controller='TagList'}{/link}" method="post"> |
95961bdf | 34 | <section class="section"> |
976844d7 | 35 | <h2 class="sectionTitle">{lang}wcf.global.filter{/lang}</h2> |
95961bdf MW |
36 | |
37 | <dl> | |
976844d7 | 38 | <dt></dt> |
95961bdf | 39 | <dd> |
6f2bc235 | 40 | <input type="text" id="tagSearch" name="search" value="{$search}" placeholder="{lang}wcf.acp.tag.list.search.query{/lang}" autofocus class="medium"> |
95961bdf MW |
41 | </dd> |
42 | </dl> | |
43 | </section> | |
c4665540 MW |
44 | |
45 | <div class="formSubmit"> | |
e5f9b56c | 46 | <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s"> |
bb3d4ee5 | 47 | {csrfToken} |
04c06e85 MW |
48 | </div> |
49 | </form> | |
50 | {/if} | |
51 | ||
b5c94e9e AE |
52 | {hascontent} |
53 | <div class="paginationTop"> | |
54 | {content}{pages print=true assign=pagesLinks controller="TagList" link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder&search=$search"}{/content} | |
55 | </div> | |
56 | {/hascontent} | |
04c06e85 MW |
57 | |
58 | {if $objects|count} | |
95961bdf | 59 | <div class="section tabularBox"> |
1d810709 | 60 | <table class="table jsClipboardContainer jsObjectActionContainer" data-type="com.woltlab.wcf.tag" data-object-action-class-name="wcf\data\tag\TagAction"> |
04c06e85 MW |
61 | <thead> |
62 | <tr> | |
e5f9b56c | 63 | <th class="columnMark"><label><input type="checkbox" class="jsClipboardMarkAll"></label></th> |
04c06e85 MW |
64 | <th class="columnID columnTagID{if $sortField == 'tagID'} active {@$sortOrder}{/if}" colspan="2"><a href="{link controller='TagList'}pageNo={@$pageNo}&sortField=tagID&sortOrder={if $sortField == 'tagID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}&search={@$search|rawurlencode}{/link}">{lang}wcf.global.objectID{/lang}</a></th> |
65 | <th class="columnTitle columnName{if $sortField == 'name'} active {@$sortOrder}{/if}"><a href="{link controller='TagList'}pageNo={@$pageNo}&sortField=name&sortOrder={if $sortField == 'name' && $sortOrder == 'ASC'}DESC{else}ASC{/if}&search={@$search|rawurlencode}{/link}">{lang}wcf.acp.tag.name{/lang}</a></th> | |
c4665540 MW |
66 | <th class="columnDigits columnUsageCount{if $sortField == 'usageCount'} active {@$sortOrder}{/if}"><a href="{link controller='TagList'}pageNo={@$pageNo}&sortField=usageCount&sortOrder={if $sortField == 'usageCount' && $sortOrder == 'ASC'}DESC{else}ASC{/if}&search={@$search|rawurlencode}{/link}">{lang}wcf.acp.tag.usageCount{/lang}</a></th> |
67 | <th class="columnText columnLanguage{if $sortField == 'languageID'} active {@$sortOrder}{/if}"><a href="{link controller='TagList'}pageNo={@$pageNo}&sortField=languageID&sortOrder={if $sortField == 'languageID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}&search={@$search|rawurlencode}{/link}">{lang}wcf.acp.tag.languageID{/lang}</a></th> | |
04c06e85 MW |
68 | <th class="columnText columnSynonymFor">{lang}wcf.acp.tag.synonymFor{/lang}</th> |
69 | ||
70 | {event name='columnHeads'} | |
71 | </tr> | |
72 | </thead> | |
73 | ||
c7bf3ccc | 74 | <tbody class="jsReloadPageWhenEmpty"> |
04c06e85 | 75 | {foreach from=$objects item=tag} |
1d810709 | 76 | <tr class="jsTagRow jsClipboardObject jsObjectActionObject" data-object-id="{@$tag->tagID}"> |
e5f9b56c | 77 | <td class="columnMark"><input type="checkbox" class="jsClipboardItem" data-object-id="{@$tag->tagID}"></td> |
04c06e85 | 78 | <td class="columnIcon"> |
ab43711a | 79 | <a href="{link controller='TagEdit' object=$tag}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip">{icon name='pencil'}</a> |
6ca0277b | 80 | {objectAction action="delete" objectTitle=$tag->getTitle()} |
04c06e85 MW |
81 | |
82 | {event name='rowButtons'} | |
83 | </td> | |
84 | <td class="columnID">{#$tag->tagID}</td> | |
971f00fa | 85 | <td class="columnTitle columnName"><a href="{link controller='TagEdit' object=$tag}{/link}" class="badge tag">{$tag->name|tableWordwrap}</a></td> |
c4665540 | 86 | <td class="columnDigits columnUsageCount">{if $tag->synonymFor === null}{#$tag->usageCount}{/if}</td> |
04c06e85 | 87 | <td class="columnText columnLanguage">{if $tag->languageName !== null}{$tag->languageName} ({$tag->languageCode}){/if}</td> |
c4665540 | 88 | <td class="columnText columnSynonymFor">{if $tag->synonymFor !== null}<a href="{link controller='TagList'}search={@$tag->synonymName|rawurlencode}{/link}" class="badge tag">{$tag->synonymName}</a>{/if}</td> |
04c06e85 MW |
89 | |
90 | {event name='columns'} | |
91 | </tr> | |
92 | {/foreach} | |
93 | </tbody> | |
94 | </table> | |
04c06e85 MW |
95 | </div> |
96 | ||
b5c94e9e AE |
97 | <footer class="contentFooter"> |
98 | {hascontent} | |
99 | <div class="paginationBottom"> | |
100 | {content}{@$pagesLinks}{/content} | |
101 | </div> | |
102 | {/hascontent} | |
04c06e85 | 103 | |
b5c94e9e | 104 | <nav class="contentFooterNavigation"> |
04c06e85 | 105 | <ul> |
ab43711a | 106 | <li><a href="{link controller='TagAdd'}{/link}" class="button">{icon name='plus'} <span>{lang}wcf.acp.tag.add{/lang}</span></a></li> |
ea3185a0 | 107 | |
b5c94e9e | 108 | {event name='contentFooterNavigation'} |
04c06e85 MW |
109 | </ul> |
110 | </nav> | |
b5c94e9e | 111 | </footer> |
04c06e85 | 112 | {else} |
a14d7068 | 113 | <woltlab-core-notice type="info">{lang}wcf.global.noItems{/lang}</woltlab-core-notice> |
04c06e85 MW |
114 | {/if} |
115 | ||
116 | {include file='footer'} |