Owen Leonard
3731ec80fc
This fixes display of Zip code relative to the city and state if you're in the USA and you like to do it this way. At the very least this matches how we display addresses elsewhere in Koha. It should be noted that this makes it incorrect for anyone who wants to see addresses like this: [name] [street address] [postal code + city] ...or any other variation of course. While I'm in there, also making branch URLs and emails clickable. Signed-off-by: Nicole Engard <nengard@gmail.com> Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
355 lines
17 KiB
Text
355 lines
17 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Administration › Libraries and Groups
|
|
[% IF ( editcategory ) %]
|
|
›[% IF ( categorycode ) %]Edit Group [% categorycode %][% ELSE %]New Group[% END %]
|
|
[% ELSIF ( delete_category ) %]
|
|
› Confirm Deletion of Group [% categorycode %]
|
|
[% ELSIF ( add ) %]
|
|
›[% IF ( heading_branches_add_branch_p ) %]New library[% ELSE %]Modify library [% branchcode %][% END %]
|
|
[% ELSIF ( delete_confirm ) %]
|
|
› Confirm deletion of library '[% branchcode %]'
|
|
[% END %]
|
|
</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
|
|
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
|
|
</head>
|
|
<body>
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
|
|
<div id="breadcrumbs">
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
|
|
› <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
|
|
› <a href="/cgi-bin/koha/admin/branches.pl">Libraries and Groups</a>
|
|
[% IF ( editcategory ) %]
|
|
› [% IF ( categorycode ) %]Edit Group [% categorycode %][% ELSE %]New Group[% END %]
|
|
[% ELSIF ( delete_category ) %]
|
|
› Confirm Deletion of Group [% categorycode %]
|
|
[% ELSIF ( add ) %]
|
|
› [% IF ( heading_branches_add_branch_p ) %]New library[% ELSE %]Modify library [% branchcode %][% END %]
|
|
[% ELSIF ( delete_confirm ) %]
|
|
› Confirm deletion of library '[% branchcode %]'
|
|
[% END %]
|
|
</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
[% IF ( else ) %]
|
|
<div id="toolbar">
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
|
|
// prepare DOM for YUI Toolbar
|
|
|
|
$(document).ready(function() {
|
|
yuiToolbar();
|
|
$.tablesorter.defaults.widgets = ['zebra'];
|
|
$("#branchest").tablesorter({
|
|
sortList: [[0,0]],
|
|
headers: { 3:{sorter:false},4:{sorter:false},5:{sorter:false},6:{sorter:false}}
|
|
}).tablesorterPager({container: $("#pagerbranchest"),positionFixed: false,size: 10});
|
|
});
|
|
// YUI Toolbar Functions
|
|
|
|
function yuiToolbar() {
|
|
new YAHOO.widget.Button("newbranch");
|
|
new YAHOO.widget.Button("newcategory");
|
|
}
|
|
|
|
//]]>
|
|
</script>
|
|
<ul class="toolbar">
|
|
<li><a id="newbranch" href="/cgi-bin/koha/admin/branches.pl?op=add">New Library</a></li>
|
|
<li><a id="newcategory" href="/cgi-bin/koha/admin/branches.pl?op=editcategory">New Group</a></li>
|
|
</ul></div>
|
|
[% END %]
|
|
|
|
[% IF ( add ) %]
|
|
[% IF ( ERROR1 ) %]<div class="dialog message">Library with that code already exists — Please enter a unique code</div>[% END %]
|
|
<h3>[% IF ( heading_branches_add_branch_p ) %]New library[% ELSE %]Modify library[% END %]</h3>
|
|
<form action="[% action %]" name="Aform" method="post">
|
|
<fieldset class="rows">
|
|
<input type="hidden" name="op" value="add_validate" />
|
|
[% IF ( heading_branches_add_branch_p ) %]
|
|
<input type="hidden" name="add" value="1" />
|
|
[% ELSE %]
|
|
<input type="hidden" name="add" value="0" />
|
|
[% END %]
|
|
<ol><li>
|
|
[% IF ( heading_branches_add_branch_p ) %]
|
|
<label for="branchcode">Library code</label>
|
|
<input type="text" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% branchcode |html %]" />
|
|
[% ELSE %]
|
|
<label for="branchcode">Library code</label>
|
|
<input type="hidden" name="branchcode" value="[% branchcode |html %]" />
|
|
[% branchcode %]
|
|
[% END %]
|
|
</li>
|
|
<li>
|
|
<label for="branchname">Name</label>
|
|
<input type="text" name="branchname" id="branchname" size="80" value="[% branch_name |html %]" />
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
[% IF ( categoryloop ) %]<fieldset class="rows"><legend>Group(s):</legend>
|
|
<ol>
|
|
[% FOREACH categoryloo IN categoryloop %]
|
|
<li><label for="[% categoryloo.categorycode %]">[% categoryloo.categoryname %]</label>
|
|
<input type="checkbox" id="[% categoryloo.categorycode %]" name="[% categoryloo.categorycode %]" [% categoryloo.checked %] /> <span class="hint">[% categoryloo.codedescription %]</span>
|
|
</li>
|
|
[% END %]
|
|
</ol>
|
|
</fieldset>[% END %]
|
|
<fieldset class="rows">
|
|
<ol>
|
|
<li><label for="branchaddress1">Address Line 1</label><input type="text" name="branchaddress1" id="branchaddress1" value="[% branchaddress1 |html %]" /></li>
|
|
<li><label for="branchaddress2">Address Line 2</label><input type="text" name="branchaddress2" id="branchaddress2" value="[% branchaddress2 |html %]" /></li>
|
|
<li><label for="branchaddress3">Address Line 3</label><input type="text" name="branchaddress3" id="branchaddress3" value="[% branchaddress3 |html %]" /></li>
|
|
<li><label for="branchcity">City</label><input type="text" name="branchcity" id="branchcity" value="[% branchcity |html %]" /></li>
|
|
<li><label for="branchstate">State</label><input type="text" name="branchstate" id="branchstate" value="[% branchstate |html %]" /></li>
|
|
<li><label for="branchzip">Zip/Postal Code</label><input type="text" name="branchzip" id="branchzip" value="[% branchzip |html %]" /></li>
|
|
<li><label for="branchcountry">Country</label><input type="text" name="branchcountry" id="branchcountry" value="[% branchcountry |html %]" /></li>
|
|
<li><label for="branchphone">Phone</label><input type="text" name="branchphone" id="branchphone" value="[% branchphone |html %]" /></li>
|
|
<li><label for="branchfax">Fax</label><input type="text" name="branchfax" id="branchfax" value="[% branchfax |html %]" /></li>
|
|
<li><label for="branchemail">Email</label><input type="text" name="branchemail" id="branchemail" value="[% branchemail |html %]" /></li>
|
|
<li><label for="branchurl">url</label><input type="text" name="branchurl" id="branchurl" value="[% branchurl |html %]" /></li>
|
|
<li><label for="branchip">IP</label><input type="text" name="branchip" id="branchip" value="[% branchip |html %]" /> <span class="hint">Can be entered as a single IP, or a subnet such as 192.168.1.*</span></li>
|
|
<!--
|
|
<li><label for="branchprinter">Library Printer</label>
|
|
<select id="branchprinter" name="branchprinter">
|
|
<option value="">None</option>
|
|
[% FOREACH printerloo IN printerloop %]
|
|
[% IF ( printerloo.selected ) %]
|
|
<option value="[% printerloo.value %]" selected="selected">[% printerloo.branchprinter %]</option>
|
|
[% ELSE %]
|
|
<option value="[% printerloo.value %]">[% printerloo.branchprinter %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select></li>
|
|
-->
|
|
<li><label for="branchnotes">Notes</label><input type="text" name="branchnotes" id="branchnotes" value="[% branchnotes |html %]" /></li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action"><input type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a></fieldset>
|
|
</form>
|
|
[% END %]
|
|
|
|
[% IF ( delete_confirm ) %]
|
|
<form action="[% action %]" method="post">
|
|
<fieldset><legend>Confirm deletion of [% branchname %] ([% branchcode %])?</legend><input type="hidden" name="op" value="delete_confirmed" />
|
|
<input type="hidden" name="branchcode" value="[% branchcode |html %]" />
|
|
<input type="hidden" name="branchname" value="[% branchname |html %]">
|
|
<fieldset class="action"><input type="submit" value="Delete Library" /> <a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a></fieldset>
|
|
</fieldset></form>
|
|
[% END %]
|
|
|
|
[% IF ( else ) %]
|
|
<h3>Libraries</h3>
|
|
[% IF ( message ) %]<div class="dialog message">
|
|
[% message %]</div>[% END %]
|
|
[% IF ( MESSAGE1 ) %]<div class="dialog message">Library not saved — code and/or name missing</div>[% END %]
|
|
[% IF ( MESSAGE2 ) %]<div class="dialog message">Library saved</div>[% END %]
|
|
[% IF ( MESSAGE3 ) %]<div class="dialog message">Library deleted</div>[% END %]
|
|
[% IF ( MESSAGE4 ) %]<div class="dialog message">Library category added</div>[% END %]
|
|
[% IF ( MESSAGE5 ) %]<div class="dialog message">Library category modified</div>[% END %]
|
|
[% IF ( MESSAGE6 ) %]<div class="dialog message">Library category deleted</div>[% END %]
|
|
[% IF ( MESSAGE7 ) %]<div class="dialog message">Library cannot be deleted because there are patrons and items using that library</div>[% END %]
|
|
[% IF ( MESSAGE8 ) %]<div class="dialog message">Category cannot be deleted because there are libraries using that category</div>[% END %]
|
|
[% IF ( MESSAGE9 ) %]<div class="dialog message">Category cannot be added, categorycode already exists</div>[% END %]
|
|
[% IF ( MESSAGE10 ) %]<div class="dialog message">Library cannot be deleted because there are items held by that library</div>[% END %]
|
|
[% IF ( MESSAGE11 ) %]<div class="dialog message">Library cannot be deleted because there are patrons registered at that library</div>[% END %]
|
|
[% IF ( branches ) %]
|
|
<span id="pagerbranchest" class="pager">
|
|
<form class="formpager"> <strong>page(s)</strong> :
|
|
<img src="[% interface %]/prog/img/first.png" class="first"/>
|
|
<img src="[% interface %]/prog/img/prev.png" class="prev"/>
|
|
<input type="text" size="5" class="pagedisplay"/>
|
|
<img src="[% interface %]/prog/img/next.png" class="next"/>
|
|
<img src="[% interface %]/prog/img/last.png" class="last"/>
|
|
, entries/page :
|
|
<select class="pagesize">
|
|
<option selected="selected" value="10">10</option>
|
|
<option value="20">20</option>
|
|
<option value="30">30</option>
|
|
<option value="40">40</option>
|
|
<option value="50">50</option>
|
|
<option value="100">100</option>
|
|
</select>
|
|
</form>
|
|
</span>
|
|
<table id="branchest">
|
|
<thead><tr>
|
|
<th>Name</th>
|
|
<th>Code</th>
|
|
<th>Address</th>
|
|
<th>Properties</th>
|
|
<th>IP</th>
|
|
<!-- <th>Printer</th> -->
|
|
<th colspan="2"> </th>
|
|
</tr></thead><tbody>
|
|
[% FOREACH branche IN branches %]
|
|
[% IF ( loop.odd ) %]
|
|
<tr>
|
|
[% ELSE %]
|
|
<tr class="highlight">
|
|
[% END %]
|
|
<td>[% branche.branch_name |html %]</td>
|
|
<td>[% branche.branch_code |html %]</td>
|
|
<td>
|
|
[% IF ( branche.address_empty_p ) %]
|
|
(nothing entered)
|
|
[% ELSE %]
|
|
[% IF ( branche.branchaddress1 ) %]
|
|
[% branche.branchaddress1 |html %][% END %]
|
|
[% IF ( branche.branchaddress2 ) %]
|
|
<br />[% branche.branchaddress2 |html %][% END %]
|
|
[% IF ( branche.branchaddress3 ) %]
|
|
<br />[% branche.branchaddress3 |html %][% END %]
|
|
[% IF ( branche.branchcity ) %]
|
|
<br />[% branche.branchcity |html %][% END %][% IF ( branche.branchstate ) %],
|
|
[% branche.branchstate |html %][% END %]
|
|
[% IF ( branche.branchzip ) %]
|
|
[% branche.branchzip |html %][% END %]
|
|
[% IF ( branche.branchcountry ) %]
|
|
<br />[% branche.branchcountry |html %][% END %]
|
|
[% IF ( branche.branchphone ) %]
|
|
<br />Ph: [% branche.branchphone |html %][% END %]
|
|
[% IF ( branche.branchfax ) %]
|
|
<br />Fax: [% branche.branchfax |html %][% END %]
|
|
[% IF ( branche.branchemail ) %]
|
|
<br /><a href="mailto:[% branche.branchemail %]">[% branche.branchemail |html %]</a>[% END %]
|
|
[% IF ( branche.branchurl ) %]
|
|
<br /><a href="[% branche.branchurl %]">[% branche.branchurl |html %]</a>[% END %]
|
|
[% IF ( branche.branchnotes ) %]
|
|
<br />Notes: [% branche.branchnotes |html %][% END %]
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
[% UNLESS ( branche.no_categories_p ) %]
|
|
[% FOREACH category_lis IN branche.category_list %]
|
|
[% category_lis.categoryname %]<br />
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
[% branche.branchip %]
|
|
</td>
|
|
<!-- <td>
|
|
[% branche.branchprinter %]
|
|
</td> -->
|
|
<td>
|
|
<a href="[% branche.action %]?op=edit&branchcode=[% branche.value |url %]">Edit</a>
|
|
</td>
|
|
<td>
|
|
<a href="[% branche.action %]?branchcode=[% branche.value |url %]&branchname=[% branche.branch_name |url %]&op=delete">Delete</a>
|
|
</td>
|
|
</tr>
|
|
[% END %]</tbody>
|
|
</table>
|
|
[% ELSE %]
|
|
<div class="dialog message">There are no libraries defined. <a href="/cgi-bin/koha/admin/branches.pl?op=add">Start defining libraries</a>.</div>
|
|
[% END %]
|
|
|
|
[% IF ( branchcategories ) %]
|
|
[% FOREACH branchcategorie IN branchcategories %]
|
|
<h3>Group(s): [% IF ( branchcategorie.properties ) %]Properties[% ELSE %][% IF ( branchcategorie.searchdomain ) %]Search Domain[% END %][% END %]</h3>
|
|
<table>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Code</th>
|
|
<th>Description</th>
|
|
<th> </th>
|
|
<th> </th>
|
|
</tr>
|
|
[% IF ( branchcategorie.catloop ) %][% FOREACH catloo IN branchcategorie.catloop %]
|
|
<tr>
|
|
<td>[% catloo.categoryname %]</td>
|
|
<td>[% catloo.categorycode %]</td>
|
|
<td>[% catloo.codedescription %]</td>
|
|
<td><a href="[% catloo.action %]?op=editcategory&categorycode=[% catloo.categorycode |url %]">Edit</a>
|
|
</td>
|
|
<td><a href="[% catloo.action %]?op=delete_category&categorycode=[% catloo.categorycode |url %]">Delete</a>
|
|
</td>
|
|
</tr>
|
|
[% END %][% ELSE %]<tr><td colspan="5">No [% IF ( branchcategorie.properties ) %]Properties[% ELSIF ( branchcategorie.searchdomain ) %]Search Domain[% END %] Defined</td></tr>[% END %]
|
|
</table>
|
|
[% END %]
|
|
[% ELSE %]
|
|
<p>No Groups defined.</p>
|
|
[% END %] <!-- NAME="branchcategories" -->
|
|
[% END %]
|
|
|
|
[% IF ( editcategory ) %]
|
|
<h3>[% IF ( categorycode ) %]Edit Group [% categorycode %][% ELSE %]Add Group[% END %]</h3>
|
|
<form action="[% action %]" name="Aform" method="post">
|
|
<input type="hidden" name="op" value="addcategory_validate" />
|
|
[% IF ( categorycode ) %]
|
|
<input type="hidden" name="add" value="0">
|
|
[% ELSE %]
|
|
<input type="hidden" name="add" value="1">
|
|
[% END %]
|
|
<fieldset class="rows">
|
|
|
|
<ol><li>
|
|
[% IF ( categorycode ) %]
|
|
<span class="label">Category code: </span>
|
|
<input type="hidden" name="categorycode" id="categorycode" value="[% categorycode |html %]" />
|
|
[% categorycode %]
|
|
[% ELSE %]
|
|
<label for="categorycode">Category code:</label>
|
|
<input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" value="[% categorycode |html %]" />
|
|
[% END %]
|
|
</li>
|
|
<li>
|
|
<label for="categoryname">Name: </label>
|
|
<input type="text" name="categoryname" id="categoryname" size="32" maxlength="32" value="[% categoryname |html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="codedescription">Description: </label>
|
|
<input type="text" name="codedescription" id="codedescription" size="70" value="[% codedescription |html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="categorytype">Category Type: </label>
|
|
<select id="categorytype" name="categorytype">
|
|
[% FOREACH categorytyp IN categorytype %]
|
|
[% IF ( categorytyp.selected ) %]
|
|
<option value="[% categorytyp.type %]" selected="selected">
|
|
[% ELSE %]
|
|
<option value="[% categorytyp.type %]">
|
|
[% END %] [% categorytyp.type %]</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action"><input type="submit" value="Update" /></fieldset>
|
|
</form>
|
|
[% END %]
|
|
|
|
[% IF ( delete_category ) %]
|
|
[% UNLESS ( MESSAGE8 ) %]
|
|
<div class="dialog message">
|
|
Confirm delete:
|
|
<form action="[% action %]" method="post">
|
|
<input type="hidden" name="op" value="categorydelete_confirmed" />
|
|
<input type="hidden" name="categorycode" value="[% categorycode |html %]" />
|
|
<input type="submit" value="YES" />
|
|
</form>
|
|
<form action="[% action %]" method="post"><input type="hidden" name="op" value="">
|
|
<input type="submit" value="NO" />
|
|
</form>
|
|
</div>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
[% INCLUDE 'admin-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|