- [% 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.branchzip ) %]
- <br />[% branche.branchzip |html %][% END %]
- [% IF ( branche.branchcity ) %]
- <br />[% branche.branchcity |html %][% END %][% IF ( branche.branchstate ) %],
- [% branche.branchstate |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 />Email: [% branche.branchemail |html %][% END %]
- [% IF ( branche.branchurl ) %]
- <br />url: [% branche.branchurl |html %][% 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 %]
+ [% IF libraries.count %]
+ <table id="branchest">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Code</th>
+ <th>Address</th>
+ <th>Properties</th>
+ <th>IP</th>
+ <th>Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ [% FOREACH library IN libraries %]
+ <tr>
+ <td>[% library.branchname |html %]</td>
+ <td>[% library.branchcode |html %]</td>
+ <td>
+ [% IF library.branchaddress1 %]
+ [% library.branchaddress1 |html %][% END %]
+ [% IF library.branchaddress2 %]
+ <br />[% library.branchaddress2 |html %][% END %]
+ [% IF library.branchaddress3 %]
+ <br />[% library.branchaddress3 |html %][% END %]
+ [% IF library.branchcity %]
+ <br />[% library.branchcity |html %][% END %][% IF ( library.branchstate ) %],
+ [% library.branchstate |html %][% END %]
+ [% IF library.branchzip %]
+ [% library.branchzip |html %][% END %]
+ [% IF library.branchcountry %]
+ <br />[% library.branchcountry |html %][% END %]
+ [% IF library.branchphone %]
+ <br />Ph: [% library.branchphone |html %][% END %]
+ [% IF library.branchfax %]
+ <br />Fax: [% library.branchfax |html %][% END %]
+ [% IF library.branchemail %]
+ <br /><a href="mailto:[% library.branchemail %]">[% library.branchemail |html %]</a>[% END %]
+ [% IF library.branchurl %]
+ <br /><a href="[% library.branchurl %]">[% library.branchurl |html %]</a>[% END %]
+ [% IF library.opac_info %]
+ <br />OPAC Info: <div>[% library.opac_info %]</div>[% END %]
+ [% IF library.branchnotes %]
+ <br />Notes: [% library.branchnotes |html %][% END %]
+ </td>
+ <td>
+ [% FOREACH category IN library.get_categories %]
+ [% category.categoryname %]<br />
+ [% END %]
+ </td>
+ <td>[% library.branchip %]</td>
+ <td class="actions">
+ <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/branches.pl?op=add_form&branchcode=[% library.branchcode %]"><i class="fa fa-pencil"></i> Edit</a>
+ <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/branches.pl?op=delete_confirm&branchcode=[% library.branchcode %]"><i class="fa fa-trash"></i> Delete</a>
+ </td>
+ </tr>
+ [% END %]
+ </tbody>
+ </table>