[Rt-commit] rt branch, 4.6/remove-cog-when-empty, created. rt-4.4.4-721-g21fafef575

Michel Rodriguez michel at bestpractical.com
Thu Jan 30 09:48:50 EST 2020


The branch, 4.6/remove-cog-when-empty has been created
        at  21fafef575b65a800a775addaa357e5df6df8c98 (commit)

- Log -----------------------------------------------------------------
commit 21fafef575b65a800a775addaa357e5df6df8c98
Author: michel <michel at bestpractical.com>
Date:   Thu Jan 30 15:17:21 2020 +0100

    Remove the cog at the top right of a history section if it is unneeded.

diff --git a/share/html/Elements/ShowHistoryHeader b/share/html/Elements/ShowHistoryHeader
index c12fce532e..7e693e1b33 100644
--- a/share/html/Elements/ShowHistoryHeader
+++ b/share/html/Elements/ShowHistoryHeader
@@ -107,6 +107,8 @@ if ( $ShowDisplayModes or $ShowTitle or $ScrollShowHistory ) {
 
 </%perl>
 % $m->callback( CallbackName => 'BeforeTitle', %ARGS, title => \$title, titleright => \$titleright );
+% # remove the cog (titleright_raw arg) if empty (no <li> element), needs to be done here, after the callback has been run
+% if ( $titleright !~ m{<li[ >]} ) { $titleright = ''; }
 <& /Widgets/TitleBoxStart, title => $title, titleright_raw => $titleright, class => 'fullwidth' &>
 % }
 

-----------------------------------------------------------------------


More information about the rt-commit mailing list