From ef722a0cc1793d5cd6ea695a1dec5b9b589d9302 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 2 Jun 2016 11:48:50 +0200 Subject: [PATCH] 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. --- com.woltlab.wcf/templates/pageHeaderSearch.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 @@