Bug 14269: OPAC: Some template improvements for the full serial history page
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Mon, 25 May 2015 10:13:08 +0000 (12:13 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 4 Jun 2015 14:06:18 +0000 (11:06 -0300)
- Fix filter labels:
  Library : -> Library:
  Subscription : -> Subscription:
- Make '(All)' entry in filter pull downs translatable
- Show branch name instead of branchcode in table and filter

To test:
- Verify changes as described above
- Verify filters still work as expected

Followed test plan. Works as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt

index f0b91c1..18e1894 100644 (file)
@@ -1,5 +1,6 @@
 [% USE Koha %]
 [% USE KohaDates %]
+[% USE Branches %]
 [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo;  Full subscription history for [% bibliotitle %]
 [% INCLUDE 'doc-head-close.inc' %]
 [% BLOCK cssinclude %]
                             <h4>Refine your search</h4>
                             <form action="/cgi-bin/koha/opac-serial-issues.pl" id="filterform">
                                 <fieldset>
-                                    <label for="libraryfilter">Library : </label>
+                                    <label for="libraryfilter">Library: </label>
                                     <select id="libraryfilter" name="libraryfilter" style="width:10em;"></select>
-
-                                    <label for="subscriptionidfilter">Subscription : </label>
+                                    <label for="subscriptionidfilter">Subscription: </label>
                                     <select id="subscriptionidfilter" name="subscriptionfilter" style="width:10em;" disabled="disabled"></select>
                                 </fieldset>
                                 <fieldset class="action">
@@ -90,7 +90,7 @@
                                                         &nbsp;
                                                     [% END %]
                                                 </td>
-                                                <td class="libraryfilterclass">[% serial.branchcode %]</td>
+                                                <td class="libraryfilterclass">[% Branches.GetName( serial.branchcode ) %]</td>
                                                 <td>[% serial.notes %]</td>
                                                 <td>
                                                     [% IF ( serial.status2 && serial.planneddate ) %]
             });
 
             // Setting the option values with branchcodes
-            $("#libraryfilter").append('<option value="all">(All)</option>');
+            $("#libraryfilter").append('<option value="all">'+_("(All)")+'</option>');
             for (var i = 0; i < subarray.length; i++) {
                 $("#libraryfilter").append('<option value="' + subarray[i] + '">' + subarray[i] + '</option>');
             }
         }
 
         // Filter by Library
+
         function filterByLibrary() {
 
             selectedStatus = $("#libraryfilter").val();
                 if (subarray.indexOf($(this).text()) == -1) { subarray.push($(this).text()); }
             });
             // Setting the option values with subscription id's
-            $("#subscriptionidfilter").append('<option value="all">(All)</option>');
+            $("#subscriptionidfilter").append('<option value="all">'+_("(All)")+'</option>');
             for (var i = 0; i < subarray.length; i++) {
                 $("#subscriptionidfilter").append('<option value="' + subarray[i] + '">' + subarray[i] + '</option>');
             }
 
             // Remove old subscription options
             $("#subscriptionidfilter option").remove();
-            $("#subscriptionidfilter option").append('<option value="all">(All)</option>');
+            $("#subscriptionidfilter option").append('<option value="all">'+_("(All)")+'</option>');
             $("#subscriptionidfilter").attr("disabled", "disabled");
 
             if (keeplibrary != true) {