Browse Source
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>17.05.x
15 changed files with 214 additions and 23 deletions
@ -0,0 +1,47 @@ |
|||
#!/usr/bin/perl |
|||
|
|||
# Copyright 2013 ByWater Solutions |
|||
# |
|||
# This file is part of Koha. |
|||
# |
|||
# Koha is free software; you can redistribute it and/or modify it |
|||
# under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# Koha is distributed in the hope that it will be useful, but |
|||
# WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU General Public License |
|||
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
|||
|
|||
use Modern::Perl; |
|||
|
|||
use CGI; |
|||
|
|||
use C4::Auth; |
|||
use C4::Output; |
|||
use Koha::Clubs; |
|||
|
|||
my $cgi = new CGI; |
|||
|
|||
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
|||
{ |
|||
template_name => 'clubs/club-enrollments.tt', |
|||
query => $cgi, |
|||
type => 'intranet', |
|||
authnotrequired => 0, |
|||
flagsrequired => { clubs => 'edit_clubs' }, |
|||
} |
|||
); |
|||
|
|||
my $id = $cgi->param('id'); |
|||
my $club = Koha::Clubs->find($id); |
|||
|
|||
$template->param( |
|||
club => $club, |
|||
); |
|||
|
|||
output_html_with_http_headers( $cgi, $cookie, $template->output ); |
@ -0,0 +1,74 @@ |
|||
[% USE KohaDates %] |
|||
[% USE Branches %] |
|||
[% USE Koha %] |
|||
[% INCLUDE 'doc-head-open.inc' %] |
|||
<title>Koha › Tools › Patron clubs › Club enrollments</title> |
|||
[% INCLUDE 'doc-head-close.inc' %] |
|||
|
|||
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
|||
[% INCLUDE 'datatables.inc' %] |
|||
|
|||
<script type="text/javascript"> |
|||
//<![CDATA[ |
|||
$(document).ready(function() { |
|||
eTable = $('#enrollments-table').dataTable($.extend(true, {}, dataTablesDefaults, { |
|||
"sPaginationType": "four_button", |
|||
"sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>', |
|||
"aoColumnDefs": [ |
|||
{ "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, |
|||
] |
|||
} )); |
|||
}); |
|||
//]]> |
|||
</script> |
|||
|
|||
</head> |
|||
|
|||
<body id="club_enrollments" class="clubs"> |
|||
[% INCLUDE 'header.inc' %] |
|||
[% INCLUDE 'cat-search.inc' %] |
|||
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › Patron clubs › Club enrollments</div> |
|||
|
|||
<div id="doc3" class="yui-t2"> |
|||
<div id="bd"> |
|||
<div id="yui-main"> |
|||
<div class="yui-b"> |
|||
<h1>Club enrollments for <i>[% club.name %]</i></h1> |
|||
|
|||
<table id="enrollments-table"> |
|||
<thead> |
|||
<tr> |
|||
<th>Name</th> |
|||
<th>Card number</th> |
|||
<th> </th> |
|||
</tr> |
|||
</thead> |
|||
|
|||
<tbody> |
|||
[% FOREACH e IN club.club_enrollments %] |
|||
[% SET p = e.patron %] |
|||
<tr> |
|||
<td> |
|||
[% p.firstname %] [% p.surname %] |
|||
</td> |
|||
<td> |
|||
[% p.cardnumber %] |
|||
</td> |
|||
<td> |
|||
<a class="btn btn-sm" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% p.id %]"> |
|||
<i class="fa fa-eye"></i> |
|||
View patron |
|||
</a> |
|||
</td> |
|||
</tr> |
|||
[% END %] |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<div class="yui-b noprint"> |
|||
[% INCLUDE 'tools-menu.inc' %] |
|||
</div> |
|||
</div> |
|||
</div> |
|||
[% INCLUDE 'intranet-bottom.inc' %] |
Loading…
Reference in new issue