Bug 15758: Koha::Libraries - Remove GetBranches
[srvgit] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / item_circulation_alerts.tt
index 83650c3..d55801f 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Branches %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; Item circulation alerts</title>
 [% INCLUDE 'doc-head-close.inc' %]
@@ -40,12 +41,12 @@ table.grid td.default {
 <script type="text/javascript">//<![CDATA[
 var $branch = "[% branch %]";
 $(function(){
-    $('#alerttabs > ul').tabs();
+    $('#alerttabs').tabs();
 
-    var blocked            = _('Blocked!');
-    var saving             = _('Saving...');
-    var disabledForAll     = _('Disabled for all');
-    var disabledForCurrent = _('Disabled for') + ' ' + $branch;
+    var blocked            = _("Blocked!");
+    var saving             = _("Saving...");
+    var disabledForAll     = _("Disabled for all");
+    var disabledForCurrent = _("Disabled for %s").format($branch);
 
     $('#branch_selector input:submit').hide();
     $('#branch').change(function(){
@@ -103,13 +104,8 @@ $(function(){
 <h2>Select a library:</h2>
 <form id="branch_selector" method="get" action="/cgi-bin/koha/admin/item_circulation_alerts.pl">
 <select id="branch" name="branch">
-[% FOREACH branche IN branches %]
-[% IF ( branche.selected ) %]
-<option value="[% branche.branchcode %]" selected="selected">[% branche.branchname %]</option>
-[% ELSE %]
-<option value="[% branche.branchcode %]">[% branche.branchname %]</option>
-[% END %]
-[% END %]
+    <option value="*">Default</option>
+    [% PROCESS options_for_libraries libraries => Branches.all( selected => branch, unfiltered => 1 ) %]
 </select>
 <input type="submit" name="pick" value="Pick" />
 </form>
@@ -141,7 +137,7 @@ $(function(){
 </div>
 </div>
 
-<h2>Circulation alerts for [% branch_name %]</h2>
+<h2>Circulation alerts for [% Branches.GetName( branch ) || 'Default' %]</h2>
 <p>Click on the grid to toggle the settings.</p>
 
 <div id="alerttabs" class="toptabs">
@@ -157,7 +153,7 @@ $(function(){
 <tr>
   <th>&nbsp;</th>
   [% FOREACH item_type IN item_types %]
-  <th>[% item_type.br_description %]</th>
+  <th>[% item_type.description %]</th>
   [% END %]
 </tr>
 </thead>
@@ -181,7 +177,7 @@ $(function(){
 <tr>
   <th>&nbsp;</th>
   [% FOREACH item_type IN item_types %]
-  <th>[% item_type.br_description %]</th>
+  <th>[% item_type.description %]</th>
   [% END %]
 </tr>
 </thead>