Bug 12904: Force browser to load new javascript files after upgrade
[koha_ffzg] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / itemsearch.tt
index 4b9fcee..dd01bab 100644 (file)
 [% INCLUDE 'doc-head-open.inc' %]
   <title>Koha &rsaquo; Catalog &rsaquo; Item search</title>
   [% INCLUDE 'doc-head-close.inc' %]
-  <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/itemsearchform.css" />
-  <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
+  <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/itemsearchform_[% KOHA_VERSION %].css" />
+  <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
 </head>
 
 <body id="catalog_itemsearch" class="catalog">
           </div>
           <fieldset>
             [% INCLUDE form_field_select name="homebranch" options = branches empty_option = "All libraries" %]
-            [% INCLUDE form_field_select name="holdingbranch" options = branche empty_option = "All libraries" %]
+            [% INCLUDE form_field_select name="holdingbranch" options = branches empty_option = "All libraries" %]
             [% IF locations.size %]
                 [% INCLUDE form_field_select name="location" options = locations empty_option = "All locations" %]
             [% END %]
           </fieldset>
           <fieldset>
             [% INCLUDE form_field_select name="itype" options = itemtypes empty_option = "All item types" %]
-            [% INCLUDE form_field_select name="ccode" options = ccodes empty_option = "All collection codes" %]
+            [% IF ccodes.size %]
+                [% INCLUDE form_field_select name="ccode" options = ccodes empty_option = "All collection codes" %]
+            [% END %]
             [% IF notforloans.size %]
                 [% INCLUDE form_field_select name="notforloan" options = notforloans empty_option = "All statuses" %]
             [% END %]
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'datatables.inc' %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script>
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
+    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter_[% KOHA_VERSION %].js"></script>
+    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
     <script type="text/javascript">
         var authorised_values = [% authorised_values_json %];
 
         function submitForm($form) {
             var tr = ''
                 + '    <tr>'
-                + '      <th>' + _("Title") + '</th>'
-                + '      <th>' + _("Publication date") + '</th>'
-                + '      <th>' + _("Publisher") + '</th>'
-                + '      <th>' + _("Collection") + '</th>'
-                + '      <th>' + _("Barcode") + '</th>'
-                + '      <th>' + _("Call number") + '</th>'
-                + '      <th>' + _("Home library") + '</th>'
-                + '      <th>' + _("Current location") + '</th>'
-                + '      <th>' + _("Shelving location") + '</th>'
-                + '      <th>' + _("Inventory number") + '</th>'
-                + '      <th>' + _("Status") + '</th>'
-                + '      <th>' + _("Checkouts") + '</th>'
-                + '      <th></th>'
+                + '      <th id="items_title">' + _("Title") + '</th>'
+                + '      <th id="items_pubdate">' + _("Publication date") + '</th>'
+                + '      <th id="items_publisher">' + _("Publisher") + '</th>'
+                + '      <th id="items_collection">' + _("Collection") + '</th>'
+                + '      <th id="items_barcode">' + _("Barcode") + '</th>'
+                + '      <th id="items_callno">' + _("Call number") + '</th>'
+                + '      <th id="items_homebranch">' + _("Home library") + '</th>'
+                + '      <th id="items_holdingbranch">' + _("Current location") + '</th>'
+                + '      <th id="items_location">' + _("Shelving location") + '</th>'
+                + '      <th id="item_inventoryno">' + _("Inventory number") + '</th>'
+                + '      <th id="items_status">' + _("Status") + '</th>'
+                + '      <th id="items_checkouts">' + _("Checkouts") + '</th>'
+                + '      <th id=""></th>'
                 + '    </tr>'
             var table = ''
                 + '<table id="results">'
                     { 'type': 'text' },
                     { 'type': 'text' },
                     { 'type': 'text' },
-          { 'type': 'select', 'values': [% ccodes.json %] },
+                    [% IF ccodes.size %]
+                        { 'type': 'select', 'values': [% ccodes.json %] },
+                    [% ELSE %]
+                        null,
+                    [% END %]
                     { 'type': 'text' },
                     { 'type': 'text' },
                     { 'type': 'select', 'values': [% branches.json %] },