Add generic position for share button in the content interaction section
authorMarcel Werk <burntime@woltlab.com>
Wed, 19 Apr 2023 14:43:37 +0000 (16:43 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 19 Apr 2023 14:43:37 +0000 (16:43 +0200)
com.woltlab.wcf/templates/contentInteraction.tpl
wcfsetup/install/files/style/layout/content.scss

index 851a2ff127589982a63c7bf621b30cdf8d1052cf..c851535757e8c6a16df2515aa810fd6fca56099a 100644 (file)
@@ -1,52 +1,63 @@
 {if !$beforeContentInteraction|empty}
-    {@$beforeContentInteraction}
+       {@$beforeContentInteraction}
 {/if}
 
 {capture assign='__contentInteractionPagination'}
-    {if $contentInteractionPagination|isset}{@$contentInteractionPagination}{/if}
+       {if $contentInteractionPagination|isset}{@$contentInteractionPagination}{/if}
 {/capture}
 {assign var='__contentInteractionPagination' value=$__contentInteractionPagination|trim}
 
 {capture assign='__contentInteractionButtons'}
-    {event name='beforeButtons'}
-    {if $contentInteractionButtons|isset}{@$contentInteractionButtons}{/if}
-    {event name='afterButtons'}
+       {event name='beforeButtons'}
+       {if $contentInteractionButtons|isset}{@$contentInteractionButtons}{/if}
+       {event name='afterButtons'}
 {/capture}
 {assign var='__contentInteractionButtons' value=$__contentInteractionButtons|trim}
 
 {capture assign='__contentInteractionDropdownItems'}
-    {event name='beforeDropdownItems'}
-    {if $contentInteractionDropdownItems|isset}{@$contentInteractionDropdownItems}{/if}
-    {event name='afterDropdownItems'}
+       {event name='beforeDropdownItems'}
+       {if $contentInteractionDropdownItems|isset}{@$contentInteractionDropdownItems}{/if}
+       {event name='afterDropdownItems'}
 {/capture}
 {assign var='__contentInteractionDropdownItems' value=$__contentInteractionDropdownItems|trim}
 
-{if $__contentInteractionPagination || $__contentInteractionButtons || $__contentInteractionDropdownItems}
-    <div class="contentInteraction">
-        {if $__contentInteractionPagination}
-               <div class="contentInteractionPagination paginationTop">
-                       {@$__contentInteractionPagination}
-               </div>
-       {/if}
-
-        {if $__contentInteractionButtons || $__contentInteractionDropdownItems}
-            <div class="contentInteractionButtonContainer">
-                {if $__contentInteractionButtons}
-                    <div class="contentInteractionButtons">
-                        {@$__contentInteractionButtons}
-                    </div>
-                {/if}
-
-                {if $__contentInteractionDropdownItems}
-                    <div class="contentInteractionDropdown dropdown jsOnly">
-                        <button type="button" class="button small dropdownToggle" aria-label="{lang}wcf.global.button.more{/lang}">{icon name='ellipsis-vertical'}</button>
-
-                        <ul class="contentInteractionDropdownItems dropdownMenu">
-                            {@$__contentInteractionDropdownItems}
-                        </ul>
-                    </div>
-                {/if}
-            </div>
-        {/if}
-    </div>
+{capture assign='__contentInteractionShareButton'}
+       {if $contentInteractionShareButton|isset}{@$contentInteractionShareButton}{/if}
+{/capture}
+{assign var='__contentInteractionShareButton' value=$__contentInteractionShareButton|trim}
+
+{if $__contentInteractionPagination || $__contentInteractionButtons || $__contentInteractionDropdownItems || $__contentInteractionShareButton}
+       <div class="contentInteraction">
+               {if $__contentInteractionPagination}
+                       <div class="contentInteractionPagination paginationTop">
+                               {@$__contentInteractionPagination}
+                       </div>
+               {/if}
+
+               {if $__contentInteractionButtons || $__contentInteractionDropdownItems || $__contentInteractionShareButton}
+                       <div class="contentInteractionButtonContainer">
+                               {if $__contentInteractionButtons}
+                                       <div class="contentInteractionButtons">
+                                               {@$__contentInteractionButtons}
+                                       </div>
+                               {/if}
+
+                               {if $__contentInteractionShareButton}
+                                        <div class="contentInteractionShareButton">
+                                               {@$__contentInteractionShareButton}
+                                       </div>
+                               {/if}
+
+                               {if $__contentInteractionDropdownItems}
+                                       <div class="contentInteractionDropdown dropdown jsOnly">
+                                               <button type="button" class="button small dropdownToggle" aria-label="{lang}wcf.global.button.more{/lang}">{icon name='ellipsis-vertical'}</button>
+
+                                               <ul class="contentInteractionDropdownItems dropdownMenu">
+                                                       {@$__contentInteractionDropdownItems}
+                                               </ul>
+                                       </div>
+                               {/if}
+                       </div>
+               {/if}
+       </div>
 {/if}
index f7abca6864a01dcffd033dec2473f54dd2a38f82..46a57abfaff5de8c1624be1a22b702270bd7e143 100644 (file)
@@ -486,6 +486,12 @@ fieldset {
        margin-left: 1px;
 }
 
+.contentInteractionShareButton {
+       display: flex;
+       flex: 1 auto;
+       margin-left: 5px;
+}
+
 .contentInteractionDropdown {
        display: flex;
        flex: 1 auto;