[Bps-public-commit] rtx-calendar branch allow-custom-field-based-events updated. 1.05-7-g8299ab5

BPS Git Server git at git.bestpractical.com
Tue Aug 22 17:45:38 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 has been updated
       via  8299ab50c7e1647b587bd3f554f7a4120ca15188 (commit)
      from  e950a511ea92100b33a002f1bba0078f2e206e3a (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 8299ab50c7e1647b587bd3f554f7a4120ca15188
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Tue Aug 22 14:44:21 2023 -0300

    Add button to Download Calendar events
    
    Add button that download the events of the calendar that are shown in the
    current view.

diff --git a/html/Search/Calendar.html b/html/Search/Calendar.html
index 3ccc107..2f7a599 100644
--- a/html/Search/Calendar.html
+++ b/html/Search/Calendar.html
@@ -56,12 +56,14 @@ $FilterOnStatusClear => undef
 % }
           </select>
       </div>
-      <div class="col-2 text-left">
+      <div class="col text-left">
 % if ($FilterOnStatus[0]) {
         <button type="submit" id="FilterOnStatusClear" name="FilterOnStatusClear"
           value="1" class="button btn btn-primary"><% loc('Clear') %></button>
 % }
         <input type="submit" value="<% loc('Filter') %>" class="button btn btn-primary" />
+        <a href="<%$RT::WebPath%>/Search/Results.tsv?<%$DownloadQueryString%>"
+          class="button btn btn-primary ml-2"><% loc('Download as Spreadsheet') %></a>
       </div>
     </div>
     </div>
@@ -344,6 +346,15 @@ $m->callback( CallbackName => 'BeforeFindTickets', ARGSRef => \%ARGS, QueryRef =
 
 my %Tickets = RTx::Calendar::FindTickets($session{'CurrentUser'}, $TempQuery, \@Dates, $date->strftime("%F"), $end->strftime("%F"));
 
+my $DownloadQueryString =
+      $m->comp(
+        '/Elements/QueryString',
+        Query   => $TempQuery,
+        Format  => $Format,
+        Order   => $Order,
+        OrderBy => $OrderBy,
+      );
+
 my %StatusesAvailable;
 for my $Dates (keys %Tickets) {
     my $TicketsOnTheDate = $Tickets{$Dates};

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

Summary of changes:
 html/Search/Calendar.html | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
rtx-calendar


More information about the Bps-public-commit mailing list