From 46b8e1e432567eead39ad7fec6d4b4879ca795da Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 7 Jun 2016 17:52:30 +0200 Subject: [PATCH] Improved article search --- com.woltlab.wcf/templates/pageHeaderSearch.tpl | 15 +++++++++++++++ .../install/files/lib/page/ArticlePage.class.php | 1 + 2 files changed, 16 insertions(+) diff --git a/com.woltlab.wcf/templates/pageHeaderSearch.tpl b/com.woltlab.wcf/templates/pageHeaderSearch.tpl index 57db8fc972..407680a0f3 100644 --- a/com.woltlab.wcf/templates/pageHeaderSearch.tpl +++ b/com.woltlab.wcf/templates/pageHeaderSearch.tpl @@ -3,6 +3,21 @@ {capture assign='__searchTypeLabel'}{lang}wcf.search.type.{if !$__searchObjectTypeName|empty}{@$__searchObjectTypeName}{else}everywhere{/if}{/lang}{/capture} {/if} +{if MODULE_ARTICLE && ($templateName == 'articleList' || $templateName == 'categoryArticleList' || $templateName == 'article')} + {if $category|isset} + {capture assign='__searchTypeLabel'}{$category->getTitle()}{/capture} + {else} + {capture assign='__searchTypeLabel'}{lang}wcf.search.type.com.woltlab.wcf.article{/lang}{/capture} + {/if} + + {assign var='__searchObjectTypeName' value='com.woltlab.wcf.article'} + + {capture assign='__searchTypesScoped'} + {if $category|isset}
  • {$category->getTitle()}
  • {/if} + {/capture} + {assign var='__searchAreaInitialized' value=true} +{/if} + {event name='settings'}
    diff --git a/wcfsetup/install/files/lib/page/ArticlePage.class.php b/wcfsetup/install/files/lib/page/ArticlePage.class.php index c750e0194c..fcbae6e6ac 100644 --- a/wcfsetup/install/files/lib/page/ArticlePage.class.php +++ b/wcfsetup/install/files/lib/page/ArticlePage.class.php @@ -262,6 +262,7 @@ class ArticlePage extends AbstractPage { 'articleContentID' => $this->articleContentID, 'articleContent' => $this->articleContent, 'article' => $this->article, + 'category' => $this->article->getCategory(), 'previousArticle' => $this->previousArticle, 'nextArticle' => $this->nextArticle, 'commentCanAdd' => WCF::getSession()->getPermission('user.article.canAddComment'), -- 2.20.1