Lines 24-30
Link Here
|
24 |
}); |
24 |
}); |
25 |
|
25 |
|
26 |
function ConfirmDeleteTemplate( id, name, a ) { |
26 |
function ConfirmDeleteTemplate( id, name, a ) { |
27 |
if ( confirm( _("Are you sure you want to delete the club template") + name + "?" ) ) { |
27 |
if ( confirm( _("Are you sure you want to delete the club template %s?" ).format(name) ) ) { |
28 |
$.ajax({ |
28 |
$.ajax({ |
29 |
type: "POST", |
29 |
type: "POST", |
30 |
url: '/cgi-bin/koha/svc/club/template/delete', |
30 |
url: '/cgi-bin/koha/svc/club/template/delete', |
Lines 42-48
Link Here
|
42 |
} |
42 |
} |
43 |
|
43 |
|
44 |
function ConfirmDeleteClub( id, name, a ) { |
44 |
function ConfirmDeleteClub( id, name, a ) { |
45 |
if ( confirm( _("Are you sure you want to delete the club ") + name + "?" ) ) { |
45 |
if ( confirm( _("Are you sure you want to delete the club %s?" ).format(name) ) ) { |
46 |
$.ajax({ |
46 |
$.ajax({ |
47 |
type: "POST", |
47 |
type: "POST", |
48 |
url: '/cgi-bin/koha/svc/club/delete', |
48 |
url: '/cgi-bin/koha/svc/club/delete', |
Lines 68-206
Link Here
|
68 |
[% INCLUDE 'cat-search.inc' %] |
68 |
[% INCLUDE 'cat-search.inc' %] |
69 |
<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</div> |
69 |
<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</div> |
70 |
|
70 |
|
71 |
<div class="yui-t7"> |
71 |
<div id="doc3" class="yui-t2"> |
72 |
<div class="yui-main"> |
72 |
<div id="bd"> |
73 |
<h1>Patron clubs</h1> |
73 |
<div id="yui-main"> |
|
|
74 |
<div class="yui-b"> |
75 |
<h1>Patron clubs</h1> |
74 |
|
76 |
|
|
|
77 |
<h3>Club templates</h3> |
75 |
|
78 |
|
76 |
<h3>Club templates</h3> |
79 |
[% IF CAN_user_clubs_edit_templates %] |
|
|
80 |
<div class="btn-toolbar"> |
81 |
<div class="btn-group"> |
82 |
<a class="btn" href="templates-add-modify.pl"><i class="fa fa-plus"></i> New club template</a> |
83 |
</div> |
84 |
</div> |
85 |
[% END %] |
77 |
|
86 |
|
78 |
[% IF CAN_user_clubs_edit_templates %] |
87 |
<table id="club-templates-table"> |
79 |
<div class="btn-group"> |
88 |
<thead> |
80 |
<a class="btn" href="templates-add-modify.pl"><i class="fa fa-plus"></i> New club template</a> |
89 |
<tr> |
81 |
</div> |
90 |
<th>Name</th> |
82 |
[% END %] |
91 |
<th>Description</th> |
83 |
|
92 |
<th>Public enrollment</th> |
84 |
<table id="club-templates-table"> |
93 |
<th>Email required</th> |
85 |
<thead> |
94 |
<th>Library</th> |
86 |
<tr> |
95 |
<th> </th> |
87 |
<th>Name</th> |
96 |
<th> </th> |
88 |
<th>Description</th> |
97 |
</tr> |
89 |
<th>Public enrollment</th> |
98 |
</thead> |
90 |
<th>Email required</th> |
99 |
|
91 |
<th>Library</th> |
100 |
<tbody> |
92 |
<th> </th> |
101 |
[% IF club_templates %] |
93 |
<th> </th> |
102 |
[% FOREACH t IN club_templates %] |
94 |
</tr> |
103 |
<tr> |
95 |
</thead> |
104 |
<td>[% t.name %]</td> |
96 |
|
105 |
<td>[% t.description %]</td> |
97 |
<tbody> |
106 |
<td> |
98 |
[% FOREACH t IN club_templates %] |
107 |
[% IF t.is_enrollable_from_opac %] |
99 |
<tr> |
108 |
Yes |
100 |
<td>[% t.name %]</td> |
109 |
[% ELSE %] |
101 |
<td>[% t.description %]</td> |
110 |
No |
102 |
<td> |
111 |
[% END %] |
103 |
[% IF t.is_enrollable_from_opac %] |
112 |
</td> |
104 |
Yes |
113 |
<td> |
105 |
[% ELSE %] |
114 |
[% IF t.is_email_required %] |
106 |
No |
115 |
Yes |
107 |
[% END %] |
116 |
[% ELSE %] |
108 |
</td> |
117 |
No |
109 |
<td> |
118 |
[% END %] |
110 |
[% IF t.is_email_required %] |
119 |
</td> |
111 |
Yes |
120 |
<td>[% Branches.GetName( t.branchcode ) %]</td> |
112 |
[% ELSE %] |
121 |
<td> |
113 |
No |
122 |
[% IF CAN_user_clubs_edit_templates %] |
114 |
[% END %] |
123 |
<a class="btn" style="white-space:nowrap" href="templates-add-modify.pl?id=[% t.id %]"> |
115 |
</td> |
124 |
<i class="fa fa-edit"></i> Edit |
116 |
<td>[% Branches.GetName( t.branchcode ) %]</td> |
125 |
</a> |
117 |
<td> |
126 |
[% END %] |
118 |
[% IF CAN_user_clubs_edit_templates %] |
127 |
</td> |
119 |
<a class="btn" style="white-space:nowrap" href="templates-add-modify.pl?id=[% t.id %]"> |
128 |
<td> |
120 |
<i class="fa fa-edit"></i> Edit |
129 |
[% IF CAN_user_clubs_edit_templates %] |
121 |
</a> |
130 |
<a class="btn" href="#" onclick='ConfirmDeleteTemplate([% t.id %], "[% t.name | html %]", $(this) ); return false;'> |
|
|
131 |
<i class="fa fa-trash"></i> Delete |
132 |
</a> |
133 |
[% END %] |
134 |
</td> |
135 |
</tr> |
122 |
[% END %] |
136 |
[% END %] |
123 |
</td> |
137 |
[% ELSE %] |
124 |
<td> |
138 |
<tr> |
125 |
[% IF CAN_user_clubs_edit_templates %] |
139 |
<td colspan="7"> |
126 |
<a class="btn" href="#" onclick='ConfirmDeleteTemplate([% t.id %], "[% t.name | html %]", $(this) ); return false;'> |
140 |
No club templates defined. |
127 |
<i class="fa fa-trash"></i> Delete |
141 |
</td> |
128 |
</a> |
142 |
</td> |
129 |
[% END %] |
143 |
[% END %] |
130 |
</td> |
144 |
</tbody> |
131 |
</tr> |
145 |
</table> |
|
|
146 |
|
147 |
<h3>Clubs</h3> |
148 |
|
149 |
[% IF CAN_user_clubs_edit_clubs %] |
150 |
<div class="btn-toolbar"> |
151 |
<div class="btn-group"> |
152 |
<button class="btn dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New club <span class="caret"></span></button> |
153 |
<ul class="dropdown-menu"> |
154 |
[% FOREACH t IN club_templates %] |
155 |
<li><a href="/cgi-bin/koha/clubs/clubs-add-modify.pl?club_template_id=[% t.id %]">[% t.name %]</a></li> |
156 |
[% END %] |
157 |
</ul> |
158 |
</div> |
159 |
</div> |
132 |
[% END %] |
160 |
[% END %] |
133 |
</tbody> |
161 |
|
134 |
</table> |
162 |
<table id="clubs-table"> |
135 |
|
163 |
<thead> |
136 |
<h3>Clubs</h3> |
164 |
<tr> |
137 |
|
165 |
<th>Name</th> |
138 |
[% IF CAN_user_clubs_edit_clubs %] |
166 |
<th>Template</th> |
139 |
<div class="btn-group"> |
167 |
<th>Description</th> |
140 |
<div class="btn-group"> |
168 |
<th>Public enrollment</th> |
141 |
<button class="btn dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New club <span class="caret"></span></button> |
169 |
<th>Email required</th> |
142 |
<ul class="dropdown-menu"> |
170 |
<th>Library</th> |
143 |
[% FOREACH t IN club_templates %] |
171 |
<th> </th> |
144 |
<li><a href="/cgi-bin/koha/clubs/clubs-add-modify.pl?club_template_id=[% t.id %]">[% t.name %]</a></li> |
172 |
<th> </th> |
|
|
173 |
</tr> |
174 |
</thead> |
175 |
|
176 |
<tbody> |
177 |
[% IF clubs %] |
178 |
[% FOREACH c IN clubs %] |
179 |
<tr> |
180 |
<td>[% c.name %]</td> |
181 |
<td>[% c.club_template.name %]</td> |
182 |
<td>[% c.description %]</td> |
183 |
<td> |
184 |
[% IF c.club_template.is_enrollable_from_opac %] |
185 |
Yes |
186 |
[% ELSE %] |
187 |
No |
188 |
[% END %] |
189 |
</td> |
190 |
<td> |
191 |
[% IF c.club_template.is_email_required %] |
192 |
Yes |
193 |
[% ELSE %] |
194 |
No |
195 |
[% END %] |
196 |
</td> |
197 |
<td>[% Branches.GetName( c.branchcode ) %]</td> |
198 |
<td> |
199 |
[% IF CAN_user_clubs_edit_clubs %] |
200 |
<a class="btn" style="white-space:nowrap" href="clubs-add-modify.pl?id=[% c.id %]"> |
201 |
<i class="fa fa-edit"></i> Edit |
202 |
</a> |
203 |
[% END %] |
204 |
</td> |
205 |
<td> |
206 |
[% IF CAN_user_clubs_edit_clubs %] |
207 |
<a class="btn" href="#" onclick='ConfirmDeleteClub([% c.id %], "[% c.name | html %]", $(this) ); return false;'> |
208 |
<i class="fa fa-trash"></i> Delete |
209 |
</a> |
210 |
[% END %] |
211 |
</td> |
212 |
</tr> |
213 |
[% END %] |
214 |
[% ELSE %] |
215 |
<tr> |
216 |
<td colspan="8"> |
217 |
No club templates defined. |
218 |
</td> |
219 |
</td> |
145 |
[% END %] |
220 |
[% END %] |
146 |
</ul> |
221 |
</tbody> |
147 |
</div> |
222 |
</table> |
148 |
</div> |
223 |
</div> |
149 |
[% END %] |
224 |
</div> |
150 |
|
225 |
<div class="yui-b noprint"> |
151 |
<table id="clubs-table"> |
226 |
[% INCLUDE 'tools-menu.inc' %] |
152 |
<thead> |
227 |
</div> |
153 |
<tr> |
|
|
154 |
<th>Name</th> |
155 |
<th>Template</th> |
156 |
<th>Description</th> |
157 |
<th>Public enrollment</th> |
158 |
<th>Email required</th> |
159 |
<th>Library</th> |
160 |
<th> </th> |
161 |
<th> </th> |
162 |
</tr> |
163 |
</thead> |
164 |
|
165 |
<tbody> |
166 |
[% FOREACH c IN clubs %] |
167 |
<tr> |
168 |
<td>[% c.name %]</td> |
169 |
<td>[% c.club_template.name %]</td> |
170 |
<td>[% c.description %]</td> |
171 |
<td> |
172 |
[% IF c.club_template.is_enrollable_from_opac %] |
173 |
Yes |
174 |
[% ELSE %] |
175 |
No |
176 |
[% END %] |
177 |
</td> |
178 |
<td> |
179 |
[% IF c.club_template.is_email_required %] |
180 |
Yes |
181 |
[% ELSE %] |
182 |
No |
183 |
[% END %] |
184 |
</td> |
185 |
<td>[% Branches.GetName( c.branchcode ) %]</td> |
186 |
<td> |
187 |
[% IF CAN_user_clubs_edit_clubs %] |
188 |
<a class="btn" style="white-space:nowrap" href="clubs-add-modify.pl?id=[% c.id %]"> |
189 |
<i class="fa fa-edit"></i> Edit |
190 |
</a> |
191 |
[% END %] |
192 |
</td> |
193 |
<td> |
194 |
[% IF CAN_user_clubs_edit_clubs %] |
195 |
<a class="btn" href="#" onclick='ConfirmDeleteClub([% c.id %], "[% c.name | html %]", $(this) ); return false;'> |
196 |
<i class="fa fa-trash"></i> Delete |
197 |
</a> |
198 |
[% END %] |
199 |
</td> |
200 |
</tr> |
201 |
[% END %] |
202 |
</tbody> |
203 |
</table> |
204 |
</div> |
228 |
</div> |
205 |
</div> |
229 |
</div> |
206 |
[% INCLUDE 'intranet-bottom.inc' %] |
230 |
[% INCLUDE 'intranet-bottom.inc' %] |