[Bps-public-commit] rtx-calendar branch allow-custom-field-based-events-2 updated. 1.05-13-g39e9406

BPS Git Server git at git.bestpractical.com
Fri Sep 1 14:38:49 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rtx-calendar".

The branch, allow-custom-field-based-events-2 has been updated
       via  39e9406791591a3b49cdb192b422beb29a1bb777 (commit)
      from  d948f4745b89f7ea68e99b0deb94091686b3efb4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 39e9406791591a3b49cdb192b422beb29a1bb777
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Fri Sep 1 11:33:39 2023 -0300

    Only show legend on the context of current Search
    
    The legend of all event icons were shown on the calendar, even if the
    event was not part of the current search. This was confusing, as the
    legend was not related to the current search.

diff --git a/html/Search/Calendar.html b/html/Search/Calendar.html
index 56fcee3..d64d256 100644
--- a/html/Search/Calendar.html
+++ b/html/Search/Calendar.html
@@ -66,10 +66,13 @@ my %CalendarIcons = RT->Config->Get('CalendarIcons');
 # Sort the legend after translation
 my %CalendarIconsTranslated;
 my $LegendLabel;
+LEGEND:
 foreach my $legend (sort { lc($a) cmp lc($b) } keys %CalendarIcons) {
   my @LegendLabels = split ',', $legend;
   $LegendLabel = join ', ',
     map {
+      my $label = $_;
+      next LEGEND unless ( grep { $label eq $_ } @Dates );
       $_ =~ s/^\s+|\s+$//g;
       $_ =~ s/^CF\.\{(.*)\}/$1/;
       $_ = 'Last Updated' if $_ eq 'LastUpdated';

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

Summary of changes:
 html/Search/Calendar.html | 3 +++
 1 file changed, 3 insertions(+)


hooks/post-receive
-- 
rtx-calendar


More information about the Bps-public-commit mailing list