Bug 7833 - unique holiday link broken
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Sat, 14 Apr 2012 15:50:51 +0000 (17:50 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 19 Apr 2012 08:54:00 +0000 (10:54 +0200)
As Nicole stated on the bug the branchcode was missing from the links.

To test:
- add unique holidays to calendar for different branches
- click on link and check that the date is opened in the right calendar

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Clicked links for unique holidays and exceptions for
multiple branches and everything works perfectly.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt
tools/holidays.pl

index ef204d2..6e50425 100644 (file)
 <tbody>
   [% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %]
   <tr>
-  <td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% EXCEPTION_HOLIDAYS_LOO.branch %]&amp;calendardate=[% EXCEPTION_HOLIDAYS_LOO.DATE %]">[% EXCEPTION_HOLIDAYS_LOO.DATE %]</a></td>
+  <td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch %]&amp;calendardate=[% EXCEPTION_HOLIDAYS_LOO.DATE %]">[% EXCEPTION_HOLIDAYS_LOO.DATE %]</a></td>
   <td>[% EXCEPTION_HOLIDAYS_LOO.TITLE %]</td>
   <td>[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION %]</td> 
   </tr>
 <tbody>
     [% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %]
 <tr>
-  <td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% HOLIDAYS_LOO.branch %]&amp;calendardate=[% HOLIDAYS_LOO.DATE %]">[% HOLIDAYS_LOO.DATE %]</a></td>
+  <td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch %]&amp;calendardate=[% HOLIDAYS_LOO.DATE %]">[% HOLIDAYS_LOO.DATE %]</a></td>
   <td>[% HOLIDAYS_LOO.TITLE %]</td>
   <td>[% HOLIDAYS_LOO.DESCRIPTION %]</td>
 </tr>
index b3912eb..d5ace27 100755 (executable)
@@ -138,18 +138,20 @@ foreach my $yearMonthDay (keys %$single_holidays) {
     push @holidays, \%holiday;
 }
 
-$template->param(WEEK_DAYS_LOOP => \@week_days,
-        branchloop => \@branchloop, 
-        HOLIDAYS_LOOP => \@holidays,
-        EXCEPTION_HOLIDAYS_LOOP => \@exception_holidays,
-        DAY_MONTH_HOLIDAYS_LOOP => \@day_month_holidays,
-        calendardate => $calendardate,
-        keydate => $keydate,
-        branchcodes => $branchcodes,
-        branch => $branch,
-        DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
-        branchname => $branchname
-  );
+$template->param(
+    WEEK_DAYS_LOOP           => \@week_days,
+    branchloop               => \@branchloop,
+    HOLIDAYS_LOOP            => \@holidays,
+    EXCEPTION_HOLIDAYS_LOOP  => \@exception_holidays,
+    DAY_MONTH_HOLIDAYS_LOOP  => \@day_month_holidays,
+    calendardate             => $calendardate,
+    keydate                  => $keydate,
+    branchcodes              => $branchcodes,
+    branch                   => $branch,
+    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
+    branchname               => $branchname,
+    branch                   => $branch,
+);
 
 # Shows the template with the real values replaced
 output_html_with_http_headers $input, $cookie, $template->output;