[% USE raw %]
[% USE Asset %]
[% SET footerjs = 1 %]
+[% USE ColumnsSettings %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Administration › Libraries
[% IF op == 'add_form' %]
[% END %]
</title>
[% INCLUDE 'doc-head-close.inc' %]
-[% Asset.css("css/datatables.css") | $raw %]
</head>
<body id="admin_branches" class="admin">
[% END %]
</div>
-<div id="doc3" class="yui-t2">
-
- <div id="bd">
- <div id="yui-main">
- <div class="yui-b">
+<div class="main container-fluid">
+ <div class="row">
+ <div class="col-sm-10 col-sm-push-2">
+ <main>
[% FOREACH m IN messages %]
<div class="dialog [% m.type | html %]">
<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>
<li><label for="marcorgccode">MARC organization code</label> <input type="text" name="marcorgcode" id="marcorgcode" size="16" value="[% library.marcorgcode | html %]" /> <span class="hint">If not filled in defaults to system preference MARCOrgCode. You can obtain your code from <a href="http://www.loc.gov/marc/organizations/orgshome.html" target="_blank">Library of Congress</a>.</span>
<li><label for="branchnotes">Notes: </label><input type="text" name="branchnotes" id="branchnotes" size="80" value="[% library.branchnotes | html %]" /></li>
+ <li><label for="pickup_location">Pickup location: </label>
+ <select name="pickup_location" id="pickup_location">
+ [% IF !library || library.pickup_location == 1 %]
+ <option value="1" selected="selected">Yes</option>
+ <option value="0">No</option>
+ [% ELSE %]
+ <option value="1">Yes</option>
+ <option value="0" selected="selected">No</option>
+ [% END %]
+ </select>
+ </li>
</ol>
</fieldset>
<fieldset class="action">
[% IF op == 'list' %]
<h3>Libraries</h3>
[% IF libraries.count %]
- <table id="branchest">
+ <table id="libraries">
<thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>MARC organization code</th>
<th>IP</th>
+ <th>Pickup location</th>
<th>Actions</th>
</tr>
</thead>
[% IF library.branchfax %]
<br />Fax: [% library.branchfax | html %][% END %]
[% IF library.branchemail %]
- <br /><a href="mailto:[% library.branchemail | html %]">[% library.branchemail | html %]</a>[% END %]
+ <br /><a href="mailto:[% library.branchemail | uri %]">[% library.branchemail | html %]</a>[% END %]
[% IF library.branchurl %]
- <br /><a href="[% library.branchurl | html %]">[% library.branchurl | html %]</a>[% END %]
+ <br /><a href="[% library.branchurl | url %]">[% library.branchurl | html %]</a>[% END %]
[% IF library.opac_info %]
<br />OPAC Info: <div>[% library.opac_info | $raw %]</div>[% END %]
[% IF library.branchnotes %]
</td>
<td>[% library.marcorgcode | html %]</td>
<td>[% library.branchip | html %]</td>
+ <td>[% IF library.pickup_location %]Yes[% ELSE %]No[% END %]</td>
<td class="actions">
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/branches.pl?op=add_form&branchcode=[% library.branchcode |uri %]"><i class="fa fa-pencil"></i> Edit</a>
<form action="/cgi-bin/koha/admin/branches.pl" method="post">
[% END %]
[% END %]
-</div>
-</div>
-<div class="yui-b">
-[% INCLUDE 'admin-menu.inc' %]
-</div>
-</div>
+ </main>
+ </div> <!-- /.col-sm-10.col-sm-push-2 -->
+
+ <div class="col-sm-2 col-sm-pull-10">
+ <aside>
+ [% INCLUDE 'admin-menu.inc' %]
+ </aside>
+ </div> <!-- /.col-sm-2.col-sm-pull-10 -->
+ </div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
+ [% INCLUDE 'columns_settings.inc' %]
[% Asset.js("lib/tiny_mce/tiny_mce.js") | $raw %]
- <script type="text/javascript">
+ <script>
+ var columns_settings = [% ColumnsSettings.GetColumns( 'admin', 'libraries', 'libraries', 'json' ) | $raw %];
$(document).ready(function() {
- $("#branchest").dataTable($.extend(true, {}, dataTablesDefaults, {
+ KohaTable("libraries", {
"aoColumnDefs": [
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
],
- "iDisplayLength": 10,
- "sPaginationType": "four_button"
- }));
+ "sPaginationType": "four_button",
+ "exportColumns": [0,1,2,3,4,5]
+ }, columns_settings);
[% UNLESS library %]
$("#Aform").on("submit", function( event ) {