View | Details | Raw Unified | Return to bug 19656
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/rotating-collections-toolbar.inc (-30 / +16 lines)
Lines 1-31 Link Here
1
<script type="text/javascript">
1
<div id="toolbar" class="btn-toolbar">
2
    $(document).ready(function(){
2
    <div class="btn-group">
3
        $(".confirmdelete").click(function(){
3
        <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>
4
            $(this).parents('tr').addClass("warn");
4
    </div>
5
            if(confirm(_("Are you sure you want to delete this rotating collection?"))){
6
                return true;
7
            } else {
8
                $(this).parents('tr').removeClass("warn");
9
                return false;
10
            }
11
        });
12
});
13
</script>
14
5
15
            <div id="toolbar" class="btn-toolbar">
6
    [% IF ( colId ) %]
16
                <div class="btn-group">
7
        <div class="btn-group">
17
                    <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>
8
            <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>
18
                </div>
9
        </div>
19
10
        <div class="btn-group">
20
                [% IF ( colId ) %]
11
            <a class="btn btn-default btn-sm" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=edit&amp;colId=[% colId %]"><i class="fa fa-pencil"></i> Edit</a>
21
                    <div class="btn-group">
12
        </div>
22
                        <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>
13
        <div class="btn-group">
23
                    </div>
14
            <a class="btn btn-default btn-sm confirmdelete" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=delete&amp;colId=[% colId %]"><i class="fa fa-trash"></i> Delete</a>
24
                    <div class="btn-group">
15
        </div>
25
                        <a class="btn btn-default btn-sm" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=edit&amp;colId=[% colId %]"><i class="fa fa-pencil"></i> Edit</a>
16
    [% END %]
26
                    </div>
17
</div>
27
                    <div class="btn-group">
28
                        <a class="btn btn-default btn-sm confirmdelete" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=delete&amp;colId=[% colId %]"><i class="fa fa-trash"></i> Delete</a>
29
                    </div>
30
                [% END %]
31
            </div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt (-7 / +8 lines)
Lines 1-14 Link Here
1
[% SET footerjs = 1 %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo; Collection [% colTitle %] &rsquo; Add or remove items</title>
3
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo; Collection [% colTitle %] &rsquo; Add or remove items</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
4
<script type="text/javascript">
5
    //<![CDATA[
6
        $( document ).ready(function() {
7
            $("#barcode").focus();
8
        });
9
    //]]>
10
</script>
11
</head>
5
</head>
6
12
<body id="rcoll_addItems" class="tools rcoll">
7
<body id="rcoll_addItems" class="tools rcoll">
13
[% INCLUDE 'header.inc' %]
8
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'cat-search.inc' %]
9
[% INCLUDE 'cat-search.inc' %]
Lines 124-127 Link Here
124
            [% INCLUDE 'tools-menu.inc' %]
119
            [% INCLUDE 'tools-menu.inc' %]
125
        </div>
120
        </div>
126
    </div> <!-- /#bd -->
121
    </div> <!-- /#bd -->
122
123
[% MACRO jsinclude BLOCK %]
124
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu.js"></script>
125
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/rotating-collections.js"></script>
126
[% END %]
127
127
[% INCLUDE 'intranet-bottom.inc' %]
128
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt (+7 lines)
Lines 1-3 Link Here
1
[% SET footerjs = 1 %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo;
3
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo;
3
    [%- IF ( action == "new" ) %]
4
    [%- IF ( action == "new" ) %]
Lines 134-137 Link Here
134
            [% INCLUDE 'tools-menu.inc' %]
135
            [% INCLUDE 'tools-menu.inc' %]
135
        </div>
136
        </div>
136
    </div> <!-- /#bd -->
137
    </div> <!-- /#bd -->
138
139
[% MACRO jsinclude BLOCK %]
140
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu.js"></script>
141
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/rotating-collections.js"></script>
142
[% END %]
143
137
[% INCLUDE 'intranet-bottom.inc' %]
144
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt (-21 / +9 lines)
Lines 1-30 Link Here
1
[% USE Branches %]
1
[% USE Branches %]
2
[% SET footerjs = 1 %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections</title>
4
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
5
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
6
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
6
[% INCLUDE 'datatables.inc' %]
7
<script type="text/javascript">
8
    $(document).ready(function(){
9
        $(".confirmdelete").click(function(){
10
            $(this).parents('tr').addClass("warn");
11
            if(confirm(_("Are you sure you want to delete this collection?"))){
12
                return true;
13
            } else {
14
                $(this).parents('tr').removeClass("warn");
15
                return false;
16
            }
17
        });
18
        $('#rotating-collections-table').dataTable($.extend(true, {}, dataTablesDefaults, {
19
            "autoWidth": false,
20
            "aoColumnDefs": [
21
                { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
22
            ],
23
            "sPaginationType": "four_button"
24
        } ));
25
    });
26
</script>
27
</head>
7
</head>
8
28
<body id="rcoll_rotatingCollections" class="tools rcoll">
9
<body id="rcoll_rotatingCollections" class="tools rcoll">
29
[% INCLUDE 'header.inc' %]
10
[% INCLUDE 'header.inc' %]
30
[% INCLUDE 'cat-search.inc' %]
11
[% INCLUDE 'cat-search.inc' %]
Lines 83-86 Link Here
83
            [% INCLUDE 'tools-menu.inc' %]
64
            [% INCLUDE 'tools-menu.inc' %]
84
        </div>
65
        </div>
85
    </div> <!-- /#bd -->
66
    </div> <!-- /#bd -->
67
68
[% MACRO jsinclude BLOCK %]
69
    [% INCLUDE 'datatables.inc' %]
70
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu.js"></script>
71
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/rotating-collections.js"></script>
72
[% END %]
73
86
[% INCLUDE 'intranet-bottom.inc' %]
74
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/transferCollection.tt (+7 lines)
Lines 1-4 Link Here
1
[% USE Branches %]
1
[% USE Branches %]
2
[% SET footerjs = 1 %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo; Transfer collection</title>
4
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo; Transfer collection</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
Lines 56-59 Link Here
56
            [% INCLUDE 'tools-menu.inc' %]
57
            [% INCLUDE 'tools-menu.inc' %]
57
        </div>
58
        </div>
58
    </div> <!-- /#bd -->
59
    </div> <!-- /#bd -->
60
61
[% MACRO jsinclude BLOCK %]
62
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu.js"></script>
63
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/rotating-collections.js"></script>
64
[% END %]
65
59
[% INCLUDE 'intranet-bottom.inc' %]
66
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/rotating-collections.js (-1 / +27 lines)
Line 0 Link Here
0
- 
1
/* global _ dataTablesDefaults */
2
3
$(document).ready(function(){
4
    $("#barcode").focus();
5
6
    $(".confirmdelete").click(function(){
7
        $(this).parents('tr').addClass("warn");
8
        if(confirm(_("Are you sure you want to delete this rotating collection?"))){
9
            return true;
10
        } else {
11
            $(this).parents('tr').removeClass("warn");
12
            return false;
13
        }
14
    });
15
16
    if( $('#rotating-collections-table').length > 0 ){
17
        $('#rotating-collections-table').dataTable($.extend(true, {}, dataTablesDefaults, {
18
            "autoWidth": false,
19
            "aoColumnDefs": [
20
                { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
21
            ],
22
            "sPaginationType": "four_button"
23
        } ));
24
    }
25
26
27
});

Return to bug 19656