Koha/koha-tmpl/intranet-tmpl/prog/en/includes/clubs-table.inc
Agustin Moyano 7aeec1bfef
Bug 19618: Add ability to place holds for members of a club in intranet
This patch adds the ability to place a hold for each member of a club in random order.

To test:
1) apply this patch
2) create 2 clubs, (club names should have some part in common, and some part different for each other)
3) in one of them add at least 6 members
4) enter patron clubs management and click on "Actions" button
SUCCESS.1 => club with members has a new action called "search to hold"
5) click on search to hold
SUCCESS.2 => in the list of bilios there appears an action called "Place hold for <club name>"
6) click on "Place hold for <club name>"
SUCCESS.3 => a new window appears where you can select pickup location (defaults to club's library, if any), and the list of members.
7) go back to the list of bilios in the catalog and click on "Forget <club name>"
8) click on "Holds" action of any biblio
SUCCESS.4 => a search box appears with two tabs: Patrons and Clubs
9) click on Clubs tab and search by the common part of clubs names
SUCCESS.5 => a list of clubs that matches the search appears. If you click on any of them, the same page as SUCCESS.3 appears.
10) go back to the search box in SUCCESS.4 and search by the different part of the name.
SUCCESS.6 => because there is only one club that matches search criteria, the same page as SUCCESS.3 appears;
11) Sign off

Sponsored-by: Southeast Kansas Library - SEKLS
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-10-01 08:05:57 +01:00

111 lines
No EOL
5 KiB
HTML

<table id="clubs-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>[% c.name | html %]</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="club-enrollments.pl?id=[% c.id | uri %]">
<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="#" onclick='ConfirmDeleteClub([% c.id | html %], "[% c.name | html %]", $(this) ); return false;'>
<i class="fa fa-trash"></i> Delete
</a>
</li>
[% END %]
[% IF ( c.club_enrollments.count ) %]
<li>
<a href="#" onclick="SearchToHold([% 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 -->