| 1 | {capture append='headContent'} |
| 2 | {if $pageNo < $pages} |
| 3 | <link rel="next" href="{link controller='ArticleList'}pageNo={@$pageNo+1}{/link}"> |
| 4 | {/if} |
| 5 | {if $pageNo > 1} |
| 6 | <link rel="prev" href="{link controller='ArticleList'}{if $pageNo > 2}pageNo={@$pageNo-1}{/if}{/link}"> |
| 7 | {/if} |
| 8 | |
| 9 | {if $__wcf->getUser()->userID} |
| 10 | <link rel="alternate" type="application/rss+xml" title="{lang}wcf.global.button.rss{/lang}" href="{link controller='ArticleRssFeed'}at={@$__wcf->getUser()->userID}-{@$__wcf->getUser()->accessToken}{/link}"> |
| 11 | {else} |
| 12 | <link rel="alternate" type="application/rss+xml" title="{lang}wcf.global.button.rss{/lang}" href="{link controller='ArticleRssFeed'}{/link}"> |
| 13 | {/if} |
| 14 | {/capture} |
| 15 | |
| 16 | {capture assign='contentHeaderNavigation'} |
| 17 | {if $__wcf->getSession()->getPermission('admin.content.article.canManageArticle') || $__wcf->getSession()->getPermission('admin.content.article.canManageOwnArticles') || $__wcf->getSession()->getPermission('admin.content.article.canContributeArticle')} |
| 18 | {if $availableLanguages|count > 1} |
| 19 | <li><a href="#" class="button buttonPrimary jsButtonArticleAdd">{icon name='plus'} <span>{lang}wcf.acp.article.add{/lang}</span></a></li> |
| 20 | {else} |
| 21 | <li><a href="{link controller='ArticleAdd'}{/link}" class="button buttonPrimary">{icon name='plus'} <span>{lang}wcf.acp.article.add{/lang}</span></a></li> |
| 22 | {/if} |
| 23 | {/if} |
| 24 | {/capture} |
| 25 | |
| 26 | {capture assign='sidebarRight'} |
| 27 | {if !$labelGroups|empty} |
| 28 | <form id="sidebarForm" method="post" action="{link application='wcf' controller=$controllerName object=$controllerObject}{/link}"> |
| 29 | <section class="box"> |
| 30 | <h2 class="boxTitle">{lang}wcf.label.label{/lang}</h2> |
| 31 | |
| 32 | <div class="boxContent"> |
| 33 | <dl> |
| 34 | {include file='__labelSelection'} |
| 35 | </dl> |
| 36 | <div class="formSubmit"> |
| 37 | <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s"> |
| 38 | </div> |
| 39 | </div> |
| 40 | </section> |
| 41 | </form> |
| 42 | |
| 43 | <script data-relocate="true"> |
| 44 | $(function() { |
| 45 | WCF.Language.addObject({ |
| 46 | 'wcf.label.none': '{jslang}wcf.label.none{/jslang}', |
| 47 | 'wcf.label.withoutSelection': '{jslang}wcf.label.withoutSelection{/jslang}' |
| 48 | }); |
| 49 | |
| 50 | new WCF.Label.Chooser({ {implode from=$labelIDs key=groupID item=labelID}{@$groupID}: {@$labelID}{/implode} }, '#sidebarForm', undefined, true); |
| 51 | }); |
| 52 | </script> |
| 53 | {/if} |
| 54 | {/capture} |
| 55 | |
| 56 | {assign var='additionalLinkParameters' value=''} |
| 57 | {if $user}{capture append='additionalLinkParameters'}&userID={@$user->userID}{/capture}{/if} |
| 58 | {if $labelIDs|count}{capture append='additionalLinkParameters'}{foreach from=$labelIDs key=labelGroupID item=labelID}&labelIDs[{@$labelGroupID}]={@$labelID}{/foreach}{/capture}{/if} |
| 59 | |
| 60 | {capture assign='contentInteractionPagination'} |
| 61 | {pages print=true assign='pagesLinks' controller='ArticleList' link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder$additionalLinkParameters"} |
| 62 | {/capture} |
| 63 | |
| 64 | {capture assign='contentInteractionButtons'} |
| 65 | <div class="contentInteractionButton dropdown jsOnly"> |
| 66 | <button type="button" class="button small dropdownToggle"> |
| 67 | {if $sortOrder === 'ASC'} |
| 68 | {icon name='arrow-down-short-wide'} |
| 69 | {else} |
| 70 | {icon name='arrow-down-wide-short'} |
| 71 | {/if} |
| 72 | <span>{lang}wcf.article.button.sort{/lang}</span> |
| 73 | </button> |
| 74 | <ul class="dropdownMenu"> |
| 75 | <li> |
| 76 | <a href="{link controller='ArticleList'}pageNo={@$pageNo}{if $user}&userID={@$user->userID}{/if}&sortField=title&sortOrder={if $sortField == 'title' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}"> |
| 77 | {lang}wcf.global.title{/lang} |
| 78 | {if $sortField == 'title'} |
| 79 | {if $sortOrder === 'ASC'} |
| 80 | {icon name='caret-up' type='solid'} |
| 81 | {else} |
| 82 | {icon name='caret-down' type='solid'} |
| 83 | {/if} |
| 84 | {/if} |
| 85 | </a> |
| 86 | </li> |
| 87 | <li> |
| 88 | <a href="{link controller='ArticleList'}pageNo={@$pageNo}{if $user}&userID={@$user->userID}{/if}&sortField=time&sortOrder={if $sortField == 'time' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}"> |
| 89 | {lang}wcf.global.date{/lang} |
| 90 | {if $sortField == 'time'} |
| 91 | {if $sortOrder === 'ASC'} |
| 92 | {icon name='caret-up' type='solid'} |
| 93 | {else} |
| 94 | {icon name='caret-down' type='solid'} |
| 95 | {/if} |
| 96 | {/if} |
| 97 | </a> |
| 98 | </li> |
| 99 | |
| 100 | {event name='sortOptions'} |
| 101 | </ul> |
| 102 | </div> |
| 103 | <button type="button" class="markAllAsReadButton contentInteractionButton button small jsOnly">{icon name='check'} <span>{lang}wcf.global.button.markAllAsRead{/lang}</span></button> |
| 104 | {/capture} |
| 105 | |
| 106 | {capture assign='contentInteractionDropdownItems'} |
| 107 | <li><a rel="alternate" href="{if $__wcf->getUser()->userID}{link controller='ArticleRssFeed'}at={@$__wcf->getUser()->userID}-{@$__wcf->getUser()->accessToken}{/link}{else}{link controller='ArticleRssFeed'}{/link}{/if}" class="rssFeed">{lang}wcf.global.button.rss{/lang}</a></li> |
| 108 | {/capture} |
| 109 | |
| 110 | {include file='header'} |
| 111 | |
| 112 | {if $objects|count} |
| 113 | <div class="section"> |
| 114 | {include file='articleListItems'} |
| 115 | </div> |
| 116 | {else} |
| 117 | <woltlab-core-notice type="info">{lang}wcf.global.noItems{/lang}</woltlab-core-notice> |
| 118 | {/if} |
| 119 | |
| 120 | <footer class="contentFooter"> |
| 121 | {hascontent} |
| 122 | <div class="paginationBottom"> |
| 123 | {content}{@$pagesLinks}{/content} |
| 124 | </div> |
| 125 | {/hascontent} |
| 126 | |
| 127 | {hascontent} |
| 128 | <nav class="contentFooterNavigation"> |
| 129 | <ul> |
| 130 | {content}{event name='contentFooterNavigation'}{/content} |
| 131 | </ul> |
| 132 | </nav> |
| 133 | {/hascontent} |
| 134 | </footer> |
| 135 | |
| 136 | <script data-relocate="true"> |
| 137 | require(['WoltLabSuite/Core/Ui/Article/MarkAllAsRead'], ({ setup }) => { |
| 138 | setup(); |
| 139 | }); |
| 140 | </script> |
| 141 | |
| 142 | {if $__wcf->getSession()->getPermission('admin.content.article.canManageArticle') || $__wcf->getSession()->getPermission('admin.content.article.canManageOwnArticles') || $__wcf->getSession()->getPermission('admin.content.article.canContributeArticle')} |
| 143 | {include file='shared_articleAddDialog'} |
| 144 | {/if} |
| 145 | |
| 146 | {include file='footer'} |