Fix current type of searched messages on conversation pages
authorMatthias Schmidt <gravatronics@live.com>
Mon, 12 Sep 2016 06:39:10 +0000 (08:39 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 12 Sep 2016 06:39:10 +0000 (08:39 +0200)
language/de.xml
language/en.xml
templates/__searchAreaConversationSettings.tpl

index 7a17ef73ed48ca9b0d68fdd5c51c28452419142f..c6db72075a7c82fdd3deb963b541b319b54b19bf 100644 (file)
        </category>
        
        <category name="wcf.search">
+               <item name="wcf.search.type.com.woltlab.wcf.conversation"><![CDATA[Diese Konversation]]></item>
                <item name="wcf.search.type.com.woltlab.wcf.conversation.message"><![CDATA[Konversationen]]></item>
                <item name="wcf.search.object.com.woltlab.wcf.conversation.message"><![CDATA[Konversation]]></item>
        </category>
index ce5901d294035b78516541154f77635862ae4756..461fbb9d71373366398d9deed5052331d7bf682d 100644 (file)
        </category>
        
        <category name="wcf.search">
+               <item name="wcf.search.type.com.woltlab.wcf.conversation"><![CDATA[This Conversation]]></item>
                <item name="wcf.search.type.com.woltlab.wcf.conversation.message"><![CDATA[Conversations]]></item>
                <item name="wcf.search.object.com.woltlab.wcf.conversation.message"><![CDATA[Conversation]]></item>
        </category>
index 5b9c7d4278e5c1149aae8b536e1dca23b42fdbed..532987ad9eb02fc410f1cabce1461dd1bdfa8c80 100644 (file)
@@ -1,5 +1,8 @@
 {if $__searchAreaInitialized|empty && $templateName|substr:0:12 == 'conversation'}
-       {capture assign='__searchInputPlaceholder'}{if $conversation|isset}{lang}wcf.conversation.searchConversation{/lang}{else}{lang}wcf.conversation.searchConversations{/lang}{/if}{/capture}
-       {capture assign='__searchHiddenInputFields'}<input type="hidden" name="types[]" value="com.woltlab.wcf.conversation.message">{if $conversation|isset}<input type="hidden" name="conversationID" value="{@$conversation->conversationID}">{/if}{/capture}
-       {assign var='__searchAreaInitialized' value=true}
+       {assign var='__searchObjectTypeName' value='com.woltlab.wcf.conversation.message'}
+       
+       {if $__wcf->getActivePage()->identifier == 'com.woltlab.wcf.conversation.Conversation'}
+               {capture assign='__searchTypeLabel'}{lang}wcf.search.type.com.woltlab.wcf.conversation{/lang}{/capture}
+               {capture assign='__searchTypesScoped'}<li><a href="#" data-extended-link="{link controller='Search'}types[]=com.woltlab.wcf.conversation.message{/link}" data-object-type="com.woltlab.wcf.conversation.message" data-parameters='{ "conversationID": {@$conversation->conversationID} }'>{lang}wcf.search.type.com.woltlab.wcf.conversation{/lang}</a></li>{/capture}
+       {/if}
 {/if}