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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt (-82 / +74 lines)
Lines 15-21 Link Here
15
            "sPaginationType": "four_button",
15
            "sPaginationType": "four_button",
16
            "sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
16
            "sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
17
            "aoColumnDefs": [
17
            "aoColumnDefs": [
18
                { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
18
                { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
19
            ]
19
            ]
20
        } ));
20
        } ));
21
21
Lines 23-29 Link Here
23
            "sPaginationType": "four_button",
23
            "sPaginationType": "four_button",
24
            "sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
24
            "sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
25
            "aoColumnDefs": [
25
            "aoColumnDefs": [
26
                { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
26
                { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
27
            ]
27
            ]
28
        } ));
28
        } ));
29
    });
29
    });
Lines 107-127 Link Here
107
                    </div>
107
                    </div>
108
                [% END %]
108
                [% END %]
109
109
110
                <table id="club-templates-table">
110
                [% IF club_templates %]
111
                    <thead>
111
                    <table id="club-templates-table">
112
                        <tr>
112
                        <thead>
113
                            <th>Name</th>
113
                            <tr>
114
                            <th>Description</th>
114
                                <th>Name</th>
115
                            <th>Public enrollment</th>
115
                                <th>Description</th>
116
                            <th>Email required</th>
116
                                <th>Public enrollment</th>
117
                            <th>Library</th>
117
                                <th>Email required</th>
118
                            <th>&nbsp;</th>
118
                                <th>Library</th>
119
                            <th>&nbsp;</th>
119
                                <th>Actions</th>
120
                        </tr>
120
                            </tr>
121
                    </thead>
121
                        </thead>
122
122
                        <tbody>
123
                    <tbody>
124
                        [% IF club_templates %]
125
                            [% FOREACH t IN club_templates %]
123
                            [% FOREACH t IN club_templates %]
126
                                <tr>
124
                                <tr>
127
                                    <td>[% t.name %]</td>
125
                                    <td>[% t.name %]</td>
Lines 141-155 Link Here
141
                                        [% END %]
139
                                        [% END %]
142
                                    </td>
140
                                    </td>
143
                                    <td>[% Branches.GetName( t.branchcode ) %]</td>
141
                                    <td>[% Branches.GetName( t.branchcode ) %]</td>
144
                                    <td>
142
                                    <td class="actions">
145
                                        [% IF CAN_user_clubs_edit_templates %]
143
                                        [% IF CAN_user_clubs_edit_templates %]
146
                                            <a class="btn btn-xs btn-default" style="white-space:nowrap"  href="templates-add-modify.pl?id=[% t.id %]">
144
                                            <a class="btn btn-xs btn-default" style="white-space:nowrap"  href="/cgi-bin/koha/clubbs/templates-add-modify.pl?id=[% t.id %]">
147
                                                <i class="fa fa-pencil"></i> Edit
145
                                                <i class="fa fa-pencil"></i> Edit
148
                                            </a>
146
                                            </a>
149
                                        [% END %]
150
                                    </td>
151
                                    <td>
152
                                        [% IF CAN_user_clubs_edit_templates %]
153
                                            <a class="btn btn-xs btn-default" href="#" onclick='ConfirmDeleteTemplate([% t.id %], "[% t.name | html %]", $(this) ); return false;'>
147
                                            <a class="btn btn-xs btn-default" href="#" onclick='ConfirmDeleteTemplate([% t.id %], "[% t.name | html %]", $(this) ); return false;'>
154
                                                <i class="fa fa-trash"></i> Delete
148
                                                <i class="fa fa-trash"></i> Delete
155
                                            </a>
149
                                            </a>
Lines 157-171 Link Here
157
                                    </td>
151
                                    </td>
158
                                </tr>
152
                                </tr>
159
                            [% END %]
153
                            [% END %]
160
                        [% ELSE %]
154
                        </tbody>
161
                            <tr>
155
                    </table>
162
                                <td colspan="7">
156
                [% ELSE %]
163
                                    No club templates defined.
157
                    <div class="dialog message">No club templates defined.</div>
164
                                </td>
158
                [% END %]
165
                            </td>
166
                        [% END %]
167
                    </tbody>
168
                </table>
169
159
170
                <h3>Clubs</h3>
160
                <h3>Clubs</h3>
171
161
Lines 186-211 Link Here
186
                    </div>
176
                    </div>
187
                [% END %]
177
                [% END %]
188
178
189
                <table id="clubs-table">
179
                [% IF clubs %]
190
                    <thead>
180
                    <table id="clubs-table">
191
                        <tr>
181
                        <thead>
192
                            <th>Name</th>
182
                            <tr>
193
                            <th>Template</th>
183
                                <th>Name</th>
194
                            <th>Description</th>
184
                                <th>Template</th>
195
                            <th>Public enrollment</th>
185
                                <th>Description</th>
196
                            <th>Email required</th>
186
                                <th>Public enrollment</th>
197
                            <th>Library</th>
