Bugzilla – Attachment 83316 Details for
Bug 21964
Switch two-column templates to Bootstrap grid: Patrons part 2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21964: Update two-column templates with Bootstrap grid: Patrons part 2
Bug-21964-Update-two-column-templates-with-Bootstr.patch (text/plain), 22.57 KB, created by
Jonathan Druart
on 2018-12-17 21:11:49 UTC
(
hide
)
Description:
Bug 21964: Update two-column templates with Bootstrap grid: Patrons part 2
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-12-17 21:11:49 UTC
Size:
22.57 KB
patch
obsolete
>From 1dba789a1c4a93303846b1aa2b3bbe0bbcfa7724 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 2 May 2018 17:56:43 +0000 >Subject: [PATCH] Bug 21964: Update two-column templates with Bootstrap grid: > Patrons part 2 > >This patch modifies several patron templates to use the Bootstrap grid >instead of YUI. > >This patch also removes obsolete "text/javascript" attributes from ><script> tags in the modified templates. > >To test, apply the patch and view the following pages, confirming that >they look correct at various browser widths: > > - Patrons home page > - New patron > - Patron -> Fines -> Create manual invoice > - Patron -> Set permissions > - Patron -> Change password > - Patron -> Edit > >Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../prog/en/modules/members/maninvoice.tt | 26 +-- > .../prog/en/modules/members/member-flags.tt | 27 +-- > .../prog/en/modules/members/member-password.tt | 29 +-- > .../prog/en/modules/members/member.tt | 239 +++++++++++---------- > .../prog/en/modules/members/memberentrygen.tt | 41 ++-- > 5 files changed, 191 insertions(+), 171 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt >index 3014227bae..4c02ef18d9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt >@@ -14,11 +14,11 @@ > > <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Manual invoice</div> > >-<div id="doc3" class="yui-t2"> >- >- <div id="bd"> >- <div id="yui-main"> >- <div class="yui-b"> >+<div class="main container-fluid"> >+ <div class="row"> >+ <div class="col-sm-10 col-sm-push-2"> >+ <main> >+ > [% INCLUDE 'members-toolbar.inc' %] > > <!-- The manual invoice and credit buttons --> >@@ -65,18 +65,20 @@ > [% END %] > </div></div> > >-</div> >-</div> >+ </main> >+ </div> <!-- /.col-sm-10.col-sm-push-2 --> > >-<div class="yui-b"> >-[% INCLUDE 'circ-menu.inc' %] >-</div> >-</div> >+ <div class="col-sm-2 col-sm-pull-10"> >+ <aside> >+ [% INCLUDE 'circ-menu.inc' %] >+ </aside> >+ </div> <!-- /.col-sm-2.col-sm-pull-10 --> >+ </div> <!-- /.row --> > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'str/members-menu.inc' %] > [% Asset.js("js/members-menu.js") | $raw %] >- <script type="text/javascript"> >+ <script> > var type_fees = {'L':'','F':'','A':'','N':'','M':''}; > [% FOREACH invoice_types_loo IN invoice_types_loop %] > type_fees['[% invoice_types_loo.authorised_value | html %]'] = "[% invoice_types_loo.lib | html %]"; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt >index c46e1ff04c..f4d1c2a85e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt >@@ -15,11 +15,11 @@ > > <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Set permissions for [% patron.surname | html %], [% patron.firstname | html %]</div> > >-<div id="doc3" class="yui-t2"> >- >- <div id="bd"> >- <div id="yui-main"> >- <div class="yui-b"> >+<div class="main container-fluid"> >+ <div class="row"> >+ <div class="col-sm-10 col-sm-push-2"> >+ <main> >+ > [% INCLUDE 'members-toolbar.inc' %] > > <form method="post" action="/cgi-bin/koha/members/member-flags.pl"> >@@ -78,20 +78,23 @@ > <fieldset class="action"><input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | html %]">Cancel</a></fieldset> > > </form> >-</div> >-</div> > >-<div class="yui-b"> >-[% INCLUDE 'circ-menu.inc' %] >-</div> >-</div> >+ </main> >+ </div> <!-- /.col-sm-10.col-sm-push-2 --> >+ >+ <div class="col-sm-2 col-sm-pull-10"> >+ <aside> >+ [% INCLUDE 'circ-menu.inc' %] >+ </aside> >+ </div> <!-- /.col-sm-2.col-sm-pull-10 --> >+ </div> <!-- /.row --> > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'str/members-menu.inc' %] > [% Asset.js("js/members-menu.js") | $raw %] > [% Asset.js("lib/jquery/plugins/jquery.treeview.pack.js") | $raw %] > <!-- set up tree --> >- <script type="text/javascript"> >+ <script> > $(document).ready(function() { > $("#permissionstree").treeview({animated: "fast", collapsed: true}); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt >index eeb4178791..7a3971f34e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt >@@ -14,11 +14,11 @@ > > <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | html %]">[% patron.firstname | html %] [% patron.surname | html %]</a> › [% IF ( newpassword ) %]Password Updated[% ELSE %]Change username and/or password[% END %]</div> > >-<div id="doc3" class="yui-t2"> >+<div class="main container-fluid"> >+ <div class="row"> >+ <div class="col-sm-10 col-sm-push-2"> >+ <main> > >- <div id="bd"> >- <div id="yui-main"> >- <div class="yui-b"> > [% INCLUDE 'members-toolbar.inc' %] > > [% IF ( newpassword ) %] >@@ -83,19 +83,22 @@ > </fieldset> > </form>[% END %] > >-</div> >-</div> >+ > <div class="loading hide"><strong>Processing...</strong><img src="[% interface | html %]/[% theme | html %]/img/loading.gif" alt="" /></div> >-<div class="yui-b"> >-[% INCLUDE 'circ-menu.inc' %] >-</div> >-</div> >+ >+ </main> >+ </div> <!-- /.col-sm-10.col-sm-push-2 --> >+ >+ <div class="col-sm-2 col-sm-pull-10"> >+ <aside> >+ [% INCLUDE 'circ-menu.inc' %] >+ </aside> >+ </div> <!-- /.col-sm-2.col-sm-pull-10 --> >+ </div> <!-- /.row --> > > [% MACRO jsinclude BLOCK %] >- [% INCLUDE 'str/members-menu.inc' %] > [% Asset.js("js/members-menu.js") | $raw %] >- <script type="text/JavaScript"> >- >+ <script> > function generate_password() { > // Always generate a strong password > var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >index 7ca2d2e88e..cf98395897 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >@@ -17,11 +17,11 @@ > > <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › [% IF ( searching ) %]<a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Search results[% ELSE %]Patrons[% END %]</div> > >-<div id="doc3" class="yui-t2"> >- <div id="bd"> >- <div id="yui-main"> >- <div class="yui-b"> >- <div class="yui-g"> >+<div class="main container-fluid"> >+ <div class="row"> >+ <div class="col-sm-10 col-sm-push-2"> >+ <main> >+ > [% IF CAN_user_tools_manage_patron_lists %] > <div id="patron_list_dialog" class="dialog alert"> > Added <span class="patrons-length"></span> patrons to <a></a>. >@@ -110,127 +110,130 @@ > <tbody></tbody> > </table> > </div> >- </div> >- </div> >- </div> >- <div class="yui-b"> >- <form method="get" id="searchform"> >- <input type="hidden" id="firstletter_filter" value="" /> >- <fieldset class="brief"> >- <h3>Filters</h3> >- <ol> >- <li> >- <label for="searchmember_filter">Search:</label> >- <input type="text" id="searchmember_filter" value="[% searchmember | html %]"/> >- </li> >- <li> >- <label for="searchfieldstype_filter">Search fields:</label> >- <select name="searchfieldstype" id="searchfieldstype_filter"> >- [% IF searchfieldstype == "standard" %] >- <option selected="selected" value='standard'>Standard</option> >- [% ELSE %] >- <option value='standard'>Standard</option> >- [% END %] >- [% IF searchfieldstype == "surname" %] >- <option selected="selected" value='surname'>Surname</option> >- [% ELSE %] >- <option value='surname'>Surname</option> >- [% END %] >- [% IF searchfieldstype == "email" %] >- <option selected="selected" value='email'>Email</option> >- [% ELSE %] >- <option value='email'>Email</option> >- [% END %] >- [% IF searchfieldstype == "borrowernumber" %] >- <option selected="selected" value='borrowernumber'>Borrower number</option> >- [% ELSE %] >- <option value='borrowernumber'>Borrower number</option> >- [% END %] >- [% IF searchfieldstype == "userid" %] >- <option selected="selected" value='userid'>Username</option> >- [% ELSE %] >- <option value='userid'>Username</option> >- [% END %] >- [% IF searchfieldstype == "phone" %] >- <option selected="selected" value='phone'>Phone number</option> >- [% ELSE %] >- <option value='phone'>Phone number</option> >- [% END %] >- [% IF searchfieldstype == "address" %] >- <option selected="selected" value='address'>Street address</option> >- [% ELSE %] >- <option value='address'>Street address</option> >- [% END %] >- [% IF searchfieldstype == "dateofbirth" %] >- <option selected="selected" value='dateofbirth'>Date of birth</option> >- [% ELSE %] >- <option value='dateofbirth'>Date of birth</option> >- [% END %] >- [% IF searchfieldstype == "sort1" %] >- <option selected="selected" value='sort1'>Sort field 1</option> >- [% ELSE %] >- <option value='sort1'>Sort field 1</option> >- [% END %] >- [% IF searchfieldstype == "sort2" %] >- <option selected="selected" value='sort2'>Sort field 2</option> >- [% ELSE %] >- <option value='sort2'>Sort field 2</option> >- [% END %] >- </select> >- </li> >- <li> >- <label for="searchtype_filter">Search type:</label> >- <select name="searchtype" id="searchtype_filter"> >- [% IF searchtype == "start_with" %] >- <option value='start_with' selected="selected">Starts with</option> >- <option value="contain">Contains</option> >- [% ELSE %] >- <option value='start_with'>Starts with</option> >- <option value="contain" selected="selected">Contains</option> >- [% END %] >- </select> >- </li> >- <li> >- <label for="categorycode_filter">Category:</label> >- [% SET categories = Categories.all() %] >- <select id="categorycode_filter"> >- <option value="">Any</option> >- [% FOREACH cat IN categories %] >- [% IF cat.categorycode == categorycode_filter %] >+ >+ </main> >+ </div> <!-- /.col-sm-10.col-sm-push-2 --> >+ >+ <div class="col-sm-2 col-sm-pull-10"> >+ <aside> >+ <form method="get" id="searchform"> >+ <input type="hidden" id="firstletter_filter" value="" /> >+ <fieldset class="brief"> >+ <h3>Filters</h3> >+ <ol> >+ <li> >+ <label for="searchmember_filter">Search:</label> >+ <input type="text" id="searchmember_filter" value="[% searchmember | html %]"/> >+ </li> >+ <li> >+ <label for="searchfieldstype_filter">Search fields:</label> >+ <select name="searchfieldstype" id="searchfieldstype_filter"> >+ [% IF searchfieldstype == "standard" %] >+ <option selected="selected" value='standard'>Standard</option> >+ [% ELSE %] >+ <option value='standard'>Standard</option> >+ [% END %] >+ [% IF searchfieldstype == "surname" %] >+ <option selected="selected" value='surname'>Surname</option> >+ [% ELSE %] >+ <option value='surname'>Surname</option> >+ [% END %] >+ [% IF searchfieldstype == "email" %] >+ <option selected="selected" value='email'>Email</option> >+ [% ELSE %] >+ <option value='email'>Email</option> >+ [% END %] >+ [% IF searchfieldstype == "borrowernumber" %] >+ <option selected="selected" value='borrowernumber'>Borrower number</option> >+ [% ELSE %] >+ <option value='borrowernumber'>Borrower number</option> >+ [% END %] >+ [% IF searchfieldstype == "userid" %] >+ <option selected="selected" value='userid'>Username</option> >+ [% ELSE %] >+ <option value='userid'>Username</option> >+ [% END %] >+ [% IF searchfieldstype == "phone" %] >+ <option selected="selected" value='phone'>Phone number</option> >+ [% ELSE %] >+ <option value='phone'>Phone number</option> >+ [% END %] >+ [% IF searchfieldstype == "address" %] >+ <option selected="selected" value='address'>Street address</option> >+ [% ELSE %] >+ <option value='address'>Street address</option> >+ [% END %] >+ [% IF searchfieldstype == "dateofbirth" %] >+ <option selected="selected" value='dateofbirth'>Date of birth</option> >+ [% ELSE %] >+ <option value='dateofbirth'>Date of birth</option> >+ [% END %] >+ [% IF searchfieldstype == "sort1" %] >+ <option selected="selected" value='sort1'>Sort field 1</option> >+ [% ELSE %] >+ <option value='sort1'>Sort field 1</option> >+ [% END %] >+ [% IF searchfieldstype == "sort2" %] >+ <option selected="selected" value='sort2'>Sort field 2</option> >+ [% ELSE %] >+ <option value='sort2'>Sort field 2</option> >+ [% END %] >+ </select> >+ </li> >+ <li> >+ <label for="searchtype_filter">Search type:</label> >+ <select name="searchtype" id="searchtype_filter"> >+ [% IF searchtype == "start_with" %] >+ <option value='start_with' selected="selected">Starts with</option> >+ <option value="contain">Contains</option> >+ [% ELSE %] >+ <option value='start_with'>Starts with</option> >+ <option value="contain" selected="selected">Contains</option> >+ [% END %] >+ </select> >+ </li> >+ <li> >+ <label for="categorycode_filter">Category:</label> >+ [% SET categories = Categories.all() %] >+ <select id="categorycode_filter"> >+ <option value="">Any</option> >+ [% FOREACH cat IN categories %] >+ [% IF cat.categorycode == categorycode_filter %] > <option selected="selected" value="[% cat.categorycode | html %]">[% cat.description | html %]</option> >- [% ELSE %] >+ [% ELSE %] > <option value="[% cat.categorycode | html %]">[% cat.description | html %]</option> >- [% END %] >- [% END %] >- </select> >- </li> >- <li> >- <label for="branchcode_filter">Library:</label> >- [% SET branches = Branches.all( selected => branchcode_filter, only_from_group => 1 ) %] >- <select id="branchcode_filter"> >- [% IF branches.size != 1 %] >- <option value="">Any</option> >- [% END %] >- [% PROCESS options_for_libraries libraries => branches %] >- </select> >- </li> >- </ol> >- <fieldset class="action"> >- <input type="submit" value="Search" /> >- <input type="button" value="Clear" id="clear_search" /> >- </fieldset> >- </fieldset> >- </form> >- </div> >- </div> >-</div> >+ >+ [% END %] >+ [% END %] >+ </select> >+ </li> >+ <li> >+ <label for="branchcode_filter">Library:</label> >+ [% SET branches = Branches.all( selected => branchcode_filter, only_from_group => 1 ) %] >+ <select id="branchcode_filter"> >+ [% IF branches.size != 1 %] >+ <option value="">Any</option> >+ [% END %] >+ [% PROCESS options_for_libraries libraries => branches %] >+ </select> >+ </li> >+ </ol> >+ <fieldset class="action"> >+ <input type="submit" value="Search" /> >+ <input type="button" value="Clear" id="clear_search" /> >+ </fieldset> >+ </fieldset> >+ </form> >+ </aside> >+ </div> <!-- /.col-sm-2.col-sm-pull-10 --> >+ </div> <!-- /.row --> > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'columns_settings.inc' %] > [% INCLUDE 'str/members-menu.inc' %] > [% Asset.js("js/members-menu.js") | $raw %] >- <script type="text/javascript"> >+ <script> > $(document).ready(function() { > $('#merge-patrons').prop('disabled', true); > $('#memberresultst').on('change', 'input.selection', function() { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index 143af0aca5..d391cfbe4e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -30,12 +30,17 @@ > <strong>[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron ([%IF ( categoryname ) %][% categoryname | html %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</strong> > [% END %] > </div> >-[% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %] > >- <div id="bd"> >- <div id="yui-main"> >- <div class="yui-b"> >- [% INCLUDE 'blocking_errors.inc' %] >+<div class="main container-fluid"> >+ <div class="row"> >+ [% IF ( opadd ) %] >+ <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2"> >+ [% ELSE %] >+ <div class="col-sm-10 col-sm-push-2"> >+ [% END %] >+ <main> >+ [% INCLUDE 'blocking_errors.inc' %] >+ > [% IF error_alert %] > [% IF ( error_alert == "no_email" ) %] > <div class="dialog alert">This member has no email</div> >@@ -1087,7 +1092,7 @@ > <!-- handle changing prefs if creating new patron and changing > the patron category > --> >- <script type="text/javascript">//<![CDATA[ >+ <script> > $(document).ready(function(){ > var message_prefs_dirty = false; > $('#memberentry_messaging_prefs > *').change(function() { >@@ -1126,7 +1131,6 @@ > ); > }); > }); >- //]]> > </script> > [% END %] > <input type="hidden" name="setting_messaging_prefs" value="1" /> >@@ -1164,21 +1168,26 @@ > </fieldset> > </form> > [% END %] >-</div> >-</div> > >-[% UNLESS ( opadd ) %]<div class="yui-b"> >-[% INCLUDE 'circ-menu.inc' %] >-</div>[% END %] > [% END %] >-</div> >+ </main> >+ </div> <!-- /.col-sm-10.col-sm-push-2 --> >+ >+ [% UNLESS ( opadd ) %] >+ <div class="col-sm-2 col-sm-pull-10"> >+ <aside> >+ [% INCLUDE 'circ-menu.inc' %] >+ </aside> >+ </div> <!-- /.col-sm-2.col-sm-pull-10 --> >+ [% END %] >+ </div> <!-- /.row --> > > [% MACRO jsinclude BLOCK %] > [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") | $raw %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'str/members-menu.inc' %] > [% Asset.js("js/members-menu.js") | $raw %] >- <script type="text/javascript"> >+ <script> > $(document).ready(function() { > > $("#saverecord").css({ 'margin-left': 0 }); >@@ -1336,8 +1345,8 @@ > </script> > [% Asset.js("js/members.js") | $raw %] > [% Asset.js("js/messaging-preference-form.js") | $raw %] >+ [% PROCESS 'password_check.inc' %] >+ [% PROCESS 'add_password_check' new_password => 'password' %] > [% END %] > > [% INCLUDE 'intranet-bottom.inc' %] >-[% PROCESS 'password_check.inc' %] >-[% PROCESS 'add_password_check' new_password => 'password' %] >-- >2.11.0
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 21964
:
82911
|
83285
|
83316
|
83790