From fe750dce63749f1653595e82d32b45291d04b9a8 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 27 Apr 2022 15:19:06 +0200 Subject: [PATCH] Avoid empty content interaction elements to avoid obsolete margin --- .../templates/contentInteraction.tpl | 71 +++++++++++-------- 1 file changed, 43 insertions(+), 28 deletions(-) diff --git a/com.woltlab.wcf/templates/contentInteraction.tpl b/com.woltlab.wcf/templates/contentInteraction.tpl index 0777c18cae..17070b97e5 100644 --- a/com.woltlab.wcf/templates/contentInteraction.tpl +++ b/com.woltlab.wcf/templates/contentInteraction.tpl @@ -2,36 +2,51 @@ {@$beforeContentInteraction} {/if} -
- {hascontent} -
- {content}{if $contentInteractionPagination|isset}{@$contentInteractionPagination}{/if}{/content} -
- {/hascontent} +{capture assign='__contentInteractionPagination'} + {if $contentInteractionPagination|isset}{@$contentInteractionPagination}{/if} +{/capture} +{assign var='__contentInteractionPagination' value=$__contentInteractionPagination|trim} -
- {hascontent} -
- {content} - {event name='beforeButtons'} - {if $contentInteractionButtons|isset}{@$contentInteractionButtons}{/if} - {event name='afterButtons'} - {/content} -
- {/hascontent} +{capture assign='__contentInteractionButtons'} + {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'} +{/capture} +{assign var='__contentInteractionDropdownItems' value=$__contentInteractionDropdownItems|trim} + +{if $__contentInteractionPagination || $__contentInteractionButtons || $__contentInteractionDropdownItems} +
+ {if $__contentInteractionPagination} +
+ {@$__contentInteractionPagination} +
+ {/if} - {hascontent} - -
+{/if} -- 2.20.1