Lines 1-20
Link Here
|
|
|
1 |
[% USE Koha %] |
1 |
[% USE AuthorisedValues %] |
2 |
[% USE AuthorisedValues %] |
|
|
3 |
[% USE Price %] |
2 |
[% INCLUDE 'doc-head-open.inc' %] |
4 |
[% INCLUDE 'doc-head-open.inc' %] |
3 |
<title>Koha › Administration › Item types [% IF ( add_form ) %]› |
5 |
<title>Koha › Administration › Item types [% IF op == 'add_form' %]› |
4 |
[% IF ( itemtype ) %] |
6 |
[% IF ( itemtype ) %] |
5 |
Modify item type '[% itemtype %]' |
7 |
Modify item type '[% itemtype.itemtype %]' |
6 |
[% ELSE %] |
8 |
[% ELSE %] |
7 |
Add item type |
9 |
Add item type |
8 |
[% END %] |
10 |
[% END %] |
9 |
[% END %] |
11 |
[% END %] |
10 |
[% IF ( delete_confirm ) %]› |
12 |
[% IF op == 'delete_confirm' %]› |
11 |
[% IF ( total ) %] |
13 |
[% IF ( total ) %] |
12 |
Cannot delete item type '[% itemtype %]' |
14 |
Cannot delete item type '[% itemtype.itemtype %]' |
13 |
[% ELSE %] |
15 |
[% ELSE %] |
14 |
Delete item type '[% itemtype %]'? |
16 |
Delete item type '[% itemtype.itemtype %]'? |
15 |
[% END %] |
17 |
[% END %] |
16 |
[% END %] |
18 |
[% END %] |
17 |
[% IF ( delete_confirmed ) %]› |
19 |
[% IF op == 'delete_confirmed' %]› |
18 |
Data deleted |
20 |
Data deleted |
19 |
[% END %] |
21 |
[% END %] |
20 |
</title> |
22 |
</title> |
Lines 55-366
Data deleted
Link Here
|
55 |
[% INCLUDE 'header.inc' %] |
57 |
[% INCLUDE 'header.inc' %] |
56 |
[% INCLUDE 'cat-search.inc' %] |
58 |
[% INCLUDE 'cat-search.inc' %] |
57 |
|
59 |
|
58 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › [% IF ( add_form ) %] |
60 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › [% IF op == 'add_form' %] |
59 |
[% IF ( itemtype ) %] |
61 |
[% IF itemtype %] |
60 |
<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Modify item type '[% itemtype %]' |
62 |
<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Modify item type '[% itemtype.itemtype %]' |
61 |
[% ELSE %] |
63 |
[% ELSE %] |
62 |
<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Add item type |
64 |
<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Add item type |
63 |
[% END %] |
65 |
[% END %] |
64 |
[% END %] |
66 |
[% END %] |
65 |
[% IF ( delete_confirm ) %] |
67 |
[% IF op == 'delete_confirm' %] |
66 |
[% IF ( total ) %] |
68 |
[% IF total %] |
67 |
<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Cannot delete item type '[% itemtype %]' |
69 |
<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Cannot delete item type '[% itemtype.itemtype %]' |
68 |
[% ELSE %] |
70 |
[% ELSE %] |
69 |
<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Delete item type '[% itemtype %]'? |
71 |
<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Delete item type '[% itemtype.itemtype %]'? |
70 |
[% END %] |
72 |
[% END %] |
71 |
[% END %] |
73 |
[% END %] |
72 |
[% IF ( delete_confirmed ) %] |
74 |
[% IF op == 'delete_confirmed' %] |
73 |
<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> ›Data deleted |
75 |
<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> ›Data deleted |
74 |
[% END %] |
76 |
[% END %] |
75 |
[% IF ( else ) %] |
77 |
[% IF op == 'list' %] |
76 |
Item types administration |
78 |
Item types administration |
77 |
[% END %]</div> |
79 |
[% END %]</div> |
78 |
|
80 |
|
79 |
<div id="doc3" class="yui-t2"> |
81 |
<div id="doc3" class="yui-t2"> |
80 |
|
82 |
|
81 |
<div id="bd"> |
83 |
<div id="bd"> |
82 |
<div id="yui-main"> |
84 |
<div id="yui-main"> |
83 |
<div class="yui-b"> |
85 |
<div class="yui-b"> |
84 |
|
86 |
|
85 |
[% IF ( else ) %]<div id="toolbar" class="btn-toolbar"> |
87 |
|
|
|
88 |
[% IF op == 'list' %]<div id="toolbar" class="btn-toolbar"> |
86 |
<a class="btn btn-small" id="newitemtype" href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form"><i class="fa fa-plus"></i> New item type</a> |
89 |
<a class="btn btn-small" id="newitemtype" href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form"><i class="fa fa-plus"></i> New item type</a> |
87 |
</div>[% END %] |
90 |
</div>[% END %] |
88 |
|
91 |
|
89 |
[% FOREACH message IN messages %] |
92 |
[% FOREACH m IN messages %] |
90 |
[% IF message.type == 'success' %] |
93 |
<div class="dialog [% m.type %]"> |
91 |
<div class="dialog message"> |
94 |
[% SWITCH m.code %] |
92 |
[% ELSIF message.type == 'warning' %] |
95 |
[% CASE 'error_on_update' %] |
93 |
<div class="dialog alert"> |
96 |
An error occurred when updating this item type. Perhaps the value already exists. |
94 |
[% ELSIF message.type == 'error' %] |
97 |
[% CASE 'error_on_insert' %] |
95 |
<div class="dialog error" style="margin:auto;"> |
98 |
An error occurred when inserting this item type. Perhaps the value already exists. |
96 |
[% END %] |
99 |
[% CASE 'error_on_delete' %] |
97 |
[% IF message.code == 'already_exists' %] |
100 |
An error occurred when deleting this item type. Check the logs. |
98 |
This item type already exists. |
101 |
[% CASE 'success_on_update' %] |
99 |
[% END %] |
102 |
Item type updated successfully. |
100 |
</div> |
103 |
[% CASE 'success_on_insert' %] |
|
|
104 |
Item type inserted successfully. |
105 |
[% CASE 'success_on_delete' %] |
106 |
Item type deleted successfully. |
107 |
[% CASE 'already_exists' %] |
108 |
This item type already exists. |
109 |
[% CASE 'cannot_be_deleted' %] |
110 |
Cannot delete this item type. <p><strong>This record is used [% m.total %] times</strong>. Deletion is not possible.</p> |
111 |
[% CASE %] |
112 |
[% m.code %] |
113 |
[% END %] |
114 |
</div> |
101 |
[% END %] |
115 |
[% END %] |
102 |
|
116 |
|
103 |
|
117 |
|
104 |
[% IF ( add_form ) %] |
118 |
[% IF op == 'add_form' %] |
105 |
[% IF ( itemtype ) %] |
119 |
[% IF itemtype %] |
106 |
<h3>Modify item type</h3> |
120 |
<h3>Modify item type</h3> |
107 |
[% ELSE %] |
|
|
108 |
<h3>Add item type</h3> |
109 |
[% END %] |
110 |
<form action="[% script_name %]" name="Aform" method="post" id="itemtypeentry"> |
111 |
<input type="hidden" name="op" value="add_validate" /> |
112 |
<input type="hidden" name="checked" value="0" /> |
113 |
|
114 |
<fieldset class="rows"> |
115 |
<ol> |
116 |
[% IF ( itemtype ) %] |
117 |
<li> |
118 |
<input type="hidden" name="is_a_modif" value="1" /> |
119 |
<span class="label">Item type: </span> <input type="hidden" name="itemtype" value="[% itemtype %]" /> |
120 |
[% itemtype %] |
121 |
</li> |
122 |
[% ELSE %] |
123 |
<li> |
124 |
<label for="itemtype" class="required">Item type: </label> <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" onblur="toUC(this)" required="required" /> <span class="required">Required</span> |
125 |
</li> |
126 |
[% END %] |
127 |
<li> |
128 |
<label for="description" class="required">Description: </label><input type="text" id="description" name="description" size="48" value="[% description |html %]" required="required" /> <span class="required">Required</span> |
129 |
<a href="/cgi-bin/koha/admin/localization.pl?entity=itemtypes&code=[% itemtype %]" title="Translate item type [% itemtype %]" rel="gb_page_center[600,500]"><i class="icon-edit"></i> Translate into other languages</a> |
130 |
</li> |
131 |
<li> |
132 |
<span class="label">Search category</span> |
133 |
<select id="searchcategory" name="searchcategory"> |
134 |
<option value="">None</option> |
135 |
[% FOREACH cat IN searchcategory %] |
136 |
[% IF ( cat.selected ) %] |
137 |
<option value="[% cat.authorised_value %]" selected="selected"> |
138 |
[% cat.lib %] |
139 |
</option> |
140 |
[% ELSE %] |
141 |
<option value="[% cat.authorised_value %]" > |
142 |
[% cat.lib %] |
143 |
</option> |
144 |
[% END %] |
145 |
[% END %] |
146 |
</select> |
147 |
(Options are defined as the authorized values for the ITEMTYPECAT category) |
148 |
</li> |
149 |
[% IF ( noItemTypeImages ) %] |
150 |
<li><span class="label">Image: </span>Item type images are disabled. To enable them, turn off the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=noItemTypeImages">noItemTypeImages system preference</a></li></ol> |
151 |
[% ELSE %]</ol> |
152 |
<div id="icons" class="toptabs" style="clear:both"> |
153 |
<h5 style="margin-left:10px;">Choose an icon:</h5> |
154 |
<ul> |
155 |
<li><a href="#none">None</a></li> |
156 |
[% FOREACH imageset IN imagesets %] |
157 |
[% IF ( imageset.imagesetactive ) %]<li class="ui-tabs-active">[% ELSE %]<li>[% END %]<a href="#[% imageset.imagesetname %]">[% imageset.imagesetname %]</a></li> |
158 |
[% END %] |
159 |
[% IF ( remote_image ) %]<li class="ui-tabs-active">[% ELSE %]<li>[% END %]<a href="#remote">Remote image</a></li> |
160 |
</ul> |
161 |
<div id="none"><ul> |
162 |
<li><label for="noimage">No image: </label><input type="radio" name="image" id="noimage" value="removeImage" /></li> |
163 |
</ul> |
164 |
<br class="clear" /></div> |
165 |
|
166 |
[% FOREACH imageset IN imagesets %] |
167 |
<div id="[% imageset.imagesetname %]"><ul> |
168 |
[% FOREACH image IN imageset.images %] |
169 |
<li style="float: none; display: inline-block; clear : none; width: auto;"> |
170 |
<label> [% IF ( image.StaffImageUrl ) %] |
171 |
<img src="[% image.StaffImageUrl %]" alt="[% image.StaffImageUrl %]" title="[% image.StaffImageUrl %]" /> |
172 |
[% ELSE %] |
173 |
[% END %] |
174 |
[% IF ( image.checked ) %] |
175 |
<input type="radio" name="image" value="[% image.KohaImage %]" checked="checked" /> |
176 |
[% ELSE %] |
121 |
[% ELSE %] |
177 |
[% IF ( image.KohaImage ) %] <!-- to delete the radio button if there is no image after --> |
122 |
<h3>Add item type</h3> |
178 |
<input type="radio" name="image" value="[% image.KohaImage %]" /> |
|
|
179 |
[% END %] |
180 |
[% END %] |
123 |
[% END %] |
181 |
</label> |
124 |
<form action="/cgi-bin/koha/admin/itemtypes.pl" name="Aform" method="post" id="itemtypeentry"> |
182 |
</li> |
125 |
<input type="hidden" name="op" value="add_validate" /> |
183 |
[% END %] |
126 |
<fieldset class="rows"> |
184 |
</ul> |
127 |
<ol> |
185 |
<br class="clear" /> |
128 |
[% IF itemtype %] |
186 |
</div> |
129 |
<li> |
187 |
[% END %] |
130 |
<input type="hidden" name="is_a_modif" value="1" /> |
188 |
<div id="remote"><ul> |
131 |
<span class="label">Item type: </span> <input type="hidden" name="itemtype" value="[% itemtype.itemtype %]" /> |
189 |
<li> <label for="remote_image_check"> Remote image:</label> |
132 |
[% itemtype.itemtype %] |
190 |
[% IF ( remote_image ) %] |
133 |
</li> |
191 |
<input type="radio" id="remote_image_check" name="image" value="remoteImage" checked="checked" /> |
134 |
[% ELSE %] |
192 |
[% ELSE %] |
135 |
<li> |
193 |
<input type="radio" id="remote_image_check" name="image" value="remoteImage" /> |
136 |
<label for="itemtype" class="required">Item type: </label> |
194 |
[% END %]<input type="text" name="remoteImage" size="48" maxlength="200" value="[% remote_image %]" onmousedown="document.getElementById('remote_image_check').checked = true;" /> [% IF ( remote_image ) %] |
137 |
<input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" onblur="toUC(this)" required="required" /> <span class="required">Required</span> |
195 |
<img src="[% remote_image %]" alt="" /> |
138 |
</li> |
196 |
[% END %]</li> |
139 |
[% END %] |
197 |
</ul> |
140 |
<li> |
198 |
<br class="clear" /> |
141 |
<label for="description" class="required">Description: </label> |
199 |
</div> |
142 |
<input type="text" id="description" name="description" size="48" value="[% itemtype.description |html %]" required="required" /> <span class="required">Required</span> |
200 |
</div> |
143 |
<a href="/cgi-bin/koha/admin/localization.pl?entity=itemtypes&code=[% itemtype %]" title="Translate item type [% itemtype %]" rel="gb_page_center[600,500]"><i class="icon-edit"></i> Translate into other languages</a> |
201 |
[% END %] |
144 |
</li> |
202 |
<ol> |
145 |
<li> |
203 |
<li> |
146 |
<span class="label">Search category</span> |
204 |
<label for="hideinopac">Hide in OPAC: </label> |
147 |
<select id="searchcategory" name="searchcategory"> |
205 |
[% IF ( hideinopac ) %] |
148 |
<option value="">None</option> |
206 |
<input type="checkbox" id="hideinopac" name="hideinopac" checked="checked" value="1" /> |
149 |
[% FOREACH cat IN searchcategory %] |
207 |
[% ELSE %] |
150 |
[% IF cat.selected %] |
208 |
<input type="checkbox" id="hideinopac" name="hideinopac" value="1" /> |
151 |
<option value="[% cat.authorised_value %]" selected="selected"> |
209 |
[% END %] |
152 |
[% cat.lib %] |
210 |
(if checked, items of this type will be hidden as filters in OPAC's advanced search) |
153 |
</option> |
211 |
</li> |
154 |
[% ELSE %] |
212 |
<li> |
155 |
<option value="[% cat.authorised_value %]" > |
213 |
<label for="notforloan">Not for loan: </label> [% IF ( notforloan ) %] |
156 |
[% cat.lib %] |
214 |
<input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" /> |
157 |
</option> |
215 |
[% ELSE %] |
158 |
[% END %] |
216 |
<input type="checkbox" id="notforloan" name="notforloan" value="1" /> |
159 |
[% END %] |
217 |
[% END %] |
160 |
</select> |
218 |
(if checked, no item of this type can be issued. If not checked, every item of this type can be issued unless notforloan is set for a specific item) |
161 |
(Options are defined as the authorized values for the ITEMTYPECAT category) |
219 |
|
162 |
</li> |
220 |
</li> |
163 |
[% IF Koha.Preference('noItemTypeImages') %] |
221 |
<li> |
164 |
<li> |
222 |
<label for="rentalcharge">Rental charge: </label> |
165 |
<span class="label">Image: </span>Item type images are disabled. To enable them, turn off the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=noItemTypeImages">noItemTypeImages system preference</a> |
223 |
<input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% rentalcharge %]" /> |
166 |
</li> |
224 |
</li> |
167 |
[% END %] |
225 |
<li> |
168 |
</ol> |
226 |
<label for="checkinmsg">Checkin message: </label> |
169 |
[% UNLESS Koha.Preference('noItemTypeImages') %] |
227 |
<textarea id="checkinmsg" name="checkinmsg" cols="55" rows="5">[% checkinmsg %]</textarea> |
170 |
<div id="icons" class="toptabs" style="clear:both"> |
228 |
</li> |
171 |
<h5 style="margin-left:10px;">Choose an icon:</h5> |
229 |
<li> |
172 |
<ul> |
230 |
<label for="checkinmsgtype">Checkin message type: </label> |
173 |
<li><a href="#none">None</a></li> |
231 |
<select type="text" id="checkinmsgtype" name="checkinmsgtype"> |
174 |
[% FOREACH imageset IN imagesets %] |
232 |
[% IF ( checkinmsgtype == 'message' ) %] |
175 |
[% IF ( imageset.imagesetactive ) %] |
233 |
<option value="message" selected="selected">Message</option> |
176 |
<li class="ui-tabs-active"> |
234 |
[% ELSE %] |
177 |
[% ELSE %] |
235 |
<option value="message">Message</option> |
178 |
<li> |
236 |
[% END %] |
179 |
[% END %] |
237 |
[% IF ( checkinmsgtype == 'alert' ) %] |
180 |
<a href="#[% imageset.imagesetname %]">[% imageset.imagesetname %]</a> |
238 |
<option value="alert" selected="selected">Alert</option> |
181 |
</li> |
239 |
[% ELSE %] |
182 |
[% END %] |
240 |
<option value="alert">Alert</option> |
183 |
[% IF itemtype.image_location.match('^http') %]<li class="ui-tabs-active">[% ELSE %]<li>[% END %]<a href="#remote">Remote image</a></li> |
241 |
[% END %] |
184 |
</ul> |
242 |
</select> |
185 |
<div id="none"> |
243 |
</li> |
186 |
<ul> |
244 |
<li> |
187 |
<li><label for="noimage">No image: </label><input type="radio" name="image" id="noimage" value="removeImage" /></li> |
245 |
<label for="sip_media_type">SIP media type: </label> |
188 |
</ul> |
246 |
<select id="sip_media_type" name="sip_media_type"> |
189 |
<br class="clear" /> |
247 |
<option value=""></option> |
190 |
</div> |
248 |
[% FOREACH a IN AuthorisedValues.Get('SIP_MEDIA_TYPE', sip_media_type ) %] |
|
|
249 |
[% IF a.selected %] |
250 |
<option value="[% a.authorised_value %]" selected="selected">[% a.lib %]</option> |
251 |
[% ELSE %] |
252 |
<option value="[% a.authorised_value %]">[% a.lib %]</option> |
253 |
[% END %] |
254 |
[% END %] |
255 |
</select> |
256 |
</li> |
257 |
<li> |
258 |
<label for="summary">Summary: </label> |
259 |
<textarea id="summary" name="summary" cols="55" rows="5">[% summary %]</textarea> |
260 |
<p>Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </p> |
261 |
<p><b><a href="[856u]">open site</a></b> will show the link just below the title</p> |
262 |
</li> |
263 |
</ol> |
264 |
</fieldset> |
265 |
|
191 |
|
266 |
<fieldset class="action"> |
192 |
[% FOREACH imageset IN imagesets %] |
267 |
<input type="submit" value="Save changes" /> |
193 |
<div id="[% imageset.imagesetname %]"> |
268 |
<a href="/cgi-bin/koha/admin/itemtypes.pl" class="cancel">Cancel</a> |
194 |
<ul> |
269 |
</fieldset> |
195 |
[% FOREACH image IN imageset.images %] |
270 |
</form> |
196 |
<li style="float: none; display: inline-block; clear : none; width: auto;"> |
271 |
[% END %] |
197 |
<label> |
|
|
198 |
[% IF image.StaffImageUrl %] |
199 |
<img src="[% image.StaffImageUrl %]" alt="[% image.StaffImageUrl %]" title="[% image.StaffImageUrl %]" /> |
200 |
[% END %] |
201 |
[% IF image.checked %] |
202 |
<input type="radio" name="image" value="[% image.KohaImage %]" checked="checked" /> |
203 |
[% ELSIF image.KohaImage %] <!-- to delete the radio button if there is no image after --> |
204 |
<input type="radio" name="image" value="[% image.KohaImage %]" /> |
205 |
[% END %] |
206 |
</label> |
207 |
</li> |
208 |
[% END %] |
209 |
</ul> |
210 |
<br class="clear" /> |
211 |
</div> |
212 |
[% END %] |
272 |
|
213 |
|
273 |
[% IF ( delete_confirm ) %] |
214 |
<div id="remote"> |
274 |
[% IF ( total ) %]<div class="dialog message"> |
215 |
<ul> |
275 |
<h3>Cannot delete item type</h3> |
216 |
<li> |
276 |
<p><strong>This record is used [% total %] times</strong>. Deletion is not possible.</p> |
217 |
<label for="remote_image_check"> Remote image:</label> |
277 |
[% ELSE %]<div class="dialog alert"> |
218 |
[% IF remote_image %] |
278 |
<h3>Delete item type '[% itemtype %]'?</h3> |
219 |
<input type="radio" id="remote_image_check" name="image" value="remoteImage" checked="checked" /> |
|
|
220 |
[% ELSE %] |
221 |
<input type="radio" id="remote_image_check" name="image" value="remoteImage" /> |
222 |
[% END %] |
223 |
<input type="text" name="remoteImage" size="48" maxlength="200" value="[% remote_image %]" onmousedown="document.getElementById('remote_image_check').checked = true;" /> |
224 |
[% IF ( remote_image ) %] |
225 |
<img src="[% remote_image %]" alt="" /> |
226 |
[% END %] |
227 |
</li> |
228 |
</ul> |
229 |
<br class="clear" /> |
230 |
</div> |
231 |
</div> |
232 |
[% END %] |
233 |
<ol> |
234 |
<li> |
235 |
<label for="hideinopac">Hide in OPAC: </label> |
236 |
[% IF ( hideinopac ) %] |
237 |
<input type="checkbox" id="hideinopac" name="hideinopac" checked="checked" value="1" /> |
238 |
[% ELSE %] |
239 |
<input type="checkbox" id="hideinopac" name="hideinopac" value="1" /> |
240 |
[% END %] |
241 |
(if checked, items of this type will be hidden as filters in OPAC's advanced search) |
242 |
</li> |
243 |
<li> |
244 |
<label for="notforloan">Not for loan: </label> |
245 |
[% IF itemtype.notforloan %] |
246 |
<input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" /> |
247 |
[% ELSE %] |
248 |
<input type="checkbox" id="notforloan" name="notforloan" value="1" /> |
249 |
[% END %] |
250 |
(if checked, no item of this type can be issued. If not checked, every item of this type can be issued unless notforloan is set for a specific item) |
251 |
</li> |
252 |
<li> |
253 |
<label for="rentalcharge">Rental charge: </label> |
254 |
<input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% itemtype.rentalcharge %]" /> |
255 |
</li> |
256 |
<li> |
257 |
<label for="checkinmsg">Checkin message: </label> |
258 |
<textarea id="checkinmsg" name="checkinmsg" cols="55" rows="5">[% itemtype.checkinmsg %]</textarea> |
259 |
</li> |
260 |
<li> |
261 |
<label for="checkinmsgtype">Checkin message type: </label> |
262 |
<select type="text" id="checkinmsgtype" name="checkinmsgtype"> |
263 |
[% IF itemtype.checkinmsgtype == 'message' %] |
264 |
<option value="message" selected="selected">Message</option> |
265 |
[% ELSE %] |
266 |
<option value="message">Message</option> |
267 |
[% END %] |
268 |
[% IF itemtype.checkinmsgtype == 'alert' %] |
269 |
<option value="alert" selected="selected">Alert</option> |
270 |
[% ELSE %] |
271 |
<option value="alert">Alert</option> |
272 |
[% END %] |
273 |
</select> |
274 |
</li> |
275 |
<li> |
276 |
<label for="sip_media_type">SIP media type: </label> |
277 |
<select id="sip_media_type" name="sip_media_type"> |
278 |
<option value=""></option> |
279 |
[% FOREACH a IN AuthorisedValues.Get('SIP_MEDIA_TYPE', itemtype.sip_media_type ) %] |
280 |
[% IF a.selected %] |
281 |
<option value="[% a.authorised_value %]" selected="selected">[% a.lib %]</option> |
282 |
[% ELSE %] |
283 |
<option value="[% a.authorised_value %]">[% a.lib %]</option> |
284 |
[% END %] |
285 |
[% END %] |
286 |
</select> |
287 |
</li> |
288 |
<li> |
289 |
<label for="summary">Summary: </label> |
290 |
<textarea id="summary" name="summary" cols="55" rows="5">[% itemtype.summary %]</textarea> |
291 |
<p>Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </p> |
292 |
<p><b><a href="[856u]">open site</a></b> will show the link just below the title</p> |
293 |
</li> |
294 |
</ol> |
295 |
</fieldset> |
296 |
|
297 |
<fieldset class="action"> |
298 |
<input type="submit" value="Save changes" /> |
299 |
<a href="/cgi-bin/koha/admin/itemtypes.pl" class="cancel">Cancel</a> |
300 |
</fieldset> |
301 |
</form> |
279 |
[% END %] |
302 |
[% END %] |
280 |
<table> |
|
|
281 |
<tr> |
282 |
<th scope="row">Item type</th> |
283 |
<td>[% itemtype %]</td> |
284 |
</tr> |
285 |
|
303 |
|
286 |
<tr><th scope="row">Description</th><td>[% translated_description %]</td></tr> |
304 |
[% IF op == 'delete_confirm' %] |
287 |
<tr><th scope="row">Loan length</th><td>[% loanlength %]</td></tr> |
305 |
<div class="dialog message"> |
288 |
<tr><th scope="row">Rental charge</th><td>[% rentalcharge %]</td></tr></table> |
306 |
<h3>Delete item type '[% itemtype.itemtype %]'?</h3> |
289 |
<form action="[% script_name %]" method="post"> |
307 |
<table> |
290 |
<input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype %]" />[% IF ( total ) %] |
308 |
<tr> |
291 |
</form> |
309 |
<th scope="row">Item type</th> |
292 |
|
310 |
<td>[% itemtype.itemtype %]</td> |
293 |
<form action="[% script_name %]" method="post"><input type="submit" class="approve" value="OK" /></form> |
311 |
</tr> |
294 |
[% ELSE %] |
312 |
<tr><th scope="row">Description</th><td>[% itemtype.translated_description %]</td></tr> |
295 |
<input type="submit" class="approve" value="Delete this Item Type" /></form> <form action="[% script_name %]" method="post"><input type="submit" class="deny" value="Do Not Delete" /></form> |
313 |
[% UNLESS Koha.Preference('noItemTypeImages') %] |
296 |
[% END %] |
314 |
<tr> |
297 |
</div> |
315 |
<th scope="row">Image</th> |
298 |
|
316 |
<td> |
|
|
317 |
[% IF itemtype.image_location %]<img src="[% itemtype.image_location %]" alt="" />[% END %] |
318 |
</td> |
319 |
</tr> |
320 |
[% END %] |
321 |
<tr><th scope="row">Rental charge</th><td>[% itemtype.rentalcharge | $Price %]</td></tr> |
322 |
</table> |
323 |
<form action="/cgi-bin/koha/admin/itemtypes.pl" method="post"> |
324 |
<input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype.itemtype %]" /> |
325 |
<input type="submit" class="approve" value="Delete this Item Type" /> |
326 |
</form> |
327 |
<form action="/cgi-bin/koha/admin/itemtypes.pl" method="post"><input type="submit" class="deny" value="Do Not Delete" /></form> |
328 |
</div> |
299 |
[% END %] |
329 |
[% END %] |
300 |
|
330 |
|
301 |
[% IF ( else ) %] |
331 |
[% IF op == 'list' %] |
302 |
<h2>Item types administration</h2> |
332 |
<h2>Item types administration</h2> |
303 |
[% IF ( loop ) %] |
333 |
[% IF itemtypes %] |
304 |
<table id="table_item_type"> |
334 |
<table id="table_item_type"> |
305 |
<thead> |
335 |
<thead> |
306 |
[% UNLESS ( noItemTypeImages ) %]<th>Image</th>[% END %] |
336 |
[% UNLESS Koha.Preference('noItemTypeImages') %]<th>Image</th>[% END %] |
307 |
<th>Code</th> |
337 |
<th>Code</th> |
308 |
<th>Description</th> |
338 |
<th>Description</th> |
309 |
<th>Search category</th> |
339 |
<th>Search category</th> |
310 |
<th>Not for loan</th> |
340 |
<th>Not for loan</th> |
311 |
<th>Hide in OPAC</th> |
341 |
<th>Hide in OPAC</th> |
312 |
<th>Charge</th> |
342 |
<th>Charge</th> |
313 |
<th>Checkin message</th> |
343 |
<th>Checkin message</th> |
314 |
<th>Actions</th> |
344 |
<th>Actions</th> |
315 |
</thead> |
345 |
</thead> |
316 |
[% FOREACH loo IN loop %] |
346 |
[% FOREACH itemtype IN itemtypes %] |
317 |
<tr> |
347 |
<tr> |
318 |
[% UNLESS ( noItemTypeImages ) %] <td>[% IF ( loo.imageurl ) %]<img src="[% loo.imageurl %]" alt="" />[% ELSE %] [% END %]</td>[% END %] |
348 |
[% UNLESS Koha.Preference('noItemTypeImages') %] <td>[% IF itemtype.image_location %]<img src="[% itemtype.image_location %]" alt="" />[% ELSE %] [% END %]</td>[% END %] |
319 |
<td> |
349 |
<td> |
320 |
<a href="[% loo.script_name %]?op=add_form&itemtype=[% loo.itemtype |html %]"> |
350 |
<a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=[% itemtype.itemtype |html %]"> |
321 |
[% loo.itemtype %] |
351 |
[% itemtype.itemtype %] |
322 |
</a> |
352 |
</a> |
323 |
</td> |
353 |
</td> |
324 |
<td> |
354 |
<td> |
325 |
[% IF loo.translated_descriptions.size %] |
355 |
[% IF itemtype.translated_descriptions.size %] |
326 |
[% loo.description %] (default)<br/> |
356 |
[% itemtype.description %] (default)<br/> |
327 |
[% FOR description IN loo.translated_descriptions %] |
357 |
[% FOR description IN itemtype.translated_descriptions %] |
328 |
[% IF description.translation == loo.translated_description %] |
358 |
[% IF description.translation == itemtype.translated_description %] |
329 |
<b>[% description.translation %]</b> |
359 |
<b>[% description.translation %]</b> |
|
|
360 |
[% ELSE %] |
361 |
[% description.translation %] ([% description.lang %]) |
362 |
[% END %] |
363 |
<br/> |
364 |
[% END %] |
330 |
[% ELSE %] |
365 |
[% ELSE %] |
331 |
[% description.translation %] ([% description.lang %]) |
366 |
[% itemtype.description %] |
332 |
[% END %] |
367 |
[% END %] |
333 |
<br/> |
368 |
</td> |
|
|
369 |
<td>[% itemtype.searchcategory %]</td> |
370 |
<td>[% IF ( itemtype.notforloan ) %]Yes[% ELSE %] [% END %]</td> |
371 |
<td>[% IF ( itemtype.hideinopac ) %]Yes[% ELSE %] [% END %]</td> |
372 |
<td> |
373 |
[% UNLESS ( itemtype.notforloan ) %] |
374 |
[% itemtype.rentalcharge | $Price %] |
334 |
[% END %] |
375 |
[% END %] |
335 |
[% ELSE %] |
376 |
</td> |
336 |
[% loo.description %] |
377 |
<td>[% itemtype.checkinmsg | html_line_break %]</td> |
337 |
[% END %] |
378 |
<td> |
338 |
</td> |
379 |
<a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=[% itemtype.itemtype |html %]">Edit</a> |
339 |
<td>[% loo.searchcategory %]</td> |
380 |
<a href="/cgi-bin/koha/admin/itemtypes.pl?op=delete_confirm&itemtype=[% itemtype.itemtype |html %]">Delete</a> |
340 |
<td>[% IF ( loo.notforloan ) %]Yes[% ELSE %] [% END %]</td> |
381 |
</td> |
341 |
<td>[% IF ( loo.hideinopac ) %]Yes[% ELSE %] [% END %]</td> |
382 |
</tr> |
342 |
<td> |
383 |
[% END %] |
343 |
[% UNLESS ( loo.notforloan ) %] |
384 |
</table> |
344 |
[% loo.rentalcharge %] |
385 |
[% ELSE %] |
|
|
386 |
<div class="dialog message">There are no itemtypes defined</div> |
345 |
[% END %] |
387 |
[% END %] |
346 |
</td> |
|
|
347 |
<td>[% loo.checkinmsg | html_line_break %]</td> |
348 |
<td> |
349 |
<a href="[% loo.script_name %]?op=add_form&itemtype=[% loo.itemtype |html %]">Edit</a> |
350 |
<a href="[% loo.script_name %]?op=delete_confirm&itemtype=[% loo.itemtype |html %]">Delete</a> |
351 |
</td> |
352 |
</tr> |
353 |
[% END %] |
354 |
</table>[% ELSE %] |
355 |
<div class="dialog message">There are no itemtypes defined</div> |
356 |
[% END %] |
357 |
|
358 |
<div class="pages">[% pagination_bar %]</div> |
359 |
|
360 |
[% END %] |
388 |
[% END %] |
361 |
|
389 |
|
362 |
|
|
|
363 |
|
364 |
</div> |
390 |
</div> |
365 |
</div> |
391 |
</div> |
366 |
<div class="yui-b"> |
392 |
<div class="yui-b"> |
367 |
- |
|
|