|
Lines 3-22
Link Here
|
| 3 |
[% SET footerjs = 1 %] |
3 |
[% SET footerjs = 1 %] |
| 4 |
[% INCLUDE 'doc-head-open.inc' %] |
4 |
[% INCLUDE 'doc-head-open.inc' %] |
| 5 |
<title> |
5 |
<title> |
| 6 |
[% IF op == 'add_form' %] |
6 |
[% IF op == 'add_form' %] |
| 7 |
[% IF ( action_modify ) %]Modify authorized value › [% END %] |
7 |
[% IF ( action_modify ) %]Modify authorized value › [% END %] |
| 8 |
[% IF ( action_add_value ) %]New authorized value › [% END %] |
8 |
[% IF ( action_add_value ) %]New authorized value › [% END %] |
| 9 |
[% IF ( action_add_category ) %]New category › [% END %] |
9 |
[% IF ( action_add_category ) %]New category › [% END %] |
| 10 |
[% END %] |
10 |
[% END %] |
| 11 |
|
11 |
Authorized values › Administration › Koha |
| 12 |
Authorized values › Administration › Koha |
|
|
| 13 |
</title> |
12 |
</title> |
| 14 |
[% INCLUDE 'doc-head-close.inc' %] |
13 |
[% INCLUDE 'doc-head-close.inc' %] |
| 15 |
|
14 |
|
| 16 |
<style> |
15 |
<style> |
| 17 |
fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; } |
16 |
fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; } |
| 18 |
fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-active {background-color : #F4F8F9; } |
17 |
fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-active {background-color : #F4F8F9; } |
| 19 |
fieldset.rows .ui-tabs-panel { margin-right : 10px; margin-left : 10px;margin-bottom:10px;} |
18 |
fieldset.rows .ui-tabs-panel { margin-right : 10px; margin-left : 10px;margin-bottom:10px;} |
| 20 |
fieldset.rows .ui-tabs-nav { margin-left : 10px; } |
19 |
fieldset.rows .ui-tabs-nav { margin-left : 10px; } |
| 21 |
#lib, #lib_opac { width: 75% } |
20 |
#lib, #lib_opac { width: 75% } |
| 22 |
</style> |
21 |
</style> |
|
Lines 86-344
Authorized values › Administration › Koha
Link Here
|
| 86 |
<div class="col-sm-10 col-sm-push-2"> |
85 |
<div class="col-sm-10 col-sm-push-2"> |
| 87 |
<main> |
86 |
<main> |
| 88 |
|
87 |
|
| 89 |
[% IF op == 'add_form' %] |
88 |
[% IF op == 'add_form' %] |
| 90 |
<h1> |
89 |
<h1> |
| 91 |
[% IF ( action_modify ) %]Modify authorized value[% END %] |
90 |
[% IF ( action_modify ) %]Modify authorized value[% END %] |
| 92 |
[% IF ( action_add_value ) %]New authorized value[% END %] |
91 |
[% IF ( action_add_value ) %]New authorized value[% END %] |
| 93 |
[% IF ( action_add_category ) %]New category[% END %] |
92 |
[% IF ( action_add_category ) %]New category[% END %] |
| 94 |
</h1> |
93 |
</h1> |
| 95 |
|
94 |
|
| 96 |
[% IF ( action_modify ) %]<div class="note"><i class="fa fa-exclamation"></i> <strong>NOTE:</strong> If you change an authorized value code, existing records using it won't be updated. Changes to value descriptions will show immediately.</div>[% END %] |
95 |
[% IF ( action_modify ) %] |
|
|
96 |
<div class="note"> |
| 97 |
<i class="fa fa-exclamation"></i> <strong>NOTE:</strong> If you change an authorized value code, existing records using it won't be updated. Changes to value descriptions will show immediately. |
| 98 |
</div> |
| 99 |
[% END %] |
| 97 |
|
100 |
|
| 98 |
<form action="/cgi-bin/koha/admin/authorised_values.pl" name="Aform" method="post" class="validated"> |
101 |
<form action="/cgi-bin/koha/admin/authorised_values.pl" name="Aform" method="post" class="validated"> |
| 99 |
<fieldset class="rows"><ol> |
102 |
<fieldset class="rows"> |
| 100 |
[% IF action_add_category %] |
103 |
[% IF action_add_category %] |
| 101 |
<li> |
104 |
<ol> |
| 102 |
<label for="category" class="required">Category: </label> |
105 |
<li> |
| 103 |
<input type="text" name="category" id="category" size="32" maxlength="32" class="focus required" /> |
106 |
<label for="category" class="required">Category: </label> |
| 104 |
<span class="required">Required</span> |
107 |
<input type="text" name="category" id="category" size="32" maxlength="32" class="focus required" /> |
| 105 |
<input type="hidden" name="op" value="add_category" /> |
108 |
<span class="required">Required</span> |
| 106 |
</li> |
109 |
<input type="hidden" name="op" value="add_category" /> |
| 107 |
[% ELSE %] |
110 |
</li> |
| 108 |
<li> |
111 |
</ol> |
| 109 |
<span class="label">Category</span> |
112 |
[% ELSE %] |
| 110 |
<input type="hidden" name="op" value="add" /> |
113 |
<ol> |
| 111 |
<input type="hidden" name="category" value="[% category_name | html %]" /> [% category_name | html %] |
114 |
<li> |
| 112 |
</li> |
115 |
<span class="label">Category</span> |
| 113 |
<li> |
116 |
<input type="hidden" name="op" value="add" /> |
| 114 |
<label for="authorised_value">Authorized value: </label> |
117 |
<input type="hidden" name="category" value="[% category_name | html %]" /> [% category_name | html %] |
| 115 |
[% IF ( action_modify ) %]<input type="hidden" id="id" name="id" value="[% id | html %]" />[% END %] |
118 |
</li> |
| 116 |
<input type="text" id="authorised_value" name="authorised_value" value="[% authorised_value | html %]" maxlength="80" class="focus" /> |
119 |
<li> |
| 117 |
</li> |
120 |
<label for="authorised_value">Authorized value: </label> |
| 118 |
<li> |
121 |
[% IF ( action_modify ) %] |
| 119 |
<label for="lib">Description: </label> |
122 |
<input type="hidden" id="id" name="id" value="[% id | html %]" /> |
| 120 |
<input type="text" name="lib" id="lib" value="[% lib | html %]" maxlength="200" /> |
123 |
[% END %] |
| 121 |
</li> |
124 |
<input type="text" id="authorised_value" name="authorised_value" value="[% authorised_value | html %]" maxlength="80" class="focus" /> |
| 122 |
<li> |
125 |
</li> |
| 123 |
<label for="lib_opac">Description (OPAC): </label> |
126 |
<li> |
| 124 |
<input type="text" name="lib_opac" id="lib_opac" value="[% lib_opac | html %]" maxlength="200" /> |
127 |
<label for="lib">Description: </label> |
| 125 |
</li> |
128 |
<input type="text" name="lib" id="lib" value="[% lib | html %]" maxlength="200" /> |
| 126 |
<li><label for="branches">Library limitations: </label> |
129 |
</li> |
| 127 |
<select id="branches" name="branches" multiple size="10"> |
130 |
<li> |
| 128 |
<option value="">All libraries</option> |
131 |
<label for="lib_opac">Description (OPAC): </label> |
| 129 |
[% FOREACH branch IN branches_loop %] |
132 |
<input type="text" name="lib_opac" id="lib_opac" value="[% lib_opac | html %]" maxlength="200" /> |
| 130 |
[% IF ( branch.selected ) %] |
133 |
</li> |
| 131 |
<option selected="selected" value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option> |
134 |
<li><label for="branches">Library limitations: </label> |
| 132 |
[% ELSE %] |
135 |
<select id="branches" name="branches" multiple size="10"> |
| 133 |
<option value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option> |
136 |
<option value="">All libraries</option> |
| 134 |
[% END %] |
137 |
[% FOREACH branch IN branches_loop %] |
|
|
138 |
[% IF ( branch.selected ) %] |
| 139 |
<option selected="selected" value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option> |
| 140 |
[% ELSE %] |
| 141 |
<option value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option> |
| 142 |
[% END %] |
| 143 |
[% END %] |
| 144 |
</select> |
| 145 |
<div class="hint">Select 'All libraries' if this authorized value must be displayed all the time. Otherwise select libraries you want to associate with this value.</div> |
| 146 |
</li> |
| 147 |
|
| 148 |
</ol> |
| 149 |
|
| 150 |
<div id="icons" class="toptabs" style="clear:both"> |
| 151 |
<h5 style="margin-left:10px;">Choose an icon:</h5> |
| 152 |
<ul> |
| 153 |
<li><a href="#none">None</a></li> |
| 154 |
[% FOREACH imageset IN imagesets %] |
| 155 |
[% IF ( imageset.imagesetactive ) %]<li class="ui-tabs-active">[% ELSE %]<li>[% END %]<a href="#[% imageset.imagesetname | uri %]">[% imageset.imagesetname | html %]</a></li> |
| 156 |
[% END %] |
| 157 |
</ul> |
| 158 |
<div id="none"> |
| 159 |
<ul> |
| 160 |
<li> |
| 161 |
<label for="noimage">No image: </label><input type="radio" name="imageurl" id="noimage" value="removeImage" /> |
| 162 |
</li> |
| 163 |
</ul> |
| 164 |
<br class="clear" /> |
| 165 |
</div> |
| 166 |
|
| 167 |
[% FOREACH imageset IN imagesets %] |
| 168 |
<div id="[% imageset.imagesetname | html %]"> |
| 169 |
<ul> |
| 170 |
[% FOREACH image IN imageset.images %] |
| 171 |
<li style="float: none; display: inline-block; clear : none; width: auto;"> |
| 172 |
<label> |
| 173 |
[% IF ( image.StaffImageUrl ) %] |
| 174 |
<img src="[% image.StaffImageUrl | html %]" alt="[% image.StaffImageUrl | html %]" title="[% image.StaffImageUrl | html %]" /> |
| 175 |
[% ELSE %] |
| 176 |
[% END %] |
| 177 |
[% IF ( image.checked ) %] |
| 178 |
<input type="radio" name="imageurl" value="[% image.KohaImage | html %]" checked="checked" /> |
| 179 |
[% ELSE %] |
| 180 |
[% IF ( image.KohaImage ) %] |
| 181 |
<!-- to delete the radio button if there is no image after --> |
| 182 |
<input type="radio" name="imageurl" value="[% image.KohaImage | html %]" /> |
| 183 |
[% END %] |
| 184 |
[% END %] |
| 185 |
</label> |
| 186 |
</li> |
| 187 |
[% END %] |
| 188 |
</ul> |
| 189 |
<br class="clear" /> |
| 190 |
</div> |
| 191 |
[% END %] |
| 192 |
</div> |
| 193 |
[% END %] |
| 194 |
</fieldset> |
| 195 |
<fieldset class="action"> |
| 196 |
<input type="hidden" name="id" value="[% id | html %]" /> |
| 197 |
<input type="submit" value="Save" /> |
| 198 |
<a class="cancel" href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=[% category_name | url %]">Cancel</a> |
| 199 |
</fieldset> |
| 200 |
</form> |
| 135 |
[% END %] |
201 |
[% END %] |
| 136 |
</select> |
|
|
| 137 |
<div class="hint">Select 'All libraries' if this authorized value must be displayed all the time. Otherwise select libraries you want to associate with this value.</div> |
| 138 |
</li> |
| 139 |
|
| 140 |
</ol> |
| 141 |
<div id="icons" class="toptabs" style="clear:both"> |
| 142 |
<h5 style="margin-left:10px;">Choose an icon:</h5> |
| 143 |
<ul> |
| 144 |
<li><a href="#none">None</a></li> |
| 145 |
[% FOREACH imageset IN imagesets %] |
| 146 |
[% IF ( imageset.imagesetactive ) %]<li class="ui-tabs-active">[% ELSE %]<li>[% END %]<a href="#[% imageset.imagesetname | uri %]">[% imageset.imagesetname | html %]</a></li> |
| 147 |
[% END %] |
| 148 |
</ul> |
| 149 |
<div id="none"><ul> |
| 150 |
<li><label for="noimage">No image: </label><input type="radio" name="imageurl" id="noimage" value="removeImage" /></li> |
| 151 |
</ul> |
| 152 |
<br class="clear" /></div> |
| 153 |
[% FOREACH imageset IN imagesets %] |
| 154 |
<div id="[% imageset.imagesetname | html %]"><ul> |
| 155 |
[% FOREACH image IN imageset.images %] |
| 156 |
<li style="float: none; display: inline-block; clear : none; width: auto;"> |
| 157 |
<label> [% IF ( image.StaffImageUrl ) %] |
| 158 |
<img src="[% image.StaffImageUrl | html %]" alt="[% image.StaffImageUrl | html %]" title="[% image.StaffImageUrl | html %]" /> |
| 159 |
[% ELSE %] |
| 160 |
[% END %] |
| 161 |
[% IF ( image.checked ) %] |
| 162 |
<input type="radio" name="imageurl" value="[% image.KohaImage | html %]" checked="checked" /> |
| 163 |
[% ELSE %] |
| 164 |
[% IF ( image.KohaImage ) %] <!-- to delete the radio button if there is no image after --> |
| 165 |
<input type="radio" name="imageurl" value="[% image.KohaImage | html %]" /> |
| 166 |
[% END %] |
| 167 |
[% END %] |
| 168 |
</label> |
| 169 |
</li> |
| 170 |
[% END %]</ul> |
| 171 |
<br class="clear" /> |
| 172 |
</div> |
| 173 |
[% END %] |
| 174 |
</div> |
| 175 |
[% END %] |
| 176 |
</fieldset> |
| 177 |
<fieldset class="action"> <input type="hidden" name="id" value="[% id | html %]" /> |
| 178 |
<input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=[% category_name | url %]">Cancel</a></fieldset> |
| 179 |
</form> |
| 180 |
[% END %] |
| 181 |
|
202 |
|
| 182 |
[% IF op == 'list' %] |
203 |
[% IF op == 'list' %] |
| 183 |
|
204 |
<div id="toolbar" class="btn-toolbar"> |
| 184 |
<div id="toolbar" class="btn-toolbar"> |
205 |
<a id="addcat" class="btn btn-default" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form"><i class="fa fa-plus"> </i> New category</a> |
| 185 |
<a id="addcat" class="btn btn-default" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form"><i class="fa fa-plus"> </i> New category</a> |
206 |
[% IF ( searchfield ) %] |
| 186 |
[% IF ( searchfield ) %] |
207 |
<a id="addauth" class="btn btn-default" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form&category=[% category.category_name | url %]"><i class="fa fa-plus"> </i> New authorized value for [% category.category_name | html %]</a> |
| 187 |
<a id="addauth" class="btn btn-default" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form&category=[% category.category_name | url %]"><i class="fa fa-plus"> </i> New authorized value for [% category.category_name | html %]</a> |
208 |
[% END %] |
| 188 |
[% END %] |
209 |
</div> |
| 189 |
</div> |
210 |
|
| 190 |
|
211 |
[% IF ( searchfield ) %] |
| 191 |
[% IF ( searchfield ) %] |
212 |
<h1>Authorized values for category [% category.category_name | html %]</h1> |
| 192 |
<h1>Authorized values for category [% category.category_name | html %]</h1> |
213 |
[% PROCESS category_descriptions code_category = category.category_name %] |
| 193 |
[% PROCESS category_descriptions code_category = category.category_name %] |
|
|
| 194 |
[% ELSE %] |
| 195 |
<h1>Authorized values</h1> |
| 196 |
[% END %] |
| 197 |
|
| 198 |
[% IF ( searchfield ) %] |
| 199 |
<div class="note"> |
| 200 |
<i class="fa fa-exclamation"></i> <strong>NOTE:</strong> If you change an authorized value code, existing records using it won't be updated. Changes to value descriptions will show immediately. |
| 201 |
</div> |
| 202 |
[% END %] |
| 203 |
|
| 204 |
[% FOR m IN messages %] |
| 205 |
<div class="dialog [% m.type | html %]"> |
| 206 |
[% SWITCH m.code %] |
| 207 |
[% CASE 'error_on_update' %] |
| 208 |
An error occurred when updating this authorized value. Perhaps the value already exists. |
| 209 |
[% CASE 'error_on_insert' %] |
| 210 |
An error occurred when inserting this authorized value. Perhaps the value or the category already exists. |
| 211 |
[% CASE 'error_on_insert_cat' %] |
| 212 |
An error occurred when inserting this authorized value category. Perhaps the category name already exists. |
| 213 |
[% CASE 'error_on_delete' %] |
| 214 |
An error occurred when deleting this authorized value. Check the logs. |
| 215 |
[% CASE 'error_on_delete_category' %] |
| 216 |
An error occurred when deleting this authorized value category. Check the logs. |
| 217 |
[% CASE 'success_on_update' %] |
| 218 |
Authorized value updated successfully. |
| 219 |
[% CASE 'success_on_insert' %] |
| 220 |
Authorized value added successfully. |
| 221 |
[% CASE 'success_on_insert_cat' %] |
| 222 |
Authorized value category added successfully. |
| 223 |
[% CASE 'success_on_delete' %] |
| 224 |
Authorized value deleted successfully. |
| 225 |
[% CASE 'success_on_delete_category' %] |
| 226 |
Authorized value category deleted successfully. |
| 227 |
[% CASE 'cat_already_exists' %] |
| 228 |
This authorized value category already exists. |
| 229 |
[% CASE 'invalid_category_name' %] |
| 230 |
The authorized value category 'branches', 'itemtypes' and 'cn_source' are used internally by Koha and are not valid. |
| 231 |
[% CASE %] |
| 232 |
[% m.code | html %] |
| 233 |
[% END %] |
| 234 |
</div> |
| 235 |
[% END %] |
| 236 |
|
| 237 |
[% IF ( searchfield ) %] |
| 238 |
|
| 239 |
<form action="/cgi-bin/koha/admin/authorised_values.pl" method="get" id="category"> |
| 240 |
<p> |
| 241 |
<label for="category_search">Show category: </label> |
| 242 |
<select name="searchfield" id="category_search"> |
| 243 |
[% FOR c IN categories %] |
| 244 |
[% IF c == searchfield %] |
| 245 |
<option value="[% c | html %]" selected="selected">[% c | html %]</option> |
| 246 |
[% ELSE %] |
214 |
[% ELSE %] |
| 247 |
<option value="[% c | html %]">[% c | html %]</option> |
215 |
<h1>Authorized values</h1> |
| 248 |
[% END %] |
216 |
[% END %] |
| 249 |
[% END %] |
217 |
|
| 250 |
</select> |
218 |
[% IF ( searchfield ) %] |
| 251 |
</p> |
219 |
<div class="note"> |
| 252 |
</form> |
220 |
<i class="fa fa-exclamation"></i> <strong>NOTE:</strong> If you change an authorized value code, existing records using it won't be updated. Changes to value descriptions will show immediately. |
| 253 |
|
221 |
</div> |
| 254 |
[% IF loop %] |
|
|
| 255 |
|
| 256 |
<table id="categoriest" class="authorized_values_table"> |
| 257 |
<thead><tr> |
| 258 |
<th>Authorized value</th> |
| 259 |
<th>Description</th> |
| 260 |
<th>Description (OPAC)</th> |
| 261 |
<th>Icon</th> |
| 262 |
<th>Library limitations</th> |
| 263 |
<th class="noExport NoSort">Actions</th> |
| 264 |
</tr> |
| 265 |
</thead><tbody> |
| 266 |
[% FOREACH loo IN loop %] |
| 267 |
<tr> |
| 268 |
<td>[% loo.authorised_value | html %]</td> |
| 269 |
<td>[% loo.lib | html %]</td> |
| 270 |
<td>[% loo.lib_opac | html %]</td> |
| 271 |
<td>[% IF ( loo.imageurl ) %]<img src="[% loo.imageurl | url %]" alt=""/>[% ELSE %] [% END %]</td> |
| 272 |
<td> |
| 273 |
[% IF loo.branches.size > 0 %] |
| 274 |
[% branches_str = "" %] |
| 275 |
[% FOREACH branch IN loo.branches %] |
| 276 |
[%- IF loop.first -%] |
| 277 |
[% branches_str = branch.branchname _ " (" _ branch.branchcode _ ")" %] |
| 278 |
[% ELSE %] |
| 279 |
[% branches_str = branches_str _ "\n" _ branch.branchname _ " (" _ branch.branchcode _ ")" %] |
| 280 |
[% END %] |
| 281 |
[% END %] |
| 282 |
<span class="library_limitation" title="[% branches_str | html %]"> |
| 283 |
[% IF loo.branches.size > 1 %] |
| 284 |
[% loo.branches.size | html %] library limitations |
| 285 |
[% ELSE %] |
| 286 |
[% loo.branches.size | html %] library limitation |
| 287 |
[% END %] |
222 |
[% END %] |
| 288 |
[% ELSE %] |
|
|
| 289 |
No limitation |
| 290 |
[% END %] |
| 291 |
</td> |
| 292 |
<td class="actions"><a href="/cgi-bin/koha/admin/authorised_values.pl?op=add_form&id=[% loo.id | uri %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a> |
| 293 |
<a class="delete btn btn-default btn-xs" href="/cgi-bin/koha/admin/authorised_values.pl?op=delete&searchfield=[% searchfield | uri %]&id=[% loo.id | uri %]"><i class="fa fa-trash"></i> Delete</a></td> |
| 294 |
</tr> |
| 295 |
[% END # /FOREACH loop %] |
| 296 |
</tbody></table> |
| 297 |
[% ELSE %] |
| 298 |
<div class="dialog message"> |
| 299 |
<p>There are no authorized values defined for [% category.category_name | html %]</p> |
| 300 |
<form action="/cgi-bin/koha/admin/authorised_values.pl" method="get"> |
| 301 |
<input type="hidden" name="op" value="add_form" /> |
| 302 |
<input type="hidden" name="category" value="[% category.category_name | html %]" /> |
| 303 |
<button type="submit"><i class="fa fa-plus"></i> Add a new authorized value</button> |
| 304 |
</form> |
| 305 |
[% UNLESS category.is_system %] |
| 306 |
<form id="delete_category" action="/cgi-bin/koha/admin/authorised_values.pl" method="post"> |
| 307 |
<input type="hidden" name="op" value="delete_category" /> |
| 308 |
<input type="hidden" name="category_name" value="[% category.category_name | html %]" /> |
| 309 |
<button type="submit"><i class="fa fa-plus"></i> Delete category '[% category.category_name | html %]' </button> |
| 310 |
</form> |
| 311 |
[% END %] |
| 312 |
</div> |
| 313 |
[% END %] |
| 314 |
|
223 |
|
| 315 |
[% ELSE # category was selected %] |
224 |
[% FOR m IN messages %] |
| 316 |
|
225 |
<div class="dialog [% m.type | html %]"> |
| 317 |
<table id="categoriest" class="authorized_values_table"> |
226 |
[% SWITCH m.code %] |
| 318 |
<thead> |
227 |
[% CASE 'error_on_update' %] |
| 319 |
<tr> |
228 |
An error occurred when updating this authorized value. Perhaps the value already exists. |
| 320 |
<th>Category</th> |
229 |
[% CASE 'error_on_insert' %] |
| 321 |
<th>Description</th> |
230 |
An error occurred when inserting this authorized value. Perhaps the value or the category already exists. |
| 322 |
<th class="noExport"> </th> |
231 |
[% CASE 'error_on_insert_cat' %] |
| 323 |
</tr> |
232 |
An error occurred when inserting this authorized value category. Perhaps the category name already exists. |
| 324 |
</thead> |
233 |
[% CASE 'error_on_delete' %] |
| 325 |
<tbody> |
234 |
An error occurred when deleting this authorized value. Check the logs. |
| 326 |
[% FOR c IN categories %] |
235 |
[% CASE 'error_on_delete_category' %] |
| 327 |
<tr> |
236 |
An error occurred when deleting this authorized value category. Check the logs. |
| 328 |
<td><a href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=[% c | uri %]">[% c | html %]</a></td> |
237 |
[% CASE 'success_on_update' %] |
| 329 |
<td> |
238 |
Authorized value updated successfully. |
| 330 |
[% PROCESS category_descriptions code_category = c %] |
239 |
[% CASE 'success_on_insert' %] |
| 331 |
</td> |
240 |
Authorized value added successfully. |
| 332 |
<td> |
241 |
[% CASE 'success_on_insert_cat' %] |
| 333 |
<a id="addauth" class="btn btn-default btn-xs" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form&category=[% c | uri %]"><i class="fa fa-plus"> </i> Add</a> |
242 |
Authorized value category added successfully. |
| 334 |
</td> |
243 |
[% CASE 'success_on_delete' %] |
| 335 |
</tr> |
244 |
Authorized value deleted successfully. |
| 336 |
[% END %] |
245 |
[% CASE 'success_on_delete_category' %] |
| 337 |
</tbody> |
246 |
Authorized value category deleted successfully. |
| 338 |
</table> |
247 |
[% CASE 'cat_already_exists' %] |
| 339 |
[% END # /IF ( searchfield )%] |
248 |
This authorized value category already exists. |
|
|
249 |
[% CASE 'invalid_category_name' %] |
| 250 |
The authorized value category 'branches', 'itemtypes' and 'cn_source' are used internally by Koha and are not valid. |
| 251 |
[% CASE %] |
| 252 |
[% m.code | html %] |
| 253 |
[% END %] |
| 254 |
</div> |
| 255 |
[% END %] |
| 340 |
|
256 |
|
| 341 |
[% END # /IF op == 'list' %] |
257 |
[% IF ( searchfield ) %] |
|
|
258 |
|
| 259 |
<form action="/cgi-bin/koha/admin/authorised_values.pl" method="get" id="category"> |
| 260 |
<p> |
| 261 |
<label for="category_search">Show category: </label> |
| 262 |
<select name="searchfield" id="category_search"> |
| 263 |
[% FOR c IN categories %] |
| 264 |
[% IF c == searchfield %] |
| 265 |
<option value="[% c | html %]" selected="selected">[% c | html %]</option> |
| 266 |
[% ELSE %] |
| 267 |
<option value="[% c | html %]">[% c | html %]</option> |
| 268 |
[% END %] |
| 269 |
[% END %] |
| 270 |
</select> |
| 271 |
</p> |
| 272 |
</form> |
| 273 |
|
| 274 |
[% IF loop %] |
| 275 |
<table id="categoriest" class="authorized_values_table"> |
| 276 |
<thead> |
| 277 |
<tr> |
| 278 |
<th>Authorized value</th> |
| 279 |
<th>Description</th> |
| 280 |
<th>Description (OPAC)</th> |
| 281 |
<th>Icon</th> |
| 282 |
<th>Library limitations</th> |
| 283 |
<th class="noExport NoSort">Actions</th> |
| 284 |
</tr> |
| 285 |
</thead> |
| 286 |
<tbody> |
| 287 |
[% FOREACH loo IN loop %] |
| 288 |
<tr> |
| 289 |
<td>[% loo.authorised_value | html %]</td> |
| 290 |
<td>[% loo.lib | html %]</td> |
| 291 |
<td>[% loo.lib_opac | html %]</td> |
| 292 |
<td> |
| 293 |
[% IF ( loo.imageurl ) %]<img src="[% loo.imageurl | url %]" alt=""/>[% ELSE %] [% END %]</td> |
| 294 |
<td> |
| 295 |
[% IF loo.branches.size > 0 %] |
| 296 |
[% branches_str = "" %] |
| 297 |
[% FOREACH branch IN loo.branches %] |
| 298 |
[%- IF loop.first -%] |
| 299 |
[% branches_str = branch.branchname _ " (" _ branch.branchcode _ ")" %] |
| 300 |
[% ELSE %] |
| 301 |
[% branches_str = branches_str _ "\n" _ branch.branchname _ " (" _ branch.branchcode _ ")" %] |
| 302 |
[% END %] |
| 303 |
[% END %] |
| 304 |
<span class="library_limitation" title="[% branches_str | html %]"> |
| 305 |
[% IF loo.branches.size > 1 %] |
| 306 |
[% loo.branches.size | html %] library limitations |
| 307 |
[% ELSE %] |
| 308 |
[% loo.branches.size | html %] library limitation |
| 309 |
[% END %] |
| 310 |
[% ELSE %] |
| 311 |
No limitation |
| 312 |
[% END %] |
| 313 |
</td> |
| 314 |
<td class="actions"><a href="/cgi-bin/koha/admin/authorised_values.pl?op=add_form&id=[% loo.id | uri %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a> |
| 315 |
<a class="delete btn btn-default btn-xs" href="/cgi-bin/koha/admin/authorised_values.pl?op=delete&searchfield=[% searchfield | uri %]&id=[% loo.id | uri %]"><i class="fa fa-trash"></i> Delete</a></td> |
| 316 |
</tr> |
| 317 |
[% END # /FOREACH loop %] |
| 318 |
</tbody> |
| 319 |
</table> |
| 320 |
[% ELSE %] |
| 321 |
<div class="dialog message"> |
| 322 |
<p>There are no authorized values defined for [% category.category_name | html %]</p> |
| 323 |
<form action="/cgi-bin/koha/admin/authorised_values.pl" method="get"> |
| 324 |
<input type="hidden" name="op" value="add_form" /> |
| 325 |
<input type="hidden" name="category" value="[% category.category_name | html %]" /> |
| 326 |
<button type="submit"><i class="fa fa-plus"></i> Add a new authorized value</button> |
| 327 |
</form> |
| 328 |
[% UNLESS category.is_system %] |
| 329 |
<form id="delete_category" action="/cgi-bin/koha/admin/authorised_values.pl" method="post"> |
| 330 |
<input type="hidden" name="op" value="delete_category" /> |
| 331 |
<input type="hidden" name="category_name" value="[% category.category_name | html %]" /> |
| 332 |
<button type="submit"><i class="fa fa-plus"></i> Delete category '[% category.category_name | html %]' </button> |
| 333 |
</form> |
| 334 |
[% END %] |
| 335 |
</div> |
| 336 |
[% END %] |
| 337 |
|
| 338 |
[% ELSE # category was selected %] |
| 339 |
|
| 340 |
<table id="categoriest" class="authorized_values_table"> |
| 341 |
<thead> |
| 342 |
<tr> |
| 343 |
<th>Category</th> |
| 344 |
<th>Description</th> |
| 345 |
<th class="noExport"> </th> |
| 346 |
</tr> |
| 347 |
</thead> |
| 348 |
<tbody> |
| 349 |
[% FOR c IN categories %] |
| 350 |
<tr> |
| 351 |
<td><a href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=[% c | uri %]">[% c | html %]</a></td> |
| 352 |
<td> |
| 353 |
[% PROCESS category_descriptions code_category = c %] |
| 354 |
</td> |
| 355 |
<td> |
| 356 |
<a id="addauth" class="btn btn-default btn-xs" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form&category=[% c | uri %]"><i class="fa fa-plus"> </i> Add</a> |
| 357 |
</td> |
| 358 |
</tr> |
| 359 |
[% END %] |
| 360 |
</tbody> |
| 361 |
</table> |
| 362 |
|
| 363 |
[% END # /IF ( searchfield )%] |
| 364 |
|
| 365 |
[% END # /IF op == 'list' %] |
| 342 |
|
366 |
|
| 343 |
</main> |
367 |
</main> |
| 344 |
</div> <!-- /.col-sm-10.col-sm-push-2 --> |
368 |
</div> <!-- /.col-sm-10.col-sm-push-2 --> |
| 345 |
- |
|
|