Lines 34-212
Link Here
|
34 |
<div class="col-sm-12 col-md-8 col-md-offset-2"> |
34 |
<div class="col-sm-12 col-md-8 col-md-offset-2"> |
35 |
|
35 |
|
36 |
<h1>Search history</h1> |
36 |
<h1>Search history</h1> |
37 |
<div id="tabs" class="toptabs"> |
37 |
<div id="tabs" class="toptabs"> |
38 |
<ul> |
38 |
<ul class="nav nav-tabs" role="tablist"> |
39 |
<li><a href="#biblio_tab">Catalog</a></li> |
39 |
<li role="presentation" class="active"><a href="#biblio_tab" aria-controls="biblio_tab" role="tab" data-toggle="tab">Catalog</a></li> |
40 |
<li><a href="#authority_tab">Authority</a></li> |
40 |
<li role="presentation"><a href="#authority_tab" aria-controls="authority_tab" role="tab" data-toggle="tab">Authority</a></li> |
41 |
</ul> |
41 |
</ul> |
42 |
<div id="biblio_tab"> |
42 |
<div class="tab-content"> |
43 |
[% IF ( current_biblio_searches ) %] |
43 |
<div role="tabpanel" class="tab-pane active" id="biblio_tab"> |
44 |
<h2>Current session</h2> |
44 |
[% IF ( current_biblio_searches ) %] |
45 |
<form id="current_cat" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> |
45 |
<h2>Current session</h2> |
46 |
<p class="selections-toolbar"> |
46 |
<form id="current_cat" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> |
47 |
<a class="CheckAll" data-form="current_cat" href="#"><i class="fa fa-check"></i> Select all visible rows</a> |
47 |
<p class="selections-toolbar"> |
48 |
<span class="sep">|</span> |
48 |
<a class="CheckAll" data-form="current_cat" href="#"><i class="fa fa-check"></i> Select all visible rows</a> |
49 |
<a class="CheckNone" data-form="current_cat" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> |
49 |
<span class="sep">|</span> |
50 |
<span class="sep">|</span> |
50 |
<a class="CheckNone" data-form="current_cat" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> |
51 |
<span class="links"> |
51 |
<span class="sep">|</span> |
52 |
<span class="selections">Select searches to: </span> |
52 |
<span class="links"> |
53 |
<a href="#" class="action_delete disabled">Delete</a> |
53 |
<span class="selections">Select searches to: </span> |
54 |
</span> |
54 |
<a href="#" class="action_delete disabled">Delete</a> |
55 |
</p> |
55 |
</span> |
56 |
<input type="hidden" name="action" value="delete" /> |
56 |
</p> |
57 |
<table class="historyt"> |
57 |
<input type="hidden" name="action" value="delete" /> |
58 |
<thead> |
58 |
<table class="historyt"> |
59 |
<tr> |
59 |
<thead> |
60 |
<th></th> |
60 |
<tr> |
61 |
<th>Date</th> |
61 |
<th></th> |
62 |
<th>Search</th> |
62 |
<th>Date</th> |
63 |
<th>Results</th> |
63 |
<th>Search</th> |
64 |
</tr> |
64 |
<th>Results</th> |
65 |
</thead> |
65 |
</tr> |
66 |
<tbody> |
66 |
</thead> |
67 |
[% FOREACH s IN current_biblio_searches %] |
67 |
<tbody> |
68 |
<tr> |
68 |
[% FOREACH s IN current_biblio_searches %] |
69 |
<td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> |
69 |
<tr> |
70 |
<td data-order="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</td> |
70 |
<td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> |
71 |
<td><a href="/cgi-bin/koha/catalogue/search.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> |
71 |
<td data-order="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</td> |
72 |
<td>[% s.total | html %]</td> |
72 |
<td><a href="/cgi-bin/koha/catalogue/search.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> |
73 |
</tr> |
73 |
<td>[% s.total | html %]</td> |
74 |
[% END %] |
74 |
</tr> |
75 |
</tbody> |
75 |
[% END %] |
76 |
</table> |
76 |
</tbody> |
77 |
</form> |
77 |
</table> |
78 |
[% END %] |
78 |
</form> |
|
|
79 |
[% END %] |
79 |
|
80 |
|
80 |
[% IF ( current_biblio_searches && previous_biblio_searches) %] |
81 |
[% IF ( current_biblio_searches && previous_biblio_searches) %] |
81 |
<hr /> |
82 |
<hr /> |
82 |
[% END %] |
83 |
[% END %] |
83 |
|
84 |
|
84 |
[% IF ( previous_biblio_searches ) %] |
85 |
[% IF ( previous_biblio_searches ) %] |
85 |
<h2>Previous sessions</h2> |
86 |
<h2>Previous sessions</h2> |
86 |
<form id="previous_cat" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> |
87 |
<form id="previous_cat" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> |
87 |
<p class="selections-toolbar"> |
88 |
<p class="selections-toolbar"> |
88 |
<a class="CheckAll" data-form="previous_cat" href="#"><i class="fa fa-check"></i> Select all visible rows</a> |
89 |
<a class="CheckAll" data-form="previous_cat" href="#"><i class="fa fa-check"></i> Select all visible rows</a> |
89 |
<span class="sep">|</span> |
90 |
<span class="sep">|</span> |
90 |
<a class="CheckNone" data-form="previous_cat" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> |
91 |
<a class="CheckNone" data-form="previous_cat" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> |
91 |
<span class="sep">|</span> |
92 |
<span class="sep">|</span> |
92 |
<span class="links"> |
93 |
<span class="links"> |
93 |
<span class="selections">Select searches to: </span> |
94 |
<span class="selections">Select searches to: </span> |
94 |
<a href="#" class="action_delete disabled">Delete</a> |
95 |
<a href="#" class="action_delete disabled">Delete</a> |
95 |
</span> |
96 |
</span> |
96 |
</p> |
97 |
</p> |
97 |
<input type="hidden" name="action" value="delete" /> |
98 |
<input type="hidden" name="action" value="delete" /> |
98 |
<table class="historyt"> |
99 |
<table class="historyt"> |
99 |
<thead> |
100 |
<thead> |
100 |
<tr> |
101 |
<tr> |
101 |
<th></th> |
102 |
<th></th> |
102 |
<th>Date</th> |
103 |
<th>Date</th> |
103 |
<th>Search</th> |
104 |
<th>Search</th> |
104 |
<th>Results</th> |
105 |
<th>Results</th> |
105 |
</tr> |
106 |
</tr> |
106 |
</thead> |
107 |
</thead> |
107 |
<tbody> |
108 |
<tbody> |
108 |
[% FOREACH s IN previous_biblio_searches %] |
109 |
[% FOREACH s IN previous_biblio_searches %] |
109 |
<tr> |
110 |
<tr> |
110 |
<td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> |
111 |
<td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> |
111 |
<td data-order="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</td> |
112 |
<td data-order="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</td> |
112 |
<td><a href="/cgi-bin/koha/catalogue/search.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> |
113 |
<td><a href="/cgi-bin/koha/catalogue/search.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> |
113 |
<td>[% s.total | html %]</td> |
114 |
<td>[% s.total | html %]</td> |
114 |
</tr> |
115 |
</tr> |
115 |
[% END %] |
116 |
[% END %] |
116 |
</tbody> |
117 |
</tbody> |
117 |
</table> |
118 |
</table> |
118 |
</form> |
119 |
</form> |
119 |
[% END %] |
120 |
[% END %] |
120 |
|
121 |
|
121 |
[% IF !current_biblio_searches && !previous_biblio_searches %] |
122 |
[% IF !current_biblio_searches && !previous_biblio_searches %] |
122 |
<p>Your catalog search history is empty.</p> |
123 |
<p>Your catalog search history is empty.</p> |
123 |
[% END %] |
124 |
[% END %] |
124 |
</div> |
125 |
</div> <!-- /#biblio_tab --> |
125 |
|
126 |
|
126 |
<div id="authority_tab"> |
127 |
<div id="authority_tab" role="tabpanel" class="tab-pane"> |
127 |
[% IF ( current_authority_searches ) %] |
128 |
[% IF ( current_authority_searches ) %] |
128 |
<h2>Current session</h2> |
129 |
<h2>Current session</h2> |
129 |
<form id="current_auth" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> |
130 |
<form id="current_auth" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> |
130 |
<p class="selections-toolbar"> |
131 |
<p class="selections-toolbar"> |
131 |
<a class="CheckAll" data-form="current_auth" href="#"><i class="fa fa-check"></i> Select all visible rows</a> |
132 |
<a class="CheckAll" data-form="current_auth" href="#"><i class="fa fa-check"></i> Select all visible rows</a> |
132 |
<span class="sep">|</span> |
133 |
<span class="sep">|</span> |
133 |
<a class="CheckNone" data-form="current_auth" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> |
134 |
<a class="CheckNone" data-form="current_auth" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> |
134 |
<span class="sep">|</span> |
135 |
<span class="sep">|</span> |
135 |
<span class="links"> |
136 |
<span class="links"> |
136 |
<span class="selections">Select searches to: </span> |
137 |
<span class="selections">Select searches to: </span> |
137 |
<a href="#" class="action_delete disabled">Delete</a> |
138 |
<a href="#" class="action_delete disabled">Delete</a> |
138 |
</span> |
139 |
</span> |
139 |
</p> |
140 |
</p> |
140 |
<input type="hidden" name="action" value="delete" /> |
141 |
<input type="hidden" name="action" value="delete" /> |
141 |
<table class="historyt"> |
142 |
<table class="historyt"> |
142 |
<thead> |
143 |
<thead> |
143 |
<tr> |
144 |
<tr> |
144 |
<th></th> |
145 |
<th></th> |
145 |
<th>Date</th> |
146 |
<th>Date</th> |
146 |
<th>Search</th> |
147 |
<th>Search</th> |
147 |
<th>Results</th> |
148 |
<th>Results</th> |
148 |
</tr> |
149 |
</tr> |
149 |
</thead> |
150 |
</thead> |
150 |
<tbody> |
151 |
<tbody> |
151 |
[% FOREACH s IN current_authority_searches %] |
152 |
[% FOREACH s IN current_authority_searches %] |
152 |
<tr> |
153 |
<tr> |
153 |
<td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> |
154 |
<td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> |
154 |
<td data-order="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</td> |
155 |
<td data-order="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</td> |
155 |
<td><a href="/cgi-bin/koha/authorities/authorities-home.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> |
156 |
<td><a href="/cgi-bin/koha/authorities/authorities-home.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> |
156 |
<td>[% s.total | html %]</td> |
157 |
<td>[% s.total | html %]</td> |
157 |
</tr> |
158 |
</tr> |
158 |
[% END %] |
159 |
[% END %] |
159 |
</tbody> |
160 |
</tbody> |
160 |
</table> |
161 |
</table> |
161 |
</form> |
162 |
</form> |
162 |
[% END %] |
163 |
[% END %] |
163 |
|
164 |
|
164 |
[% IF ( current_authority_searches && previous_authority_searches) %] |
165 |
[% IF ( current_authority_searches && previous_authority_searches) %] |
165 |
<hr /> |
166 |
<hr /> |
166 |
[% END %] |
167 |
[% END %] |
167 |
|
168 |
|
168 |
[% IF ( previous_authority_searches ) %] |
169 |
[% IF ( previous_authority_searches ) %] |
169 |
<h2>Previous sessions</h2> |
170 |
<h2>Previous sessions</h2> |
170 |
<form id="previous_auth" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> |
171 |
<form id="previous_auth" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> |
171 |
<p class="selections-toolbar"> |
172 |
<p class="selections-toolbar"> |
172 |
<a class="CheckAll" data-form="previous_auth" href="#"><i class="fa fa-check"></i> Select all visible rows</a> |
173 |
<a class="CheckAll" data-form="previous_auth" href="#"><i class="fa fa-check"></i> Select all visible rows</a> |
173 |
<span class="sep">|</span> |
174 |
<span class="sep">|</span> |
174 |
<a class="CheckNone" data-form="previous_auth" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> |
175 |
<a class="CheckNone" data-form="previous_auth" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> |
175 |
<span class="sep">|</span> |
176 |
<span class="sep">|</span> |
176 |
<span class="links"> |
177 |
<span class="links"> |
177 |
<span class="selections">Select searches to: </span> |
178 |
<span class="selections">Select searches to: </span> |
178 |
<a href="#" class="action_delete disabled">Delete</a> |
179 |
<a href="#" class="action_delete disabled">Delete</a> |
179 |
</span> |
180 |
</span> |
180 |
</p> |
181 |
</p> |
181 |
<input type="hidden" name="action" value="delete" /> |
182 |
<input type="hidden" name="action" value="delete" /> |
182 |
<table class="historyt"> |
183 |
<table class="historyt"> |
183 |
<thead> |
184 |
<thead> |
184 |
<tr> |
185 |
<tr> |
185 |
<th></th> |
186 |
<th></th> |
186 |
<th>Date</th> |
187 |
<th>Date</th> |
187 |
<th>Search</th> |
188 |
<th>Search</th> |
188 |
<th>Results</th> |
189 |
<th>Results</th> |
189 |
</tr> |
190 |
</tr> |
190 |
</thead> |
191 |
</thead> |
191 |
<tbody> |
192 |
<tbody> |
192 |
[% FOREACH s IN previous_authority_searches %] |
193 |
[% FOREACH s IN previous_authority_searches %] |
193 |
<tr> |
194 |
<tr> |
194 |
<td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> |
195 |
<td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> |
195 |
<td data-order="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</td> |
196 |
<td data-order="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</td> |
196 |
<td><a href="/cgi-bin/koha/authorities/authorities-home.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> |
197 |
<td><a href="/cgi-bin/koha/authorities/authorities-home.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> |
197 |
<td>[% s.total | html %]</td> |
198 |
<td>[% s.total | html %]</td> |
198 |
</tr> |
199 |
</tr> |
199 |
[% END %] |
200 |
[% END %] |
200 |
</tbody> |
201 |
</tbody> |
201 |
</table> |
202 |
</table> |
202 |
</form> |
203 |
</form> |
203 |
[% END %] |
204 |
[% END %] |
204 |
|
205 |
|
205 |
[% IF !current_authority_searches && !previous_authority_searches %] |
206 |
[% IF !current_authority_searches && !previous_authority_searches %] |
206 |
<p>Your authority search history is empty.</p> |
207 |
<p>Your authority search history is empty.</p> |
207 |
[% END %] |
208 |
[% END %] |
208 |
</div> [% # /authority_tab %] |
209 |
</div> [% # /authority_tab %] |
209 |
</div> [% # /tabs %] |
210 |
</div> <!-- /.tab-content --> |
|
|
211 |
</div> [% # /tabs %] |
210 |
</div> [% # /div.col-md-8 %] |
212 |
</div> [% # /div.col-md-8 %] |
211 |
</div> [% # /div.row %] |
213 |
</div> [% # /div.row %] |
212 |
|
214 |
|
Lines 224-231
Link Here
|
224 |
"sPaginationType": "full_numbers" |
226 |
"sPaginationType": "full_numbers" |
225 |
})); |
227 |
})); |
226 |
|
228 |
|
227 |
$('#tabs').tabs(); |
|
|
228 |
|
229 |
// DataTables removes hidden rows from the DOM, so we can't expect a |
229 |
// DataTables removes hidden rows from the DOM, so we can't expect a |
230 |
// "regular" submit to work and we need to build another form containing |
230 |
// "regular" submit to work and we need to build another form containing |
231 |
// all form elements, and then submit this form. |
231 |
// all form elements, and then submit this form. |
232 |
- |
|
|