Bugzilla – Attachment 133485 Details for
Bug 30474
Convert tools pages tabs to Bootstrap (part 1)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30474: Convert tools pages tabs to Bootstrap (part 1)
Bug-30474-Convert-tools-pages-tabs-to-Bootstrap-pa.patch (text/plain), 16.68 KB, created by
Martin Renvoize (ashimema)
on 2022-04-20 15:35:45 UTC
(
hide
)
Description:
Bug 30474: Convert tools pages tabs to Bootstrap (part 1)
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-04-20 15:35:45 UTC
Size:
16.68 KB
patch
obsolete
>From 74abe61fda7cf3535fb7b03261019cfcc3d8da71 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 6 Apr 2022 16:52:39 +0000 >Subject: [PATCH] Bug 30474: Convert tools pages tabs to Bootstrap (part 1) > >This patch converts jQueryUI tabs on three tools templates to Bootstrap >tabs. > >To test, apply the patch and go to Tools -> HTML customizations. > >- Click "New entry." >- On the entry form you should see two tabs, "Default" and "English > (en)" >- The tabs should look correct and work correctly. > >Go to Tools -> Batch record deletion. > > - Test the three tabs: "Upload a file", "Select a list of records", and > "Enter a list of record numbers." > >Go to Tools -> Batch record modification. > > - Test the same three tabs on this page. > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../en/modules/tools/additional-contents.tt | 50 ++++++----- > .../en/modules/tools/batch_delete_records.tt | 31 ++++--- > .../tools/batch_record_modification.tt | 89 ++++++++++--------- > 3 files changed, 93 insertions(+), 77 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >index fed0a8864e..33632c2472 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >@@ -235,35 +235,35 @@ > </fieldset> > > [% IF languages.size %] >- <div style="clear:both"></div> >- <div id="tabs"> >- <ul> >+ <div id="tabs" class="toptabs"> >+ <ul class="nav nav-tabs" role="tablist"> > [% FOR language IN languages %] > [% IF language.lang == 'default' %] >- <li><a href="#lang_default">Default</a></li> >+ <li role="presentation"><a href="#lang_default" aria-controls="lang_default" role="tab" data-toggle="tab">Default</a></li> > [% ELSE %] >- <li><a href="#lang_[% language.lang | uri %]">[% language.description | html %]</a></li> >+ <li role="presentation"><a href="#lang_[% language.lang | uri %]" aria-controls="lang_[% language.lang | uri %]" role="tab" data-toggle="tab">[% language.description | html %]</a></li> > [% END %] > [% END %] > </ul> >- >- [% FOR language IN languages %] >- <div id="lang_[% language.lang | uri %]" class="lang clearfix" data-lang="[% language.description | html %]"> >- <fieldset class="rows"> >- <ol> >- <li style="list-style: none;"> >- <label for="title_[% language.lang | html %]">Title: </label> >- <input id="title_[% language.lang| html %]" size="100" maxlength="250" type="text" name="title_[% language.lang | html %]" value="[% translated_contents.item(language.lang).title | html %]"> >- </li> >- <li style="list-style: none;"> >- <label for="content_[% language.lang | html %]">Content: </label> >- <textarea name="content_[% language.lang | html %]" id="content_[% language.lang | html %]" data-lang="[% language.lang | html%]" cols="75" rows="10">[% translated_contents.item(language.lang).content | html %]</textarea> >- <input type="hidden" name="lang" value="[% language.lang | html %]" /> >- </li> >- </ol> >- </fieldset> >- </div> >- [% END %] >+ <div class="tab-content"> >+ [% FOR language IN languages %] >+ <div id="lang_[% language.lang | uri %]" class="lang clearfix tab-pane" data-lang="[% language.description | html %]"> >+ <fieldset class="rows"> >+ <ol> >+ <li> >+ <label for="title_[% language.lang | html %]">Title: </label> >+ <input id="title_[% language.lang| html %]" size="100" maxlength="250" type="text" name="title_[% language.lang | html %]" value="[% translated_contents.item(language.lang).title | html %]"> >+ </li> >+ <li> >+ <label for="content_[% language.lang | html %]">Content: </label> >+ <textarea name="content_[% language.lang | html %]" id="content_[% language.lang | html %]" data-lang="[% language.lang | html%]" cols="75" rows="10">[% translated_contents.item(language.lang).content | html %]</textarea> >+ <input type="hidden" name="lang" value="[% language.lang | html %]" /> >+ </li> >+ </ol> >+ </fieldset> >+ </div> >+ [% END %] >+ </div> <!-- /.tab-content --> > </div> > [% ELSE %] > <div id="lang_default"> >@@ -558,7 +558,9 @@ > [% ELSE %] > <script> > $(document).ready(function() { >- $("#tabs").tabs(); >+ if( $("#tabs .tab-pane.active").length < 1 ){ >+ $("#tabs a:first").tab("show"); >+ } > [% IF category == 'news' %] > $("#add_additional_content").validate({ > submitHandler: function(form){ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt >index 469ec64868..f66ab23df8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt >@@ -66,14 +66,23 @@ > </ol> > </fieldset> > >- <div id="batch_del_form" class="toptabs" style="clear:both"> >- <ul> >- <li><a href="#uploadfile_tab">Upload a file</a></li> >- [% IF lists.count %]<li id="show_list_option"><a href="#shelves_tab">Select a list of records</a></li>[% END %] >- <li><a href="#enterlist_tab">Enter a list of record numbers</a></li> >+ <div id="batch_del_form" class="toptabs"> >+ <ul class="nav nav-tabs" role="tablist"> >+ <li role="presentation" class="active"> >+ <a href="#uploadfile_tab" aria-controls="uploadfile_tab" role="tab" data-toggle="tab">Upload a file</a> >+ </li> >+ [% IF lists.count %] >+ <li id="show_list_option" role="presentation"> >+ <a href="#shelves_tab" aria-controls="shelves_tab" role="tab" data-toggle="tab">Select a list of records</a> >+ </li> >+ [% END %] >+ <li role="presentation"> >+ <a href="#enterlist_tab" aria-controls="enterlist_tab" role="tab" data-toggle="tab">Enter a list of record numbers</a> >+ </li> > </ul> > >- <div id="uploadfile_tab"> >+ <div class="tab-content"> >+ <div id="uploadfile_tab" role="tabpanel" class="tab-pane active"> > <fieldset class="rows"> > <legend>Use a file</legend> > <ol> >@@ -84,7 +93,7 @@ > </div> > > [% IF lists.count %] >- <div id="shelves_tab"> >+ <div id="shelves_tab" role="tabpanel" class="tab-pane"> > <fieldset class="rows"> > <legend>Or select a list of records</legend> > <ol> >@@ -95,7 +104,6 @@ > [% FOREACH list IN lists %] > <option value="[% list.shelfnumber | html %]">[% list.shelfname | html %]</option> > [% END %] >- </option> > </select> > </li> > </ol> >@@ -104,7 +112,7 @@ > </div> > [% END %] > >- <div id="enterlist_tab"> >+ <div id="enterlist_tab" role="tabpanel" class="tab-pane"> > <fieldset class="rows"> > <legend>Or enter a list of record numbers</legend> > <ol> >@@ -117,7 +125,8 @@ > > </div> > >- </div> >+ </div> <!-- /.tab-content --> >+ </div> > > <fieldset class="action"> > <input type="hidden" name="op" value="list" /> >@@ -229,8 +238,6 @@ > var MSG_CANNOT_BE_DELETED = _("This record cannot be deleted, at least one item is currently checked out."); > $(document).ready(function() { > >- $("#batch_del_form").tabs(); >- > $("input[type='radio']").click(function(){ > if ($(this).attr('id') == 'authority_type') { > $("#show_list_option").hide(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt >index a88f84c6b2..e4a943c303 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt >@@ -75,56 +75,65 @@ > <br><br> > > <div id="batch_mod_form" class="toptabs" style="clear:both"> >- <ul> >- <li><a href="#uploadfile_tab">Upload a file</a></li> >- [% IF lists.count %]<li id="show_list_option"><a href="#shelves_tab">Select a list of records</a></li>[% END %] >- <li><a href="#enterlist_tab">Enter a list of record numbers</a></li> >+ <ul class="nav nav-tabs" role="tablist"> >+ <li role="presentation" class="active"> >+ <a href="#uploadfile_tab" aria-controls="uploadfile_tab" role="tab" data-toggle="tab">Upload a file</a> >+ </li> >+ [% IF lists.count %] >+ <li id="show_list_option"> >+ <a href="#shelves_tab" aria-controls="shelves_tab" role="tab" data-toggle="tab">Select a list of records</a> >+ </li> >+ [% END %] >+ <li role="presentation"> >+ <a href="#enterlist_tab" aria-controls="enterlist_tab" role="tab" data-toggle="tab">Enter a list of record numbers</a> >+ </li> > </ul> > >- <div id="uploadfile_tab"> >- <fieldset class="rows"> >- <legend>Use a file</legend> >- <ol> >- <li><label for="uploadfile">File: </label> <input type="file" id="uploadfile" name="uploadfile" /></li> >- </ol> >- </fieldset> >- >- </div> >+ <div class="tab-content"> >+ <div id="uploadfile_tab" role="tabpanel" class="tab-pane active"> >+ <fieldset class="rows"> >+ <legend>Use a file</legend> >+ <ol> >+ <li><label for="uploadfile">File: </label> <input type="file" id="uploadfile" name="uploadfile" /></li> >+ </ol> >+ </fieldset> >+ >+ </div> > >- [% IF lists.count %] >- <div id="shelves_tab"> >+ [% IF lists.count %] >+ <div id="shelves_tab" role="tabpanel" class="tab-pane"> >+ <fieldset class="rows"> >+ <legend>Or select a list of records</legend> >+ <ol> >+ <li> >+ <label for="shelf_number">Use records from the following list: </label> >+ <select name="shelf_number" id="shelf_number"> >+ <option value="">Select a list</option> >+ [% FOREACH list IN lists %] >+ <option value="[% list.shelfnumber | html %]">[% list.shelfname | html %]</option> >+ [% END %] >+ </option> >+ </select> >+ </li> >+ </ol> >+ </fieldset> >+ >+ </div> >+ [% END %] >+ >+ <div id="enterlist_tab" role="tabpanel" class="tab-pane"> > <fieldset class="rows"> >- <legend>Or select a list of records</legend> >+ <legend>Or enter a list of record numbers</legend> > <ol> > <li> >- <label for="shelf_number">Use records from the following list: </label> >- <select name="shelf_number" id="shelf_number"> >- <option value="">Select a list</option> >- [% FOREACH list IN lists %] >- <option value="[% list.shelfnumber | html %]">[% list.shelfname | html %]</option> >- [% END %] >- </option> >- </select> >+ <label for="recordnumber_list">List of biblionumbers or authority ids (one per line): </label> >+ <textarea rows="10" cols="30" id="recordnumber_list" name="recordnumber_list"></textarea> > </li> > </ol> > </fieldset> > > </div> >- [% END %] >- >- <div id="enterlist_tab"> >- <fieldset class="rows"> >- <legend>Or enter a list of record numbers</legend> >- <ol> >- <li> >- <label for="recordnumber_list">List of biblionumbers or authority ids (one per line): </label> >- <textarea rows="10" cols="30" id="recordnumber_list" name="recordnumber_list"></textarea> >- </li> >- </ol> >- </fieldset> >- >- </div> >- >+ </div> <!-- /.tab-content --> > </div> <!-- /#batch_mod_form --> > > <fieldset class="rows"> >@@ -279,8 +288,6 @@ > <script> > $(document).ready(function() { > >- $("#batch_mod_form").tabs(); >- > $("input[type='radio']").click(function() { > if ($(this).attr('id') == 'authority_type') { > $("#show_list_option").hide(); >-- >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 30474
:
133046
|
133236
|
133237
|
133271
|
133272
|
133485
|
133486
|
134532
|
134533
|
134609
|
134610