Bug 10971: Hide EAN search for MARC21 / template corrections
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Sat, 21 Feb 2015 18:22:33 +0000 (19:22 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Fri, 24 Apr 2015 23:14:52 +0000 (20:14 -0300)
This patch hides the EAN filter on the page for ordering from
a subscription when the marcflavour is not UNIMARC as it will
only work for this flavour currently.

It also corrects
- branch to library
- supplier to vendor
- the library code in the result list to the branch name

To test:
- Make sure you have a subscription, not the vendor
- Create a new basket for the subscription vendor
- Choose 'from a subscription' to create your order line
- Look at the filters on the left side, switch
  the marcflavour system preference to see change for
  the EAN filter
- Verify changes

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt

index db65f93..4f6f1ca 100644 (file)
                 <label for="title">Title:</label>
                 <input type="text" id="title" name="title_filter" value="[% title_filter %]" />
               </li>
+              [% IF Koha.Preference( 'marcflavour' ) == "UNIMARC" %]
               <li>
                 <label for="ean">EAN:</label>
                 <input type="text" id="ean" name="EAN_filter" value="[% EAN_filter %]" />
               </li>
+              [% END %]
               <li>
                 <label for="publisher">Publisher:</label>
                 <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter %]" />
               </li>
               <li>
-                <label for="supplier">Supplier:</label>
+                <label for="supplier">Vendor:</label>
                 <input type="text" id="supplier" name="supplier_filter" value="[% supplier_filter %]" />
               </li>
               <li>
-                <label for="branch">Branch:</label>
+                <label for="branch">Library:</label>
                 <select id="branch" name="branch_filter">
                   <option value="">All</option>
                   [% FOREACH branch IN branches_loop %]
index 8e30563..d6e65a0 100644 (file)
@@ -1,4 +1,6 @@
 [% USE KohaDates %]
+[% USE Branches %]
+[% USE Koha %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Serials [% biblionumber %]</title>
 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
@@ -76,7 +78,7 @@
                                     [% IF (sub.internalnotes) %]([% sub.internalnotes %])[% END %]
                                 </td>
                                 <td>
-                                    [% IF (sub.branchcode) %][% sub.branchcode %][% END %]
+                                    [% IF (sub.branchcode) %][% Branches.GetName( sub.branchcode ) %][% END %]
                                 </td>
                                 <td>
                                     [% IF (sub.callnumber) %][% sub.callnumber %][% END %]