Bug 7317: Display all the libraries, not only one
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 9 Nov 2017 16:25:13 +0000 (13:25 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 9 Nov 2017 16:31:10 +0000 (13:31 -0300)
Before this patch only the first library defined in the system where
displayed.
TODO: Make sure we want to display all the libraries and not a
"filtered" list
see `git grep PROCESS options_for_libraries libraries|grep unfiltered`

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

ill/ill-requests.pl
koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt

index 034ce02..029fa49 100755 (executable)
@@ -249,7 +249,7 @@ $template->param(
     backends   => $backends,
     media      => [ "Book", "Article", "Journal" ],
     query_type => $op,
-    branches   => Koha::Libraries->search
+    branches   => scalar Koha::Libraries->search,
 );
 
 output_html_with_http_headers( $cgi, $cookie, $template->output );
index 60efd71..f167a0b 100644 (file)
                                     <input name="biblio_id" id="biblio_id" type="text" value="[% request.biblio_id %]">
                                 </li>
                                 <li class="branchcode">
-                                    <label for="branchcode" class="branchcode">Library:</label>
-                                    <select name="branchcode" id="branch">
-                                        [% FOREACH branch IN branches %]
-                                            [% IF ( branch.branchcode == request.branchcode ) %]
-                                                <option value="[% branch.branchcode %]" selected="selected">
-                                                    [% branch.branchname %]
-                                                </option>
-                                            [% ELSE %]
-                                                <option value="[% branch.branchcode %]">
-                                                    [% branch.branchname %]
-                                                </option>
-                                            [% END %]
-                                        [% END %]
+                                    <label for="library" class="branchcode">Library:</label>
+                                    <select name="branchcode" id="library">
+                                        [% PROCESS options_for_libraries libraries => Branches.all( selected => request.branchcode ) %]
                                     </select>
                                 </li>
                                 <li class="status">