Bug 11810: Input fields in OPAC suggestion form are a bit short (Bootstrap)
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-search-history.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your search history
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% BLOCK cssinclude %][% END %]
7 </head>
8 <body id="opac-search-history" class="scrollto">
9 [% INCLUDE 'masthead.inc' %]
10
11 <div class="main">
12     <ul class="breadcrumb">
13         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
14         [% IF ( loggedinusername ) %]
15             <li><a href="#">Your search history</a></li>
16         [% ELSE %]
17             <li><a href="#">Search history</a></li>
18         [% END %]
19     </ul>
20
21     <div class="container-fluid">
22         <div class="row-fluid">
23             [% IF ( OpacNav||loggedinusername ) %]
24                 <div class="span2">
25                     <div id="navigation">
26                         [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
27                     </div>
28                 </div>
29                 <div class="span10">
30             [% ELSE %]
31                 <div class="span12">
32             [% END %]
33                 <div id="searchhistory" class="maincontent">
34                     <h1>Search history</h1>
35
36                     [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]
37                       <div id="tabs" class="toptabs">
38                         <ul>
39                           <li><a href="#biblio_tab">Catalog searches</a></li>
40                           <li><a href="#authority_tab">Authority searches</a></li>
41                         </ul>
42                     [% END %]
43                       <div id="biblio_tab">
44                         [% IF ( current_biblio_searches ) %]
45                           <h2>Current session</h2>
46                           <form action="/cgi-bin/koha/opac-search-history.pl" method="get">
47                             <input type="hidden" name="action" value="delete" />
48                             <input type="hidden" name="previous" value="0" />
49                             <input type="hidden" name="type" value="biblio" />
50                             <input type="submit" class="deleteshelf" value="Delete your current catalog history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" />
51                           </form>
52                           <table class="historyt table table-bordered table-condensed table-striped">
53                             <thead>
54                               <tr>
55                                 <th>Date</th>
56                                 <th>Search</th>
57                                 <th>Results</th>
58                               </tr>
59                             </thead>
60                             <tbody>
61                             [% FOREACH s IN current_biblio_searches %]
62                               <tr>
63                                 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
64                                 <td><a href="/cgi-bin/koha/opac-search.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
65                                 <td>[% s.total %]</td>
66                               </tr>
67                             [% END %]
68                             </tbody>
69                           </table>
70                         [% END %]
71
72                         [% IF ( previous_biblio_searches ) %]
73                           <h2>Previous sessions</h2>
74                           <form action="/cgi-bin/koha/opac-search-history.pl" method="get">
75                             <input type="hidden" name="action" value="delete" />
76                             <input type="hidden" name="previous" value="1" />
77                             <input type="hidden" name="type" value="biblio" />
78                             <input type="submit" class="deleteshelf" value="Delete your previous catalog search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" />
79                           </form>
80                           <table class="historyt table table-bordered table-condensed table-striped">
81                             <thead>
82                               <tr>
83                                 <th>Date</th>
84                                 <th>Search</th>
85                                 <th>Results</th>
86                               </tr>
87                             </thead>
88                             <tbody>
89                             [% FOREACH s IN previous_biblio_searches %]
90                               <tr>
91                                 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
92                                 <td><a href="/cgi-bin/koha/opac-search.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
93                                 <td>[% s.total %]</td>
94                               </tr>
95                             [% END %]
96                             </tbody>
97                           </table>
98                         [% END %]
99
100                         [% IF !current_biblio_searches && !previous_biblio_searches %]
101                           <p>Your catalog search history is empty.</p>
102                         [% END %]
103                       </div>
104
105
106                     [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]
107                       <div id="authority_tab">
108                         [% IF ( current_authority_searches ) %]
109                           <h2>Current session</h2>
110                           <form action="/cgi-bin/koha/opac-search-history.pl" method="get">
111                             <input type="hidden" name="action" value="delete" />
112                             <input type="hidden" name="previous" value="0" />
113                             <input type="hidden" name="type" value="authority" />
114                             <input type="submit" class="deleteshelf" value="Delete your current authority search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" />
115                           </form>
116                           <table class="historyt table table-bordered table-condensed table-striped">
117                             <thead>
118                               <tr>
119                                 <th>Date</th>
120                                 <th>Search</th>
121                                 <th>Results</th>
122                               </tr>
123                             </thead>
124                             <tbody>
125                             [% FOREACH s IN current_authority_searches %]
126                               <tr>
127                                 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
128                                 <td><a href="/cgi-bin/koha/opac-authorities-home.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
129                                 <td>[% s.total %]</td>
130                               </tr>
131                             [% END %]
132                             </tbody>
133                           </table>
134                         [% END %]
135
136                         [% IF ( previous_authority_searches ) %]
137                           <h2>Previous sessions</h2>
138                           <form action="/cgi-bin/koha/opac-search-history.pl" method="get">
139                             <input type="hidden" name="action" value="delete" />
140                             <input type="hidden" name="previous" value="1" />
141                             <input type="hidden" name="type" value="authority" />
142                             <input type="submit" class="deleteshelf" value="Delete your previous authority search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" />
143                           </form>
144                           <table class="historyt table table-bordered table-condensed table-striped">
145                             <thead>
146                               <tr>
147                                 <th>Date</th>
148                                 <th>Search</th>
149                                 <th>Results</th>
150                               </tr>
151                             </thead>
152                             <tbody>
153                             [% FOREACH s IN previous_authority_searches %]
154                               <tr>
155                                 <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
156                                 <td><a href="/cgi-bin/koha/opac-authorities-home.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
157                                 <td>[% s.total %]</td>
158                               </tr>
159                             [% END %]
160                             </tbody>
161                           </table>
162                         [% END %]
163
164                         [% IF !current_authority_searches && !previous_authority_searches %]
165                           <p>Your authority search history is empty.</p>
166                         [% END %]
167                       </div>
168                     </div>
169                     [% END %]
170                     </div>
171                 </div>
172             </div>
173         </div>
174     </div>
175
176 [% INCLUDE 'opac-bottom.inc' %]
177 [% BLOCK jsinclude %]
178 [% INCLUDE 'datatables.inc' %]
179 <script type="text/javascript">
180 //<![CDATA[
181     var MSG_CONFIRM_DELETE_HISTORY = _("Are you sure you want to delete your search history?");
182          $(document).ready(function() {
183             // We show table ordered by descending dates by default
184             // (so that the more recent query is shown first)
185             $(".historyt").dataTable($.extend(true, {}, dataTablesDefaults, {
186                 "aaSorting": [[ 0, "desc" ]],
187                 "aoColumns": [
188                     { "sType": "title-string" },
189                     null,
190                     null
191                 ]
192             }));
193         });
194
195     [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]$('#tabs').tabs();[% END %]
196 //]]>
197
198 </script>
199 [% END %]