- [% 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 ) %]
- <table id="branchest">
-<thead><tr>
- <th>Name</th>
- <th>Code</th>
- <th>Address</th>
- <th>Properties</th>
- <th>IP</th>
- <!-- <th>Printer</th> -->
- <th> </th>
- <th> </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.opac_info ) %]
- <br />OPAC Info: <div>[% branche.opac_info %]</div>[% 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>
- [% IF ( branchcategorie.catloop ) %]
- <table>
- <thead>
- <tr>
- <th>Name</th>
- <th>Code</th>
- <th>Description</th>
- <th> </th>
- <th> </th>
- </tr>
- </thead>
- <tbody>
- [% 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 %]
- </tbody>
- </table>
+ [% 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>