Merge branch '5.5'
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 28 Mar 2023 13:38:26 +0000 (15:38 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 28 Mar 2023 13:38:26 +0000 (15:38 +0200)
1  2 
com.woltlab.wcf/acpMenu.xml
com.woltlab.wcf/templates/articleList.tpl
wcfsetup/install/files/acp/templates/articleList.tpl
wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php
wcfsetup/install/files/lib/acp/page/ArticleListPage.class.php
wcfsetup/install/files/lib/data/article/AccessibleArticleList.class.php
wcfsetup/install/files/lib/data/article/Article.class.php

index 2ca70c8dfdb451455f9c4bb29d1330d39d8e1b4e,e9b9818e8ef643424e4e559026de1da8d3a4aaad..1b87f4feed4fcec3157d6dfa3a4aae485832cd18
                <acpmenuitem name="wcf.acp.menu.link.article.add">
                        <controller>wcf\acp\form\ArticleAddForm</controller>
                        <parent>wcf.acp.menu.link.article.list</parent>
-                       <permissions>admin.content.article.canManageArticle,admin.content.article.canContributeArticle</permissions>
+                       <permissions>admin.content.article.canManageArticle,admin.content.article.canManageOwnArticles,admin.content.article.canContributeArticle</permissions>
 -                      <icon>fa-plus</icon>
 +                      <icon>plus</icon>
                </acpmenuitem>
                <acpmenuitem name="wcf.acp.menu.link.article.category.list">
                        <controller>wcf\acp\page\ArticleCategoryListPage</controller>
index 8b1b666132b5187e1639c15c2f3f7f102a81a605,b77f914ff742fd7feadc56c5837c8af21cf06ff7..1ef60372c9a1f2e5e1d46ea73576bcc39c781050
  {/capture}
  
  {capture assign='contentHeaderNavigation'}
-       {if $__wcf->getSession()->getPermission('admin.content.article.canManageArticle') || $__wcf->getSession()->getPermission('admin.content.article.canContributeArticle')}
+       {if $__wcf->getSession()->getPermission('admin.content.article.canManageArticle') || $__wcf->getSession()->getPermission('admin.content.article.canManageOwnArticles') || $__wcf->getSession()->getPermission('admin.content.article.canContributeArticle')}
                {if $availableLanguages|count > 1}
 -                      <li><a href="#" class="button buttonPrimary jsButtonArticleAdd"><span class="icon icon16 fa-plus"></span> <span>{lang}wcf.acp.article.add{/lang}</span></a></li>
 +                      <li><a href="#" class="button buttonPrimary jsButtonArticleAdd">{icon name='plus'} <span>{lang}wcf.acp.article.add{/lang}</span></a></li>
                {else}
 -                      <li><a href="{link controller='ArticleAdd'}{/link}" class="button buttonPrimary"><span class="icon icon16 fa-plus"></span> <span>{lang}wcf.acp.article.add{/lang}</span></a></li>
 +                      <li><a href="{link controller='ArticleAdd'}{/link}" class="button buttonPrimary">{icon name='plus'} <span>{lang}wcf.acp.article.add{/lang}</span></a></li>
                {/if}
        {/if}
  {/capture}
        {/hascontent}
  </footer>
  
 -{if ARTICLE_ENABLE_VISIT_TRACKING}
 -      <script data-relocate="true">
 -              require(['WoltLabSuite/Core/Ui/Article/MarkAllAsRead'], function(UiArticleMarkAllAsRead) {
 -                      UiArticleMarkAllAsRead.init();
 -              });
 -      </script>
 -{/if}
 +<script data-relocate="true">
 +      require(['WoltLabSuite/Core/Ui/Article/MarkAllAsRead'], function(UiArticleMarkAllAsRead) {
 +              UiArticleMarkAllAsRead.init();
 +      });
 +</script>
  
- {if $__wcf->getSession()->getPermission('admin.content.article.canManageArticle') || $__wcf->getSession()->getPermission('admin.content.article.canContributeArticle')}
+ {if $__wcf->getSession()->getPermission('admin.content.article.canManageArticle') || $__wcf->getSession()->getPermission('admin.content.article.canManageOwnArticles') || $__wcf->getSession()->getPermission('admin.content.article.canContributeArticle')}
        {include file='articleAddDialog'}
  {/if}
  
index c67a6578d0298c6e33c1707f176bc330a9419045,a562f818441c642a7b0363e03be283e1f2412b9a..7742f431c08773f918bdabc8ea66997c2b00a232
                                        <tr class="jsArticleRow jsClipboardObject" data-object-id="{@$article->articleID}">
                                                <td class="columnMark"><input type="checkbox" class="jsClipboardItem" data-object-id="{@$article->articleID}"></td>
                                                <td class="columnIcon">
-                                                       <a href="{link controller='ArticleEdit' id=$article->articleID}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip">{icon name='pencil'}</a>
+                                                       {if $article->canEdit()}
 -                                                              <a href="{link controller='ArticleEdit' id=$article->articleID}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon16 fa-pencil"></span></a>
++                                                              <a href="{link controller='ArticleEdit' id=$article->articleID}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip">{icon name='pencil'}</a>
+                                                       {else}
 -                                                              <span class="icon icon16 fa-pencil disabled" title="{lang}wcf.global.button.edit{/lang}"></span>
++                                                              <span class="disabled" title="{lang}wcf.global.button.edit{/lang}">
++                                                                      {icon name='pencil'}
++                                                              </span>
+                                                       {/if}
                                                        {if $article->canDelete()}
 -                                                              <a href="#" class="jsButtonRestore jsTooltip" title="{lang}wcf.global.button.restore{/lang}" data-confirm-message-html="{lang __encode=true}wcf.acp.article.restore.confirmMessage{/lang}"{if !$article->isDeleted} style="display: none"{/if}><span class="icon icon16 fa-refresh"></span></a>
 -                                                              <a href="#" class="jsButtonDelete jsTooltip" title="{lang}wcf.global.button.delete{/lang}" data-confirm-message-html="{lang __encode=true}wcf.acp.article.delete.confirmMessage{/lang}"{if !$article->isDeleted} style="display: none"{/if}><span class="icon icon16 fa-times"></span></a>
 -                                                              <a href="#" class="jsButtonTrash jsTooltip" title="{lang}wcf.global.button.trash{/lang}" data-confirm-message-html="{lang __encode=true}wcf.acp.article.trash.confirmMessage{/lang}"{if $article->isDeleted} style="display: none"{/if}><span class="icon icon16 fa-times"></span></a>
 +                                                              <a href="#" class="jsButtonRestore jsTooltip" title="{lang}wcf.global.button.restore{/lang}" data-confirm-message-html="{lang __encode=true}wcf.acp.article.restore.confirmMessage{/lang}"{if !$article->isDeleted} style="display: none"{/if}>{icon name='arrows-rotate'}</a>
 +                                                              <a href="#" class="jsButtonDelete jsTooltip" title="{lang}wcf.global.button.delete{/lang}" data-confirm-message-html="{lang __encode=true}wcf.acp.article.delete.confirmMessage{/lang}"{if !$article->isDeleted} style="display: none"{/if}>{icon name='xmark'}</a>
 +                                                              <a href="#" class="jsButtonTrash jsTooltip" title="{lang}wcf.global.button.trash{/lang}" data-confirm-message-html="{lang __encode=true}wcf.acp.article.trash.confirmMessage{/lang}"{if $article->isDeleted} style="display: none"{/if}>{icon name='xmark'}</a>
                                                        {else}
 -                                                              <span class="icon icon16 fa-times disabled" title="{lang}wcf.global.button.delete{/lang}"></span>
 +                                                              <span class="disabled" title="{lang}wcf.global.button.delete{/lang}">
 +                                                                      {icon name='xmark'}
 +                                                              </span>
                                                        {/if}
                                                        
 -                                                      <a href="{$article->getLink()}" title="{lang}wcf.acp.article.button.viewArticle{/lang}" class="jsTooltip"><span class="icon icon16 fa-search"></span></a>
 +                                                      <a href="{$article->getLink()}" title="{lang}wcf.acp.article.button.viewArticle{/lang}" class="jsTooltip">{icon name='magnifying-glass'}</a>
                                                        
                                                        {event name='rowButtons'}
                                                </td>