0bb9bec3e7bd584f7a70be9c0b1942b0408f9d38
[working/Evergreen.git] / Open-ILS / src / templates / staff / admin / local / actor / closed_dates.tt2
1 [%
2   WRAPPER 'staff/base.tt2';
3   ctx.page_type = l('Closed Dates');
4   ctx.page_app = 'egAdminClosed';
5   ctx.page_ctrl = 'ClosedDates';
6 %]
7
8 [% BLOCK APP_JS %]
9 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/grid.js"></script>
10 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/ui.js"></script>
11 <script src="[% ctx.media_prefix %]/js/ui/default/staff/admin/local/actor/closed_dates.js"></script>
12 <link rel="stylesheet" href="[% ctx.base_path %]/staff/css/admin.css" />
13 <script>
14   angular.module('egCoreMod').run(['egStrings', function(s) {
15     s.CONFIRM_CLOSED_DELETE = "[% l('Confirm closed date deletion') %]";
16     s.CONFIRM_CLOSED_DELETE_BODY = '[% l('Delete closing "{{reason}}" for {{org.name()}}?') %]';
17     s.POSSIBLE_EMERGENCY_CLOSING = "[% l('Possible Emergency Closing') %]";
18     s.EMERGENCY_CLOSING = "[% l('Emergency Closing') %]";
19     s.CREATING_CLOSINGS = "[% l('Creating closings') %]";
20     s.PROCESSING_EMERGENCY = "[% l('Processing Emergency Closing') %]";
21   }]);
22 </script>
23 [% END %]
24
25 <div class="container-fluid" style="text-align:center">
26   <div class="alert alert-info alert-less-pad strong-text-2">
27     [% l('Closed Dates Editor') %]
28   </div>
29 </div>
30
31 <div class="row">
32   <div class="col-md-4">
33     <div class="form-group">
34       <label>[% l('Edit Closed Dates for: ') %]&nbsp; </label>
35       <eg-org-selector onchange="org_changed" 
36         selected="context_org"></eg-org-selector>
37     </div>
38   </div>
39   <div class="col-md-4">
40   </div>
41   <div class="col-md-1">
42     <label>[% l('Date Filter: ') %]&nbsp; </label>
43   </div>
44   <div class="col-md-3">
45     <eg-date-input ng-model="date_filter"></eg-date-input>
46   </div>
47 </div>
48
49 <eg-grid
50     id-field="id"
51     grid-controls="gridControls"
52     items-provider="gridDataProvider"
53     features="-multiselect"
54     persist-key="admin.local.actor.closed_dates"
55     dateformat="{{$root.egDateAndTimeFormat}}">
56    
57     <eg-grid-menu-item standalone="true" label="[% l('Add closing') %]" handler="create_aoucd"></eg-grid-action> 
58     <eg-grid-menu-item standalone="true" label="[% l('Refresh') %]" handler="refresh_page"></eg-grid-action> 
59
60     <eg-grid-action label="[% l('Edit closing') %]" handler="update_aoucd"></eg-grid-action> 
61     <eg-grid-action label="[% l('Delete closing') %]" handler="delete_aoucd"></eg-grid-action> 
62
63     <eg-grid-field label="[% l('Closing Start') %]" flex="1" path="close_start" visible>
64       {{item.close_start | egOrgDateInContext:item._format:item.org_unit:item._duration}}
65     </eg-grid-field>
66     <eg-grid-field label="[% l('Closing End') %]" flex="1" path="close_end" visible>
67       {{item.close_end | egOrgDateInContext:item._format:item.org_unit:item._duration}}
68     </eg-grid-field>
69     <eg-grid-field label="[% l('Reason for Closing') %]" flex="2" path="reason" visible></eg-grid-field>
70     <eg-grid-field label="[% l('Emergency Closing Processing Summary') %]" flex="2" path="emergency_closing.status" visible>
71       <span class="{{item._text_class}}">
72         [% l('Circulations: ') %]{{item.emergency_closing.status.circulations_complete}} / {{item.emergency_closing.status.circulations}} |
73         [% l('Holds: ') %]{{item.emergency_closing.status.holds_complete}} / {{item.emergency_closing.status.holds}} |
74         [% l('Reservations:') %]{{item.emergency_closing.status.reservations_complete}} / {{item.emergency_closing.status.reservations}}
75       </span>
76     </eg-grid-field>
77     <eg-grid-field label="[% l('Full Day') %]" path="full_day" datatype="bool" hidden></eg-grid-field>
78     <eg-grid-field label="[% l('Multiple Days') %]" path="multi_day" datatype="bool" hidden></eg-grid-field>
79     <eg-grid-field label="[% l('Emergency Closing Circulations') %]" path="emergency_closing.status.circulations" hidden>
80     <eg-grid-field label="[% l('Emergency Closing Holds') %]" path="emergency_closing.status.holds" hidden>
81     <eg-grid-field label="[% l('Emergency Closing Reservations') %]" path="emergency_closing.status.reservations" hidden>
82     <eg-grid-field label="[% l('Emergency Closing Circulations Completed') %]" path="emergency_closing.status.circulations_complete" hidden>
83     <eg-grid-field label="[% l('Emergency Closing Holds Completed') %]" path="emergency_closing.status.holds_complete" hidden>
84     <eg-grid-field label="[% l('Emergency Closing Reservations Completed') %]" path="emergency_closing.status.reservations_complete" hidden>
85 </eg-grid>
86
87 [% END %]