Use content interactions button in user profiles (search menu)
authorMarcel Werk <burntime@woltlab.com>
Thu, 28 Apr 2022 13:43:00 +0000 (15:43 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 28 Apr 2022 13:43:00 +0000 (15:43 +0200)
com.woltlab.wcf/templates/user.tpl
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 0f0c0416b77c8584cea93d66afbbc0ee99a35769..61971cab2071a0e1e5471b7ee20718b54a6f725f 100644 (file)
                                        </li>
                                {/hascontent}
                                
-                               {hascontent}
-                                       <li class="dropdown">
-                                               <a class="jsTooltip button dropdownToggle" title="{lang}wcf.user.searchUserContent{/lang}"><span class="icon icon32 fa-search"></span> <span class="invisible">{lang}wcf.user.searchUserContent{/lang}</span></a>
-                                               <ul class="dropdownMenu userProfileButtonMenu" data-menu="search">
-                                                       {content}{event name='menuSearch'}{event name='quickSearchItems'}{/content}
-                                               </ul>
-                                       </li>
-                               {/hascontent}
-                               
                                {hascontent}
                                        <li class="dropdown">
                                                <a class="jsTooltip button dropdownToggle" title="{lang}wcf.user.profile.management{/lang}"><span class="icon icon32 fa-cog"></span> <span class="invisible">{lang}wcf.user.profile.management{/lang}</span></a>
 
 {include file='userSidebar' assign='sidebarRight'}
 
+{capture assign='__menuSearch'}
+       {event name='menuSearch'}
+       {* DEPRECATED *}{event name='quickSearchItems'}
+{/capture}
+{assign var='__menuSearch' value=$__menuSearch|trim}
+
+{capture assign='contentInteractionButtons'}
+       {if $__menuSearch}
+               <div class="contentInteractionButton dropdown jsOnly">
+                       <a href="#" class="button small dropdownToggle">{lang}wcf.user.searchUserContent{/lang}</a>
+                       <ul class="dropdownMenu userProfileButtonMenu" data-menu="search">
+                               {@$__menuSearch}
+                       </ul>
+               </div>
+       {/if}
+{/capture}
+
 {capture assign='contentInteractionDropdownItems'}
        {event name='menuInteraction'}
                                                                
index c1d00475076b743e664996a08c4f42ffbda870dc..9e2bac8d4f356cbc515dfea4322c7d4967b6499d 100644 (file)
@@ -4786,7 +4786,7 @@ sich{/if} nicht bei uns registriert {if LANGUAGE_USE_INFORMAL_VARIANT}hast{else}
                <item name="wcf.user.activityPoint.objectType.com.woltlab.wcf.like.activityPointEvent.receivedLikes"><![CDATA[Erhaltene Reaktionen]]></item>
                <item name="wcf.user.register.honeyPot"><![CDATA[Bitte ignorieren!]]></item>
                <item name="wcf.user.register.honeyPot.description"><![CDATA[Falls {if LANGUAGE_USE_INFORMAL_VARIANT}du{else}Sie{/if} dies sehen {if LANGUAGE_USE_INFORMAL_VARIANT}kannst{else}können{/if}, {if LANGUAGE_USE_INFORMAL_VARIANT}fülle{else}füllen Sie{/if} bitte die nächsten zwei Eingabefelder <strong>NICHT</strong> aus!]]></item>
-               <item name="wcf.user.searchUserContent"><![CDATA[Inhalte von {$user->username} suchen]]></item>
+               <item name="wcf.user.searchUserContent"><![CDATA[Inhalte suchen]]></item>
                <item name="wcf.user.author"><![CDATA[Autor]]></item>
                <item name="wcf.user.moderate"><![CDATA[Benutzer moderieren]]></item>
                <item name="wcf.user.ban"><![CDATA[Benutzer sperren]]></item>
index 61abe81ae7fff5be66e443deaf8762a34f1ffae7..70b21ad651df068889074908b23dda4e95a1e81d 100644 (file)
@@ -4785,7 +4785,7 @@ not register with us.]]></item>
                <item name="wcf.user.activityPoint.objectType.com.woltlab.wcf.like.activityPointEvent.receivedLikes"><![CDATA[Reactions Received]]></item>
                <item name="wcf.user.register.honeyPot"><![CDATA[Please Ignore!]]></item>
                <item name="wcf.user.register.honeyPot.description"><![CDATA[Caution! If you can view this, you are strongly encouraged <strong>NOT</strong> to fill in the next two input fields!]]></item>
-               <item name="wcf.user.searchUserContent"><![CDATA[Search for Content by {$user->username}]]></item>
+               <item name="wcf.user.searchUserContent"><![CDATA[Search Content]]></item>
                <item name="wcf.user.author"><![CDATA[Author]]></item>
                <item name="wcf.user.moderate"><![CDATA[Moderate User]]></item>
                <item name="wcf.user.ban"><![CDATA[Ban User]]></item>