|
Lines 1-9
Link Here
|
| 1 |
[% USE raw %] |
1 |
[% USE raw %] |
| 2 |
[% USE Asset %] |
2 |
[% USE Asset %] |
| 3 |
[% USE Branches %] |
3 |
[% USE Branches %] |
|
|
4 |
[% PROCESS 'i18n.inc' %] |
| 4 |
[% SET footerjs = 1 %] |
5 |
[% SET footerjs = 1 %] |
| 5 |
[% INCLUDE 'doc-head-open.inc' %] |
6 |
[% INCLUDE 'doc-head-open.inc' %] |
| 6 |
<title>[% Branches.GetName( branch ) | html %] calendar › Tools › Koha</title> |
7 |
<title |
|
|
8 |
>[% FILTER collapse %] |
| 9 |
[% tx("{library} calendar", { library = Branches.GetName( branch ) }) | html %] |
| 10 |
› [% t("Tools") | html %] › [% t("Koha") | html %] |
| 11 |
[% END %]</title |
| 12 |
> |
| 7 |
[% INCLUDE 'doc-head-close.inc' %] |
13 |
[% INCLUDE 'doc-head-close.inc' %] |
| 8 |
[% Asset.css("css/calendar.css") | $raw %] |
14 |
[% Asset.css("css/calendar.css") | $raw %] |
| 9 |
</head> |
15 |
</head> |
|
Lines 19-383
Link Here
|
| 19 |
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> |
25 |
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> |
| 20 |
[% END %] |
26 |
[% END %] |
| 21 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
27 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
| 22 |
<span>[% Branches.GetName( branch ) | html %] calendar</span> |
28 |
[% tx("{library} calendar", { library = Branches.GetName( branch ) }) | html %] |
| 23 |
[% END %] |
29 |
[% END %] |
| 24 |
[% END #/ WRAPPER breadcrumbs %] |
30 |
[% END #/ WRAPPER breadcrumbs %] |
| 25 |
[% END #/ WRAPPER sub-header.inc %] |
31 |
[% END #/ WRAPPER sub-header.inc %] |
| 26 |
|
32 |
|
| 27 |
<div id="main" class="main container-fluid"> |
33 |
[% WRAPPER 'main-container.inc' aside='tools-menu' %] |
| 28 |
<div class="row"> |
34 |
[% IF no_branch_selected %] |
| 29 |
<div class="col-sm-10 col-sm-push-2"> |
35 |
<div class="dialog alert"> |
| 30 |
<main> |
36 |
<strong>No library set!</strong> |
| 31 |
[% IF no_branch_selected %] |
37 |
</div> |
| 32 |
<div class="dialog alert"> |
38 |
[% END %] |
| 33 |
<strong>No library set!</strong> |
39 |
|
| 34 |
</div> |
40 |
[% UNLESS datesInfos %] |
| 35 |
[% END %] |
41 |
<div class="dialog alert"> |
| 36 |
|
42 |
<strong>Error!</strong> You have to run add_days_discrete_calendar.pl in order to use Discrete Calendar. |
| 37 |
[% UNLESS datesInfos %] |
43 |
</div> |
| 38 |
<div class="dialog alert"> |
44 |
[% END %] |
| 39 |
<strong>Error!</strong> You have to run add_days_discrete_calendar.pl in order to use Discrete Calendar. |
45 |
|
| 40 |
</div> |
46 |
[% IF date_format_error %] |
| 41 |
[% END %] |
47 |
<div class="dialog alert"> |
|
|
48 |
<strong>Error!</strong> Date format error. Please try again. |
| 49 |
</div> |
| 50 |
[% END %] |
| 51 |
|
| 52 |
[% IF cannot_edit_past_dates %] |
| 53 |
<div class="alert alert-danger"> |
| 54 |
<strong>Error!</strong> You cannot edit the past. The date '[% error_date | html %]' was out of range for the requested action. |
| 55 |
</div> |
| 56 |
[% END %] |
| 57 |
|
| 58 |
<h1>[% tx("{library} calendar", { library = Branches.GetName( branch ) }) | html %]</h1> |
| 42 |
|
59 |
|
| 43 |
[% IF date_format_error %] |
60 |
<div class="row"> |
| 44 |
<div class="dialog alert"> |
61 |
<div class="col-sm-6"> |
| 45 |
<strong>Error!</strong> Date format error. Please try again. |
62 |
<div class="page-section"> |
| 46 |
</div> |
63 |
<label for="branch">Define the holidays for:</label> |
| 47 |
[% END %] |
64 |
<form id="copyCalendar-form" method="post"> |
| 48 |
|
65 |
[% INCLUDE 'csrf-token.inc' %] |
| 49 |
[% IF cannot_edit_past_dates %] |
66 |
<select id="branch" name="branch"> |
| 50 |
<div class="alert alert-danger"> |
67 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %] |
| 51 |
<strong>Error!</strong> You cannot edit the past. The date '[% error_date | html %]' was out of range for the requested action. |
68 |
</select> |
| 52 |
</div> |
69 |
<label for="newBranch">Copy calendar to</label> |
| 53 |
[% END %] |
70 |
<select id='newBranch' name ='newBranch'> |
| 54 |
|
71 |
<option value=""></option> |
| 55 |
<h1>[% Branches.GetName( branch ) | html %] calendar</h1> |
72 |
[% FOREACH l IN Branches.all() %] |
| 56 |
|
73 |
[% UNLESS branch == l.branchcode %] |
| 57 |
<div class="row"> |
74 |
<option value="[% l.branchcode | html %]">[% l.branchname | html %]</option> |
| 58 |
<div class="col-sm-6"> |
75 |
[% END %] |
| 59 |
<div class="page-section"> |
76 |
[% END %] |
| 60 |
<label for="branch">Define the holidays for:</label> |
77 |
</select> |
| 61 |
<form id="copyCalendar-form" method="post"> |
78 |
<input type="hidden" name="action" value="copyBranch" /> |
| 62 |
<select id="branch" name="branch"> |
79 |
<input type="submit" class="btn btn-primary" value="Clone"> |
| 63 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %] |
80 |
</form> |
| 64 |
</select> |
81 |
|
| 65 |
Copy calendar to |
82 |
<h3>Calendar information</h3> |
| 66 |
<select id='newBranch' name ='newBranch'> |
83 |
|
| 67 |
<option value=""></option> |
84 |
<div class="calendar"> |
| 68 |
[% FOREACH l IN Branches.all() %] |
85 |
<span id="calendar-anchor"></span> |
| 69 |
[% UNLESS branch == l.branchcode %] |
86 |
|
| 70 |
<option value="[% l.branchcode | html %]">[% l.branchname | html %]</option> |
87 |
<!-- ***************************** Panel to deal with new holidays ********************** --> |
|
|
88 |
<div class="panel newHoliday" id="newHoliday"> |
| 89 |
<form id="newHoliday-form" method="post"> |
| 90 |
[% INCLUDE 'csrf-token.inc' %] |
| 91 |
<fieldset class="brief"> |
| 92 |
<h3>Edit date details</h3> |
| 93 |
<span id="holtype"></span> |
| 94 |
<ol> |
| 95 |
<li> |
| 96 |
<strong>Library:</strong> |
| 97 |
<span id="newBranchNameOutput"></span> |
| 98 |
<input type="hidden" id="branch" name="branch" value="[% branch | html %]" /> |
| 99 |
</li> |
| 100 |
<li> |
| 101 |
<strong>From date:</strong> |
| 102 |
<span id="newDaynameOutput"></span>, |
| 103 |
|
| 104 |
[% IF ( dateformat == "us" ) %] |
| 105 |
<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>/<span id="newYearOutput"></span> |
| 106 |
[% ELSIF ( dateformat == "metric" ) %] |
| 107 |
<span id="newDayOutput"></span>/<span id="newMonthOutput"></span>/<span id="newYearOutput"></span> |
| 108 |
[% ELSIF ( dateformat == "dmydot" ) %] |
| 109 |
<span id="newDayOutput"></span>.<span id="newMonthOutput"></span>.<span id="newYearOutput"></span> |
| 110 |
[% ELSE %] |
| 111 |
<span id="newYearOutput"></span>/<span id="newMonthOutput"></span>/<span id="newDayOutput"></span> |
| 71 |
[% END %] |
112 |
[% END %] |
| 72 |
[% END %] |
113 |
|
| 73 |
</select> |
114 |
<input type="hidden" id="newDayname" name="showDayname" /> |
| 74 |
<input type="hidden" name="action" value="copyBranch" /> |
115 |
<input type="hidden" id="Day" name="Day" /> |
| 75 |
<input type="submit" value="Clone"> |
116 |
<input type="hidden" id="Month" name="Month" /> |
| 76 |
</form> |
117 |
<input type="hidden" id="Year" name="Year" /> |
| 77 |
|
118 |
</li> |
| 78 |
<h3>Calendar information</h3> |
119 |
<li class="dateinsert"> |
| 79 |
|
120 |
<strong>To date:</strong> |
| 80 |
<div class="calendar"> |
121 |
<input type="text" id="to_date_flatpickr" size="20" /> |
| 81 |
<span id="calendar-anchor"></span> |
122 |
</li> |
| 82 |
|
123 |
<li> |
| 83 |
<!-- ***************************** Panel to deal with new holidays ********************** --> |
124 |
<label for="title">Title: </label> |
| 84 |
<div class="panel newHoliday" id="newHoliday"> |
125 |
<input type="text" name="Title" id="title" size="35" /> |
| 85 |
<form id="newHoliday-form" method="post"> |
126 |
</li> |
| 86 |
<fieldset class="brief"> |
127 |
<li> |
| 87 |
<h3>Edit date details</h3> |
128 |
<label for="description">Description: </label> |
| 88 |
<span id="holtype"></span> |
129 |
<textarea id="description" name="description" rows="2" cols="40"></textarea> |
|
|
130 |
</li> |
| 131 |
<li id="holidayType"> |
| 132 |
<label for="holidayType">Date type</label> |
| 133 |
<select name ='holidayType'> |
| 134 |
<option value="empty"></option> |
| 135 |
<option value="none">Working day</option> |
| 136 |
<option value="E">Unique holiday</option> |
| 137 |
<option value="W">Weekly holiday</option> |
| 138 |
<option value="R">Repeatable holiday</option> |
| 139 |
<option value="F">Floating holiday</option> |
| 140 |
<option value="N" disabled>Need validation</option> |
| 141 |
</select> |
| 142 |
<a href="#" class="helptext">[?]</a> |
| 143 |
<div class="hint"> |
| 89 |
<ol> |
144 |
<ol> |
| 90 |
<li> |
145 |
<li><strong>Working day:</strong> the library is open on that day.</li> |
| 91 |
<strong>Library:</strong> |
146 |
<li><strong>Unique holiday:</strong> make a single holiday. For example, selecting August 1, 2012 will make it a holiday, but will not affect August 1 in other years.</li> |
| 92 |
<span id="newBranchNameOutput"></span> |
147 |
<li><strong>Weekly holiday:</strong> make this weekday a holiday, every week. For example, if your library is closed on Saturdays, use this option to make every Saturday a holiday.</li> |
| 93 |
<input type="hidden" id="branch" name="branch" value="[% branch | html %]" /> |
148 |
<li><strong>Repeatable holiday:</strong> this will take this day and month as a reference to make it a holiday. Through this option, you can repeat this rule for every year. For example, selecting August 1 will make August 1 a holiday every year.</li> |
| 94 |
</li> |
149 |
<li><strong>Floating holiday:</strong> this will take this day and month as a reference to make it a floating holiday. Through this option, you can add a holiday that repeats every year but not necessarily on the exact same day. On subsequent years the date will need validation.</li> |
| 95 |
<li> |
150 |
<li><strong>Need validation:</strong> this holiday has been added automatically, but needs to be validated.</li> |
| 96 |
<strong>From date:</strong> |
|
|
| 97 |
<span id="newDaynameOutput"></span>, |
| 98 |
|
| 99 |
[% IF ( dateformat == "us" ) %] |
| 100 |
<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>/<span id="newYearOutput"></span> |
| 101 |
[% ELSIF ( dateformat == "metric" ) %] |
| 102 |
<span id="newDayOutput"></span>/<span id="newMonthOutput"></span>/<span id="newYearOutput"></span> |
| 103 |
[% ELSIF ( dateformat == "dmydot" ) %] |
| 104 |
<span id="newDayOutput"></span>.<span id="newMonthOutput"></span>.<span id="newYearOutput"></span> |
| 105 |
[% ELSE %] |
| 106 |
<span id="newYearOutput"></span>/<span id="newMonthOutput"></span>/<span id="newDayOutput"></span> |
| 107 |
[% END %] |
| 108 |
|
| 109 |
<input type="hidden" id="newDayname" name="showDayname" /> |
| 110 |
<input type="hidden" id="Day" name="Day" /> |
| 111 |
<input type="hidden" id="Month" name="Month" /> |
| 112 |
<input type="hidden" id="Year" name="Year" /> |
| 113 |
</li> |
| 114 |
<li class="dateinsert"> |
| 115 |
<strong>To date:</strong> |
| 116 |
<input type="text" id="to_date_flatpickr" size="20" /> |
| 117 |
</li> |
| 118 |
<li> |
| 119 |
<label for="title">Title: </label> |
| 120 |
<input type="text" name="Title" id="title" size="35" /> |
| 121 |
</li> |
| 122 |
<li> |
| 123 |
<label for="description">Description: </label> |
| 124 |
<textarea id="description" name="description" rows="2" cols="40"></textarea> |
| 125 |
</li> |
| 126 |
<li id="holidayType"> |
| 127 |
<label for="holidayType">Date type</label> |
| 128 |
<select name ='holidayType'> |
| 129 |
<option value="empty"></option> |
| 130 |
<option value="none">Working day</option> |
| 131 |
<option value="E">Unique holiday</option> |
| 132 |
<option value="W">Weekly holiday</option> |
| 133 |
<option value="R">Repeatable holiday</option> |
| 134 |
<option value="F">Floating holiday</option> |
| 135 |
<option value="N" disabled>Need validation</option> |
| 136 |
</select> |
| 137 |
<a href="#" class="helptext">[?]</a> |
| 138 |
<div class="hint"> |
| 139 |
<ol> |
| 140 |
<li><strong>Working day:</strong> the library is open on that day.</li> |
| 141 |
<li><strong>Unique holiday:</strong> make a single holiday. For example, selecting August 1, 2012 will make it a holiday, but will not affect August 1 in other years.</li> |
| 142 |
<li><strong>Weekly holiday:</strong> make this weekday a holiday, every week. For example, if your library is closed on Saturdays, use this option to make every Saturday a holiday.</li> |
| 143 |
<li><strong>Repeatable holiday:</strong> this will take this day and month as a reference to make it a holiday. Through this option, you can repeat this rule for every year. For example, selecting August 1 will make August 1 a holiday every year.</li> |
| 144 |
<li><strong>Floating holiday:</strong> this will take this day and month as a reference to make it a floating holiday. Through this option, you can add a holiday that repeats every year but not necessarily on the exact same day. On subsequent years the date will need validation.</li> |
| 145 |
<li><strong>Need validation:</strong> this holiday has been added automatically, but needs to be validated.</li> |
| 146 |
</ol> |
| 147 |
</div> |
| 148 |
</li> |
| 149 |
<li id="days_of_week"> |
| 150 |
<label for="day_of_week">Week day</label> |
| 151 |
<select name ='day_of_week'> |
| 152 |
<option value="everyday">Everyday</option> |
| 153 |
<option value="1">Sundays</option> |
| 154 |
<option value="2">Mondays</option> |
| 155 |
<option value="3">Tuesdays</option> |
| 156 |
<option value="4">Wednesdays</option> |
| 157 |
<option value="5">Thursdays</option> |
| 158 |
<option value="6">Fridays</option> |
| 159 |
<option value="7">Saturdays</option> |
| 160 |
</select> |
| 161 |
</li> |
| 162 |
<li class="radio" id="deleteType"> |
| 163 |
<input type="checkbox" name="deleteType" id="deleteType_checkbox" value="1" ><label for="deleteType_checkbox"> Delete this type</label> |
| 164 |
<a href="#" class="helptext">[?]</a> |
| 165 |
<div class="hint">Remove all repeated or weekly holidays of the selected date or week day <br> if working day is selected.</div> |
| 166 |
</li> |
| 167 |
<li> |
| 168 |
<label for="openHour">Open hours: </label><input type="text" name="openHour" id='openHour' /> |
| 169 |
</li> |
| 170 |
<li> |
| 171 |
<label for="closeHour">Close hours: </label><input type="text" name="closeHour" id='closeHour' /> |
| 172 |
</li> |
| 173 |
<li class="radio"> |
| 174 |
<input type="radio" name="action" id="EditRadioButton" value="edit" checked/> |
| 175 |
<label for="EditRadioButton">Edit selected dates</label> |
| 176 |
</li> |
| 177 |
<li class="radio"> |
| 178 |
<input type="radio" name="action" id="CopyRadioButton" value="copyDates" /> |
| 179 |
<label for="CopyRadioButton">Copy to different dates</label> |
| 180 |
</li> |
| 181 |
<li class="CopyDatePanel"> |
| 182 |
<label>From:</label> |
| 183 |
<input type="text" id="copyto_from_flatpickr" size="20"/> |
| 184 |
<label>To:</label> |
| 185 |
<input type="text" id="copyto_to_flatpickr" size="20"/> |
| 186 |
</li> |
| 187 |
<li class="checkbox"> |
| 188 |
<input type="checkbox" name="all_branches" id="all_branches" /> |
| 189 |
<label for="all_branches">Copy to all libraries</label>. |
| 190 |
<a href="#" class="helptext">[?]</a> |
| 191 |
<div class="hint">If checked, this holiday will be copied to all libraries.</div> |
| 192 |
</li> |
| 193 |
</ol> |
151 |
</ol> |
| 194 |
|
152 |
</div> |
| 195 |
<!-- These yyyy-mm-dd --> |
|
|
| 196 |
<input type="hidden" name="from_date" id='from_date'> |
| 197 |
<input type="hidden" name="to_date" id='to_date'> |
| 198 |
<input type="hidden" name="copyto_from" id='copyto_from'> |
| 199 |
<input type="hidden" name="copyto_to" id='copyto_to'> |
| 200 |
<input type="hidden" name="daysnumber" id='daysnumber'> |
| 201 |
<input type="hidden" name="local_today" id='local_today'> |
| 202 |
|
| 203 |
<fieldset class="action"> |
| 204 |
<input type="submit" name="submit" value="Save" /> |
| 205 |
<a href="#" class="cancel hidePanel newHoliday">Cancel</a> |
| 206 |
</fieldset> |
| 207 |
</fieldset> |
| 208 |
</form> |
| 209 |
</div> |
| 210 |
</div> |
| 211 |
</div> <!-- /.page-section --> |
| 212 |
</div> <!-- /.col-sm-6 --> |
| 213 |
|
| 214 |
<div class="col-sm-6"> |
| 215 |
<div class="page-section"> |
| 216 |
<div class="help"> |
| 217 |
<h4>Hints</h4> |
| 218 |
<ul> |
| 219 |
<li>Search in the calendar the day you want to set as holiday.</li> |
| 220 |
<li>Click the date to add or edit a holiday.</li> |
| 221 |
<li>Enter a title and description for the holiday.</li> |
| 222 |
<li>Specify how the holiday should repeat.</li> |
| 223 |
<li>Click Save to finish.</li> |
| 224 |
<li>PS: |
| 225 |
<ul> |
| 226 |
<li>Past dates cannot be changed</li> |
| 227 |
<li>Weekly holidays change open/close hours for all the days affected unless inputs are empty</li> |
| 228 |
</ul> |
| 229 |
</li> |
153 |
</li> |
| 230 |
</ul> |
154 |
<li id="days_of_week"> |
| 231 |
<h4>Key</h4> |
155 |
<label for="day_of_week">Week day</label> |
| 232 |
<p> |
156 |
<select name ='day_of_week'> |
| 233 |
<span class="key normalday">Working day</span> |
157 |
<option value="everyday">Everyday</option> |
| 234 |
<span class="key holiday">Unique holiday</span> |
158 |
<option value="1">Sundays</option> |
| 235 |
<span class="key repeatableweekly">Holiday repeating weekly</span> |
159 |
<option value="2">Mondays</option> |
| 236 |
<span class="key repeatableyearly">Holiday repeating yearly</span> |
160 |
<option value="3">Tuesdays</option> |
| 237 |
<span class="key float">Floating holiday</span> |
161 |
<option value="4">Wednesdays</option> |
| 238 |
<span class="key exception">Need validation</span> |
162 |
<option value="5">Thursdays</option> |
| 239 |
</p> |
163 |
<option value="6">Fridays</option> |
| 240 |
</div> <!-- /#help --> |
164 |
<option value="7">Saturdays</option> |
| 241 |
|
165 |
</select> |
| 242 |
<div id="holiday-list"> |
166 |
</li> |
| 243 |
[% IF ( NEED_VALIDATION_HOLIDAYS ) %] |
167 |
<li class="radio" id="deleteType"> |
| 244 |
<h3>Need validation holidays</h3> |
168 |
<input type="checkbox" name="deleteType" id="deleteType_checkbox" value="1" ><label for="deleteType_checkbox"> Delete this type</label> |
| 245 |
<table id="holidayexceptions" class="dataTable no-footer"> |
169 |
<a href="#" class="helptext">[?]</a> |
| 246 |
<thead> |
170 |
<div class="hint">Remove all repeated or weekly holidays of the selected date or week day <br> if working day is selected.</div> |
| 247 |
<tr> |
171 |
</li> |
| 248 |
<th class="exception">Date</th> |
172 |
<li> |
| 249 |
<th class="exception">Title</th> |
173 |
<label for="openHour">Open hours: </label><input type="text" name="openHour" id='openHour' /> |
| 250 |
<th class="exception">Description</th> |
174 |
</li> |
| 251 |
</tr> |
175 |
<li> |
| 252 |
</thead> |
176 |
<label for="closeHour">Close hours: </label><input type="text" name="closeHour" id='closeHour' /> |
| 253 |
<tbody> |
177 |
</li> |
| 254 |
[% FOREACH need_validation_holiday IN NEED_VALIDATION_HOLIDAYS %] |
178 |
<li class="radio"> |
| 255 |
<tr> |
179 |
<input type="radio" name="action" id="EditRadioButton" value="edit" checked/> |
| 256 |
<td><a href="#main" onclick="go_to_date('[% need_validation_holiday.date | html %]')"><span title="[% need_validation_holiday.DATE_SORT | html %]">[% need_validation_holiday.outputdate | html %]</span></a></td> |
180 |
<label for="EditRadioButton">Edit selected dates</label> |
| 257 |
<td>[% need_validation_holiday.note | html %]</td> |
181 |
</li> |
| 258 |
<td>[% need_validation_holiday.description.replace('\\\r\\\n', '<br />') | html %]</td> |
182 |
<li class="radio"> |
| 259 |
</tr> |
183 |
<input type="radio" name="action" id="CopyRadioButton" value="copyDates" /> |
| 260 |
[% END %] |
184 |
<label for="CopyRadioButton">Copy to different dates</label> |
| 261 |
</tbody> |
185 |
</li> |
| 262 |
</table> <!-- /#holidayexceptions --> |
186 |
<li class="CopyDatePanel"> |
| 263 |
[% END # /IF ( EXCEPTION_HOLIDAYS_LOOP ) %] |
187 |
<label>From:</label> |
| 264 |
|
188 |
<input type="text" id="copyto_from_flatpickr" size="20"/> |
| 265 |
[% IF ( WEEKLY_HOLIDAYS ) %] |
189 |
<label>To:</label> |
| 266 |
<h3>Weekly - Repeatable holidays</h3> |
190 |
<input type="text" id="copyto_to_flatpickr" size="20"/> |
| 267 |
<table id="holidayweeklyrepeatable" class="dataTable no-footer"> |
191 |
</li> |
| 268 |
<thead> |
192 |
<li class="checkbox"> |
| 269 |
<tr> |
193 |
<input type="checkbox" name="all_branches" id="all_branches" /> |
| 270 |
<th class="repeatableweekly">Day of week</th> |
194 |
<label for="all_branches">Copy to all libraries</label>. |
| 271 |
<th class="repeatableweekly">Title</th> |
195 |
<a href="#" class="helptext">[?]</a> |
| 272 |
<th class="repeatableweekly">Description</th> |
196 |
<div class="hint">If checked, this holiday will be copied to all libraries.</div> |
| 273 |
</tr> |
197 |
</li> |
| 274 |
</thead> |
198 |
</ol> |
| 275 |
<tbody> |
199 |
|
| 276 |
[% FOREACH WEEK_DAYS_LOO IN WEEKLY_HOLIDAYS %] |
200 |
<!-- These yyyy-mm-dd --> |
| 277 |
<tr> |
201 |
<input type="hidden" name="from_date" id='from_date'> |
| 278 |
<td>[% WEEK_DAYS_LOO.weekday | html %]</td> |
202 |
<input type="hidden" name="to_date" id='to_date'> |
| 279 |
<td>[% WEEK_DAYS_LOO.note | html %]</td> |
203 |
<input type="hidden" name="copyto_from" id='copyto_from'> |
| 280 |
<td>[% WEEK_DAYS_LOO.description.replace('\\\r\\\n', '<br />') | html %]</td> |
204 |
<input type="hidden" name="copyto_to" id='copyto_to'> |
| 281 |
</tr> |
205 |
<input type="hidden" name="daysnumber" id='daysnumber'> |
| 282 |
[% END %] |
206 |
<input type="hidden" name="local_today" id='local_today'> |
| 283 |
</tbody> |
207 |
|
| 284 |
</table> <!-- /#holidayweeklyrepeatable --> |
208 |
<fieldset class="action"> |
| 285 |
[% END # / IF ( WEEKLY_HOLIDAYS ) %] |
209 |
<input type="submit" name="submit" class="btn btn-primary" value="Save" /> |
| 286 |
|
210 |
<a href="#" class="cancel hidePanel newHoliday">Cancel</a> |
| 287 |
[% IF ( REPEATABLE_HOLIDAYS ) %] |
211 |
</fieldset> |
| 288 |
<h3>Yearly - Repeatable holidays</h3> |
212 |
</fieldset> |
| 289 |
<table id="holidaysyearlyrepeatable" class="dataTable no-footer"> |
213 |
</form> |
| 290 |
<thead> |
214 |
</div> |
| 291 |
<tr> |
215 |
</div> |
| 292 |
[% IF ( dateformat == "metric" ) %] |
216 |
</div> <!-- /.page-section --> |
| 293 |
<th class="repeatableyearly">Day/month</th> |
217 |
</div> <!-- /.col-sm-6 --> |
| 294 |
[% ELSE %] |
218 |
|
| 295 |
<th class="repeatableyearly">Month/day</th> |
219 |
<div class="col-sm-6"> |
| 296 |
[% END %] |
220 |
<div class="page-section"> |
| 297 |
<th class="repeatableyearly">Title</th> |
221 |
<div class="help"> |
| 298 |
<th class="repeatableyearly">Description</th> |
222 |
<h4>Hints</h4> |
| 299 |
</tr> |
223 |
<ul> |
| 300 |
</thead> |
224 |
<li>Search in the calendar the day you want to set as holiday.</li> |
| 301 |
<tbody> |
225 |
<li>Click the date to add or edit a holiday.</li> |
| 302 |
[% FOREACH DAY_MONTH_HOLIDAYS_LOO IN REPEATABLE_HOLIDAYS %] |
226 |
<li>Enter a title and description for the holiday.</li> |
| 303 |
<tr> |
227 |
<li>Specify how the holiday should repeat.</li> |
| 304 |
[% IF ( dateformat == "metric" ) %] |
228 |
<li>Click Save to finish.</li> |
| 305 |
<td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT | html %]">[% DAY_MONTH_HOLIDAYS_LOO.day | html %]/[% DAY_MONTH_HOLIDAYS_LOO.month | html %]</span></td> |
229 |
<li>PS: |
| 306 |
[% ELSE %] |
230 |
<ul> |
| 307 |
<td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT | html %]">[% DAY_MONTH_HOLIDAYS_LOO.month | html %]/[% DAY_MONTH_HOLIDAYS_LOO.day | html %]</span></td> |
231 |
<li>Past dates cannot be changed</li> |
| 308 |
[% END %] |
232 |
<li>Weekly holidays change open/close hours for all the days affected unless inputs are empty</li> |
| 309 |
<td>[% DAY_MONTH_HOLIDAYS_LOO.note | html %]</td> |
233 |
</ul> |
| 310 |
<td>[% DAY_MONTH_HOLIDAYS_LOO.description.replace('\\\r\\\n', '<br />') | html %]</td> |
234 |
</li> |
| 311 |
</tr> |
235 |
</ul> |
| 312 |
[% END %] |
236 |
<h4>Key</h4> |
| 313 |
</tbody> |
237 |
<p> |
| 314 |
</table> <!-- /#holidaysyearlyrepeatable --> |
238 |
<span class="key normalday">Working day</span> |
| 315 |
[% END # /IF ( REPEATABLE_HOLIDAYS ) %] |
239 |
<span class="key holiday">Unique holiday</span> |
| 316 |
|
240 |
<span class="key repeatableweekly">Holiday repeating weekly</span> |
| 317 |
[% IF ( UNIQUE_HOLIDAYS ) %] |
241 |
<span class="key repeatableyearly">Holiday repeating yearly</span> |
| 318 |
<h3>Unique holidays</h3> |
242 |
<span class="key float">Floating holiday</span> |
| 319 |
<label class="controls"> |
243 |
<span class="key exception">Need validation</span> |
| 320 |
<input type="checkbox" name="show_past" id="show_past_holidaysunique" class="show_past" /> |
244 |
</p> |
| 321 |
Show past entries |
245 |
</div> <!-- /#help --> |
| 322 |
</label> |
246 |
|
| 323 |
<table id="holidaysunique" class="dataTable no-footer"> |
247 |
<div id="holiday-list"> |
| 324 |
<thead> |
248 |
[% IF ( NEED_VALIDATION_HOLIDAYS ) %] |
| 325 |
<tr> |
249 |
<h3>Need validation holidays</h3> |
| 326 |
<th class="holiday">Date</th> |
250 |
<table id="holidayexceptions" class="dataTable no-footer"> |
| 327 |
<th class="holiday">Title</th> |
251 |
<thead> |
| 328 |
<th class="holiday">Description</th> |
252 |
<tr> |
| 329 |
</tr> |
253 |
<th class="exception">Date</th> |
| 330 |
</thead> |
254 |
<th class="exception">Title</th> |
| 331 |
<tbody> |
255 |
<th class="exception">Description</th> |
| 332 |
[% FOREACH HOLIDAYS_LOO IN UNIQUE_HOLIDAYS %] |
256 |
</tr> |
| 333 |
<tr data-date="[% HOLIDAYS_LOO.date | html %]"> |
257 |
</thead> |
| 334 |
<td><a href="#main" onclick="go_to_date('[% HOLIDAYS_LOO.date | html %]')"><span title="[% HOLIDAYS_LOO.DATE_SORT | html %]">[% HOLIDAYS_LOO.outputdate | html %]</span></a></td> |
258 |
<tbody> |
| 335 |
<td>[% HOLIDAYS_LOO.note | html %]</td> |
259 |
[% FOREACH need_validation_holiday IN NEED_VALIDATION_HOLIDAYS %] |
| 336 |
<td>[% HOLIDAYS_LOO.description.replace('\\\r\\\n', '<br />') | html %]</td> |
260 |
<tr> |
| 337 |
</tr> |
261 |
<td> |
| 338 |
[% END %] |
262 |
<a href="#main" onclick="go_to_date('[% need_validation_holiday.date | html %]')"><span title="[% need_validation_holiday.DATE_SORT | html %]">[% need_validation_holiday.outputdate | html %]</span></a> |
| 339 |
</tbody> |
263 |
</td> |
| 340 |
</table> <!-- /#holidaysunique --> |
264 |
<td>[% need_validation_holiday.note | html %]</td> |
| 341 |
[% END # /IF ( UNIQUE_HOLIDAYS ) %] |
265 |
<td>[% need_validation_holiday.description.replace('\\\r\\\n', '<br />') | html %]</td> |
| 342 |
|
266 |
</tr> |
| 343 |
[% IF ( FLOAT_HOLIDAYS ) %] |
267 |
[% END %] |
| 344 |
<h3>Floating holidays</h3> |
268 |
</tbody> |
| 345 |
<label class="controls"> |
269 |
</table> <!-- /#holidayexceptions --> |
| 346 |
<input type="checkbox" name="show_past" id="show_past_holidaysfloat" class="show_past" /> |
270 |
[% END # /IF ( EXCEPTION_HOLIDAYS_LOOP ) %] |
| 347 |
Show past entries |
271 |
|
| 348 |
</label> |
272 |
[% IF ( WEEKLY_HOLIDAYS ) %] |
| 349 |
<table id="holidaysfloat" class="dataTable no-footer"> |
273 |
<h3>Weekly - Repeatable holidays</h3> |
| 350 |
<thead> |
274 |
<table id="holidayweeklyrepeatable" class="dataTable no-footer"> |
| 351 |
<tr> |
275 |
<thead> |
| 352 |
<th class="float">Date</th> |
276 |
<tr> |
| 353 |
<th class="float">Title</th> |
277 |
<th class="repeatableweekly">Day of week</th> |
| 354 |
<th class="float">Description</th> |
278 |
<th class="repeatableweekly">Title</th> |
| 355 |
</tr> |
279 |
<th class="repeatableweekly">Description</th> |
| 356 |
</thead> |
280 |
</tr> |
| 357 |
<tbody> |
281 |
</thead> |
| 358 |
[% FOREACH float_holiday IN FLOAT_HOLIDAYS %] |
282 |
<tbody> |
| 359 |
<tr data-date="[% float_holiday.date | html %]"> |
283 |
[% FOREACH WEEK_DAYS_LOO IN WEEKLY_HOLIDAYS %] |
| 360 |
<td><a href="#main" onclick="go_to_date('[% float_holiday.date | html %]')"><span title="[% float_holiday.DATE_SORT | html %]">[% float_holiday.outputdate | html %]</span></a></td> |
284 |
<tr> |
| 361 |
<td>[% float_holiday.note | html %]</td> |
285 |
<td>[% WEEK_DAYS_LOO.weekday | html %]</td> |
| 362 |
<td>[% float_holiday.description.replace('\\\r\\\n', '<br />') | html %]</td> |
286 |
<td>[% WEEK_DAYS_LOO.note | html %]</td> |
| 363 |
</tr> |
287 |
<td>[% WEEK_DAYS_LOO.description.replace('\\\r\\\n', '<br />') | html %]</td> |
| 364 |
[% END %] |
288 |
</tr> |
| 365 |
</tbody> |
289 |
[% END %] |
| 366 |
</table> <!-- /#holidaysfloat --> |
290 |
</tbody> |
| 367 |
[% END # /IF ( FLOAT_HOLIDAYS ) %] |
291 |
</table> <!-- /#holidayweeklyrepeatable --> |
| 368 |
</div> <!-- /#holiday-list --> |
292 |
[% END # / IF ( WEEKLY_HOLIDAYS ) %] |
| 369 |
</div> <!-- /.page-section --> |
293 |
|
| 370 |
</div> <!-- /.col-sm-6 --> |
294 |
[% IF ( REPEATABLE_HOLIDAYS ) %] |
| 371 |
</div> <!-- /.row --> |
295 |
<h3>Yearly - Repeatable holidays</h3> |
| 372 |
</main> |
296 |
<table id="holidaysyearlyrepeatable" class="dataTable no-footer"> |
| 373 |
</div> <!-- /.col-sm-10.col-sm-push-2 --> |
297 |
<thead> |
| 374 |
|
298 |
<tr> |
| 375 |
<div class="col-sm-2 col-sm-pull-10"> |
299 |
[% IF ( dateformat == "metric" ) %] |
| 376 |
<aside> |
300 |
<th class="repeatableyearly">Day/month</th> |
| 377 |
[% INCLUDE 'tools-menu.inc' %] |
301 |
[% ELSE %] |
| 378 |
</aside> |
302 |
<th class="repeatableyearly">Month/day</th> |
| 379 |
</div> <!-- .col-sm-2.col-sm-pull-10 --> |
303 |
[% END %] |
| 380 |
</div> <!-- /.row --> |
304 |
<th class="repeatableyearly">Title</th> |
|
|
305 |
<th class="repeatableyearly">Description</th> |
| 306 |
</tr> |
| 307 |
</thead> |
| 308 |
<tbody> |
| 309 |
[% FOREACH DAY_MONTH_HOLIDAYS_LOO IN REPEATABLE_HOLIDAYS %] |
| 310 |
<tr> |
| 311 |
[% IF ( dateformat == "metric" ) %] |
| 312 |
<td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT | html %]">[% DAY_MONTH_HOLIDAYS_LOO.day | html %]/[% DAY_MONTH_HOLIDAYS_LOO.month | html %]</span></td> |
| 313 |
[% ELSE %] |
| 314 |
<td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT | html %]">[% DAY_MONTH_HOLIDAYS_LOO.month | html %]/[% DAY_MONTH_HOLIDAYS_LOO.day | html %]</span></td> |
| 315 |
[% END %] |
| 316 |
<td>[% DAY_MONTH_HOLIDAYS_LOO.note | html %]</td> |
| 317 |
<td>[% DAY_MONTH_HOLIDAYS_LOO.description.replace('\\\r\\\n', '<br />') | html %]</td> |
| 318 |
</tr> |
| 319 |
[% END %] |
| 320 |
</tbody> |
| 321 |
</table> <!-- /#holidaysyearlyrepeatable --> |
| 322 |
[% END # /IF ( REPEATABLE_HOLIDAYS ) %] |
| 323 |
|
| 324 |
[% IF ( UNIQUE_HOLIDAYS ) %] |
| 325 |
<h3>Unique holidays</h3> |
| 326 |
<label class="controls"> |
| 327 |
<input type="checkbox" name="show_past" id="show_past_holidaysunique" class="show_past" /> |
| 328 |
Show past entries |
| 329 |
</label> |
| 330 |
<table id="holidaysunique" class="dataTable no-footer"> |
| 331 |
<thead> |
| 332 |
<tr> |
| 333 |
<th class="holiday">Date</th> |
| 334 |
<th class="holiday">Title</th> |
| 335 |
<th class="holiday">Description</th> |
| 336 |
</tr> |
| 337 |
</thead> |
| 338 |
<tbody> |
| 339 |
[% FOREACH HOLIDAYS_LOO IN UNIQUE_HOLIDAYS %] |
| 340 |
<tr data-date="[% HOLIDAYS_LOO.date | html %]"> |
| 341 |
<td><a href="#main" onclick="go_to_date('[% HOLIDAYS_LOO.date | html %]')"><span title="[% HOLIDAYS_LOO.DATE_SORT | html %]">[% HOLIDAYS_LOO.outputdate | html %]</span></a></td> |
| 342 |
<td>[% HOLIDAYS_LOO.note | html %]</td> |
| 343 |
<td>[% HOLIDAYS_LOO.description.replace('\\\r\\\n', '<br />') | html %]</td> |
| 344 |
</tr> |
| 345 |
[% END %] |
| 346 |
</tbody> |
| 347 |
</table> <!-- /#holidaysunique --> |
| 348 |
[% END # /IF ( UNIQUE_HOLIDAYS ) %] |
| 349 |
|
| 350 |
[% IF ( FLOAT_HOLIDAYS ) %] |
| 351 |
<h3>Floating holidays</h3> |
| 352 |
<label class="controls"> |
| 353 |
<input type="checkbox" name="show_past" id="show_past_holidaysfloat" class="show_past" /> |
| 354 |
Show past entries |
| 355 |
</label> |
| 356 |
<table id="holidaysfloat" class="dataTable no-footer"> |
| 357 |
<thead> |
| 358 |
<tr> |
| 359 |
<th class="float">Date</th> |
| 360 |
<th class="float">Title</th> |
| 361 |
<th class="float">Description</th> |
| 362 |
</tr> |
| 363 |
</thead> |
| 364 |
<tbody> |
| 365 |
[% FOREACH float_holiday IN FLOAT_HOLIDAYS %] |
| 366 |
<tr data-date="[% float_holiday.date | html %]"> |
| 367 |
<td><a href="#main" onclick="go_to_date('[% float_holiday.date | html %]')"><span title="[% float_holiday.DATE_SORT | html %]">[% float_holiday.outputdate | html %]</span></a></td> |
| 368 |
<td>[% float_holiday.note | html %]</td> |
| 369 |
<td>[% float_holiday.description.replace('\\\r\\\n', '<br />') | html %]</td> |
| 370 |
</tr> |
| 371 |
[% END %] |
| 372 |
</tbody> |
| 373 |
</table> <!-- /#holidaysfloat --> |
| 374 |
[% END # /IF ( FLOAT_HOLIDAYS ) %] |
| 375 |
</div> |
| 376 |
<!-- /#holiday-list --> |
| 377 |
</div> |
| 378 |
<!-- /.page-section --> |
| 379 |
</div> |
| 380 |
<!-- /.col-sm-6 --> |
| 381 |
</div> |
| 382 |
<!-- /.row --> |
| 383 |
[% END %] |
| 381 |
|
384 |
|
| 382 |
[% MACRO jsinclude BLOCK %] |
385 |
[% MACRO jsinclude BLOCK %] |
| 383 |
[% INCLUDE 'calendar.inc' %] |
386 |
[% INCLUDE 'calendar.inc' %] |