|
1 | 1 | {capture append='headContent'} |
2 | | - {if $pageNo < $pages} |
3 | | - <link rel="next" href="{link controller='ArticleList'}pageNo={@$pageNo+1}{/link}"> |
| 2 | + {if $listView->getPageNo() < $listView->countPages()} |
| 3 | + <link rel="next" href="{link controller='ArticleList'}pageNo={$listView->getPageNo() + 1}{/link}"> |
4 | 4 | {/if} |
5 | | - {if $pageNo > 1} |
6 | | - <link rel="prev" href="{link controller='ArticleList'}{if $pageNo > 2}pageNo={@$pageNo-1}{/if}{/link}"> |
| 5 | + {if $listView->getPageNo() > 1} |
| 6 | + <link rel="prev" href="{link controller='ArticleList'}{if $listView->getPageNo() > 2}pageNo={$listView->getPageNo() - 1}{/if}{/link}"> |
7 | 7 | {/if} |
8 | 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}"> |
| 9 | + {if $__wcf->user->userID} |
| 10 | + <link rel="alternate" type="application/rss+xml" title="{lang}wcf.global.button.rss{/lang}" href="{link controller='ArticleRssFeed'}at={$__wcf->user->userID}-{$__wcf->user->accessToken}{/link}"> |
11 | 11 | {else} |
12 | 12 | <link rel="alternate" type="application/rss+xml" title="{lang}wcf.global.button.rss{/lang}" href="{link controller='ArticleRssFeed'}{/link}"> |
13 | 13 | {/if} |
14 | 14 | {/capture} |
15 | 15 |
|
16 | 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')} |
| 17 | + {if $canManageArticles} |
18 | 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> |
| 19 | + <li><button type="button" class="button buttonPrimary jsButtonArticleAdd">{icon name='plus'} <span>{lang}wcf.acp.article.add{/lang}</span></a></li> |
20 | 20 | {else} |
21 | 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 | 22 | {/if} |
23 | 23 | {/if} |
24 | 24 | {/capture} |
25 | 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 | 26 | {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 | 27 | {if $__wcf->user->userID} |
104 | 28 | <button type="button" class="markAllAsReadButton contentInteractionButton button small jsOnly">{icon name='check'} <span>{lang}wcf.global.button.markAllAsRead{/lang}</span></button> |
105 | 29 | {/if} |
106 | 30 | {/capture} |
107 | 31 |
|
108 | 32 | {capture assign='contentInteractionDropdownItems'} |
109 | | - <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> |
| 33 | + {if $__wcf->user->userID} |
| 34 | + <li><a rel="alternate" href="{link controller='ArticleRssFeed'}at={$__wcf->user->userID}-{$__wcf->user->accessToken}{/link}" class="rssFeed">{lang}wcf.global.button.rss{/lang}</a></li> |
| 35 | + {else} |
| 36 | + <li><a rel="alternate" href="{link controller='ArticleRssFeed'}{/link}" class="rssFeed">{lang}wcf.global.button.rss{/lang}</a></li> |
| 37 | + {/if} |
110 | 38 | {/capture} |
111 | 39 |
|
112 | 40 | {include file='header'} |
113 | 41 |
|
114 | | -{if $objects|count} |
115 | | - <div class="section"> |
116 | | - {include file='articleListItems'} |
117 | | - </div> |
118 | | -{else} |
119 | | - <woltlab-core-notice type="info">{lang}wcf.global.noItems{/lang}</woltlab-core-notice> |
120 | | -{/if} |
121 | | - |
122 | | -<footer class="contentFooter"> |
123 | | - {hascontent} |
124 | | - <div class="paginationBottom"> |
125 | | - {content}{@$pagesLinks}{/content} |
126 | | - </div> |
127 | | - {/hascontent} |
128 | | - |
129 | | - {hascontent} |
130 | | - <nav class="contentFooterNavigation"> |
131 | | - <ul> |
132 | | - {content}{event name='contentFooterNavigation'}{/content} |
133 | | - </ul> |
134 | | - </nav> |
135 | | - {/hascontent} |
136 | | -</footer> |
| 42 | +<div class="section"> |
| 43 | + {unsafe:$listView->render()} |
| 44 | +</div> |
137 | 45 |
|
138 | 46 | {if $__wcf->user->userID} |
139 | 47 | <script data-relocate="true"> |
|
143 | 51 | </script> |
144 | 52 | {/if} |
145 | 53 |
|
146 | | -{if $__wcf->getSession()->getPermission('admin.content.article.canManageArticle') || $__wcf->getSession()->getPermission('admin.content.article.canManageOwnArticles') || $__wcf->getSession()->getPermission('admin.content.article.canContributeArticle')} |
| 54 | +{if $canManageArticles} |
147 | 55 | {include file='shared_articleAddDialog'} |
148 | 56 | {/if} |
149 | 57 |
|
|
0 commit comments