5 [% INCLUDE 'doc-head-open.inc' %]
7 [% IF op =='add_form' %]
12 [% END %] › [% ELSE %]
13 [% IF op == 'delete_confirm' %]
14 Confirm deletion of desk › [% END %]
16 Desks › Administration › Koha
18 [% INCLUDE 'doc-head-close.inc' %]
21 <body id="admin_desks" class="admin">
22 [% WRAPPER 'header.inc' %]
23 [% INCLUDE 'desks-admin-search.inc' %]
26 [% WRAPPER 'sub-header.inc' %]
27 [% WRAPPER breadcrumbs %]
28 [% WRAPPER breadcrumb_item %]
29 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
32 [% IF op == 'add_form' || op == 'delete_confirm' %]
33 [% WRAPPER breadcrumb_item %]
34 <a href="/cgi-bin/koha/admin/desks.pl">Desks</a>
37 [% WRAPPER breadcrumb_item bc_active = 1 %]
42 [% IF op == 'add_form' %]
43 [% WRAPPER breadcrumb_item bc_active = 1 %]
45 <span>Modify desk</span>
51 [% ELSIF op == 'delete_confirm' %]
52 [% WRAPPER breadcrumb_item bc_active = 1 %]
53 <span>Confirm deletion of desk</span>
57 [% END #/ WRAPPER breadcrumbs %]
58 [% END #/ WRAPPER sub-header.inc %]
60 <div class="main container-fluid">
62 <div class="col-sm-10 col-sm-push-2">
65 [% FOR m IN messages %]
66 <div class="dialog [% m.type | html %]">
68 [% CASE 'error_on_update' %]
69 <span>An error occurred when updating this desk. Perhaps it already exists</span>
70 [% CASE 'error_on_insert' %]
71 <span>An error occurred when adding this desk. The desk ID might already exist</span>
72 [% CASE 'error_on_delete' %]
73 <span>An error occurred when deleting this desk. Check the logs</span>
74 [% CASE 'success_on_update' %]
75 <span>Desk updated successfully</span>
76 [% CASE 'success_on_insert' %]
77 <span>Desk added successfully</span>
78 [% CASE 'success_on_delete' %]
79 <span>Desk deleted successfully</span>
80 [% CASE 'already_exists' %]
81 <span>This desk already exists</span>
83 <span>[% m.code | html %]</span>
88 [% IF op == 'add_form' %]
90 <h1>Modify a desk</h1>
95 <form action="/cgi-bin/koha/admin/desks.pl" name="Aform" method="post" class="validated">
96 <input type="hidden" name="op" value="add_validate" />
97 <input type="hidden" name="desk_id" value="[% desk.desk_id | html %]" />
99 <fieldset class="rows">
102 <li><span class="label">Desk ID: </span>[% desk.desk_id | html %]</li>
105 <label for="desk_name" class="required">Desk: </label>
106 <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>
109 <label for="branchcode" class="required">Library: </label>
110 <select id="branchcode" name="branchcode" required="required">
111 <option value=""></option>
112 [% FOREACH branch IN branches %]
114 [% IF (desk.branchcode == branch.branchcode) %]
115 <option value="[% branch.branchcode|html %]" selected="selected">[% branch.branchname|html %]</option>
118 [% IF (Branches.GetLoggedInBranchcode == branch.branchcode) %]
119 <option value="[% branch.branchcode|html %]" selected="selected">[% branch.branchname|html %]</option>
121 <option value="[% branch.branchcode|html %]">[% branch.branchname|html %]</option>
130 <fieldset class="action">
131 <input type="submit" class="btn btn-primary" value="Submit" />
132 <a class="cancel" href="/cgi-bin/koha/admin/desks.pl">Cancel</a>
137 [% IF op == 'delete_confirm' %]
138 <div class="dialog alert">
139 <h1>Delete desk "[% desk.desk_name | html %]"?</h1>
142 <td>[% desk.desk_id | html %]</td>
145 <td>[% desk.desk_name | html %]</td>
148 <td>[% Branches.GetName( desk.branchcode ) | html %]</td>
151 <form action="/cgi-bin/koha/admin/desks.pl" method="post">
152 <input type="hidden" name="op" value="delete_confirmed" />
153 <input type="hidden" name="desk_id" value="[% desk.desk_id | html %]" />
154 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
156 <form action="/cgi-bin/koha/admin/desks.pl" method="get">
157 <button type="submit" class="deny"><i class="fa fa-fw fa-times"></i> No, do not delete</button>
162 [% IF op == 'list' %]
164 <div id="toolbar" class="btn-toolbar">
165 <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>
170 <span>Searching: [% searchfield | html %]</span>
174 <div class="page-section">
175 <table id="table_desks">
181 <th class="NoSort noExport">Action</th>
185 [% FOREACH desk IN desks %]
187 <td>[% desk.desk_id | html %]</td>
188 <td>[% desk.desk_name | html %]</td>
189 <td>[% Branches.GetName( desk.branchcode ) | html %]</td>
191 <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-alt"></i> Edit</a>
192 <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-can"></i> Delete</a>
198 </div> <!-- /.page-section -->
200 <div class="dialog message">
201 There are no desks defined. <a href="/cgi-bin/koha/admin/desks.pl?op=add_form">Create a new desk</a>.
207 </div> <!-- /.col-sm-10.col-sm-push-2 -->
209 <div class="col-sm-2 col-sm-pull-10">
211 [% INCLUDE 'admin-menu.inc' %]
213 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
214 </div> <!-- /.row -->
216 [% MACRO jsinclude BLOCK %]
217 [% Asset.js("js/admin-menu.js") | $raw %]
218 [% INCLUDE 'datatables.inc' %]
219 [% INCLUDE 'columns_settings.inc' %]
221 $(document).ready(function() {
222 KohaTable("table_desks", {
223 "order": [[ 1, "asc" ]]
228 [% INCLUDE 'intranet-bottom.inc' %]