Bug 12904: Force browser to load new javascript files after upgrade
[koha_ffzg] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / itemsearch.tt
index 5e02cc4..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">
           </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 %];
 
                     { '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 %] },