View | Details | Raw Unified | Return to bug 25079
Collapse All | Expand All

(-)a/clubs/club-enrollments.pl (+4 lines)
Lines 24-29 use CGI; Link Here
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::Clubs;
26
use Koha::Clubs;
27
use Koha::Club::Enrollment::Fields;
27
28
28
my $cgi = CGI->new;
29
my $cgi = CGI->new;
29
30
Lines 38-46 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
38
39
39
my $id = $cgi->param('id');
40
my $id = $cgi->param('id');
40
my $club = Koha::Clubs->find( $id );
41
my $club = Koha::Clubs->find( $id );
42
my @club_template_enrollment_fields = $club->club_template()->club_template_enrollment_fields()->as_list;
43
my @club_enrollment_fields = Koha::Club::Enrollment::Fields->search({'club_template_enrollment_field_id'=> { -in => [map { $_->id } @club_template_enrollment_fields] }})->as_list;
41
44
42
$template->param(
45
$template->param(
43
    club          => $club,
46
    club          => $club,
47
    club_enrollment_fields => \@club_enrollment_fields,
44
);
48
);
45
49
46
output_html_with_http_headers( $cgi, $cookie, $template->output );
50
output_html_with_http_headers( $cgi, $cookie, $template->output );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt (-1 / +23 lines)
Lines 3-8 Link Here
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE Branches %]
4
[% USE Branches %]
5
[% USE Koha %]
5
[% USE Koha %]
6
[% USE AuthorisedValues %]
7
[% SET AuthorisedValuesCategories = AuthorisedValues.GetCategories %]
6
[% SET footerjs = 1 %]
8
[% SET footerjs = 1 %]
7
[% INCLUDE 'doc-head-open.inc' %]
9
[% INCLUDE 'doc-head-open.inc' %]
8
<title>Club enrollments &rsaquo; Patron clubs &rsaquo; Tools &rsaquo; Koha</title>
10
<title>Club enrollments &rsaquo; Patron clubs &rsaquo; Tools &rsaquo; Koha</title>
Lines 43-48 Link Here
43
                            <tr>
45
                            <tr>
44
                                <th>Name</th>
46
                                <th>Name</th>
45
                                <th>Card number</th>
47
                                <th>Card number</th>
48
                                [% FOREACH club_template_enrollment_field IN club.club_template.club_template_enrollment_fields %]
49
                                    <th>[% club_template_enrollment_field.name %] </th>
50
                                [% END %]
46
                            </tr>
51
                            </tr>
47
                        </thead>
52
                        </thead>
48
53
Lines 56-61 Link Here
56
                                    <td>
61
                                    <td>
57
                                        [% p.cardnumber | html %]
62
                                        [% p.cardnumber | html %]
58
                                    </td>
63
                                    </td>
64
                                    [% IF club_enrollment_fields %]
65
                                        [% FOREACH club_enrollment_field IN club_enrollment_fields %]
66
                                            [% IF e.id == club_enrollment_field.club_enrollment_id %]
67
                                                [% FOREACH club_template_enrollment_field IN club.club_template.club_template_enrollment_fields %]
68
                                                    [% IF club_enrollment_field.club_template_enrollment_field_id == club_template_enrollment_field.id %]
69
                                                        [% IF club_template_enrollment_field.authorised_value_category %]
70
                                                            [% FOREACH a IN AuthorisedValues.Get( club_template_enrollment_field.authorised_value_category ) %]
71
                                                                [% IF a.authorised_value == club_enrollment_field.value %]
72
                                                                    [% SET club_enrollment_field.value = a.lib %]
73
                                                                [% END %]
74
                                                            [% END %]
75
                                                        [% END %]
76
                                                        <td>[% club_enrollment_field.value | html %]</td>
77
                                                    [% END %]
78
                                                [% END %]
79
                                            [% END %]
80
                                        [% END %]
81
                                    [% END %]
59
                                </tr>
82
                                </tr>
60
                            [% END %]
83
                            [% END %]
61
                        </tbody>
84
                        </tbody>
62
- 

Return to bug 25079