Bug 11739 - Use new DataTables include in notices template
[koha_fer] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / letter.tt
index e095bdc..95c55e5 100644 (file)
@@ -1,10 +1,8 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Tools &rsaquo; Notices[% IF ( add_form ) %][% IF ( modify ) %] &rsaquo; Modify notice[% ELSE %] &rsaquo; Add notice[% END %][% END %][% IF ( add_validate ) %] &rsaquo; Notice added[% END %][% IF ( delete_confirm ) %] &rsaquo; Confirm deletion[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/datatables.css" />
-<script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js"></script>
-[% INCLUDE 'datatables-strings.inc' %]
-<script type="text/javascript" src="/intranet-tmpl/prog/en/js/datatables.js"></script>
+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
+[% INCLUDE 'datatables.inc' %]
 <script type="text/javascript">
 //<![CDATA[
 $(document).ready(function() {
@@ -15,14 +13,16 @@ $(document).ready(function() {
         ],
         "bPaginate": false
     }));
-    $('#branch').change(function() {
+    [% IF no_op_set %]
+      $('#branch').change(function() {
             $('#op').val("");
             $('#selectlibrary').submit();
-    });
-    $('#newnotice').click(function() {
+      });
+      $('#newnotice').click(function() {
             $('#op').val("add_form");
             return true;
-    });
+      });
+    [% END %]
 }); 
 [% IF ( add_form ) %]
        
@@ -166,6 +166,8 @@ $(document).ready(function() {
             </select>
             [% END %]
         [% END %]
+
+[% IF ( letter ) %]
         <table id="lettert">
                <thead><tr>
                        <th>Library</th>
@@ -218,6 +220,15 @@ $(document).ready(function() {
     [% END %]
         </tbody>
                </table>
+[% ELSE %]
+    <div class="dialog message">
+        [% IF ( branchcode ) %]
+           <p>There are no notices for this library.</p>
+        [% ELSE %]
+            <p>There are no notices.</p>
+        [% END %]
+    </div>
+[% END %]
 [% END %]