Lines 1-13
Link Here
|
1 |
[% INCLUDE 'doc-head-open.inc' %] |
1 |
[% INCLUDE 'doc-head-open.inc' %] |
2 |
<title>Koha › Administration › Libraries and groups |
2 |
<title>Koha › Administration › Libraries and groups |
3 |
[% IF ( editcategory ) %] |
3 |
[% IF op == 'editcategory' %] |
4 |
›[% IF ( categorycode ) %]Edit group [% categorycode %][% ELSE %]New group[% END %] |
4 |
›[% IF category.categorycode %]Edit group [% category.categorycode%][% ELSE %]New group[% END %] |
5 |
[% ELSIF ( delete_category ) %] |
5 |
[% ELSIF op == 'delete_confirm_category' %] |
6 |
› Confirm deletion of group [% categorycode %] |
6 |
› Confirm deletion of group [% category.categorycode %] |
7 |
[% ELSIF ( add ) %] |
7 |
[% ELSIF op == 'add_form' %] |
8 |
›[% IF ( heading_branches_add_branch_p ) %]New library[% ELSE %]Modify library [% branchcode %][% END %] |
8 |
›[% IF library %]Modify library[% ELSE %]New library [% library.branchcode %][% END %] |
9 |
[% ELSIF ( delete_confirm ) %] |
9 |
[% ELSIF op == 'delete_confirm' %] |
10 |
› Confirm deletion of library '[% branchcode %]' |
10 |
› Confirm deletion of library '[% library.branchcode %]' |
11 |
[% END %] |
11 |
[% END %] |
12 |
</title> |
12 |
</title> |
13 |
[% INCLUDE 'doc-head-close.inc' %] |
13 |
[% INCLUDE 'doc-head-close.inc' %] |
Lines 25-31
Link Here
|
25 |
"sPaginationType": "four_button" |
25 |
"sPaginationType": "four_button" |
26 |
})); |
26 |
})); |
27 |
|
27 |
|
28 |
[% IF ( heading_branches_add_branch_p ) %] |
28 |
[% UNLESS library %] |
29 |
$("#Aform").on("submit", function( event ) { |
29 |
$("#Aform").on("submit", function( event ) { |
30 |
if ( $("#branchcode").val().match(/\s/) ) { |
30 |
if ( $("#branchcode").val().match(/\s/) ) { |
31 |
event.preventDefault(); |
31 |
event.preventDefault(); |
Lines 62-373
tinyMCE.init({
Link Here
|
62 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> |
62 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> |
63 |
› <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> |
63 |
› <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> |
64 |
› <a href="/cgi-bin/koha/admin/branches.pl">Libraries and groups</a> |
64 |
› <a href="/cgi-bin/koha/admin/branches.pl">Libraries and groups</a> |
65 |
[% IF ( editcategory ) %] |
65 |
[% IF op == 'add_form_category' %] |
66 |
› [% IF ( categorycode ) %]Edit group [% categorycode %][% ELSE %]New group[% END %] |
66 |
› [% IF category.categorycode %]Edit group [% category.categorycode %][% ELSE %]New group[% END %] |
67 |
[% ELSIF ( delete_category ) %] |
67 |
[% ELSIF op == 'delete_confirm_category' %] |
68 |
› Confirm deletion of group [% categorycode %] |
68 |
› Confirm deletion of group [% category.categorycode %] |
69 |
[% ELSIF ( add ) %] |
69 |
[% ELSIF op == 'add_form' %] |
70 |
› [% IF ( heading_branches_add_branch_p ) %]New library[% ELSE %]Modify library [% branchcode %][% END %] |
70 |
› [% IF library %]Modify library[% ELSE %]New library [% library.branchcode %][% END %] |
71 |
[% ELSIF ( delete_confirm ) %] |
71 |
[% ELSIF op == 'delete_confirm' %] |
72 |
› Confirm deletion of library '[% branchcode %]' |
72 |
› Confirm deletion of library '[% library.branchcode %]' |
73 |
[% END %] |
73 |
[% END %] |
74 |
</div> |
74 |
</div> |
75 |
|
75 |
|
76 |
<div id="doc3" class="yui-t2"> |
76 |
<div id="doc3" class="yui-t2"> |
77 |
|
77 |
|
78 |
<div id="bd"> |
78 |
<div id="bd"> |
79 |
<div id="yui-main"> |
79 |
<div id="yui-main"> |
80 |
<div class="yui-b"> |
80 |
<div class="yui-b"> |
81 |
[% IF ( else ) %] |
81 |
|
|
|
82 |
[% FOR m IN messages %] |
83 |
<div class="dialog [% m.type %]"> |
84 |
[% SWITCH m.code %] |
85 |
[% CASE 'error_on_update' %] |
86 |
An error occurred when updating this library. Perhaps it already exists. |
87 |
[% CASE 'error_on_insert' %] |
88 |
An error occurred when adding this library. The branchcode might already exist. |
89 |
[% CASE 'error_on_delete' %] |
90 |
An error occurred when deleting this library. Check the logs. |
91 |
[% CASE 'success_on_update' %] |
92 |
Library updated successfully. |
93 |
[% CASE 'success_on_insert' %] |
94 |
Library added successfully. |
95 |
[% CASE 'success_on_delete' %] |
96 |
Library deleted successfully. |
97 |
[% CASE 'cannot_delete_library' %] |
98 |
This library cannot be deleted. Patrons or items are still using it |
99 |
[% IF m.data.patrons_count and m.data.items_count %] |
100 |
([% m.data.patrons_count %] patrons and [% m.data.items_count %] items). |
101 |
[% ELSIF m.data.patrons_count %] |
102 |
([% m.data.patrons_count %] patrons). |
103 |
[% ELSIF m.data.items_count %] |
104 |
([% m.data.items_count %] items). |
105 |
[% END %] |
106 |
[% CASE 'error_on_update_category' %] |
107 |
An error occurred when updating this library category. Perhaps it already exists. |
108 |
[% CASE 'error_on_insert_category' %] |
109 |
An error occurred when adding this library category. The categorycode might already exist. |
110 |
[% CASE 'error_on_delete_category' %] |
111 |
An error occurred when deleting this library category. Check the logs. |
112 |
[% CASE 'success_on_update_category' %] |
113 |
Library category updated successfully. |
114 |
[% CASE 'success_on_insert_category' %] |
115 |
Library category added successfully. |
116 |
[% CASE 'success_on_delete_category' %] |
117 |
Library category deleted successfully. |
118 |
[% CASE 'cannot_delete_category' %] |
119 |
This library category cannot be deleted. [% m.data.libraries_count %] libraries are still using it. |
120 |
[% CASE %] |
121 |
[% m.code %] |
122 |
[% END %] |
123 |
</div> |
124 |
[% END %] |
125 |
|
126 |
[% IF op == 'list' %] |
82 |
<div id="toolbar" class="btn-toolbar"> |
127 |
<div id="toolbar" class="btn-toolbar"> |
83 |
<a class="btn btn-small" id="newbranch" href="/cgi-bin/koha/admin/branches.pl?op=add"><i class="fa fa-plus"></i> New library</a> |
128 |
<a class="btn btn-small" id="newbranch" href="/cgi-bin/koha/admin/branches.pl?op=add_form"><i class="fa fa-plus"></i> New library</a> |
84 |
<a class="btn btn-small" id="newcategory" href="/cgi-bin/koha/admin/branches.pl?op=editcategory"><i class="fa fa-plus"></i> New group</a> |
129 |
<a class="btn btn-small" id="newcategory" href="/cgi-bin/koha/admin/branches.pl?op=add_form_category"><i class="fa fa-plus"></i> New group</a> |
85 |
</div> |
130 |
</div> |
86 |
[% END %] |
131 |
[% END %] |
87 |
|
132 |
|
88 |
[% IF ( add ) %] |
133 |
[% IF op == 'add_form' %] |
89 |
[% IF ( ERROR1 ) %]<div class="dialog message">Library with that code already exists — Please enter a unique code</div>[% END %] |
134 |
<h3>[% IF library %]Modify library[% ELSE %]New library[% END %]</h3> |
90 |
<h3>[% IF ( heading_branches_add_branch_p ) %]New library[% ELSE %]Modify library[% END %]</h3> |
135 |
<form action="/cgi-bin/koha/admin/branches.pl" id="Aform" name="Aform" class="validated" method="post"> |
91 |
<form action="[% action %]" id="Aform" name="Aform" class="validated" method="post"> |
136 |
<fieldset class="rows"> |
92 |
<fieldset class="rows"> |
137 |
<input type="hidden" name="op" value="add_validate" /> |
93 |
<input type="hidden" name="op" value="add_validate" /> |
138 |
[% IF library %] |
94 |
[% IF ( heading_branches_add_branch_p ) %] |
139 |
<input type="hidden" name="is_a_modif" value="1" /> |
95 |
<input type="hidden" name="add" value="1" /> |
|
|
96 |
[% ELSE %] |
97 |
<input type="hidden" name="add" value="0" /> |
98 |
[% END %] |
99 |
<ol><li> |
100 |
[% IF ( heading_branches_add_branch_p ) %] |
101 |
<label for="branchcode" class="required">Library code: </label> |
102 |
<input type="text" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% branchcode |html %]" class="required" required="required" /> <span class="required">Required</span> |
103 |
[% ELSE %] |
104 |
<span class="label">Library code: </span> |
105 |
<input type="hidden" name="branchcode" value="[% branchcode |html %]" /> |
106 |
[% branchcode %] |
107 |
[% END %] |
140 |
[% END %] |
108 |
</li> |
141 |
<ol> |
109 |
<li> |
142 |
<li> |
110 |
<label for="branchname" class="required">Name: </label> |
143 |
[% IF library %] |
111 |
<input type="text" name="branchname" id="branchname" size="80" value="[% branch_name |html %]" class="required" required="required" /> <span class="required">Required</span> |
144 |
<span class="label">Library code: </span> |
112 |
</li> |
145 |
<input type="hidden" name="branchcode" value="[% library.branchcode |html %]" /> |
113 |
</ol> |
146 |
[% library.branchcode %] |
114 |
</fieldset> |
147 |
[% ELSE %] |
115 |
[% IF ( categoryloop ) %]<fieldset class="rows"><legend>Group(s):</legend> |
148 |
<label for="branchcode" class="required">Library code: </label> |
116 |
<ol> |
149 |
<input type="text" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% library.branchcode |html %]" class="required" required="required" /> |
117 |
[% FOREACH categoryloo IN categoryloop %] |
150 |
<span class="required">Required</span> |
118 |
<li><label for="[% categoryloo.categorycode %]">[% categoryloo.categoryname %]: </label> |
151 |
[% END %] |
119 |
[% IF categoryloo.selected %] |
152 |
</li> |
120 |
<input type="checkbox" id="[% categoryloo.categorycode %]" name="[% categoryloo.categorycode %]" checked="checked" /> |
153 |
<li> |
121 |
[% ELSE %] |
154 |
<label for="branchname" class="required">Name: </label> |
122 |
<input type="checkbox" id="[% categoryloo.categorycode %]" name="[% categoryloo.categorycode %]" /> |
155 |
<input type="text" name="branchname" id="branchname" size="80" value="[% library.branchname |html %]" class="required" required="required" /> |
123 |
[% END %] |
156 |
<span class="required">Required</span> |
124 |
<span class="hint">[% categoryloo.codedescription %]</span> |
157 |
</li> |
125 |
</li> |
158 |
</ol> |
|
|
159 |
</fieldset> |
160 |
[% IF categories %] |
161 |
<fieldset class="rows"><legend>Group(s):</legend> |
162 |
<ol> |
163 |
[% FOREACH category IN categories %] |
164 |
<li> |
165 |
<label for="[% category.categorycode %]">[% category.categoryname %]: </label> |
166 |
[% IF category and selected_categorycodes.grep(category.categorycode).size %] |
167 |
<input type="checkbox" id="[% category.categorycode %]" name="selected_categorycode_[% category.categorycode %]" checked="checked" /> |
168 |
[% ELSE %] |
169 |
<input type="checkbox" id="[% category.categorycode %]" name="selected_categorycode_[% category.categorycode %]" /> |
170 |
[% END %] |
171 |
<span class="hint">[% category.codedescription %]</span> |
172 |
</li> |
173 |
[% END %] |
174 |
</ol> |
175 |
</fieldset> |
126 |
[% END %] |
176 |
[% END %] |
127 |
</ol> |
177 |
<fieldset class="rows"> |
128 |
</fieldset>[% END %] |
178 |
<ol> |
129 |
<fieldset class="rows"> |
179 |
<li><label for="branchaddress1">Address line 1: </label><input type="text" name="branchaddress1" id="branchaddress1" size="60" value="[% library.branchaddress1 |html %]" /></li> |
130 |
<ol> |
180 |
<li><label for="branchaddress2">Address line 2: </label><input type="text" name="branchaddress2" id="branchaddress2" size="60" value="[% library.branchaddress2 |html %]" /></li> |
131 |
<li><label for="branchaddress1">Address line 1: </label><input type="text" name="branchaddress1" id="branchaddress1" size="60" value="[% branchaddress1 |html %]" /></li> |
181 |
<li><label for="branchaddress3">Address line 3: </label><input type="text" name="branchaddress3" id="branchaddress3" size="60" value="[% library.branchaddress3 |html %]" /></li> |
132 |
<li><label for="branchaddress2">Address line 2: </label><input type="text" name="branchaddress2" id="branchaddress2" size="60" value="[% branchaddress2 |html %]" /></li> |
182 |
<li><label for="branchcity">City: </label><input type="text" name="branchcity" id="branchcity" size="60" value="[% library.branchcity |html %]" /></li> |
133 |
<li><label for="branchaddress3">Address line 3: </label><input type="text" name="branchaddress3" id="branchaddress3" size="60" value="[% branchaddress3 |html %]" /></li> |
183 |
<li><label for="branchstate">State: </label><input type="text" name="branchstate" id="branchstate" size="60" value="[% library.branchstate |html %]" /></li> |
134 |
<li><label for="branchcity">City: </label><input type="text" name="branchcity" id="branchcity" size="60" value="[% branchcity |html %]" /></li> |
184 |
<li><label for="branchzip">Zip/Postal code: </label><input type="text" name="branchzip" id="branchzip" size="25" maxlength="25" value="[% library.branchzip |html %]" /></li> |
135 |
<li><label for="branchstate">State: </label><input type="text" name="branchstate" id="branchstate" size="60" value="[% branchstate |html %]" /></li> |
185 |
<li><label for="branchcountry">Country: </label><input type="text" name="branchcountry" id="branchcountry" size="60" value="[% library.branchcountry |html %]" /></li> |
136 |
<li><label for="branchzip">Zip/Postal code: </label><input type="text" name="branchzip" id="branchzip" size="25" maxlength="25" value="[% branchzip |html %]" /></li> |
186 |
<li><label for="branchphone">Phone: </label><input type="text" name="branchphone" id="branchphone" size="60" value="[% library.branchphone |html %]" /></li> |
137 |
<li><label for="branchcountry">Country: </label><input type="text" name="branchcountry" id="branchcountry" size="60" value="[% branchcountry |html %]" /></li> |
187 |
<li><label for="branchfax">Fax: </label><input type="text" name="branchfax" id="branchfax" size="60" value="[% library.branchfax |html %]" /></li> |
138 |
<li><label for="branchphone">Phone: </label><input type="text" name="branchphone" id="branchphone" size="60" value="[% branchphone |html %]" /></li> |
188 |
<li><label for="branchemail">Email: </label><input type="text" name="branchemail" id="branchemail" class="email" size="80" value="[% library.branchemail |html %]" /></li> |
139 |
<li><label for="branchfax">Fax: </label><input type="text" name="branchfax" id="branchfax" size="60" value="[% branchfax |html %]" /></li> |
189 |
<li><label for="branchreplyto">Reply-To (if different to Email): </label> <input type="text" name="branchreplyto" id="branchreplyto" class="email" size="80" value="[% library.branchreplyto |html %]" /></li> |
140 |
<li><label for="branchemail">Email: </label><input type="text" name="branchemail" id="branchemail" class="email" size="80" value="[% branchemail |html %]" /></li> |
190 |
<li><label for="branchreturnpath">Return-Path (if different to Email): </label> <input type="text" name="branchreturnpath" id="branchreturnpath" class="email" size="80" value="[% library.branchreturnpath |html %]" /></li> |
141 |
<li><label for="branchreplyto">Reply-To (if different to Email): </label> <input type="text" name="branchreplyto" id="branchreplyto" class="email" size="80" value="[% branchreplyto |html %]" /></li> |
191 |
<li><label for="branchurl">URL: </label><input type="text" name="branchurl" id="branchurl" size="80" value="[% library.branchurl |html %]" class="url" /></li> |
142 |
<li><label for="branchreturnpath">Return-Path (if different to Email): </label> <input type="text" name="branchreturnpath" id="branchreturnpath" class="email" size="80" value="[% branchreturnpath |html %]" /></li> |
192 |
<li><label for="opac_info">OPAC info: </label><textarea name="opac_info" id="opac_info">[% library.opac_info |html %]</textarea></li> |
143 |
<li><label for="branchurl">URL: </label><input type="text" name="branchurl" id="branchurl" size="80" value="[% branchurl |html %]" class="url" /></li> |
193 |
<li><label for="branchip">IP: </label><input type="text" name="branchip" id="branchip" size="15" maxlength="15" value="[% library.branchip |html %]" /> <span class="hint">Can be entered as a single IP, or a subnet such as 192.168.1.*</span></li> |
144 |
<li><label for="opac_info">OPAC info: </label><textarea name="opac_info" id="opac_info">[% opac_info |html %]</textarea></li> |
194 |
<li><label for="branchnotes">Notes: </label><input type="text" name="branchnotes" id="branchnotes" size="80" value="[% library.branchnotes |html %]" /></li> |
145 |
<li><label for="branchip">IP: </label><input type="text" name="branchip" id="branchip" size="15" maxlength="15" value="[% branchip |html %]" /> <span class="hint">Can be entered as a single IP, or a subnet such as 192.168.1.*</span></li> |
195 |
</ol> |
146 |
<!-- |
196 |
</fieldset> |
147 |
<li><label for="branchprinter">Library Printer: </label> |
197 |
<fieldset class="action"> |
148 |
<select id="branchprinter" name="branchprinter"> |
198 |
<input type="submit" value="Submit" /> |
149 |
<option value="">None</option> |
199 |
<a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a> |
150 |
[% FOREACH printerloo IN printerloop %] |
|
|
151 |
[% IF ( printerloo.selected ) %] |
152 |
<option value="[% printerloo.value %]" selected="selected">[% printerloo.branchprinter %]</option> |
153 |
[% ELSE %] |
154 |
<option value="[% printerloo.value %]">[% printerloo.branchprinter %]</option> |
155 |
[% END %] |
156 |
[% END %] |
157 |
</select></li> |
158 |
--> |
159 |
<li><label for="branchnotes">Notes: </label><input type="text" name="branchnotes" id="branchnotes" size="80" value="[% branchnotes |html %]" /></li> |
160 |
</ol> |
161 |
</fieldset> |
200 |
</fieldset> |
162 |
<fieldset class="action"><input type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a></fieldset> |
|
|
163 |
</form> |
201 |
</form> |
164 |
[% END %] |
202 |
[% END %] |
165 |
|
203 |
|
166 |
[% IF ( delete_confirm ) %] |
204 |
[% IF op == 'delete_confirm' and not ( items_count or patrons_count )%] |
167 |
<form action="[% action %]" method="post"> |
205 |
<form action="/cgi-bin/koha/admin/branches.pl" method="post"> |
168 |
<fieldset><legend>Confirm deletion of [% branchname %] ([% branchcode %])?</legend><input type="hidden" name="op" value="delete_confirmed" /> |
206 |
<fieldset> |
169 |
<input type="hidden" name="branchcode" value="[% branchcode |html %]" /> |
207 |
<legend>Confirm deletion of [% library.branchname %] ([% library.branchcode %])?</legend> |
170 |
<input type="hidden" name="branchname" value="[% branchname |html %]"> |
208 |
<input type="hidden" name="op" value="delete_confirmed" /> |
171 |
<fieldset class="action"><input type="submit" value="Delete Library" /> <a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a></fieldset> |
209 |
<input type="hidden" name="branchcode" value="[% library.branchcode |html %]" /> |
172 |
</fieldset></form> |
210 |
<input type="hidden" name="branchname" value="[% library.branchname |html %]"> |
|
|
211 |
<fieldset class="action"> |
212 |
<input type="submit" value="Delete Library" /> |
213 |
<a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a> |
214 |
</fieldset> |
215 |
</fieldset> |
216 |
</form> |
173 |
[% END %] |
217 |
[% END %] |
174 |
|
218 |
|
175 |
[% IF ( else ) %] |
219 |
[% IF op == 'list' %] |
176 |
<h3>Libraries</h3> |
220 |
<h3>Libraries</h3> |
177 |
[% IF ( message ) %]<div class="dialog message"> |
221 |
[% IF libraries %] |
178 |
[% message %]</div>[% END %] |
222 |
<table id="branchest"> |
179 |
[% IF ( MESSAGE1 ) %]<div class="dialog message">Library not saved — code and/or name missing</div>[% END %] |
223 |
<thead> |
180 |
[% IF ( MESSAGE2 ) %]<div class="dialog message">Library saved</div>[% END %] |
224 |
<tr> |
181 |
[% IF ( MESSAGE3 ) %]<div class="dialog message">Library deleted</div>[% END %] |
225 |
<th>Name</th> |
182 |
[% IF ( MESSAGE4 ) %]<div class="dialog message">Library category added</div>[% END %] |
226 |
<th>Code</th> |
183 |
[% IF ( MESSAGE5 ) %]<div class="dialog message">Library category modified</div>[% END %] |
227 |
<th>Address</th> |
184 |
[% IF ( MESSAGE6 ) %]<div class="dialog message">Library category deleted</div>[% END %] |
228 |
<th>Properties</th> |
185 |
[% IF ( MESSAGE7 ) %]<div class="dialog message">Library cannot be deleted because there are patrons and items using that library</div>[% END %] |
229 |
<th>IP</th> |
186 |
[% IF ( MESSAGE8 ) %]<div class="dialog message">Category cannot be deleted because there are libraries using that category</div>[% END %] |
230 |
<th> </th> |
187 |
[% IF ( MESSAGE9 ) %]<div class="dialog message">Category cannot be added, categorycode already exists</div>[% END %] |
231 |
<th> </th> |
188 |
[% IF ( MESSAGE10 ) %]<div class="dialog message">Library cannot be deleted because there are items held by that library</div>[% END %] |
232 |
</tr> |
189 |
[% IF ( MESSAGE11 ) %]<div class="dialog message">Library cannot be deleted because there are patrons registered at that library</div>[% END %] |
233 |
</thead> |
190 |
[% IF ( branches ) %] |
234 |
<tbody> |
191 |
<table id="branchest"> |
235 |
[% FOREACH library IN libraries %] |
192 |
<thead><tr> |
236 |
<tr> |
193 |
<th>Name</th> |
237 |
<td>[% library.branchname |html %]</td> |
194 |
<th>Code</th> |
238 |
<td>[% library.branchcode |html %]</td> |
195 |
<th>Address</th> |
239 |
<td> |
196 |
<th>Properties</th> |
240 |
[% IF library.branchaddress1 %] |
197 |
<th>IP</th> |
241 |
[% library.branchaddress1 |html %][% END %] |
198 |
<!-- <th>Printer</th> --> |
242 |
[% IF library.branchaddress2 %] |
199 |
<th> </th> |
243 |
<br />[% library.branchaddress2 |html %][% END %] |
200 |
<th> </th> |
244 |
[% IF library.branchaddress3 %] |
201 |
</tr></thead><tbody> |
245 |
<br />[% library.branchaddress3 |html %][% END %] |
202 |
[% FOREACH branche IN branches %] |
246 |
[% IF library.branchcity %] |
203 |
<tr> |
247 |
<br />[% library.branchcity |html %][% END %][% IF ( library.branchstate ) %], |
204 |
<td>[% branche.branch_name |html %]</td> |
248 |
[% library.branchstate |html %][% END %] |
205 |
<td>[% branche.branch_code |html %]</td> |
249 |
[% IF library.branchzip %] |
206 |
<td> |
250 |
[% library.branchzip |html %][% END %] |
207 |
[% IF ( branche.address_empty_p ) %] |
251 |
[% IF library.branchcountry %] |
208 |
(nothing entered) |
252 |
<br />[% library.branchcountry |html %][% END %] |
209 |
[% ELSE %] |
253 |
[% IF library.branchphone %] |
210 |
[% IF ( branche.branchaddress1 ) %] |
254 |
<br />Ph: [% library.branchphone |html %][% END %] |
211 |
[% branche.branchaddress1 |html %][% END %] |
255 |
[% IF library.branchfax %] |
212 |
[% IF ( branche.branchaddress2 ) %] |
256 |
<br />Fax: [% library.branchfax |html %][% END %] |
213 |
<br />[% branche.branchaddress2 |html %][% END %] |
257 |
[% IF library.branchemail %] |
214 |
[% IF ( branche.branchaddress3 ) %] |
258 |
<br /><a href="mailto:[% library.branchemail %]">[% library.branchemail |html %]</a>[% END %] |
215 |
<br />[% branche.branchaddress3 |html %][% END %] |
259 |
[% IF library.branchurl %] |
216 |
[% IF ( branche.branchcity ) %] |
260 |
<br /><a href="[% library.branchurl %]">[% library.branchurl |html %]</a>[% END %] |
217 |
<br />[% branche.branchcity |html %][% END %][% IF ( branche.branchstate ) %], |
261 |
[% IF library.opac_info %] |
218 |
[% branche.branchstate |html %][% END %] |
262 |
<br />OPAC Info: <div>[% library.opac_info %]</div>[% END %] |
219 |
[% IF ( branche.branchzip ) %] |
263 |
[% IF library.branchnotes %] |
220 |
[% branche.branchzip |html %][% END %] |
264 |
<br />Notes: [% library.branchnotes |html %][% END %] |
221 |
[% IF ( branche.branchcountry ) %] |
265 |
</td> |
222 |
<br />[% branche.branchcountry |html %][% END %] |
266 |
<td> |
223 |
[% IF ( branche.branchphone ) %] |
267 |
[% FOREACH category IN library.get_categories %] |
224 |
<br />Ph: [% branche.branchphone |html %][% END %] |
268 |
[% category.categoryname %]<br /> |
225 |
[% IF ( branche.branchfax ) %] |
269 |
[% END %] |
226 |
<br />Fax: [% branche.branchfax |html %][% END %] |
270 |
</td> |
227 |
[% IF ( branche.branchemail ) %] |
271 |
<td>[% library.branchip %]</td> |
228 |
<br /><a href="mailto:[% branche.branchemail %]">[% branche.branchemail |html %]</a>[% END %] |
272 |
<td> |
229 |
[% IF ( branche.branchurl ) %] |
273 |
<a href="/cgi-bin/koha/admin/branches.pl?op=add_form&branchcode=[% library.branchcode %]">Edit</a> |
230 |
<br /><a href="[% branche.branchurl %]">[% branche.branchurl |html %]</a>[% END %] |
274 |
</td> |
231 |
[% IF ( branche.opac_info ) %] |
275 |
<td> |
232 |
<br />OPAC Info: <div>[% branche.opac_info %]</div>[% END %] |
276 |
<a href="/cgi-bin/koha/admin/branches.pl?op=delete_confirm&branchcode=[% library.branchcode %]">Delete</a> |
233 |
[% IF ( branche.branchnotes ) %] |
277 |
</td> |
234 |
<br />Notes: [% branche.branchnotes |html %][% END %] |
278 |
</tr> |
235 |
[% END %] |
279 |
[% END %] |
236 |
</td> |
280 |
</tbody> |
237 |
<td> |
281 |
</table> |
238 |
[% UNLESS ( branche.no_categories_p ) %] |
282 |
[% ELSE %] |
239 |
[% FOREACH category_lis IN branche.category_list %] |
283 |
<div class="dialog message">There are no libraries defined. <a href="/cgi-bin/koha/admin/branches.pl?op=add_form">Start defining libraries</a>.</div> |
240 |
[% category_lis.categoryname %]<br /> |
284 |
[% END %] |
241 |
[% END %] |
|
|
242 |
[% END %] |
243 |
</td> |
244 |
<td> |
245 |
[% branche.branchip %] |
246 |
</td> |
247 |
<!-- <td> |
248 |
[% branche.branchprinter %] |
249 |
</td> --> |
250 |
<td> |
251 |
<a href="[% branche.action %]?op=edit&branchcode=[% branche.value |url %]">Edit</a> |
252 |
</td> |
253 |
<td> |
254 |
<a href="[% branche.action %]?branchcode=[% branche.value |url %]&branchname=[% branche.branch_name |url %]&op=delete">Delete</a> |
255 |
</td> |
256 |
</tr> |
257 |
[% END %]</tbody> |
258 |
</table> |
259 |
[% ELSE %] |
260 |
<div class="dialog message">There are no libraries defined. <a href="/cgi-bin/koha/admin/branches.pl?op=add">Start defining libraries</a>.</div> |
261 |
[% END %] |
262 |
|
285 |
|
263 |
[% IF ( branchcategories ) %] |
286 |
[% IF group_types %] |
264 |
[% FOREACH branchcategorie IN branchcategories %] |
287 |
[% FOREACH group_type IN group_types %] |
265 |
<h3>Group(s): [% IF ( branchcategorie.properties ) %]Properties[% ELSE %][% IF ( branchcategorie.searchdomain ) %]Search domain[% END %][% END %]</h3> |
288 |
<h3>[% IF group_type.categorytype == 'properties' %]Properties[% ELSIF group_type.categorytype == 'searchdomain' %]Search domain[% END %]</h3> |
266 |
[% IF ( branchcategorie.catloop ) %] |
289 |
[% IF group_type.categories %] |
267 |
<table> |
290 |
<table> |
268 |
<thead> |
291 |
<thead> |
269 |
<tr> |
292 |
<tr> |
270 |
<th>Name</th> |
293 |
<th>Name</th> |
271 |
<th>Code</th> |
294 |
<th>Code</th> |
272 |
<th>Description</th> |
295 |
<th>Description</th> |
273 |
<th> </th> |
296 |
<th> </th> |
274 |
<th> </th> |
297 |
<th> </th> |
275 |
</tr> |
298 |
</tr> |
276 |
</thead> |
299 |
</thead> |
277 |
<tbody> |
300 |
<tbody> |
278 |
[% FOREACH catloo IN branchcategorie.catloop %] |
301 |
[% FOREACH category IN group_type.categories %] |
279 |
<tr> |
302 |
<tr> |
280 |
<td>[% catloo.categoryname %]</td> |
303 |
<td>[% category.categoryname %]</td> |
281 |
<td>[% catloo.categorycode %]</td> |
304 |
<td>[% category.categorycode %]</td> |
282 |
<td>[% catloo.codedescription %]</td> |
305 |
<td>[% category.codedescription %]</td> |
283 |
<td> |
306 |
<td> |
284 |
<a href="[% catloo.action %]?op=editcategory&categorycode=[% catloo.categorycode |url %]">Edit</a> |
307 |
<a href="/cgi-bin/koha/admin/branches.pl?categorycode=[% category.categorycode %]&op=add_form_category">Edit</a> |
285 |
</td> |
308 |
</td> |
286 |
<td> |
309 |
<td> |
287 |
<a href="[% catloo.action %]?op=delete_category&categorycode=[% catloo.categorycode |url %]">Delete</a> |
310 |
<a href="/cgi-bin/koha/admin/branches.pl?categorycode=[% category.categorycode %]&op=delete_confirm_category">Delete</a> |
288 |
</td> |
311 |
</td> |
289 |
</tr> |
312 |
</tr> |
290 |
[% END %] |
313 |
[% END %] |
291 |
</tbody> |
314 |
</tbody> |
292 |
</table> |
315 |
</table> |
|
|
316 |
[% ELSE %] |
317 |
[% IF group_type.categorytype == 'properties' %] |
318 |
No properties defined. |
319 |
[% ELSIF group_type.categorytype == 'searchdomain' %] |
320 |
No search domain defined. |
321 |
[% END %] |
322 |
<a href="/cgi-bin/koha/admin/branches.pl?op=add_form_category">Add a new group</a>. |
323 |
[% END %] |
324 |
[% END %] |
293 |
[% ELSE %] |
325 |
[% ELSE %] |
294 |
No [% IF ( branchcategorie.properties ) %]properties[% ELSIF ( branchcategorie.searchdomain ) %]search domain[% END %] defined. <a href="/cgi-bin/koha/admin/branches.pl?op=editcategory">Add a new group</a>. |
326 |
<p>No groups defined.</p> |
295 |
[% END %] |
327 |
[% END %] |
296 |
[% END %] |
|
|
297 |
[% ELSE %] |
298 |
<p>No groups defined.</p> |
299 |
[% END %] <!-- NAME="branchcategories" --> |
300 |
[% END %] |
328 |
[% END %] |
301 |
|
329 |
|
302 |
[% IF ( editcategory ) %] |
330 |
[% IF op == 'add_form_category' %] |
303 |
<h3>[% IF ( categorycode ) %]Edit group [% categorycode %][% ELSE %]Add group[% END %]</h3> |
331 |
<h3>[% IF category.categorycode %]Edit group [% category.categorycode %][% ELSE %]Add group[% END %]</h3> |
304 |
<form action="[% action %]" name="Aform" method="post"> |
332 |
<form action="/cgi-bin/koha/admin/branches.pl" name="Aform" method="post"> |
305 |
<input type="hidden" name="op" value="addcategory_validate" /> |
333 |
<input type="hidden" name="op" value="add_validate_category" /> |
306 |
[% IF ( categorycode ) %] |
334 |
[% IF category.categorycode %] |
307 |
<input type="hidden" name="add" value="0"> |
335 |
<input type="hidden" name="is_a_modif" value="1" /> |
308 |
[% ELSE %] |
336 |
[% END %] |
309 |
<input type="hidden" name="add" value="1"> |
337 |
<fieldset class="rows"> |
310 |
[% END %] |
338 |
<ol> |
311 |
<fieldset class="rows"> |
339 |
<li> |
|
|
340 |
[% IF category.categorycode %] |
341 |
<span class="label">Category code: </span> |
342 |
<input type="hidden" name="categorycode" id="categorycode" value="[% category.categorycode |html %]" /> |
343 |
[% category.categorycode %] |
344 |
[% ELSE %] |
345 |
<label for="categorycode">Category code:</label> |
346 |
<input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" /> |
347 |
[% END %] |
348 |
</li> |
349 |
<li> |
350 |
<label for="categoryname">Name: </label> |
351 |
<input type="text" name="categoryname" id="categoryname" size="32" maxlength="32" value="[% category.categoryname |html %]" /> |
352 |
</li> |
353 |
<li> |
354 |
<label for="codedescription">Description: </label> |
355 |
<input type="text" name="codedescription" id="codedescription" size="70" value="[% category.codedescription |html %]" /> |
356 |
</li> |
357 |
<li> |
358 |
<label for="categorytype">Category type: </label> |
359 |
<select id="categorytype" name="categorytype"> |
360 |
[% IF category.categorytype == 'properties' %] |
361 |
<option value="searchdomain">Search domain</option> |
362 |
<option value="properties" selected="selected">Properties</option> |
363 |
[% ELSE %] |
364 |
<option value="searchdomain">Search domain</option> |
365 |
<option value="properties">Properties</option> |
312 |
|
366 |
|
313 |
<ol><li> |
367 |
[% END %] |
314 |
[% IF ( categorycode ) %] |
368 |
</select> |
315 |
<span class="label">Category code: </span> |
369 |
</li> |
316 |
<input type="hidden" name="categorycode" id="categorycode" value="[% categorycode |html %]" /> |
370 |
<li> |
317 |
[% categorycode %] |
371 |
<label for="show_in_pulldown">Show in search pulldown: </label> |
318 |
[% ELSE %] |
372 |
[% IF category.show_in_pulldown %] |
319 |
<label for="categorycode">Category code:</label> |
373 |
<input type="checkbox" name="show_in_pulldown" id="show_in_pulldown" checked="checked"/> |
320 |
<input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" value="[% categorycode |html %]" /> |
374 |
[% ELSE %] |
321 |
[% END %] |
375 |
<input type="checkbox" name="show_in_pulldown" id="show_in_pulldown" /> |
322 |
</li> |
376 |
[% END %] |
323 |
<li> |
377 |
</li> |
324 |
<label for="categoryname">Name: </label> |
378 |
</ol> |
325 |
<input type="text" name="categoryname" id="categoryname" size="32" maxlength="32" value="[% categoryname |html %]" /> |
379 |
</fieldset> |
326 |
</li> |
380 |
<fieldset class="action"><input type="submit" value="Update" /></fieldset> |
327 |
<li> |
|
|
328 |
<label for="codedescription">Description: </label> |
329 |
<input type="text" name="codedescription" id="codedescription" size="70" value="[% codedescription |html %]" /> |
330 |
</li> |
331 |
<li> |
332 |
<label for="categorytype">Category type: </label> |
333 |
<select id="categorytype" name="categorytype"> |
334 |
[% FOREACH categorytyp IN categorytype %] |
335 |
[% IF ( categorytyp.selected ) %] |
336 |
<option value="[% categorytyp.type %]" selected="selected"> |
337 |
[% ELSE %] |
338 |
<option value="[% categorytyp.type %]"> |
339 |
[% END %] [% categorytyp.type %]</option> |
340 |
[% END %] |
341 |
</select> |
342 |
</li> |
343 |
<li> |
344 |
<label for="show_in_pulldown">Show in search pulldown: </label> |
345 |
[% IF ( show_in_pulldown ) %] |
346 |
<input type="checkbox" name="show_in_pulldown" id="show_in_pulldown" checked="checked"/> |
347 |
[% ELSE %] |
348 |
<input type="checkbox" name="show_in_pulldown" id="show_in_pulldown" /> |
349 |
[% END %] |
350 |
</li> |
351 |
</ol> |
352 |
</fieldset> |
353 |
<fieldset class="action"><input type="submit" value="Update" /></fieldset> |
354 |
</form> |
381 |
</form> |
355 |
[% END %] |
382 |
[% END %] |
356 |
|
383 |
|
357 |
[% IF ( delete_category ) %] |
384 |
[% IF op == 'delete_confirm_category' %] |
358 |
[% UNLESS ( MESSAGE8 ) %] |
|
|
359 |
<div class="dialog message"> |
385 |
<div class="dialog message"> |
360 |
Confirm delete: |
386 |
Are you sure you want to delete the group '[% category.codedescription %]' ([% category.categorycode %])? |
361 |
<form action="[% action %]" method="post"> |
387 |
<form action="/cgi-bin/koha/admin/branches.pl" method="post"> |
362 |
<input type="hidden" name="op" value="categorydelete_confirmed" /> |
388 |
<input type="hidden" name="op" value="delete_confirmed_category" /> |
363 |
<input type="hidden" name="categorycode" value="[% categorycode |html %]" /> |
389 |
<input type="hidden" name="categorycode" value="[% category.categorycode |html %]" /> |
364 |
<input type="submit" value="YES" /> |
390 |
<input type="submit" value="Delete" /> |
365 |
</form> |
391 |
<a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a> |
366 |
<form action="[% action %]" method="post"><input type="hidden" name="op" value=""> |
|
|
367 |
<input type="submit" value="NO" /> |
368 |
</form> |
392 |
</form> |
369 |
</div> |
393 |
</div> |
370 |
[% END %] |
|
|
371 |
[% END %] |
394 |
[% END %] |
372 |
|
395 |
|
373 |
</div> |
396 |
</div> |
374 |
- |
|
|