Koha/koha-tmpl/intranet-tmpl/prog/en/includes/clubs-table.inc
Owen Leonard 3b47f87b0f
Bug 24627: Correct style of clubs search results during hold process
This patch updates some markup and CSS so that the process of selecting
a club from search results during the hold process looks the same as
when selecting a patron: Club names should be links (like patron
names are) and the table row should have a hover color to help indicate
that it is clickable.

This patch also changes the markup of the Patrons/Clubs tabs a little
bit to make the information clearer: Superfluous Bootstrap-related tab
markup has been removed, and the patron and club search results have
been moved into their respective tab containers. This means that if you
search for a patron but then switch to the clubs tab the patron list
doesn't still display.

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)

 - You should have more than one patron club defined.
 - Begin the process of placing a hold on a title.
 - Test the process of searching for both patrons and clubs.
   - In each case the name (patron or club) should be an active link.
   - Hovering your mouse over the table rows should change the row
     background to yellow.
   - Clicking the other tab at this stage should hide the search results
     from your last search.
   - Whether you click the linked name or elsewhere in the table row
     you should be correctly redirected to the next step in the holds
     process.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-16 10:59:28 +00:00

111 lines
5.1 KiB
HTML

<table id="clubs-table" class="selections-table">
<thead>
<tr>
<th>Name</th>
<th>Template</th>
<th>Description</th>
[% UNLESS destination == 'holds' %]
<th>Public enrollment</th>
<th>Email required</th>
[% END %]
<th>Library</th>
<th>Start date</th>
<th>End date</th>
<th>Enrolled patrons</th>
[% UNLESS destination == 'holds' %]
<th>&nbsp;</th>
[% END %]
</tr>
</thead>
<tbody>
[% FOREACH c IN clubs %]
[% IF destination == 'holds' %]
[% IF multi_hold %]
[% SET data_url = "/cgi-bin/koha/reserve/request.pl?club=" _ c.id _ "&amp;multi_hold=1&amp;biblionumbers=" _ biblionumbers %]
[% ELSE %]
[% SET data_url = "/cgi-bin/koha/reserve/request.pl?club=" _ c.id _ "&amp;biblionumber=" _ biblionumber %]
[% END %]
<tr class="clickable" data-url="[% data_url | html %]">
[% ELSE %]
<tr>
[% END %]
<td><a href="[% data_url | url %]">[% c.name | html %]</a></td>
<td>[% c.club_template.name | html %]</td>
<td>[% c.description | html %]</td>
[% UNLESS destination == 'holds' %]
<td>
[% IF c.club_template.is_enrollable_from_opac %]
Yes
[% ELSE %]
No
[% END %]
</td>
<td>
[% IF c.club_template.is_email_required %]
Yes
[% ELSE %]
No
[% END %]
</td>
[% END %]
<td>[% Branches.GetName( c.branchcode ) | html %]</td>
<td>
[% IF c.date_start %]
[% c.date_start | $KohaDates %]
[% END %]
</td>
<td>
[% IF c.date_end %]
[% c.date_end | $KohaDates %]
[% END %]
</td>
<td>
[% c.club_enrollments.count | html %]
</td>
[% UNLESS destination == 'holds' %]
<td class="actions">
<div class="dropdown">
<a class="btn btn-default btn-xs dropdown-toggle" id="clubactions[% c.id | html %]" role="button" data-toggle="dropdown" href="#">
Actions <b class="caret"></b>
</a>
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="clubactions[% c.id | html %]">
[% IF ( c.club_enrollments.count ) %]
<li>
<a href="club-enrollments.pl?id=[% c.id | uri %]">
<i class="fa fa-list-ul"></i> Enrollments
</a>
</li>
[% ELSE %]
<li class="disabled">
<a href="#" data-toggle="tooltip" data-placement="left" title="There are no enrollments for this club yet">
<i class="fa fa-list-ul"></i> Enrollments
</a>
</li>
[% END %]
[% IF CAN_user_clubs_edit_clubs %]
<li>
<a href="clubs-add-modify.pl?id=[% c.id | uri %]">
<i class="fa fa-pencil"></i> Edit
</a>
</li>
<li>
<a href="#" class="delete_club" data-id="[% c.id | html %]" data-name="[% c.name | html %]">
<i class="fa fa-trash"></i> Delete
</a>
</li>
[% END %]
[% IF ( c.club_enrollments.count ) %]
<li>
<a href="#" class="club_hold_search" data-id="[% c.id | html %]">
<i class="fa fa-search"></i> Search to hold
</a>
</li>
[% END %]
</ul>
</div>
</td>
[% END %]
</tr>
[% END %]
</tbody>
</table> <!-- /.clubs-table -->