From: Alexander Ebert Date: Thu, 2 Jun 2016 09:48:50 +0000 (+0200) Subject: Ability to assign custom search dropdown label X-Git-Tag: 3.0.0_Beta_1~1543 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ef722a0cc1793d5cd6ea695a1dec5b9b589d9302;p=GitHub%2FWoltLab%2FWCF.git Ability to assign custom search dropdown label This label is verified through JavaScript, but can be used to set a custom label that is actually valid but represents a parameter-based subtype of an existing type. For instance Burning Board has the type 'forum' but also special subtypes to search a thread/board, but this causes the label to read 'forum' until the JS kicks in and changes it if necessary. Statically setting the correct label ahead of time prevents flickering. --- diff --git a/com.woltlab.wcf/templates/pageHeaderSearch.tpl b/com.woltlab.wcf/templates/pageHeaderSearch.tpl index 1dfe96def0..57db8fc972 100644 --- a/com.woltlab.wcf/templates/pageHeaderSearch.tpl +++ b/com.woltlab.wcf/templates/pageHeaderSearch.tpl @@ -1,4 +1,7 @@ {capture assign='__searchLink'}{link controller='Search'}{/link}{/capture} +{if $__searchTypeLabel|empty} + {capture assign='__searchTypeLabel'}{lang}wcf.search.type.{if !$__searchObjectTypeName|empty}{@$__searchObjectTypeName}{else}everywhere{/if}{/lang}{/capture} +{/if} {event name='settings'} @@ -6,7 +9,7 @@