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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-2 / +2 lines)
Lines 77-83 Link Here
77
                                    <li><p class="members navbar-text">Welcome, <a href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</span></a></p></li>
77
                                    <li><p class="members navbar-text">Welcome, <a href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</span></a></p></li>
78
                                    <li class="divider-vertical"></li>
78
                                    <li class="divider-vertical"></li>
79
                                [% END %]
79
                                [% END %]
80
                                [% IF ( ShowOpacRecentSearchLink ) %]
80
                                [% IF EnableOpacSearchHistory %]
81
                                    <li><p class="navbar-text"><a href="/cgi-bin/koha/opac-search-history.pl" title="View your search history">Search history</a> [<a class="logout" href="/cgi-bin/koha/opac-search-history.pl?action=delete" title="Delete your search history" onclick="return confirm(MSG_DELETE_SEARCH_HISTORY);">x</a>]</p></li>
81
                                    <li><p class="navbar-text"><a href="/cgi-bin/koha/opac-search-history.pl" title="View your search history">Search history</a> [<a class="logout" href="/cgi-bin/koha/opac-search-history.pl?action=delete" title="Delete your search history" onclick="return confirm(MSG_DELETE_SEARCH_HISTORY);">x</a>]</p></li>
82
                                    <li class="divider-vertical"></li>
82
                                    <li class="divider-vertical"></li>
83
                                [% END %]
83
                                [% END %]
Lines 284-287 Link Here
284
                <a href="#" data-dismiss="modal" aria-hidden="true" class="cancel">Cancel</a>
284
                <a href="#" data-dismiss="modal" aria-hidden="true" class="cancel">Cancel</a>
285
            </div>
285
            </div>
286
        </form> <!-- /#auth -->
286
        </form> <!-- /#auth -->
287
    </div>  <!-- /#modalAuth  -->
287
    </div>  <!-- /#modalAuth  -->
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc (-1 / +1 lines)
Lines 41-47 Link Here
41
                <a href="/cgi-bin/koha/opac-passwd.pl">change your password</a></li>
41
                <a href="/cgi-bin/koha/opac-passwd.pl">change your password</a></li>
42
            [% END %]
42
            [% END %]
43
43
44
            [% IF ( ShowOpacRecentSearchLink ) %]
44
            [% IF EnableOpacSearchHistory %]
45
                [% IF ( searchhistoryview ) %]
45
                [% IF ( searchhistoryview ) %]
46
                    <li class="active">
46
                    <li class="active">
47
                [% ELSE %]
47
                [% ELSE %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt (-36 / +126 lines)
Lines 30-84 Link Here
30
            [% ELSE %]
30
            [% ELSE %]
31
                <div class="span12">
31
                <div class="span12">
32
            [% END %]
32
            [% END %]
33
34
                <div id="searchhistory" class="maincontent">
33
                <div id="searchhistory" class="maincontent">
35
                    <h1>Search history</h1>
34
                    <h1>Search history</h1>
36
                        [% IF ( recentSearches ) %]<form action="/cgi-bin/koha/opac-search-history.pl" method="get"><input type="hidden" name="action" value="delete" /><input type="submit" class="btn btn-danger" value="Delete your search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" /></form>[% ELSE %][% IF ( previousSearches ) %]<form action="/cgi-bin/koha/opac-search-history.pl" method="get"><input type="hidden" name="action" value="delete" /><input type="submit" class="btn btn-danger" value="Delete your search history" onclick="return confirm(MSG_CONFIRM_DELETE_HISTORY);" /></form>[% END %][% END %]
37
35
38
                        [% IF ( recentSearches ) %]
36
                    [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]
39
                            <table class="historyt table table-bordered table-condensed table-striped">
37
                      <div id="tabs" class="toptabs">
40
                            [% IF ( previousSearches ) %]
38
                        <ul>
41
                                <caption>Current session</caption>
39
                          <li><a href="#biblio_tab">Catalog</a></li>
40
                          <li><a href="#authority_tab">Authority</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>
42
                            [% END %]
67
                            [% END %]
43
                                <thead>
68
                            </tbody>
44
                                    <tr><th>Date</th><th>Search</th><th>Results</th></tr>
69
                          </table>
45
                                </thead>
46
                                <tbody>
47
                                [% FOREACH recentSearche IN recentSearches %]
48
                                    <tr>
49
                                        <td><span title="[% recentSearche.time %]">[% recentSearche.time |$KohaDates with_hours => 1 %]</span></td>
50
                                        <td><a href="/cgi-bin/koha/opac-search.pl?[% recentSearche.query_cgi |html %]">[% recentSearche.query_desc |html %]</a></td>
51
                                        <td>[% recentSearche.total %]</td>
52
                                    </tr>
53
                                [% END %]
54
                                </tbody>
55
                            </table>
56
                        [% END %]
70
                        [% END %]
57
71
58
                        [% IF ( previousSearches ) %]
72
                        [% IF ( previous_biblio_searches ) %]
59
                        <table class="historyt table table-bordered table-condensed table-striped">
73
                          <h2>Previous sessions</h2>
60
                            <caption>Previous sessions</caption>
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">
61
                            <thead>
81
                            <thead>
62
                                <tr><th>Date</th><th>Search</th><th>Results</th></tr>
82
                              <tr>
83
                                <th>Date</th>
84
                                <th>Search</th>
85
                                <th>Results</th>
86
                              </tr>
63
                            </thead>
87
                            </thead>
64
                            <tbody>
88
                            <tbody>
65
                                [% FOREACH previousSearche IN previousSearches %]
89
                            [% FOREACH s IN previous_biblio_searches %]
66
                                    <tr>
90
                              <tr>
67
                                        <td><span title="[% previousSearche.time %]">[% previousSearche.time |$KohaDates with_hours => 1 %]</span></td>
91
                                <td><span title="[% s.time %]">[% s.time |$KohaDates with_hours => 1 %]</span></td>
68
                                        <td><a href="/cgi-bin/koha/opac-search.pl?[% previousSearche.query_cgi |html %]">[% previousSearche.query_desc |html %]</a></td>
92
                                <td><a href="/cgi-bin/koha/opac-search.pl?[% s.query_cgi |html %]">[% s.query_desc |html %]</a></td>
69
                                        <td>[% previousSearche.total %]</td>
93
                                <td>[% s.total %]</td>
70
                                    </tr>
94
                              </tr>
71
                                [% END %]
95
                            [% END %]
72
                            </tbody>
96
                            </tbody>
73
                        </table>
97
                          </table>
74
                        [% END %]
98
                        [% END %]
75
99
76
                        [% UNLESS ( recentSearches ) %]
100
                        [% IF !current_biblio_searches && !previous_biblio_searches %]
77
                           [% UNLESS ( previousSearches ) %]
101
                          <p>Your catalog search history is empty.</p>
78
                                <p>Your 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>
79
                            [% END %]
131
                            [% END %]
132
                            </tbody>
133
                          </table>
80
                        [% END %]
134
                        [% END %]
81
                     </div>
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>
82
                </div>
171
                </div>
83
            </div>
172
            </div>
84
        </div>
173
        </div>
Lines 102-107 Link Here
102
                ]
191
                ]
103
            }));
192
            }));
104
        });
193
        });
194
195
    [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]$('#tabs').tabs();[% END %]
105
//]]>
196
//]]>
106
197
107
</script>
198
</script>
108
- 

Return to bug 10807