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 50-55 Link Here
50
                            <tr>
52
                            <tr>
51
                                <th>Name</th>
53
                                <th>Name</th>
52
                                <th>Card number</th>
54
                                <th>Card number</th>
55
                                [% FOREACH club_template_enrollment_field IN club.club_template.club_template_enrollment_fields %]
56
                                    <th>[% club_template_enrollment_field.name %] </th>
57
                                [% END %]
53
                            </tr>
58
                            </tr>
54
                        </thead>
59
                        </thead>
55
60
Lines 63-68 Link Here
63
                                    <td>
68
                                    <td>
64
                                        [% p.cardnumber | html %]
69
                                        [% p.cardnumber | html %]
65
                                    </td>
70
                                    </td>
71
                                    [% IF club_enrollment_fields %]
72
                                        [% FOREACH club_enrollment_field IN club_enrollment_fields %]
73
                                            [% IF e.id == club_enrollment_field.club_enrollment_id %]
74
                                                [% FOREACH club_template_enrollment_field IN club.club_template.club_template_enrollment_fields %]
75
                                                    [% IF club_enrollment_field.club_template_enrollment_field_id == club_template_enrollment_field.id %]
76
                                                        [% IF club_template_enrollment_field.authorised_value_category %]
77
                                                            [% FOREACH a IN AuthorisedValues.Get( club_template_enrollment_field.authorised_value_category ) %]
78
                                                                [% IF a.authorised_value == club_enrollment_field.value %]
79
                                                                    [% SET club_enrollment_field.value = a.lib %]
80
                                                                [% END %]
81
                                                            [% END %]
82
                                                        [% END %]
83
                                                        <td>[% club_enrollment_field.value | html %]</td>
84
                                                    [% END %]
85
                                                [% END %]
86
                                            [% END %]
87
                                        [% END %]
88
                                    [% END %]
66
                                </tr>
89
                                </tr>
67
                            [% END %]
90
                            [% END %]
68
                        </tbody>
91
                        </tbody>
69
- 

Return to bug 25079