187
                                <th>Email required</th>
198
                            <th>Start date</th>
188
                                <th>Library</th>
199
                            <th>End date</th>
189
                                <th>Start date</th>
200
                            <th>Enrolled patrons</th>
190
                                <th>End date</th>
201
                            <th>&nbsp;</th>
191
                                <th>Enrolled patrons</th>
202
                            <th>&nbsp;</th>
192
                                <th>&nbsp;</th>
203
                            <th>&nbsp;</th>
193
                            </tr>
204
                        </tr>
194
                        </thead>
205
                    </thead>
195
                        <tbody>
206
207
                    <tbody>
208
                        [% IF clubs %]
209
                            [% FOREACH c IN clubs %]
196
                            [% FOREACH c IN clubs %]
210
                                <tr>
197
                                <tr>
211
                                    <td>[% c.name %]</td>
198
                                    <td>[% c.name %]</td>
Lines 240-278 Link Here
240
                                        [% c.club_enrollments.count %]
227
                                        [% c.club_enrollments.count %]
241
                                    </td>
228
                                    </td>
242
                                    <td class="actions">
229
                                    <td class="actions">
243
                                        [% IF ( c.club_enrollments.count ) %]
230
                                        <div class="dropdown">
244
                                            <a class="btn btn-xs btn-default" href="club-enrollments.pl?id=[% c.id %]">
231
                                            <a class="btn btn-default btn-xs dropdown-toggle" id="clubactions[% c.id %]" role="button" data-toggle="dropdown" href="#">
245
                                        [% ELSE %]
232
                                                Actions <b class="caret"></b>
246
                                            <a class="btn btn-xs btn-default disabled" href="club-enrollments.pl?id=[% c.id %]">
247
                                        [% END %]
248
                                            <i class="fa fa-list-ul"></i> Enrollments
249
                                        </a>
250
                                    </td>
251
                                    <td class="actions">
252
                                        [% IF CAN_user_clubs_edit_clubs %]
253
                                            <a class="btn btn-xs btn-default" href="clubs-add-modify.pl?id=[% c.id %]">
254
                                                <i class="fa fa-pencil"></i> Edit
255
                                            </a>
256
                                        [% END %]
257
                                    </td>
258
                                    <td class="actions">
259
                                        [% IF CAN_user_clubs_edit_clubs %]
260
                                            <a class="btn btn-xs btn-default" href="#" onclick='ConfirmDeleteClub([% c.id %], "[% c.name | html %]", $(this) ); return false;'>
261
                                                <i class="fa fa-trash"></i> Delete
262
                                            </a>
233
                                            </a>
263
                                        [% END %]
234
                                            <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="clubactions[% c.id %]">
235
                                                <li>
236
                                                    [% IF ( c.club_enrollments.count ) %]
237
                                                        <a class="btn btn-xs btn-default" href="club-enrollments.pl?id=[% c.id %]">
238
                                                    [% ELSE %]
239
                                                        <a class="btn btn-xs btn-default disabled" href="club-enrollments.pl?id=[% c.id %]">
240
                                                    [% END %]
241
                                                    <i class="fa fa-list-ul"></i> Enrollments
242
                                                </li>
243
                                                [% IF CAN_user_clubs_edit_clubs %]
244
                                                    <li>
245
                                                        <a class="btn btn-xs btn-default" href="clubs-add-modify.pl?id=[% c.id %]">
246
                                                            <i class="fa fa-pencil"></i> Edit
247
                                                        </a>
248
                                                    </li>
249
                                                    <li>
250
                                                        <a class="btn btn-xs btn-default" href="#" onclick='ConfirmDeleteClub([% c.id %], "[% c.name | html %]", $(this) ); return false;'>
251
                                                            <i class="fa fa-trash"></i> Delete
252
                                                        </a>
253
                                                    </li>
254
                                                [% END %]
255
                                            </ul>
256
                                        </div>
264
                                    </td>
257
                                    </td>
265
                                </tr>
258
                                </tr>
266
                            [% END %]
259
                            [% END %]
267
                        [% ELSE %]
260
                        </tbody>
268
                            <tr>
261
                    </table> <!-- /.clubs-table -->
269
                                <td colspan="11">
262
                [% ELSE %]
270
                                    No clubs defined.
263
                    [% IF club_templates %]
271
                                </td>
264
                        <div class="dialog message">No clubs defined.</div>
272
                            </tr>
265
                    [% ELSE %]
273
                        [% END %]
266
                        <div class="dialog message">No clubs defined. A club template must be defined before a club can be defined.</div>
274
                    </tbody>
267
                    [% END %]
275
                </table> <!-- /.clubs-table -->
268
                [% END %]
276
            </div> <!-- /.yui-b -->
269
            </div> <!-- /.yui-b -->
277
        </div> <!-- /.yui-main -->
270
        </div> <!-- /.yui-main -->
278
        <div class="yui-b noprint">
271
        <div class="yui-b noprint">
279
- 

Return to bug 18869