Bugzilla – Attachment 131928 Details for
Bug 30317
Replace the use of jQueryUI tabs on search history page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30317: Replace the use of jQueryUI tabs on search history page
Bug-30317-Replace-the-use-of-jQueryUI-tabs-on-sear.patch (text/plain), 20.30 KB, created by
Owen Leonard
on 2022-03-18 16:24:24 UTC
(
hide
)
Description:
Bug 30317: Replace the use of jQueryUI tabs on search history page
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2022-03-18 16:24:24 UTC
Size:
20.30 KB
patch
obsolete
>From afc6568d3e52e46964cbb6fdaf4d1175b9b751cc Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 18 Mar 2022 16:06:53 +0000 >Subject: [PATCH] Bug 30317: Replace the use of jQueryUI tabs on search history > page > >This patch replaces jQueryUI tabs on the staff interface's search >history page, replacing them with Bootstrap tabs. > >To test, apply the patch and perform some bibliographic and >authority searches in the staff client if necessary. > >Go to the search history page and test that the "Catalog" and >"Authority" tabs work correctly. >--- > .../en/modules/catalogue/search-history.tt | 336 +++++++++--------- > 1 file changed, 168 insertions(+), 168 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt >index 30eea94edf..0ef57c025b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt >@@ -34,179 +34,181 @@ > <div class="col-sm-12 col-md-8 col-md-offset-2"> > > <h1>Search history</h1> >- <div id="tabs" class="toptabs"> >- <ul> >- <li><a href="#biblio_tab">Catalog</a></li> >- <li><a href="#authority_tab">Authority</a></li> >- </ul> >- <div id="biblio_tab"> >- [% IF ( current_biblio_searches ) %] >- <h2>Current session</h2> >- <form id="current_cat" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> >- <p class="selections-toolbar"> >- <a class="CheckAll" data-form="current_cat" href="#"><i class="fa fa-check"></i> Select all visible rows</a> >- <span class="sep">|</span> >- <a class="CheckNone" data-form="current_cat" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> >- <span class="sep">|</span> >- <span class="links"> >- <span class="selections">Select searches to: </span> >- <a href="#" class="action_delete disabled">Delete</a> >- </span> >- </p> >- <input type="hidden" name="action" value="delete" /> >- <table class="historyt"> >- <thead> >- <tr> >- <th></th> >- <th>Date</th> >- <th>Search</th> >- <th>Results</th> >- </tr> >- </thead> >- <tbody> >- [% FOREACH s IN current_biblio_searches %] >- <tr> >- <td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> >- <td data-order="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</td> >- <td><a href="/cgi-bin/koha/catalogue/search.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> >- <td>[% s.total | html %]</td> >- </tr> >- [% END %] >- </tbody> >- </table> >- </form> >- [% END %] >+ <div id="tabs" class="toptabs"> >+ <ul class="nav nav-tabs" role="tablist"> >+ <li role="presentation" class="active"><a href="#biblio_tab" aria-controls="biblio_tab" role="tab" data-toggle="tab">Catalog</a></li> >+ <li role="presentation"><a href="#authority_tab" aria-controls="authority_tab" role="tab" data-toggle="tab">Authority</a></li> >+ </ul> >+ <div class="tab-content"> >+ <div role="tabpanel" class="tab-pane active" id="biblio_tab"> >+ [% IF ( current_biblio_searches ) %] >+ <h2>Current session</h2> >+ <form id="current_cat" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> >+ <p class="selections-toolbar"> >+ <a class="CheckAll" data-form="current_cat" href="#"><i class="fa fa-check"></i> Select all visible rows</a> >+ <span class="sep">|</span> >+ <a class="CheckNone" data-form="current_cat" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> >+ <span class="sep">|</span> >+ <span class="links"> >+ <span class="selections">Select searches to: </span> >+ <a href="#" class="action_delete disabled">Delete</a> >+ </span> >+ </p> >+ <input type="hidden" name="action" value="delete" /> >+ <table class="historyt"> >+ <thead> >+ <tr> >+ <th></th> >+ <th>Date</th> >+ <th>Search</th> >+ <th>Results</th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH s IN current_biblio_searches %] >+ <tr> >+ <td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> >+ <td data-order="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</td> >+ <td><a href="/cgi-bin/koha/catalogue/search.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> >+ <td>[% s.total | html %]</td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ </form> >+ [% END %] > >- [% IF ( current_biblio_searches && previous_biblio_searches) %] >- <hr /> >- [% END %] >+ [% IF ( current_biblio_searches && previous_biblio_searches) %] >+ <hr /> >+ [% END %] > >- [% IF ( previous_biblio_searches ) %] >- <h2>Previous sessions</h2> >- <form id="previous_cat" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> >- <p class="selections-toolbar"> >- <a class="CheckAll" data-form="previous_cat" href="#"><i class="fa fa-check"></i> Select all visible rows</a> >- <span class="sep">|</span> >- <a class="CheckNone" data-form="previous_cat" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> >- <span class="sep">|</span> >- <span class="links"> >- <span class="selections">Select searches to: </span> >- <a href="#" class="action_delete disabled">Delete</a> >- </span> >- </p> >- <input type="hidden" name="action" value="delete" /> >- <table class="historyt"> >- <thead> >- <tr> >- <th></th> >- <th>Date</th> >- <th>Search</th> >- <th>Results</th> >- </tr> >- </thead> >- <tbody> >- [% FOREACH s IN previous_biblio_searches %] >- <tr> >- <td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> >- <td data-order="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</td> >- <td><a href="/cgi-bin/koha/catalogue/search.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> >- <td>[% s.total | html %]</td> >- </tr> >- [% END %] >- </tbody> >- </table> >- </form> >- [% END %] >+ [% IF ( previous_biblio_searches ) %] >+ <h2>Previous sessions</h2> >+ <form id="previous_cat" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> >+ <p class="selections-toolbar"> >+ <a class="CheckAll" data-form="previous_cat" href="#"><i class="fa fa-check"></i> Select all visible rows</a> >+ <span class="sep">|</span> >+ <a class="CheckNone" data-form="previous_cat" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> >+ <span class="sep">|</span> >+ <span class="links"> >+ <span class="selections">Select searches to: </span> >+ <a href="#" class="action_delete disabled">Delete</a> >+ </span> >+ </p> >+ <input type="hidden" name="action" value="delete" /> >+ <table class="historyt"> >+ <thead> >+ <tr> >+ <th></th> >+ <th>Date</th> >+ <th>Search</th> >+ <th>Results</th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH s IN previous_biblio_searches %] >+ <tr> >+ <td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> >+ <td data-order="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</td> >+ <td><a href="/cgi-bin/koha/catalogue/search.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> >+ <td>[% s.total | html %]</td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ </form> >+ [% END %] > >- [% IF !current_biblio_searches && !previous_biblio_searches %] >- <p>Your catalog search history is empty.</p> >- [% END %] >- </div> >+ [% IF !current_biblio_searches && !previous_biblio_searches %] >+ <p>Your catalog search history is empty.</p> >+ [% END %] >+ </div> <!-- /#biblio_tab --> > >- <div id="authority_tab"> >- [% IF ( current_authority_searches ) %] >- <h2>Current session</h2> >- <form id="current_auth" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> >- <p class="selections-toolbar"> >- <a class="CheckAll" data-form="current_auth" href="#"><i class="fa fa-check"></i> Select all visible rows</a> >- <span class="sep">|</span> >- <a class="CheckNone" data-form="current_auth" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> >- <span class="sep">|</span> >- <span class="links"> >- <span class="selections">Select searches to: </span> >- <a href="#" class="action_delete disabled">Delete</a> >- </span> >- </p> >- <input type="hidden" name="action" value="delete" /> >- <table class="historyt"> >- <thead> >- <tr> >- <th></th> >- <th>Date</th> >- <th>Search</th> >- <th>Results</th> >- </tr> >- </thead> >- <tbody> >- [% FOREACH s IN current_authority_searches %] >- <tr> >- <td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> >- <td data-order="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</td> >- <td><a href="/cgi-bin/koha/authorities/authorities-home.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> >- <td>[% s.total | html %]</td> >- </tr> >- [% END %] >- </tbody> >- </table> >- </form> >- [% END %] >+ <div id="authority_tab" role="tabpanel" class="tab-pane"> >+ [% IF ( current_authority_searches ) %] >+ <h2>Current session</h2> >+ <form id="current_auth" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> >+ <p class="selections-toolbar"> >+ <a class="CheckAll" data-form="current_auth" href="#"><i class="fa fa-check"></i> Select all visible rows</a> >+ <span class="sep">|</span> >+ <a class="CheckNone" data-form="current_auth" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> >+ <span class="sep">|</span> >+ <span class="links"> >+ <span class="selections">Select searches to: </span> >+ <a href="#" class="action_delete disabled">Delete</a> >+ </span> >+ </p> >+ <input type="hidden" name="action" value="delete" /> >+ <table class="historyt"> >+ <thead> >+ <tr> >+ <th></th> >+ <th>Date</th> >+ <th>Search</th> >+ <th>Results</th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH s IN current_authority_searches %] >+ <tr> >+ <td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> >+ <td data-order="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</td> >+ <td><a href="/cgi-bin/koha/authorities/authorities-home.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> >+ <td>[% s.total | html %]</td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ </form> >+ [% END %] > >- [% IF ( current_authority_searches && previous_authority_searches) %] >- <hr /> >- [% END %] >+ [% IF ( current_authority_searches && previous_authority_searches) %] >+ <hr /> >+ [% END %] > >- [% IF ( previous_authority_searches ) %] >- <h2>Previous sessions</h2> >- <form id="previous_auth" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> >- <p class="selections-toolbar"> >- <a class="CheckAll" data-form="previous_auth" href="#"><i class="fa fa-check"></i> Select all visible rows</a> >- <span class="sep">|</span> >- <a class="CheckNone" data-form="previous_auth" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> >- <span class="sep">|</span> >- <span class="links"> >- <span class="selections">Select searches to: </span> >- <a href="#" class="action_delete disabled">Delete</a> >- </span> >- </p> >- <input type="hidden" name="action" value="delete" /> >- <table class="historyt"> >- <thead> >- <tr> >- <th></th> >- <th>Date</th> >- <th>Search</th> >- <th>Results</th> >- </tr> >- </thead> >- <tbody> >- [% FOREACH s IN previous_authority_searches %] >- <tr> >- <td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> >- <td data-order="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</td> >- <td><a href="/cgi-bin/koha/authorities/authorities-home.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> >- <td>[% s.total | html %]</td> >- </tr> >- [% END %] >- </tbody> >- </table> >- </form> >- [% END %] >+ [% IF ( previous_authority_searches ) %] >+ <h2>Previous sessions</h2> >+ <form id="previous_auth" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> >+ <p class="selections-toolbar"> >+ <a class="CheckAll" data-form="previous_auth" href="#"><i class="fa fa-check"></i> Select all visible rows</a> >+ <span class="sep">|</span> >+ <a class="CheckNone" data-form="previous_auth" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> >+ <span class="sep">|</span> >+ <span class="links"> >+ <span class="selections">Select searches to: </span> >+ <a href="#" class="action_delete disabled">Delete</a> >+ </span> >+ </p> >+ <input type="hidden" name="action" value="delete" /> >+ <table class="historyt"> >+ <thead> >+ <tr> >+ <th></th> >+ <th>Date</th> >+ <th>Search</th> >+ <th>Results</th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH s IN previous_authority_searches %] >+ <tr> >+ <td><input type="checkbox" name="id" value="[% s.id | html %]" /></td> >+ <td data-order="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</td> >+ <td><a href="/cgi-bin/koha/authorities/authorities-home.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> >+ <td>[% s.total | html %]</td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ </form> >+ [% END %] > >- [% IF !current_authority_searches && !previous_authority_searches %] >- <p>Your authority search history is empty.</p> >- [% END %] >- </div> [% # /authority_tab %] >- </div> [% # /tabs %] >+ [% IF !current_authority_searches && !previous_authority_searches %] >+ <p>Your authority search history is empty.</p> >+ [% END %] >+ </div> [% # /authority_tab %] >+ </div> <!-- /.tab-content --> >+ </div> [% # /tabs %] > </div> [% # /div.col-md-8 %] > </div> [% # /div.row %] > >@@ -224,8 +226,6 @@ > "sPaginationType": "full_numbers" > })); > >- $('#tabs').tabs(); >- > // DataTables removes hidden rows from the DOM, so we can't expect a > // "regular" submit to work and we need to build another form containing > // all form elements, and then submit this form. >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30317
:
131928
|
131984