View | Details | Raw Unified | Return to bug 32050
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt (-328 / +331 lines)
Lines 40-384 Link Here
40
40
41
                <div class="row">
41
                <div class="row">
42
                    <div class="col-sm-6">
42
                    <div class="col-sm-6">
43
                        <label for="branch">Define the holidays for:</label>
43
                        <div class="page-section">
44
                        <select id="branch" name="branch">
44
                            <label for="branch">Define the holidays for:</label>
45
                            [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
45
                            <select id="branch" name="branch">
46
                        </select>
46
                                [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
47
47
                            </select>
48
                        <div class="panel" id="showHoliday">
48
49
                            <form action="/cgi-bin/koha/tools/exceptionHolidays.pl" method="post">
49
                            <div class="panel" id="showHoliday">
50
                                <input type="hidden" id="showHolidayType" name="showHolidayType" value="" />
50
                                <form action="/cgi-bin/koha/tools/exceptionHolidays.pl" method="post">
51
                                <fieldset class="brief">
51
                                    <input type="hidden" id="showHolidayType" name="showHolidayType" value="" />
52
                                    <h3>Edit this holiday</h3>
52
                                    <fieldset class="brief">
53
                                    <span id="holtype"></span>
53
                                        <h3>Edit this holiday</h3>
54
                                    <ol>
54
                                        <span id="holtype"></span>
55
                                        <li>
55
                                        <ol>
56
                                            <strong>Library:</strong> <span id="showBranchNameOutput"></span>
56
                                            <li>
57
                                            <input type="hidden" id="showBranchName" name="showBranchName" />
57
                                                <strong>Library:</strong> <span id="showBranchNameOutput"></span>
58
                                        </li>
58
                                                <input type="hidden" id="showBranchName" name="showBranchName" />
59
                                        <li>
59
                                            </li>
60
                                            <strong>From date:</strong>
60
                                            <li>
61
                                            <span id="showDaynameOutput"></span>,
61
                                                <strong>From date:</strong>
62
                                            [% IF ( dateformat == "us" ) %]
62
                                                <span id="showDaynameOutput"></span>,
63
                                                <span id="showMonthOutput"></span>/<span id="showDayOutput"></span>/<span id="showYearOutput"></span>
63
                                                [% IF ( dateformat == "us" ) %]
64
                                            [% ELSIF ( dateformat == "metric") %]
64
                                                    <span id="showMonthOutput"></span>/<span id="showDayOutput"></span>/<span id="showYearOutput"></span>
65
                                                <span id="showDayOutput"></span>/<span id="showMonthOutput"></span>/<span id="showYearOutput"></span>
65
                                                [% ELSIF ( dateformat == "metric") %]
66
                                            [% ELSIF ( dateformat == "dmydot") %]
66
                                                    <span id="showDayOutput"></span>/<span id="showMonthOutput"></span>/<span id="showYearOutput"></span>
67
                                                <span id="showDayOutput"></span>.<span id="showMonthOutput"></span>.<span id="showYearOutput"></span>[% ELSE %]<span id="showYearOutput"></span>/<span id="showMonthOutput"></span>/<span id="showDayOutput"></span>
67
                                                [% ELSIF ( dateformat == "dmydot") %]
68
                                            [% END %]
68
                                                    <span id="showDayOutput"></span>.<span id="showMonthOutput"></span>.<span id="showYearOutput"></span>[% ELSE %]<span id="showYearOutput"></span>/<span id="showMonthOutput"></span>/<span id="showDayOutput"></span>
69
69
                                                [% END %]
70
                                            <input type="hidden" id="showDayname" name="showDayname" />
70
71
                                            <input type="hidden" id="showWeekday" name="showWeekday" />
71
                                                <input type="hidden" id="showDayname" name="showDayname" />
72
                                            <input type="hidden" id="showDay" name="showDay" />
72
                                                <input type="hidden" id="showWeekday" name="showWeekday" />
73
                                            <input type="hidden" id="showMonth" name="showMonth" />
73
                                                <input type="hidden" id="showDay" name="showDay" />
74
                                            <input type="hidden" id="showYear" name="showYear" />
74
                                                <input type="hidden" id="showMonth" name="showMonth" />
75
                                        </li>
75
                                                <input type="hidden" id="showYear" name="showYear" />
76
                                        <li class="dateinsert">
76
                                            </li>
77
                                            <strong>To date: </strong>
77
                                            <li class="dateinsert">
78
                                            <input type="text" id="datecancelrange" name="datecancelrange" size="20" value="[% datecancelrange | html %]" class="flatpickr" />
78
                                                <strong>To date: </strong>
79
                                        </li>
79
                                                <input type="text" id="datecancelrange" name="datecancelrange" size="20" value="[% datecancelrange | html %]" class="flatpickr" />
80
                                        <li>
80
                                            </li>
81
                                            <label for="showTitle">Title: </label><input type="text" name="showTitle" id="showTitle" size="35" />
81
                                            <li>
82
                                        </li>
82
                                                <label for="showTitle">Title: </label><input type="text" name="showTitle" id="showTitle" size="35" />
83
                                        <!-- showTitle is necessary for exception radio button to work properly -->
83
                                            </li>
84
                                        <li>
84
                                            <!-- showTitle is necessary for exception radio button to work properly -->
85
                                            <label for="showDescription">Description:</label>
85
                                            <li>
86
                                            <textarea rows="2" cols="40" id="showDescription" name="showDescription"></textarea>
86
                                                <label for="showDescription">Description:</label>
87
                                        </li>
87
                                                <textarea rows="2" cols="40" id="showDescription" name="showDescription"></textarea>
88
                                        <li class="radio">
88
                                            </li>
89
                                            <div class="exceptionPossibility" style="position:static">
89
                                            <li class="radio">
90
                                                <input type="radio" name="showOperation" id="showOperationExc" value="exception" /> <label for="showOperationExc">Generate an exception for this repeated holiday.</label>
90
                                                <div class="exceptionPossibility" style="position:static">
91
                                                    <input type="radio" name="showOperation" id="showOperationExc" value="exception" /> <label for="showOperationExc">Generate an exception for this repeated holiday.</label>
92
                                                    <a href="#" class="helptext">[?]</a>
93
                                                    <div class="hint">You can make an exception for this holiday rule. This means that you will be able to say that for a repeatable holiday there is one day which is going to be an exception.</div>
94
                                                </div>
95
                                            </li>
96
                                            <li class="radio">
97
                                                <div class="exceptionPossibility" style="position:static">
98
                                                    <input type="radio" name="showOperation" id="showOperationExcRange" value="exceptionrange" />
99
                                                    <label for="showOperationExcRange">Generate exceptions on a range of dates.</label>
100
                                                    <a href="#" class="helptext">[?]</a>
101
                                                    <div class="hint">You can make an exception on a range of dates repeated yearly.</div>
102
                                                </div>
103
                                            </li>
104
                                            <li class="radio">
105
                                                <input type="radio" name="showOperation" id="showOperationDel" value="delete" />
106
                                                <label for="showOperationDel" id="showOperationDelLabel">Delete this holiday</label>
91
                                                <a href="#" class="helptext">[?]</a>
107
                                                <a href="#" class="helptext">[?]</a>
92
                                                <div class="hint">You can make an exception for this holiday rule. This means that you will be able to say that for a repeatable holiday there is one day which is going to be an exception.</div>
108
                                                <div class="hint">This will delete this holiday rule. If it is a repeatable holiday, this option checks for possible exceptions. If an exception exists, this option will remove the exception and set the date to a regular holiday.</div>
93
                                            </div>
109
                                            </li>
94
                                        </li>
110
                                            <li class="radio">
95
                                        <li class="radio">
111
                                                <input type="radio" name="showOperation" id="showOperationDelRange" value="deleterange" /> <label for="showOperationDelRange" id="showOperationDelLabelRange">Delete the single holidays on a range</label>.
96
                                            <div class="exceptionPossibility" style="position:static">
97
                                                <input type="radio" name="showOperation" id="showOperationExcRange" value="exceptionrange" />
98
                                                <label for="showOperationExcRange">Generate exceptions on a range of dates.</label>
99
                                                <a href="#" class="helptext">[?]</a>
112
                                                <a href="#" class="helptext">[?]</a>
100
                                                <div class="hint">You can make an exception on a range of dates repeated yearly.</div>
113
                                                <div class="hint">This will delete the single holidays rules only. The repeatable holidays and exceptions will not be deleted.</div>
101
                                            </div>
114
                                            </li>
102
                                        </li>
115
                                            <li class="radio">
103
                                        <li class="radio">
116
                                                <input type="radio" name="showOperation" id="showOperationDelRangeRepeat" value="deleterangerepeat" /> <label for="showOperationDelRangeRepeat" id="showOperationDelLabelRangeRepeat">Delete the repeated holidays on a range</label>.
104
                                            <input type="radio" name="showOperation" id="showOperationDel" value="delete" />
117
                                                <a href="#" class="helptext">[?]</a>
105
                                            <label for="showOperationDel" id="showOperationDelLabel">Delete this holiday</label>
118
                                                <div class="hint">This will delete the repeated holidays rules only. The repeatable holidays will be deleted but not the exceptions.</div>
106
                                            <a href="#" class="helptext">[?]</a>
119
                                            </li>
107
                                            <div class="hint">This will delete this holiday rule. If it is a repeatable holiday, this option checks for possible exceptions. If an exception exists, this option will remove the exception and set the date to a regular holiday.</div>
120
                                            <li class="radio">
108
                                        </li>
121
                                                <input type="radio" name="showOperation" id="showOperationDelRangeRepeatExcept" value="deleterangerepeatexcept" /> <label for="showOperationDelRangeRepeatExcept" id="showOperationDelLabelRangeRepeatExcept">Delete the exceptions on a range</label>.
109
                                        <li class="radio">
122
                                                <a href="#" class="helptext">[?]</a>
110
                                            <input type="radio" name="showOperation" id="showOperationDelRange" value="deleterange" /> <label for="showOperationDelRange" id="showOperationDelLabelRange">Delete the single holidays on a range</label>.
123
                                                <div class="hint">This will delete the exceptions inside a given range. Be careful about your scope range; if it is oversized you could slow down Koha.</div>
111
                                            <a href="#" class="helptext">[?]</a>
124
                                            </li>
112
                                            <div class="hint">This will delete the single holidays rules only. The repeatable holidays and exceptions will not be deleted.</div>
125
                                            <li class="radio">
113
                                        </li>
126
                                                <input type="radio" name="showOperation" id="showOperationEdit" value="edit" checked="checked" /> <label for="showOperationEdit">Edit this holiday</label>
114
                                        <li class="radio">
127
                                                <a href="#" class="helptext">[?]</a>
115
                                            <input type="radio" name="showOperation" id="showOperationDelRangeRepeat" value="deleterangerepeat" /> <label for="showOperationDelRangeRepeat" id="showOperationDelLabelRangeRepeat">Delete the repeated holidays on a range</label>.
128
                                                <div class="hint">This will save changes to the holiday's title and description. If the information for a repeatable holiday is modified, it affects all of the dates on which the holiday is repeated.</div></li>
116
                                            <a href="#" class="helptext">[?]</a>
129
                                            <li class="checkbox">
117
                                            <div class="hint">This will delete the repeated holidays rules only. The repeatable holidays will be deleted but not the exceptions.</div>
130
                                                <input type="checkbox" name="allBranches" id="allBranches" />
118
                                        </li>
131
                                                <label for="allBranches">Copy changes to all libraries</label>.
119
                                        <li class="radio">
132
                                                <a href="#" class="helptext">[?]</a>
120
                                            <input type="radio" name="showOperation" id="showOperationDelRangeRepeatExcept" value="deleterangerepeatexcept" /> <label for="showOperationDelRangeRepeatExcept" id="showOperationDelLabelRangeRepeatExcept">Delete the exceptions on a range</label>.
133
                                                <div class="hint">If checked, changes for this holiday will be copied to all libraries. If the holiday doesn't exists for a library, no change is made.</div>
121
                                            <a href="#" class="helptext">[?]</a>
134
                                            </li>
122
                                            <div class="hint">This will delete the exceptions inside a given range. Be careful about your scope range; if it is oversized you could slow down Koha.</div>
135
                                        </ol>
123
                                        </li>
136
                                        <fieldset class="action">
124
                                        <li class="radio">
137
                                            <input type="submit" name="submit" value="Save" />
125
                                            <input type="radio" name="showOperation" id="showOperationEdit" value="edit" checked="checked" /> <label for="showOperationEdit">Edit this holiday</label>
138
                                            <a href="#" class="cancel hidePanel showHoliday">Cancel</a>
126
                                            <a href="#" class="helptext">[?]</a>
139
                                        </fieldset>
127
                                            <div class="hint">This will save changes to the holiday's title and description. If the information for a repeatable holiday is modified, it affects all of the dates on which the holiday is repeated.</div></li>
140
                                    </fieldset> <!-- /.brief -->
128
                                        <li class="checkbox">
141
                                </form>
129
                                            <input type="checkbox" name="allBranches" id="allBranches" />
142
                            </div> <!-- /#showHoliday -->
130
                                            <label for="allBranches">Copy changes to all libraries</label>.
143
131
                                            <a href="#" class="helptext">[?]</a>
144
                            <!-- Panel to deal with new holidays -->
132
                                            <div class="hint">If checked, changes for this holiday will be copied to all libraries. If the holiday doesn't exists for a library, no change is made.</div>
145
                            <div class="panel" id="newHoliday">
133
                                        </li>
146
                                <form action="/cgi-bin/koha/tools/newHolidays.pl" method="post">
134
                                    </ol>
147
                                    <fieldset class="brief">
135
                                    <fieldset class="action">
148
                                        <h3>Add new holiday</h3>
136
                                        <input type="submit" name="submit" value="Save" />
149
                                        <ol>
137
                                        <a href="#" class="cancel hidePanel showHoliday">Cancel</a>
150
                                            <li>
138
                                    </fieldset>
151
                                                <strong>Library:</strong>
139
                                </fieldset> <!-- /.brief -->
152
                                                <span id="newBranchNameOutput"></span>
140
                            </form>
153
                                                <input type="hidden" id="newBranchName" name="newBranchName" />
141
                        </div> <!-- /#showHoliday -->
154
                                            </li>
142
155
                                            <li>
143
                        <!-- Panel to deal with new holidays -->
156
                                                <strong>From date:</strong>
144
                        <div class="panel" id="newHoliday">
157
                                                <span id="newDaynameOutput"></span>,
145
                            <form action="/cgi-bin/koha/tools/newHolidays.pl" method="post">
158
146
                                <fieldset class="brief">
159
                                                [% IF ( dateformat == "us" ) %]
147
                                    <h3>Add new holiday</h3>
160
                                                    <span id="newMonthOutput"></span>/<span id="newDayOutput"></span>/<span id="newYearOutput"></span>
148
                                    <ol>
161
                                                [% ELSIF ( dateformat == "metric" ) %]
149
                                        <li>
162
                                                    <span id="newDayOutput"></span>/<span id="newMonthOutput"></span>/<span id="newYearOutput"></span>
150
                                            <strong>Library:</strong>
163
                                                [% ELSIF ( dateformat == "dmydot" ) %]
151
                                            <span id="newBranchNameOutput"></span>
164
                                                    <span id="newDayOutput"></span>.<span id="newMonthOutput"></span>.<span id="newYearOutput"></span>
152
                                            <input type="hidden" id="newBranchName" name="newBranchName" />
165
                                                [% ELSE %]
153
                                        </li>
166
                                                    <span id="newYearOutput"></span>/<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>
154
                                        <li>
167
                                                [% END %]
155
                                            <strong>From date:</strong>
168
156
                                            <span id="newDaynameOutput"></span>,
169
                                                <input type="hidden" id="newDayname" name="showDayname" />
157
170
                                                <input type="hidden" id="newWeekday" name="newWeekday" />
158
                                            [% IF ( dateformat == "us" ) %]
171
                                                <input type="hidden" id="newDay" name="newDay" />
159
                                                <span id="newMonthOutput"></span>/<span id="newDayOutput"></span>/<span id="newYearOutput"></span>
172
                                                <input type="hidden" id="newMonth" name="newMonth" />
160
                                            [% ELSIF ( dateformat == "metric" ) %]
173
                                                <input type="hidden" id="newYear" name="newYear" />
161
                                                <span id="newDayOutput"></span>/<span id="newMonthOutput"></span>/<span id="newYearOutput"></span>
174
                                            </li>
162
                                            [% ELSIF ( dateformat == "dmydot" ) %]
175
                                            <li class="dateinsert">
163
                                                <span id="newDayOutput"></span>.<span id="newMonthOutput"></span>.<span id="newYearOutput"></span>
176
                                                <strong>To date: </strong>
164
                                            [% ELSE %]
177
                                                <input type="text" id="dateofrange" name="dateofrange" size="20" value="[% dateofrange | html %]" class="flatpickr" />
165
                                                <span id="newYearOutput"></span>/<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>
178
                                            </li>
166
                                            [% END %]
179
                                            <li>
167
180
                                                <label for="title">Title: </label>
168
                                            <input type="hidden" id="newDayname" name="showDayname" />
181
                                                <input type="text" name="newTitle" id="title" size="35" /></li>
169
                                            <input type="hidden" id="newWeekday" name="newWeekday" />
182
                                            <li>
170
                                            <input type="hidden" id="newDay" name="newDay" />
183
                                                <label for="newDescription">Description:</label>
171
                                            <input type="hidden" id="newMonth" name="newMonth" />
184
                                                <textarea rows="2" cols="40" id="newDescription" name="newDescription"></textarea>
172
                                            <input type="hidden" id="newYear" name="newYear" />
185
                                            </li>
173
                                        </li>
186
                                            <li class="radio">
174
                                        <li class="dateinsert">
187
                                                <input type="radio" name="newOperation" id="newOperationOnce" value="holiday" checked="checked" />
175
                                            <strong>To date: </strong>
188
                                                <label for="newOperationOnce">Holiday only on this day</label>.
176
                                            <input type="text" id="dateofrange" name="dateofrange" size="20" value="[% dateofrange | html %]" class="flatpickr" />
189
                                                <a href="#" class="helptext">[?]</a>
177
                                        </li>
190
                                                <div class="hint">Make a single holiday. For example, selecting August 1, 2012 will make it a holiday, but will not affect August 1 in other years.</div>
178
                                        <li>
191
                                            </li>
179
                                            <label for="title">Title: </label>
192
                                            <li class="radio">
180
                                            <input type="text" name="newTitle" id="title" size="35" /></li>
193
                                                <input type="radio" name="newOperation" id="newOperationDay" value="weekday" />
181
                                        <li>
194
                                                <label for="newOperationDay">Holiday repeated every same day of the week</label>.
182
                                            <label for="newDescription">Description:</label>
195
                                                <a href="#" class="helptext">[?]</a>
183
                                            <textarea rows="2" cols="40" id="newDescription" name="newDescription"></textarea>
196
                                                <div class="hint">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.</div>
184
                                        </li>
197
                                            </li>
185
                                        <li class="radio">
198
                                            <li class="radio">
186
                                            <input type="radio" name="newOperation" id="newOperationOnce" value="holiday" checked="checked" />
199
                                                <input type="radio" name="newOperation" id="newOperationYear" value="repeatable" />
187
                                            <label for="newOperationOnce">Holiday only on this day</label>.
200
                                                <label for="newOperationYear">Holiday repeated yearly on the same date</label>.
188
                                            <a href="#" class="helptext">[?]</a>
201
                                                <a href="#" class="helptext">[?]</a>
189
                                            <div class="hint">Make a single holiday. For example, selecting August 1, 2012 will make it a holiday, but will not affect August 1 in other years.</div>
202
                                                <div class="hint">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.</div>
190
                                        </li>
203
                                            </li>
191
                                        <li class="radio">
204
                                            <li class="radio">
192
                                            <input type="radio" name="newOperation" id="newOperationDay" value="weekday" />
205
                                                <input type="radio" name="newOperation" id="newOperationField" value="holidayrange" />
193
                                            <label for="newOperationDay">Holiday repeated every same day of the week</label>.
206
                                                <label for="newOperationField">Holidays on a range</label>.
194
                                            <a href="#" class="helptext">[?]</a>
207
                                                <a href="#" class="helptext">[?]</a>
195
                                            <div class="hint">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.</div>
208
                                                <div class="hint">Make a single holiday on a range. For example, selecting August 1, 2012  and August 10, 2012 will make all days between August 1 and 10 a holiday, but will not affect August 1-10 in other years.</div>
196
                                        </li>
209
                                            </li>
197
                                        <li class="radio">
210
                                            <li class="radio">
198
                                            <input type="radio" name="newOperation" id="newOperationYear" value="repeatable" />
211
                                                <input type="radio" name="newOperation" id="newOperationFieldyear" value="holidayrangerepeat" />
199
                                            <label for="newOperationYear">Holiday repeated yearly on the same date</label>.
212
                                                <label for="newOperationFieldyear">Holidays repeated yearly on a range</label>.
200
                                            <a href="#" class="helptext">[?]</a>
213
                                                <a href="#" class="helptext">[?]</a>
201
                                            <div class="hint">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.</div>
214
                                                <div class="hint">Make a single holiday on a range repeated yearly. For example, selecting August 1, 2012  and August 10, 2012 will make all days between August 1 and 10 a holiday, and will affect August 1-10 in other years.</div>
202
                                        </li>
215
                                            </li>
203
                                        <li class="radio">
216
                                            <li class="checkbox">
204
                                            <input type="radio" name="newOperation" id="newOperationField" value="holidayrange" />
217
                                                <input type="checkbox" name="allBranches" id="allBranches" />
205
                                            <label for="newOperationField">Holidays on a range</label>.
218
                                                <label for="allBranches">Copy to all libraries</label>.
206
                                            <a href="#" class="helptext">[?]</a>
219
                                                <a href="#" class="helptext">[?]</a>
207
                                            <div class="hint">Make a single holiday on a range. For example, selecting August 1, 2012  and August 10, 2012 will make all days between August 1 and 10 a holiday, but will not affect August 1-10 in other years.</div>
220
                                                <div class="hint">If checked, this holiday will be copied to all libraries. If the holiday already exists for a library, no change is made.</div>
208
                                        </li>
221
                                            </li>
209
                                        <li class="radio">
222
                                        </ol>
210
                                            <input type="radio" name="newOperation" id="newOperationFieldyear" value="holidayrangerepeat" />
223
                                        <fieldset class="action">
211
                                            <label for="newOperationFieldyear">Holidays repeated yearly on a range</label>.
224
                                            <input type="submit" name="submit" value="Save" />
212
                                            <a href="#" class="helptext">[?]</a>
225
                                            <a href="#" class="cancel hidePanel newHoliday">Cancel</a>
213
                                            <div class="hint">Make a single holiday on a range repeated yearly. For example, selecting August 1, 2012  and August 10, 2012 will make all days between August 1 and 10 a holiday, and will affect August 1-10 in other years.</div>
226
                                        </fieldset>
214
                                        </li>
227
                                    </fieldset> <!-- /.brief -->
215
                                        <li class="checkbox">
228
                                </form>
216
                                            <input type="checkbox" name="allBranches" id="allBranches" />
229
                            </div> <!-- /#newHoliday -->
217
                                            <label for="allBranches">Copy to all libraries</label>.
230
218
                                            <a href="#" class="helptext">[?]</a>
231
                            <div id="calendar-container">
219
                                            <div class="hint">If checked, this holiday will be copied to all libraries. If the holiday already exists for a library, no change is made.</div>
232
                                <h3>Calendar information</h3>
220
                                        </li>
233
                                <span id="calendar-anchor"></span>
221
                                    </ol>
234
                            </div>
222
                                    <fieldset class="action">
235
                            <div style="margin-top: 2em;">
223
                                        <input type="submit" name="submit" value="Save" />
236
                                <form action="copy-holidays.pl" method="post">
224
                                        <a href="#" class="cancel hidePanel newHoliday">Cancel</a>
237
                                    <input type="hidden" name="from_branchcode" value="[% branch | html %]" />
225
                                    </fieldset>
238
                                    <label for="branchcode">Copy holidays to:</label>
226
                                </fieldset> <!-- /.brief -->
239
                                    <select id="branchcode" name="branchcode">
227
                            </form>
240
                                        <option value=""></option>
228
                        </div> <!-- /#newHoliday -->
241
                                        [% FOREACH l IN Branches.all() %]
229
242
                                            <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
230
                        <div id="calendar-container">
243
                                        [% END %]
231
                            <h3>Calendar information</h3>
244
                                    </select>
232
                            <span id="calendar-anchor"></span>
245
                                    <input type="submit" value="Copy" />
233
                        </div>
246
                                </form>
234
                        <div style="margin-top: 2em;">
247
                            </div>
235
                            <form action="copy-holidays.pl" method="post">
248
                        </div> <!-- /.page-section -->
236
                                <input type="hidden" name="from_branchcode" value="[% branch | html %]" />
237
                                <label for="branchcode">Copy holidays to:</label>
238
                                <select id="branchcode" name="branchcode">
239
                                    <option value=""></option>
240
                                    [% FOREACH l IN Branches.all() %]
241
                                        <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
242
                                    [% END %]
243
                                </select>
244
                                <input type="submit" value="Copy" />
245
                            </form>
246
                        </div>
247
                    </div> <!-- /.col-sm-6 -->
249
                    </div> <!-- /.col-sm-6 -->
248
250
249
                    <div class="col-sm-6">
251
                    <div class="col-sm-6">
250
                        <div class="help">
252
                        <div class="page-section">
251
                            <h4>Hints</h4>
253
                            <div class="help">
252
                            <ul>
254
                                <h4>Hints</h4>
253
                                <li>Search in the calendar the day you want to set as holiday.</li>
255
                                <ul>
254
                                <li>Click the date to add or edit a holiday.</li>
256
                                    <li>Search in the calendar the day you want to set as holiday.</li>
255
                                <li>Enter a title and description for the holiday.</li>
257
                                    <li>Click the date to add or edit a holiday.</li>
256
                                <li>Specify how the holiday should repeat.</li>
258
                                    <li>Enter a title and description for the holiday.</li>
257
                                <li>Click Save to finish.</li>
259
                                    <li>Specify how the holiday should repeat.</li>
258
                            </ul>
260
                                    <li>Click Save to finish.</li>
259
                            <h4>Key</h4>
261
                                </ul>
260
                            <p>
262
                                <h4>Key</h4>
261
                                <span class="key normalday">Working day</span>
263
                                <p>
262
                                <span class="key holiday">Unique holiday</span>
264
                                    <span class="key normalday">Working day</span>
263
                                <span class="key repeatableweekly">Holiday repeating weekly</span>
265
                                    <span class="key holiday">Unique holiday</span>
264
                                <span class="key repeatableyearly">Holiday repeating yearly</span>
266
                                    <span class="key repeatableweekly">Holiday repeating weekly</span>
265
                                <span class="key exception">Holiday exception</span>
267
                                    <span class="key repeatableyearly">Holiday repeating yearly</span>
266
                            </p>
268
                                    <span class="key exception">Holiday exception</span>
267
                        </div> <!-- /#help -->
269
                                </p>
268
270
                            </div> <!-- /#help -->
269
                        <div id="holiday-list">
271
270
                            <!-- Exceptions First -->
272
                            <div id="holiday-list">
271
                            <!--   this will probably always have the least amount of data -->
273
                                <!-- Exceptions First -->
272
                            [% IF ( EXCEPTION_HOLIDAYS_LOOP ) %]
274
                                <!--   this will probably always have the least amount of data -->
273
                                <h3>Exceptions</h3>
275
                                [% IF ( EXCEPTION_HOLIDAYS_LOOP ) %]
274
                                <label class="controls">
276
                                    <h3>Exceptions</h3>
275
                                    <input type="checkbox" name="show_past" id="show_past_holidayexceptions" class="show_past" />
277
                                    <label class="controls">
276
                                    Show past entries
278
                                        <input type="checkbox" name="show_past" id="show_past_holidayexceptions" class="show_past" />
277
                                </label>
279
                                        Show past entries
278
                                <table id="holidayexceptions">
280
                                    </label>
279
                                    <thead>
281
                                    <table id="holidayexceptions">
280
                                        <tr>
282
                                        <thead>
281
                                            <th class="exception">Date</th>
283
                                            <tr>
282
                                            <th class="exception">Title</th>
284
                                                <th class="exception">Date</th>
283
                                            <th class="exception">Description</th>
285
                                                <th class="exception">Title</th>
284
                                        </tr>
286
                                                <th class="exception">Description</th>
285
                                    </thead>
286
                                    <tbody>
287
                                        [% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %]
288
                                            <tr data-date="[% EXCEPTION_HOLIDAYS_LOO.DATE_SORT | html %]">
289
                                                <td data-order="[% EXCEPTION_HOLIDAYS_LOO.DATE_SORT | html %]">
290
                                                    <a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch | uri %]&amp;calendardate=[% EXCEPTION_HOLIDAYS_LOO.DATE | uri %]">
291
                                                        [% EXCEPTION_HOLIDAYS_LOO.DATE | html %]
292
                                                    </a>
293
                                                </td>
294
                                                <td>[% EXCEPTION_HOLIDAYS_LOO.TITLE | html %]</td>
295
                                                <td>[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION | html %]</td>
296
                                            </tr>
287
                                            </tr>
297
                                        [% END %]
288
                                        </thead>
298
                                    </tbody>
289
                                        <tbody>
299
                                </table> <!-- /#holidayexceptions -->
290
                                            [% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %]
300
                            [% END # /IF ( EXCEPTION_HOLIDAYS_LOOP ) %]
291
                                                <tr data-date="[% EXCEPTION_HOLIDAYS_LOO.DATE_SORT | html %]">
301
292
                                                    <td data-order="[% EXCEPTION_HOLIDAYS_LOO.DATE_SORT | html %]">
302
                            [% IF ( WEEK_DAYS_LOOP ) %]
293
                                                        <a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch | uri %]&amp;calendardate=[% EXCEPTION_HOLIDAYS_LOO.DATE | uri %]">
303
                                <h3>Weekly - Repeatable holidays</h3>
294
                                                            [% EXCEPTION_HOLIDAYS_LOO.DATE | html %]
304
                                <table id="holidayweeklyrepeatable">
295
                                                        </a>
305
                                    <thead>
296
                                                    </td>
306
                                        <tr>
297
                                                    <td>[% EXCEPTION_HOLIDAYS_LOO.TITLE | html %]</td>
307
                                            <th class="repeatableweekly">Day of week</th>
298
                                                    <td>[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION | html %]</td>
308
                                            <th class="repeatableweekly">Title</th>
299
                                                </tr>
309
                                            <th class="repeatableweekly">Description</th>
300
                                            [% END %]
310
                                        </tr>
301
                                        </tbody>
311
                                    </thead>
302
                                    </table> <!-- /#holidayexceptions -->
312
                                    <tbody>
303
                                [% END # /IF ( EXCEPTION_HOLIDAYS_LOOP ) %]
313
                                        [% FOREACH WEEK_DAYS_LOO IN WEEK_DAYS_LOOP %]
304
305
                                [% IF ( WEEK_DAYS_LOOP ) %]
306
                                    <h3>Weekly - Repeatable holidays</h3>
307
                                    <table id="holidayweeklyrepeatable">
308
                                        <thead>
314
                                            <tr>
309
                                            <tr>
315
                                                <td>[% WEEK_DAYS_LOO.KEY | html %]</td>
310
                                                <th class="repeatableweekly">Day of week</th>
316
                                                <td>[% WEEK_DAYS_LOO.TITLE | html %]</td>
311
                                                <th class="repeatableweekly">Title</th>
317
                                                <td>[% WEEK_DAYS_LOO.DESCRIPTION | html %]</td>
312
                                                <th class="repeatableweekly">Description</th>
318
                                            </tr>
313
                                            </tr>
319
                                        [% END %]
314
                                        </thead>
320
                                    </tbody>
315
                                        <tbody>
321
                                </table> <!-- /#holidayweeklyrepeatable -->
316
                                            [% FOREACH WEEK_DAYS_LOO IN WEEK_DAYS_LOOP %]
322
                            [% END # / IF ( WEEK_DAYS_LOOP ) %]
317
                                                <tr>
323
318
                                                    <td>[% WEEK_DAYS_LOO.KEY | html %]</td>
324
                            [% IF ( DAY_MONTH_HOLIDAYS_LOOP ) %]
319
                                                    <td>[% WEEK_DAYS_LOO.TITLE | html %]</td>
325
                                <h3>Yearly - Repeatable holidays</h3>
320
                                                    <td>[% WEEK_DAYS_LOO.DESCRIPTION | html %]</td>
326
                                <table id="holidaysyearlyrepeatable">
321
                                                </tr>
327
                                    <thead>
328
                                        <tr>
329
                                            [% IF ( dateformat == "metric" ) %]
330
                                                <th class="repeatableyearly">Day/month</th>
331
                                            [% ELSE %]
332
                                                <th class="repeatableyearly">Month/day</th>
333
                                            [% END %]
322
                                            [% END %]
334
                                            <th class="repeatableyearly">Title</th>
323
                                        </tbody>
335
                                            <th class="repeatableyearly">Description</th>
324
                                    </table> <!-- /#holidayweeklyrepeatable -->
336
                                        </tr>
325
                                [% END # / IF ( WEEK_DAYS_LOOP ) %]
337
                                    </thead>
326
338
                                    <tbody>
327
                                [% IF ( DAY_MONTH_HOLIDAYS_LOOP ) %]
339
                                        [% FOREACH DAY_MONTH_HOLIDAYS_LOO IN DAY_MONTH_HOLIDAYS_LOOP %]
328
                                    <h3>Yearly - Repeatable holidays</h3>
329
                                    <table id="holidaysyearlyrepeatable">
330
                                        <thead>
340
                                            <tr>
331
                                            <tr>
341
                                                <td data-order="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT | html %]">
332
                                                [% IF ( dateformat == "metric" ) %]
342
                                                    [% DAY_MONTH_HOLIDAYS_LOO.DATE | html %]
333
                                                    <th class="repeatableyearly">Day/month</th>
343
                                                </td>
334
                                                [% ELSE %]
344
                                                <td>[% DAY_MONTH_HOLIDAYS_LOO.TITLE | html %]</td>
335
                                                    <th class="repeatableyearly">Month/day</th>
345
                                                <td>[% DAY_MONTH_HOLIDAYS_LOO.DESCRIPTION | html %]</td>
336
                                                [% END %]
337
                                                <th class="repeatableyearly">Title</th>
338
                                                <th class="repeatableyearly">Description</th>
346
                                            </tr>
339
                                            </tr>
347
                                        [% END %]
340
                                        </thead>
348
                                    </tbody>
341
                                        <tbody>
349
                                </table> <!-- /#holidaysyearlyrepeatable -->
342
                                            [% FOREACH DAY_MONTH_HOLIDAYS_LOO IN DAY_MONTH_HOLIDAYS_LOOP %]
350
                            [% END # /IF ( DAY_MONTH_HOLIDAYS_LOOP ) %]
343
                                                <tr>
351
344
                                                    <td data-order="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT | html %]">
352
                            [% IF ( HOLIDAYS_LOOP ) %]
345
                                                        [% DAY_MONTH_HOLIDAYS_LOO.DATE | html %]
353
                                <h3>Unique holidays</h3>
346
                                                    </td>
354
                                <label class="controls">
347
                                                    <td>[% DAY_MONTH_HOLIDAYS_LOO.TITLE | html %]</td>
355
                                    <input type="checkbox" name="show_past" id="show_past_holidaysunique" class="show_past" />
348
                                                    <td>[% DAY_MONTH_HOLIDAYS_LOO.DESCRIPTION | html %]</td>
356
                                    Show past entries
349
                                                </tr>
357
                                </label>
350
                                            [% END %]
358
                                <table id="holidaysunique">
351
                                        </tbody>
359
                                    <thead>
352
                                    </table> <!-- /#holidaysyearlyrepeatable -->
360
                                        <tr>
353
                                [% END # /IF ( DAY_MONTH_HOLIDAYS_LOOP ) %]
361
                                            <th class="holiday">Date</th>
354
362
                                            <th class="holiday">Title</th>
355
                                [% IF ( HOLIDAYS_LOOP ) %]
363
                                            <th class="holiday">Description</th>
356
                                    <h3>Unique holidays</h3>
364
                                        </tr>
357
                                    <label class="controls">
365
                                    </thead>
358
                                        <input type="checkbox" name="show_past" id="show_past_holidaysunique" class="show_past" />
366
                                    <tbody>
359
                                        Show past entries
367
                                        [% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %]
360
                                    </label>
368
                                            <tr data-date="[% HOLIDAYS_LOO.DATE_SORT | html %]">
361
                                    <table id="holidaysunique">
369
                                                <td data-order="[% HOLIDAYS_LOO.DATE_SORT | html %]">
362
                                        <thead>
370
                                                    <a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch | uri %]&amp;calendardate=[% HOLIDAYS_LOO.DATE | uri %]">
363
                                            <tr>
371
                                                        [% HOLIDAYS_LOO.DATE | html %]
364
                                                <th class="holiday">Date</th>
372
                                                    </a>
365
                                                <th class="holiday">Title</th>
373
                                                </td>
366
                                                <th class="holiday">Description</th>
374
                                                <td>[% HOLIDAYS_LOO.TITLE | html %]</td>
375
                                                <td>[% HOLIDAYS_LOO.DESCRIPTION.replace('\\\r\\\n', '<br />') | html %]</td>
376
                                            </tr>
367
                                            </tr>
377
                                        [% END %]
368
                                        </thead>
378
                                    </tbody>
369
                                        <tbody>
379
                                </table> <!-- #holidaysunique -->
370
                                            [% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %]
380
                            [% END # /IF ( HOLIDAYS_LOOP ) %]
371
                                                <tr data-date="[% HOLIDAYS_LOO.DATE_SORT | html %]">
381
                        </div> <!-- /#holiday-list -->
372
                                                    <td data-order="[% HOLIDAYS_LOO.DATE_SORT | html %]">
373
                                                        <a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch | uri %]&amp;calendardate=[% HOLIDAYS_LOO.DATE | uri %]">
374
                                                            [% HOLIDAYS_LOO.DATE | html %]
375
                                                        </a>
376
                                                    </td>
377
                                                    <td>[% HOLIDAYS_LOO.TITLE | html %]</td>
378
                                                    <td>[% HOLIDAYS_LOO.DESCRIPTION.replace('\\\r\\\n', '<br />') | html %]</td>
379
                                                </tr>
380
                                            [% END %]
381
                                        </tbody>
382
                                    </table> <!-- #holidaysunique -->
383
                                [% END # /IF ( HOLIDAYS_LOOP ) %]
384
                            </div> <!-- /#holiday-list -->
385
                        </div> <!-- /.page-section -->
382
                    </div> <!-- /.col-sm-6 -->
386
                    </div> <!-- /.col-sm-6 -->
383
                </div> <!-- /.row -->
387
                </div> <!-- /.row -->
384
            </main>
388
            </main>
385
- 

Return to bug 32050