5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Administration › [% IF op =='add_form' %]Desks › [% IF desk.desk_id %] Modify desk[% ELSE %] New desk[% END %][% ELSE %][% IF op == 'delete_confirm' %]Desks › Confirm deletion of desk[% ELSE %] Desks[% END %][% END %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
10 <body id="admin_desks" class="admin">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'desks-admin-search.inc' %]
14 <div id="breadcrumbs">
15 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
16 › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
17 › <a href="/cgi-bin/koha/admin/desks.pl">Desks</a>
18 [% IF op == 'add_form' %]
19 › [% IF desk.desk_id %]Modify[% ELSE %]New[% END %] Desk
20 [% ELSIF op == 'delete_confirm' %]
21 › Confirm deletion of desk
25 <div class="main container-fluid">
27 <div class="col-sm-10 col-sm-push-2">
30 [% FOR m IN messages %]
31 <div class="dialog [% m.type | html %]">
33 [% CASE 'error_on_update' %]
34 An error occurred when updating this desk. Perhaps it already exists.
35 [% CASE 'error_on_insert' %]
36 An error occurred when adding this desk. The desk ID might already exist.
37 [% CASE 'error_on_delete' %]
38 An error occurred when deleting this desk. Check the logs.
39 [% CASE 'success_on_update' %]
40 Desk updated successfully.
41 [% CASE 'success_on_insert' %]
42 Desk added successfully.
43 [% CASE 'success_on_delete' %]
44 Desk deleted successfully.
45 [% CASE 'already_exists' %]
46 This desk already exists.
53 [% IF op == 'add_form' %]
55 <h1>Modify a desk</h1>
60 <form action="/cgi-bin/koha/admin/desks.pl" name="Aform" method="post" class="validated">
61 <input type="hidden" name="op" value="add_validate" />
62 <input type="hidden" name="desk_id" value="[% desk.desk_id | html %]" />
64 <fieldset class="rows">
67 <li><span class="label">Desk ID: </span>[% desk.desk_id | html %]</li>
70 <label for="desk_name" class="required">Desk: </label>
71 <input type="text" name="desk_name" id="desk_name" size="80" maxlength="100" value="[% desk.desk_name | html %]" required="required" class="required" /> <span class="required">Required</span>
74 <label for="branchcode" class="required">Library: </label>
75 <select id="branchcode" name="branchcode" required="required">
76 <option value=""></option>
77 [% FOREACH branch IN branches %]
78 [% IF (Branches.GetLoggedInBranchcode == branch.branchcode) %]
79 <option value="[% branch.branchcode|html %]" selected="selected">[% branch.branchname|html %]</option>
81 <option value="[% branch.branchcode|html %]">[% branch.branchname|html %]</option>
90 <fieldset class="action">
91 <input type="submit" value="Submit" />
92 <a class="cancel" href="/cgi-bin/koha/admin/desks.pl">Cancel</a>
97 [% IF op == 'delete_confirm' %]
98 <div class="dialog alert">
99 <h3>Delete desk "[% desk.desk_name | html %]?"</h3>
102 <td>[% desk.desk_id | html %]</td>
105 <td>[% desk.desk_name | html %]</td>
108 <td>[% Branches.GetName( desk.branchcode ) | html %]</td>
111 <form action="/cgi-bin/koha/admin/desks.pl" method="post">
112 <input type="hidden" name="op" value="delete_confirmed" />
113 <input type="hidden" name="desk_id" value="[% desk.desk_id | html %]" />
114 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
116 <form action="/cgi-bin/koha/admin/desks.pl" method="get">
117 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
122 [% IF op == 'list' %]
124 <div id="toolbar" class="btn-toolbar">
125 <a class="btn btn-default" id="newdesk" href="/cgi-bin/koha/admin/desks.pl?op=add_form"><i class="fa fa-plus"></i> New desk</a>
130 Searching: [% searchfield | html %]
134 <table id="table_desks">
144 [% FOREACH desk IN desks %]
146 <td>[% desk.desk_id | html %]</td>
147 <td>[% desk.desk_name | html %]</td>
148 <td>[% Branches.GetName( desk.branchcode ) | html %]</td>
150 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/desks.pl?op=add_form&desk_id=[% desk.desk_id | html %]"><i class="fa fa-pencil"></i> Edit</a>
151 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/desks.pl?op=delete_confirm&desk_id=[% desk.desk_id | html %]"><i class="fa fa-trash"></i> Delete</a>
158 <div class="dialog message">
159 There are no desks defined. <a href="/cgi-bin/koha/admin/desks.pl?op=add_form">Create a new desk</a>.
165 </div> <!-- /.col-sm-10.col-sm-push-2 -->
167 <div class="col-sm-2 col-sm-pull-10">
169 [% INCLUDE 'admin-menu.inc' %]
171 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
172 </div> <!-- /.row -->
174 [% MACRO jsinclude BLOCK %]
175 [% Asset.js("js/admin-menu.js") | $raw %]
176 [% INCLUDE 'datatables.inc' %]
178 $(document).ready(function() {
179 $("#table_desks").dataTable($.extend(true, {}, dataTablesDefaults, {
181 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
183 "aaSorting": [[ 1, "asc" ]],
184 "iDisplayLength": 10,
185 "sPaginationType": "full_numbers"
190 [% INCLUDE 'intranet-bottom.inc' %]