Bugzilla – Attachment 141865 Details for
Bug 31763
Add 'page-section' to patron lists page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31763: Add 'page-section' to patron lists page
Bug-31763-Add-page-section-to-patron-lists-page.patch (text/plain), 16.56 KB, created by
Martin Renvoize (ashimema)
on 2022-10-14 08:25:05 UTC
(
hide
)
Description:
Bug 31763: Add 'page-section' to patron lists page
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-10-14 08:25:05 UTC
Size:
16.56 KB
patch
obsolete
>From ef24fd4cabc6838c8a193bab71e52e43f00d11da Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 13 Oct 2022 17:47:35 +0000 >Subject: [PATCH] Bug 31763: Add 'page-section' to patron lists page > >This patch updates patron lists templates so that the main content of >the page is wrapped with a "page-section" div. This ensures that content >has sufficient contrast. See Bug 31757. > >Unrelated change: I wrapped some form controls in a <fieldset> to make >it consistent with other pages and to work better with the updated >markup. > >Note: This patch contains indentation changes, so use diff accordingly. > >To test, apply the patch and go to Tools -> Patron lists. > >- If necessary, create one or more patron lists so that the table > appears. Confirm that the content area looks correct. >- Click Actions -> Add patrons to confirm that the screen > looks correct. > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/modules/patron_lists/list.tt | 94 +++++++------- > .../prog/en/modules/patron_lists/lists.tt | 116 +++++++++--------- > 2 files changed, 108 insertions(+), 102 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt >index 23ade3ef86..ac4497cb27 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt >@@ -169,54 +169,58 @@ > </div> > </div> > >- <table id="patron-list-table"> >- <thead> >- <tr> >- <th class="NoSort"> </th> >- <th>Card</th> >- <th>First name</th> >- <th>Surname</th> >- <th>Address</th> >- <th>Category</th> >- <th>Library</th> >- <th>Expires on</th> >- <th>Circ notes</th> >- </tr> >- </thead> >- >- <tbody> >- [% FOREACH p IN list.patron_list_patrons %] >+ <div class="page-section"> >+ <table id="patron-list-table"> >+ <thead> > <tr> >- <td> >- <input type="checkbox" name="patrons_to_remove" class="selection" value="[% p.patron_list_patron_id | html %]" /> >- <input type="hidden" id="borrowernumber_[% p.patron_list_patron_id | html %]" value="[% p.borrowernumber.id | html %]" /> >- </td> >- <td> >- <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% p.borrowernumber.borrowernumber | uri %]"> >- [% p.borrowernumber.cardnumber | html %] >- </a> >- </td> >- <td>[% p.borrowernumber.firstname | html %]</td> >- <td>[% p.borrowernumber.surname | html %]</td> >- <td> >- [% p.borrowernumber.address | html %] >- [% p.borrowernumber.address2 | html %] >- [% p.borrowernumber.city | html %] >- [% p.borrowernumber.state | html %] >- [% p.borrowernumber.country | html %] >- </td> >- <td>[% p.borrowernumber.categorycode.description | html %] ([% p.borrowernumber.categorycode.categorycode | html %])</td> >- <td>[% p.borrowernumber.branchcode.branchname | html %]</td> >- <td data-order="[% p.borrowernumber.dateexpiry | html %]">[% p.borrowernumber.dateexpiry | $KohaDates %]</td> >- <td>[% p.borrowernumber.borrowernotes | html %]</td> >+ <th class="NoSort"> </th> >+ <th>Card</th> >+ <th>First name</th> >+ <th>Surname</th> >+ <th>Address</th> >+ <th>Category</th> >+ <th>Library</th> >+ <th>Expires on</th> >+ <th>Circ notes</th> > </tr> >- [% END %] >- </tbody> >- </table> >+ </thead> >+ >+ <tbody> >+ [% FOREACH p IN list.patron_list_patrons %] >+ <tr> >+ <td> >+ <input type="checkbox" name="patrons_to_remove" class="selection" value="[% p.patron_list_patron_id | html %]" /> >+ <input type="hidden" id="borrowernumber_[% p.patron_list_patron_id | html %]" value="[% p.borrowernumber.id | html %]" /> >+ </td> >+ <td> >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% p.borrowernumber.borrowernumber | uri %]"> >+ [% p.borrowernumber.cardnumber | html %] >+ </a> >+ </td> >+ <td>[% p.borrowernumber.firstname | html %]</td> >+ <td>[% p.borrowernumber.surname | html %]</td> >+ <td> >+ [% p.borrowernumber.address | html %] >+ [% p.borrowernumber.address2 | html %] >+ [% p.borrowernumber.city | html %] >+ [% p.borrowernumber.state | html %] >+ [% p.borrowernumber.country | html %] >+ </td> >+ <td>[% p.borrowernumber.categorycode.description | html %] ([% p.borrowernumber.categorycode.categorycode | html %])</td> >+ <td>[% p.borrowernumber.branchcode.branchname | html %]</td> >+ <td data-order="[% p.borrowernumber.dateexpiry | html %]">[% p.borrowernumber.dateexpiry | $KohaDates %]</td> >+ <td>[% p.borrowernumber.borrowernotes | html %]</td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ </div> <!-- /.page-section --> > >- <input type="hidden" name="patron_list_id" value="[% list.patron_list_id | html %]" /> >- <button type="submit" class="btn btn-default btn-sm list-remove"><i class="fa fa-trash" aria-hidden="true"></i> Remove selected patrons</button> >- <button class="btn btn-default btn-sm merge-patrons" type="submit"><i class="fa fa-compress"></i> Merge selected patrons</button> >+ <fieldset class="action"> >+ <input type="hidden" name="patron_list_id" value="[% list.patron_list_id | html %]" /> >+ <button type="submit" class="btn btn-default btn-sm list-remove"><i class="fa fa-trash" aria-hidden="true"></i> Remove selected patrons</button> >+ <button class="btn btn-default btn-sm merge-patrons" type="submit"><i class="fa fa-compress"></i> Merge selected patrons</button> >+ </fieldset> > </form> > > </main> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt >index dcacfc83b2..229d97c8bd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt >@@ -45,69 +45,71 @@ > > [% IF ( lists ) %] > >- <table id="patron-lists-table"> >- <thead> >- <tr> >- <th>Name</th> >- <th>Patrons in list</th> >- <th>Shared</th> >- <th class="NoSort"> </th> >- </tr> >- </thead> >- >- <tbody> >- [% FOREACH l IN lists %] >- [% SET shared_by_other = l.owner.id != logged_in_user.id %] >+ <div class="page-section"> >+ <table id="patron-lists-table"> >+ <thead> > <tr> >- <td><a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id | uri %]">[% l.name | html %]</a></td> >- <td>[% l.patron_list_patrons_rs.count || 0 | html %]</td> >- <td> >- [% IF l.shared %] >- [% IF shared_by_other %] >- by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% l.owner.id | uri %]">[% INCLUDE 'patron-title.inc' patron=l.owner %]</a> >- [% ELSE %] >- by you >- [% END %] >- [% END %] >- </td> >- <td> >- <div class="btn-group dropup"> >- <a class="btn btn-default btn-xs dropdown-toggle" id="listactions[% l.patron_list_id | html %]" role="button" data-toggle="dropdown" href="#"> >- Actions <b class="caret"></b> >- </a> >- <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id | html %]"> >- <li><a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id | uri %]"><i class="fa fa-user"></i> Add patrons</a></li> >- [% UNLESS shared_by_other %] >- <li><a href="/cgi-bin/koha/patron_lists/add-modify.pl?patron_list_id=[% l.patron_list_id | uri %]"><i class="fa fa-pencil"></i> Edit list</a></li> >- <li><a class="delete_patron" href="/cgi-bin/koha/patron_lists/delete.pl?patron_list_id=[% l.patron_list_id | html %]" data-list-name="[% l.name | html %]"><i class="fa fa-trash"></i> Delete list</a></li> >+ <th>Name</th> >+ <th>Patrons in list</th> >+ <th>Shared</th> >+ <th class="NoSort"> </th> >+ </tr> >+ </thead> >+ >+ <tbody> >+ [% FOREACH l IN lists %] >+ [% SET shared_by_other = l.owner.id != logged_in_user.id %] >+ <tr> >+ <td><a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id | uri %]">[% l.name | html %]</a></td> >+ <td>[% l.patron_list_patrons_rs.count || 0 | html %]</td> >+ <td> >+ [% IF l.shared %] >+ [% IF shared_by_other %] >+ by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% l.owner.id | uri %]">[% INCLUDE 'patron-title.inc' patron=l.owner %]</a> >+ [% ELSE %] >+ by you > [% END %] >- [% IF ( l.patron_list_patrons_rs.count ) %] >- <li class="divider"></li> >- <li> >- <a class="print_cards" href="/cgi-bin/koha/patroncards/print.pl?patronlist_id=[% l.patron_list_id | html %]" data-patron_list_id="[% l.patron_list_id | html %]"><i class="fa fa-print"></i> Print patron cards</a> >- </li> >- [% IF CAN_user_tools_edit_patrons %] >- <li> >- <a href="/cgi-bin/koha/tools/modborrowers.pl?patron_list_id=[% l.patron_list_id | uri %]&op=show"> >- <i class="fa fa-pencil"></i> Batch edit patrons >- </a> >- </li> >+ [% END %] >+ </td> >+ <td> >+ <div class="btn-group dropup"> >+ <a class="btn btn-default btn-xs dropdown-toggle" id="listactions[% l.patron_list_id | html %]" role="button" data-toggle="dropdown" href="#"> >+ Actions <b class="caret"></b> >+ </a> >+ <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id | html %]"> >+ <li><a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id | uri %]"><i class="fa fa-user"></i> Add patrons</a></li> >+ [% UNLESS shared_by_other %] >+ <li><a href="/cgi-bin/koha/patron_lists/add-modify.pl?patron_list_id=[% l.patron_list_id | uri %]"><i class="fa fa-pencil"></i> Edit list</a></li> >+ <li><a class="delete_patron" href="/cgi-bin/koha/patron_lists/delete.pl?patron_list_id=[% l.patron_list_id | html %]" data-list-name="[% l.name | html %]"><i class="fa fa-trash"></i> Delete list</a></li> > [% END %] >- [% IF CAN_user_tools_delete_anonymize_patrons %] >+ [% IF ( l.patron_list_patrons_rs.count ) %] >+ <li class="divider"></li> > <li> >- <a href="/cgi-bin/koha/tools/cleanborrowers.pl?step=2&patron_list_id=[% l.patron_list_id | uri %]&checkbox=borrower"> >- <i class="fa fa-trash"></i> Batch delete patrons >- </a> >+ <a class="print_cards" href="/cgi-bin/koha/patroncards/print.pl?patronlist_id=[% l.patron_list_id | html %]" data-patron_list_id="[% l.patron_list_id | html %]"><i class="fa fa-print"></i> Print patron cards</a> > </li> >+ [% IF CAN_user_tools_edit_patrons %] >+ <li> >+ <a href="/cgi-bin/koha/tools/modborrowers.pl?patron_list_id=[% l.patron_list_id | uri %]&op=show"> >+ <i class="fa fa-pencil"></i> Batch edit patrons >+ </a> >+ </li> >+ [% END %] >+ [% IF CAN_user_tools_delete_anonymize_patrons %] >+ <li> >+ <a href="/cgi-bin/koha/tools/cleanborrowers.pl?step=2&patron_list_id=[% l.patron_list_id | uri %]&checkbox=borrower"> >+ <i class="fa fa-trash"></i> Batch delete patrons >+ </a> >+ </li> >+ [% END %] > [% END %] >- [% END %] >- </ul> >- </div> >- </td> >- </tr> >- [% END %] >- </tbody> >- </table> >+ </ul> >+ </div> >+ </td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ </div> <!-- /.page-section --> > > <!-- Modal to print patron cards --> > <div class="modal" id="patronExportModal" tabindex="-1" role="dialog" aria-labelledby="patronExportModal_label" aria-hidden="true"> >-- >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 31763
:
141835
|
141840
|
141845
| 141865