Bug 31764: Add 'page-section' to patron clubs page

This patch updates patron clubs template 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.

Note: This patch contains indentation changes, so use diff accordingly.

To test, apply the patch and go to Tools -> Patron clubs.

- If necessary, add at least one club template and at least one club
  based on that template.
- Confirm that the display of club templates and clubs looks correct.
- Locate some patrons and add them to a club.
- On the patron clubs page, locate a club with enrollments and click
  Actions -> Enrollments. Confirm that the page looks correct.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Owen Leonard 2022-10-13 18:09:21 +00:00 committed by Tomas Cohen Arazi
parent 51b74d050b
commit 8a993d7bf4
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
2 changed files with 70 additions and 64 deletions

View File

@ -44,28 +44,30 @@
[% ELSE %]
<h1>Club enrollments for <em>[% club.name | html %]</em></h1>
<table id="enrollments-table">
<thead>
<tr>
<th>Name</th>
<th>Card number</th>
</tr>
</thead>
<tbody>
[% FOREACH e IN club.club_enrollments %]
[% SET p = e.patron %]
<div class="page-section">
<table id="enrollments-table">
<thead>
<tr>
<td>
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% p.id | uri %]">[% p.surname | html %], [% p.firstname | html %]</a>
</td>
<td>
[% p.cardnumber | html %]
</td>
<th>Name</th>
<th>Card number</th>
</tr>
[% END %]
</tbody>
</table>
</thead>
<tbody>
[% FOREACH e IN club.club_enrollments %]
[% SET p = e.patron %]
<tr>
<td>
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% p.id | uri %]">[% p.surname | html %], [% p.firstname | html %]</a>
</td>
<td>
[% p.cardnumber | html %]
</td>
</tr>
[% END %]
</tbody>
</table>
</div> <!-- /.page-section -->
[% END %]
</main>

View File

@ -69,51 +69,53 @@
[% END %]
[% IF club_templates.count %]
<table id="club-templates-table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Public enrollment</th>
<th>Email required</th>
<th>Library</th>
<th class="noExport">Actions</th>
</tr>
</thead>
<tbody>
[% FOREACH t IN club_templates %]
<div class="page-section">
<table id="club-templates-table">
<thead>
<tr>
<td>[% t.name | html %]</td>
<td>[% t.description | html %]</td>
<td>
[% IF t.is_enrollable_from_opac %]
<span>Yes</span>
[% ELSE %]
<span>No</span>
[% END %]
</td>
<td>
[% IF t.is_email_required %]
<span>Yes</span>
[% ELSE %]
<span>No</span>
[% END %]
</td>
<td>[% Branches.GetName( t.branchcode ) | html %]</td>
<td class="actions">
[% IF CAN_user_clubs_edit_templates %]
<a class="btn btn-xs btn-default" style="white-space:nowrap" href="/cgi-bin/koha/clubs/templates-add-modify.pl?id=[% t.id | html %]">
<i class="fa fa-pencil"></i> Edit
</a>
<a class="btn btn-xs btn-default delete_template" href="#" data-id="[% t.id | html %]" data-name="[% t.name | html %]">
<i class="fa fa-trash"></i> Delete
</a>
[% END %]
</td>
<th>Name</th>
<th>Description</th>
<th>Public enrollment</th>
<th>Email required</th>
<th>Library</th>
<th class="noExport">Actions</th>
</tr>
[% END %]
</tbody>
</table>
</thead>
<tbody>
[% FOREACH t IN club_templates %]
<tr>
<td>[% t.name | html %]</td>
<td>[% t.description | html %]</td>
<td>
[% IF t.is_enrollable_from_opac %]
<span>Yes</span>
[% ELSE %]
<span>No</span>
[% END %]
</td>
<td>
[% IF t.is_email_required %]
<span>Yes</span>
[% ELSE %]
<span>No</span>
[% END %]
</td>
<td>[% Branches.GetName( t.branchcode ) | html %]</td>
<td class="actions">
[% IF CAN_user_clubs_edit_templates %]
<a class="btn btn-xs btn-default" style="white-space:nowrap" href="/cgi-bin/koha/clubs/templates-add-modify.pl?id=[% t.id | html %]">
<i class="fa fa-pencil"></i> Edit
</a>
<a class="btn btn-xs btn-default delete_template" href="#" data-id="[% t.id | html %]" data-name="[% t.name | html %]">
<i class="fa fa-trash"></i> Delete
</a>
[% END %]
</td>
</tr>
[% END %]
</tbody>
</table>
</div> <!-- /.page-section -->
[% ELSE %]
<div class="dialog message">No club templates defined.</div>
[% END %]
@ -138,7 +140,9 @@
[% END %]
[% IF clubs.count %]
[% INCLUDE 'clubs-table.inc' %]
<div class="page-section">
[% INCLUDE 'clubs-table.inc' %]
</div> <!-- /.page-section -->
[% ELSE %]
[% IF club_templates.count %]
<div class="dialog message">No clubs defined.</div>