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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt (-28 / +34 lines)
Lines 30-46 Link Here
30
        <div id="biblio_tab">
30
        <div id="biblio_tab">
31
          [% IF ( current_biblio_searches ) %]
31
          [% IF ( current_biblio_searches ) %]
32
            <h2>Current session</h2>
32
            <h2>Current session</h2>
33
            <form action="/cgi-bin/koha/catalogue/search-history.pl" method="post">
33
            <form id="current_cat" action="/cgi-bin/koha/catalogue/search-history.pl" method="post">
34
              <div class="selections-toolbar">
34
              <p class="selections-toolbar">
35
                <a class="CheckAll" href="#"><i class="fa fa-check"></i> Select all visible rows</a>
35
                <a class="CheckAll" data-form="current_cat" href="#"><i class="fa fa-check"></i> Select all visible rows</a>
36
                <span class="sep">|</span>
36
                <span class="sep">|</span>
37
                <a class="CheckNone" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a>
37
                <a class="CheckNone" data-form="current_cat" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a>
38
                <span class="sep">|</span>
38
                <span class="sep">|</span>
39
                <span class="links">
39
                <span class="links">
40
                  <span class="selections">Select searches to: </span>
40
                  <span class="selections">Select searches to: </span>
41
                  <a href="#" class="action_delete disabled">Delete</a>
41
                  <a href="#" class="action_delete disabled">Delete</a>
42
                </span>
42
                </span>
43
              </div>
43
              </p>
44
              <input type="hidden" name="action" value="delete" />
44
              <input type="hidden" name="action" value="delete" />
45
              <table class="historyt">
45
              <table class="historyt">
46
                <thead>
46
                <thead>
Lines 65-83 Link Here
65
            </form>
65
            </form>
66
          [% END %]
66
          [% END %]
67
67
68
            [% IF ( current_biblio_searches && previous_biblio_searches) %]
69
                <hr />
70
            [% END %]
71
68
          [% IF ( previous_biblio_searches ) %]
72
          [% IF ( previous_biblio_searches ) %]
69
            <h2>Previous sessions</h2>
73
            <h2>Previous sessions</h2>
70
            <form action="/cgi-bin/koha/catalogue/search-history.pl" method="post">
74
            <form id="previous_cat" action="/cgi-bin/koha/catalogue/search-history.pl" method="post">
71
              <div class="selections-toolbar">
75
              <p class="selections-toolbar">
72
                <a class="CheckAll" href="#"><i class="fa fa-check"></i> Select all visible rows</a>
76
                <a class="CheckAll" data-form="previous_cat" href="#"><i class="fa fa-check"></i> Select all visible rows</a>
73
                <span class="sep">|</span>
77
                <span class="sep">|</span>
74
                <a class="CheckNone" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a>
78
                <a class="CheckNone" data-form="previous_cat" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a>
75
                <span class="sep">|</span>
79
                <span class="sep">|</span>
76
                <span class="links">
80
                <span class="links">
77
                  <span class="selections">Select searches to: </span>
81
                  <span class="selections">Select searches to: </span>
78
                  <a href="#" class="action_delete disabled">Delete</a>
82
                  <a href="#" class="action_delete disabled">Delete</a>
79
                </span>
83
                </span>
80
              </div>
84
              </p>
81
              <input type="hidden" name="action" value="delete" />
85
              <input type="hidden" name="action" value="delete" />
82
              <table class="historyt">
86
              <table class="historyt">
83
                <thead>
87
                <thead>
Lines 110-126 Link Here
110
        <div id="authority_tab">
114
        <div id="authority_tab">
111
          [% IF ( current_authority_searches ) %]
115
          [% IF ( current_authority_searches ) %]
112
            <h2>Current session</h2>
116
            <h2>Current session</h2>
113
            <form action="/cgi-bin/koha/catalogue/search-history.pl" method="post">
117
            <form id="current_auth" action="/cgi-bin/koha/catalogue/search-history.pl" method="post">
114
              <div class="selections-toolbar">
118
              <p class="selections-toolbar">
115
                <a class="CheckAll" href="#"><i class="fa fa-check"></i> Select all visible rows</a>
119
                <a class="CheckAll" data-form="current_auth" href="#"><i class="fa fa-check"></i> Select all visible rows</a>
116
                <span class="sep">|</span>
