Bug 15453: Assign the correct shelfid to the download list links
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 31 Dec 2015 11:11:51 +0000 (11:11 +0000)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Thu, 7 Jan 2016 18:54:34 +0000 (18:54 +0000)
Introduced by bug 14544, the shelfnumber is not correctly passed to the
template.
The shelf variable is passed to the template, to access the shelfnumber,
we need to get shelf.shelfnumber.

Test plan:
At the intranet, try to download a list.
Without this patch it won't work.

Followed test plan, works as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc

index e43cf13..be58db0 100644 (file)
         <div class="btn-group">
             <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="fa fa-download"></i> Download list <span class="caret"></span></button>
                 <ul class="dropdown-menu">
-                    <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=iso2709&amp;shelfid=[% shelfnumber %]">iso2709</a></li>
-                    <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=ris&amp;shelfid=[% shelfnumber %]">RIS</a></li>
-                    <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=bibtex&amp;shelfid=[% shelfnumber %]">BibTex</a></li>
+                    <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=iso2709&amp;shelfid=[% shelf.shelfnumber %]">iso2709</a></li>
+                    <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=ris&amp;shelfid=[% shelf.shelfnumber %]">RIS</a></li>
+                    <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=bibtex&amp;shelfid=[% shelf.shelfnumber %]">BibTex</a></li>
                     [% FOREACH csv_profile IN csv_profiles %]
-                        <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=[% csv_profile.export_format_id %]&amp;shelfid=[% shelfnumber %]">CSV - [% csv_profile.profile %]</a></li>
+                        <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=[% csv_profile.export_format_id %]&amp;shelfid=[% shelf.shelfnumber %]">CSV - [% csv_profile.profile %]</a></li>
                     [% END %]
                 </ul>
         </div>