-<script type="text/javascript">
- $(document).ready(function(){
- $(".confirmdelete").click(function(){
- $(this).parents('tr').addClass("warn");
- if(confirm(_("Are you sure you want to delete this rotating collection?"))){
- return true;
- } else {
- $(this).parents('tr').removeClass("warn");
- return false;
- }
- });
-});
-</script>
+<div id="toolbar" class="btn-toolbar">
+ <div class="btn-group">
+ <a class="btn btn-default btn-sm" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=new"><i class="fa fa-plus"></i> New collection</a>
+ </div>
- <div id="toolbar" class="btn-toolbar">
- <div class="btn-group">
- <a class="btn btn-default btn-sm" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=new"><i class="fa fa-plus"></i> New collection</a>
- </div>
-
- [% IF ( colId ) %]
- <div class="btn-group">
- <a class="btn btn-default btn-sm" href="/cgi-bin/koha/rotating_collections/transferCollection.pl?colId=[% colId %]"><i class="fa fa-exchange"></i> Transfer</a>
- </div>
- <div class="btn-group">
- <a class="btn btn-default btn-sm" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=edit&colId=[% colId %]"><i class="fa fa-pencil"></i> Edit</a>
- </div>
- <div class="btn-group">
- <a class="btn btn-default btn-sm confirmdelete" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=delete&colId=[% colId %]"><i class="fa fa-trash"></i> Delete</a>
- </div>
- [% END %]
- </div>
+ [% IF ( colId ) %]
+ <div class="btn-group">
+ <a class="btn btn-default btn-sm" href="/cgi-bin/koha/rotating_collections/transferCollection.pl?colId=[% colId %]"><i class="fa fa-exchange"></i> Transfer</a>
+ </div>
+ <div class="btn-group">
+ <a class="btn btn-default btn-sm" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=edit&colId=[% colId %]"><i class="fa fa-pencil"></i> Edit</a>
+ </div>
+ <div class="btn-group">
+ <a class="btn btn-default btn-sm confirmdelete" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=delete&colId=[% colId %]"><i class="fa fa-trash"></i> Delete</a>
+ </div>
+ [% END %]
+</div>
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Tools › Rotating collections › Collection [% colTitle %] ’ Add or remove items</title>
[% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript">
- //<![CDATA[
- $( document ).ready(function() {
- $("#barcode").focus();
- });
- //]]>
-</script>
</head>
+
<body id="rcoll_addItems" class="tools rcoll">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
[% INCLUDE 'tools-menu.inc' %]
</div>
</div> <!-- /#bd -->
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu.js"></script>
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/rotating-collections.js"></script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Tools › Rotating collections ›
[%- IF ( action == "new" ) %]
[% INCLUDE 'tools-menu.inc' %]
</div>
</div> <!-- /#bd -->
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu.js"></script>
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/rotating-collections.js"></script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Branches %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Tools › Rotating collections</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
-[% INCLUDE 'datatables.inc' %]
-<script type="text/javascript">
- $(document).ready(function(){
- $(".confirmdelete").click(function(){
- $(this).parents('tr').addClass("warn");
- if(confirm(_("Are you sure you want to delete this collection?"))){
- return true;
- } else {
- $(this).parents('tr').removeClass("warn");
- return false;
- }
- });
- $('#rotating-collections-table').dataTable($.extend(true, {}, dataTablesDefaults, {
- "autoWidth": false,
- "aoColumnDefs": [
- { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
- ],
- "sPaginationType": "four_button"
- } ));
- });
-</script>
</head>
+
<body id="rcoll_rotatingCollections" class="tools rcoll">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
[% INCLUDE 'tools-menu.inc' %]
</div>
</div> <!-- /#bd -->
+
+[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'datatables.inc' %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu.js"></script>
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/rotating-collections.js"></script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Branches %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Tools › Rotating collections › Transfer collection</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'tools-menu.inc' %]
</div>
</div> <!-- /#bd -->
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu.js"></script>
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/rotating-collections.js"></script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
--- /dev/null
+/* global _ dataTablesDefaults */
+
+$(document).ready(function(){
+ $("#barcode").focus();
+
+ $(".confirmdelete").click(function(){
+ $(this).parents('tr').addClass("warn");
+ if(confirm(_("Are you sure you want to delete this rotating collection?"))){
+ return true;
+ } else {
+ $(this).parents('tr').removeClass("warn");
+ return false;
+ }
+ });
+
+ if( $('#rotating-collections-table').length > 0 ){
+ $('#rotating-collections-table').dataTable($.extend(true, {}, dataTablesDefaults, {
+ "autoWidth": false,
+ "aoColumnDefs": [
+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
+ ],
+ "sPaginationType": "four_button"
+ } ));
+ }
+
+
+});