Bug 14695 - Add new circulation rule
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / branches.tt
index 305741a..77356ac 100644 (file)
@@ -11,7 +11,7 @@
 [% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
 [% INCLUDE 'datatables.inc' %]
 <script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script>
 <script type="text/javascript">
@@ -19,7 +19,7 @@
     $(document).ready(function() {
         $("#branchest").dataTable($.extend(true, {}, dataTablesDefaults, {
             "aoColumnDefs": [
-                { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
+                { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
             ],
             "iDisplayLength": 10,
             "sPaginationType": "four_button"
@@ -40,7 +40,7 @@
 tinyMCE.init({
     mode : "textareas",
     theme : "advanced",
-    content_css : "[% themelang %]/css/tinymce.css",
+    content_css : "[% interface %]/[% theme %]/css/tinymce.css",
     plugins : "table,save,advhr,advlink,contextmenu",
     theme_advanced_buttons1 : "save,|,bold,italic,|,cut,copy,paste,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,link,unlink,anchor,cleanup,help,code,advhr,",
     theme_advanced_buttons2 : "tablecontrols,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,removeformat,|,visualaid,|,sub,sup,|,charmap",
@@ -79,7 +79,7 @@ tinyMCE.init({
     <div id="yui-main">
     <div class="yui-b">
 
-[% FOR m IN messages %]
+[% FOREACH m IN messages %]
     <div class="dialog [% m.type %]">
         [% SWITCH m.code %]
         [% CASE 'error_on_update' %]
@@ -202,23 +202,23 @@ tinyMCE.init({
 [% END %]
 
 [% IF op == 'delete_confirm' and not ( items_count or patrons_count )%]
-    <form action="/cgi-bin/koha/admin/branches.pl" method="post">
-        <fieldset>
-            <legend>Confirm deletion of [% library.branchname %] ([% library.branchcode %])?</legend>
+    <div class="dialog alert">
+        <form action="/cgi-bin/koha/admin/branches.pl" method="post">
+            <h3>Are you sure you want to delete [% library.branchname %] ([% library.branchcode %])?</h3>
             <input type="hidden" name="op" value="delete_confirmed" />
             <input type="hidden" name="branchcode" value="[% library.branchcode |html %]" />
             <input type="hidden" name="branchname" value="[% library.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>
+            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
+        </form>
+        <form action="/cgi-bin/koha/admin/branches.pl" method="get">
+            <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
+        </form>
+    </div>
 [% END %]
 
 [% IF op == 'list' %]
     <h3>Libraries</h3>
-    [% IF libraries %]
+    [% IF libraries.count %]
         <table id="branchest">
             <thead>
                 <tr>
@@ -227,8 +227,7 @@ tinyMCE.init({
                     <th>Address</th>
                     <th>Properties</th>
                     <th>IP</th>
-                    <th>&nbsp;</th>
-                    <th>&nbsp;</th>
+                    <th>Actions</th>
                 </tr>
             </thead>
             <tbody>
@@ -269,11 +268,9 @@ tinyMCE.init({
                             [% END %]
                         </td>
                         <td>[% library.branchip %]</td>
-                        <td>
-                            <a href="/cgi-bin/koha/admin/branches.pl?op=add_form&amp;branchcode=[% library.branchcode %]">Edit</a>
-                        </td>
-                        <td>
-                            <a href="/cgi-bin/koha/admin/branches.pl?op=delete_confirm&amp;branchcode=[% library.branchcode %]">Delete</a>
+                        <td class="actions">
+                            <a class="btn btn-mini" href="/cgi-bin/koha/admin/branches.pl?op=add_form&amp;branchcode=[% library.branchcode %]"><i class="fa fa-pencil"></i> Edit</a>
+                            <a class="btn btn-mini" href="/cgi-bin/koha/admin/branches.pl?op=delete_confirm&amp;branchcode=[% library.branchcode %]"><i class="fa fa-trash"></i> Delete</a>
                         </td>
                     </tr>
                 [% END %]
@@ -286,15 +283,14 @@ tinyMCE.init({
     [% IF group_types %]
         [% FOREACH group_type IN group_types %]
             <h3>[% IF group_type.categorytype == 'properties' %]Properties[% ELSIF group_type.categorytype == 'searchdomain' %]Search domain[% END %]</h3>
-            [% IF group_type.categories %]
+            [% IF group_type.categories.size %]
                 <table>
                     <thead>
                         <tr>
                             <th>Name</th>
                             <th>Code</th>
                             <th>Description</th>
-                            <th>&nbsp;</th>
-                            <th>&nbsp;</th>
+                            <th>Actions</th>
                         </tr>
                     </thead>
                     <tbody>
@@ -303,11 +299,9 @@ tinyMCE.init({
                                 <td>[% category.categoryname %]</td>
                                 <td>[% category.categorycode %]</td>
                                 <td>[% category.codedescription %]</td>
-                                <td>
-                                  <a href="/cgi-bin/koha/admin/branches.pl?categorycode=[% category.categorycode %]&amp;op=add_form_category">Edit</a>
-                                </td>
-                                <td>
-                                    <a href="/cgi-bin/koha/admin/branches.pl?categorycode=[% category.categorycode %]&amp;op=delete_confirm_category">Delete</a>
+                                <td class="actions">
+                                  <a class="btn btn-mini" href="/cgi-bin/koha/admin/branches.pl?categorycode=[% category.categorycode %]&amp;op=add_form_category"><i class="fa fa-pencil"></i> Edit</a>
+                                  <a class="btn btn-mini" href="/cgi-bin/koha/admin/branches.pl?categorycode=[% category.categorycode %]&amp;op=delete_confirm_category"><i class="fa fa-trash"></i> Delete</a>
                                 </td>
                             </tr>
                         [% END %]
@@ -329,7 +323,7 @@ tinyMCE.init({
 
 [% IF op == 'add_form_category' %]
     <h3>[% IF category.categorycode %]Edit group [% category.categorycode %][% ELSE %]Add group[% END %]</h3>
-    <form action="/cgi-bin/koha/admin/branches.pl" name="Aform" method="post">
+    <form action="/cgi-bin/koha/admin/branches.pl" name="Aform" method="post" class="validated">
         <input type="hidden" name="op" value="add_validate_category" />
         [% IF category.categorycode %]
             <input type="hidden" name="is_a_modif" value="1" />
@@ -342,13 +336,15 @@ tinyMCE.init({
                         <input type="hidden" name="categorycode" id="categorycode" value="[% category.categorycode |html %]" />
                         [% category.categorycode %]
                     [% ELSE %]
-                        <label for="categorycode">Category code:</label>
-                        <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" />
+                        <label for="categorycode" class="required">Category code:</label>
+                        <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" class="required" required="required" />
+                        <span class="required">Required</span>
                     [% END %]
                 </li>
                 <li>
-                    <label for="categoryname">Name: </label>
-                    <input type="text" name="categoryname" id="categoryname" size="32" maxlength="32" value="[% category.categoryname |html %]" />
+                    <label for="categoryname" class="required">Name: </label>
+                    <input type="text" name="categoryname" id="categoryname" size="32" maxlength="32" value="[% category.categoryname |html %]" class="required" required="required" />
+                    <span class="required">Required</span>
                 </li>
                 <li>
                     <label for="codedescription">Description: </label>
@@ -377,18 +373,23 @@ tinyMCE.init({
                 </li>
             </ol>
         </fieldset>
-        <fieldset class="action"><input type="submit" value="Update" /></fieldset>
+        <fieldset class="action">
+            <input type="submit" value="Submit" />
+            <a href="/cgi-bin/koha/admin/branches.pl" class="cancel">Cancel</a>
+        </fieldset>
     </form>
 [% END %]
 
 [% IF op == 'delete_confirm_category' %]
-    <div class="dialog message">
-    Are you sure you want to delete the group '[% category.codedescription %]' ([% category.categorycode %])?
+    <div class="dialog alert">
+    <h3>Are you sure you want to delete the group '[% category.codedescription %]' ([% category.categorycode %])?</h3>
     <form action="/cgi-bin/koha/admin/branches.pl" method="post">
         <input type="hidden" name="op" value="delete_confirmed_category" />
         <input type="hidden" name="categorycode" value="[% category.categorycode |html %]" />
-        <input type="submit" value="Delete" />
-        <a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a>
+        <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
+    </form>
+    <form action="/cgi-bin/koha/admin/branches.pl" method="get">
+        <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
     </form>
     </div>
 [% END %]