120
                <span class="sep">|</span>
117
                <a class="CheckNone" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a>
121
                <a class="CheckNone" data-form="current_auth" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a>
118
                <span class="sep">|</span>
122
                <span class="sep">|</span>
119
                <span class="links">
123
                <span class="links">
120
                  <span class="selections">Select searches to: </span>
124
                  <span class="selections">Select searches to: </span>
121
                  <a href="#" class="action_delete disabled">Delete</a>
125
                  <a href="#" class="action_delete disabled">Delete</a>
122
                </span>
126
                </span>
123
              </div>
127
              </p>
124
              <input type="hidden" name="action" value="delete" />
128
              <input type="hidden" name="action" value="delete" />
125
              <table class="historyt">
129
              <table class="historyt">
126
                <thead>
130
                <thead>
Lines 145-163 Link Here
145
            </form>
149
            </form>
146
          [% END %]
150
          [% END %]
147
151
152
            [% IF ( current_authority_searches && previous_authority_searches) %]
153
                <hr />
154
            [% END %]
155
148
          [% IF ( previous_authority_searches ) %]
156
          [% IF ( previous_authority_searches ) %]
149
            <h2>Previous sessions</h2>
157
            <h2>Previous sessions</h2>
150
            <form action="/cgi-bin/koha/catalogue/search-history.pl" method="post">
158
            <form id="previous_auth" action="/cgi-bin/koha/catalogue/search-history.pl" method="post">
151
              <div class="selections-toolbar">
159
              <p class="selections-toolbar">
152
                <a class="CheckAll" href="#"><i class="fa fa-check"></i> Select all visible rows</a>
160
                <a class="CheckAll" data-form="previous_auth" href="#"><i class="fa fa-check"></i> Select all visible rows</a>
153
                <span class="sep">|</span>
161
                <span class="sep">|</span>
154
                <a class="CheckNone" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a>
162
                <a class="CheckNone" data-form="previous_auth" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a>
155
                <span class="sep">|</span>
163
                <span class="sep">|</span>
156
                <span class="links">
164
                <span class="links">
157
                  <span class="selections">Select searches to: </span>
165
                  <span class="selections">Select searches to: </span>
158
                  <a href="#" class="action_delete disabled">Delete</a>
166
                  <a href="#" class="action_delete disabled">Delete</a>
159
                </span>
167
                </span>
160
              </div>
168
              </p>
161
              <input type="hidden" name="action" value="delete" />
169
              <input type="hidden" name="action" value="delete" />
162
              <table class="historyt">
170
              <table class="historyt">
163
                <thead>
171
                <thead>
Lines 192-198 Link Here
192
200
193
[% MACRO jsinclude BLOCK %]
201
[% MACRO jsinclude BLOCK %]
194
    [% INCLUDE 'datatables.inc' %]
202
    [% INCLUDE 'datatables.inc' %]
195
    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
196
    <script>
203
    <script>
197
    $(document).ready(function() {
204
    $(document).ready(function() {
198
        // We show table ordered by descending dates by default
205
        // We show table ordered by descending dates by default
Lines 234-248 Link Here
234
241
235
        $(".CheckNone").click(function(e){
242
        $(".CheckNone").click(function(e){
236
            e.preventDefault();
243
            e.preventDefault();
237
            var form = $(this).parents("form").first();
244
            var form = $(this).data("form");
238
            form.find('table input[type="checkbox"]').prop('checked', false);
245
            $("#" + form ).find('table input[type="checkbox"]').prop('checked', false);
239
            enableCheckboxActions(form);
246
            enableCheckboxActions($("#" + form ));
240
        });
247
        });
241
        $(".CheckAll").click(function(e){
248
        $(".CheckAll").click(function(e){
242
            e.preventDefault();
249
            e.preventDefault();
243
            var form = $(this).parents("form").first();
250
            var form = $(this).data("form");
244
            form.find('table input[type="checkbox"]').prop('checked', true);
251
            $("#" + form ).find('table input[type="checkbox"]').prop('checked', true);
245
            enableCheckboxActions(form);
252
            enableCheckboxActions($("#" + form ));
246
        });
253
        });
247
254
248
        $('#tabs table').on('click', 'input:checkbox', function() {
255
        $('#tabs table').on('click', 'input:checkbox', function() {
249
- 

Return to bug 26769