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

(-)a/koha-tmpl/intranet-tmpl/prog/css/discretecalendar.css (-4 / +4 lines)
Lines 159-177 td.repeatableyearly a.ui-state-default { Link Here
159
159
160
fieldset.brief {
160
fieldset.brief {
161
    border:0;
161
    border:0;
162
    margin-top:0;
162
    margin:0;
163
}
163
}
164
164
165
h1 select {
165
h1 select {
166
    width:20em;
166
    width:20em;
167
}
167
}
168
168
169
div.yui-b fieldset.brief ol {
169
fieldset.brief ol {
170
    font-size:100%;
170
    font-size:100%;
171
}
171
}
172
172
173
div.yui-b fieldset.brief li,
173
fieldset.brief li,
174
div.yui-b fieldset.brief li.radio {
174
fieldset.brief li.radio {
175
    padding:.2em 0;
175
    padding:.2em 0;
176
}
176
}
177
177
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/discrete_calendar.tt (-54 / +56 lines)
Lines 1-27 Link Here
1
[% USE raw %]
1
[% USE Asset %]
2
[% USE Asset %]
2
[% USE Branches %]
3
[% USE Branches %]
3
[% SET footerjs = 1 %]
4
[% SET footerjs = 1 %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Tools &rsaquo; [% Branches.GetName( branch ) %] calendar</title>
6
<title>Koha &rsaquo; Tools &rsaquo; [% Branches.GetName( branch ) | html %] calendar</title>
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
7
[% Asset.css("css/datatables.css") %]
8
[% Asset.css("css/datatables.css") | $raw %]
8
[% Asset.css("css/discretecalendar.css") %]
9
[% Asset.css("css/discretecalendar.css") | $raw %]
9
</head>
10
</head>
10
11
11
<body id="tools_holidays" class="tools">
12
<body id="tools_holidays" class="tools">
12
[% INCLUDE 'header.inc' %]
13
[% INCLUDE 'header.inc' %]
13
[% INCLUDE 'cat-search.inc' %]
14
[% INCLUDE 'cat-search.inc' %]
14
15
15
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; [% Branches.GetName( branch ) %] calendar</div>
16
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; [% Branches.GetName( branch ) | html %] calendar</div>
16
17
17
<div id="doc3" class="yui-t1">
18
<div id="main" class="main container-fluid">
19
    <div class="row">
20
        <div class="col-sm-10 col-sm-push-2">
21
            <main>
18
22
19
   <div id="bd">
23
    <h2>[% Branches.GetName( branch ) | html %] calendar</h2>
20
    <div id="yui-main">
24
21
    <div class="yui-b">
25
    <div class="row">
22
    <h2>[% Branches.GetName( branch ) %] calendar</h2>
26
    <div class="col-sm-8">
23
    <div class="yui-g">
24
    <div class="yui-u first" style="width:60%">
25
        <label for="branch">Define the holidays for:</label>
27
        <label for="branch">Define the holidays for:</label>
26
        <form method="post" onsubmit="return validateForm('CopyCalendar')">
28
        <form method="post" onsubmit="return validateForm('CopyCalendar')">
27
            <select id="branch" name="branch">
29
            <select id="branch" name="branch">
Lines 32-38 Link Here
32
                <option value=""></option>
34
                <option value=""></option>
33
                [% FOREACH l IN Branches.all() %]
35
                [% FOREACH l IN Branches.all() %]
34
                    [% UNLESS branch == l.branchcode %]
36
                    [% UNLESS branch == l.branchcode %]
35
                    <option value="[% l.branchcode %]">[% l.branchname %]</option>
37
                    <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
36
                    [% END %]
38
                    [% END %]
37
                [% END %]
39
                [% END %]
38
            </select>
40
            </select>
Lines 77-83 Link Here
77
                        <input type="hidden" id="Year" name="Year" />
79
                        <input type="hidden" id="Year" name="Year" />
78
                    </li>
80
                    </li>
79
                    <li class="dateinsert">
81
                    <li class="dateinsert">
80
                        <b>To date: </b>
82
                        <strong>To date: </strong>
81
                        <input type="text" id="from_copyToDatePicker" name="toDate" size="20" class="datepicker" />
83
                        <input type="text" id="from_copyToDatePicker" name="toDate" size="20" class="datepicker" />
82
                    </li>
84
                    </li>
83
                    <li>
85
                    <li>
Lines 154-160 Link Here
154
<!-- ************************************************************************************** -->
156
<!-- ************************************************************************************** -->
155
157
156
</div>
158
</div>
157
<div class="yui-u" style="width : 40%">
159
<div class="col-sm-4">
158
    <div class="help">
160
    <div class="help">
159
        <h4>Hints</h4>
161
        <h4>Hints</h4>
160
        <ul>
162
        <ul>
Lines 171-177 Link Here
171
        </ul>
173
        </ul>
172
        <h4>Key</h4>
174
        <h4>Key</h4>
173
        <p>
175
        <p>
174
            <span class="key normalday">Working day </span>
176
            <span class="key normalday">Working day</span>
175
            <span class="key holiday">Unique holiday</span>
177
            <span class="key holiday">Unique holiday</span>
176
            <span class="key repeatableweekly">Holiday repeating weekly</span>
178
            <span class="key repeatableweekly">Holiday repeating weekly</span>
177
            <span class="key repeatableyearly">Holiday repeating yearly</span>
179
            <span class="key repeatableyearly">Holiday repeating yearly</span>
Lines 193-200 Link Here
193
        <tbody>
195
        <tbody>
194
            [% FOREACH need_validation_holiday IN NEED_VALIDATION_HOLIDAYS %]
196
            [% FOREACH need_validation_holiday IN NEED_VALIDATION_HOLIDAYS %]
195
            <tr>
197
            <tr>
196
                <td><a href="#doc3" onclick="go_to_date('[% need_validation_holiday.date %]')"><span title="[% need_validation_holiday.DATE_SORT %]">[% need_validation_holiday.outputdate %]</span></a></td>
198
                <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>
197
                <td>[% need_validation_holiday.note %]</td>
199
                <td>[% need_validation_holiday.note | html %]</td>
198
            </tr>
200
            </tr>
199
            [% END %]
201
            [% END %]
200
        </tbody>
202
        </tbody>
Lines 213-226 Link Here
213
        <tbody>
215
        <tbody>
214
            [% FOREACH WEEK_DAYS_LOO IN WEEKLY_HOLIDAYS %]
216
            [% FOREACH WEEK_DAYS_LOO IN WEEKLY_HOLIDAYS %]
215
            <tr>
217
            <tr>
216
                <td>[% WEEK_DAYS_LOO.weekday %]</td>
218
                <td>[% WEEK_DAYS_LOO.weekday | html %]</td>
217
            </td>
219
                <td>[% WEEK_DAYS_LOO.note | html %]</td>
218
            <td>[% WEEK_DAYS_LOO.note %]</td>
220
            </tr>
219
        </tr>
221
            [% END %]
220
        [% END %]
222
        </tbody>
221
    </tbody>
223
    </table>
222
</table>
224
    [% END %]
223
[% END %]
224
225
225
[% IF ( REPEATABLE_HOLIDAYS ) %]
226
[% IF ( REPEATABLE_HOLIDAYS ) %]
226
<h3>Yearly - Repeatable holidays</h3>
227
<h3>Yearly - Repeatable holidays</h3>
Lines 239-249 Link Here
239
        [% FOREACH DAY_MONTH_HOLIDAYS_LOO IN REPEATABLE_HOLIDAYS %]
240
        [% FOREACH DAY_MONTH_HOLIDAYS_LOO IN REPEATABLE_HOLIDAYS %]
240
        <tr>
241
        <tr>
241
            [% IF ( dateformat == "metric" ) %]
242
            [% IF ( dateformat == "metric" ) %]
242
            <td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT %]">[% DAY_MONTH_HOLIDAYS_LOO.day %]/[% DAY_MONTH_HOLIDAYS_LOO.month %]</span></td>
243
            <td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT | html %]">[% DAY_MONTH_HOLIDAYS_LOO.day | html %]/[% DAY_MONTH_HOLIDAYS_LOO.month | html %]</span></td>
243
            [% ELSE %]
244
            [% ELSE %]
244
            <td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT %]">[% DAY_MONTH_HOLIDAYS_LOO.month %]/[% DAY_MONTH_HOLIDAYS_LOO.day %]</span></td>
245
            <td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT | html %]">[% DAY_MONTH_HOLIDAYS_LOO.month | html %]/[% DAY_MONTH_HOLIDAYS_LOO.day | html %]</span></td>
245
            [% END %]
246
            [% END %]
246
            <td>[% DAY_MONTH_HOLIDAYS_LOO.note %]</td>
247
            <td>[% DAY_MONTH_HOLIDAYS_LOO.note | html %]</td>
247
        </tr>
248
        </tr>
248
        [% END %]
249
        [% END %]
249
    </tbody>
250
    </tbody>
Lines 262-269 Link Here
262
    <tbody>
263
    <tbody>
263
        [% FOREACH HOLIDAYS_LOO IN UNIQUE_HOLIDAYS %]
264
        [% FOREACH HOLIDAYS_LOO IN UNIQUE_HOLIDAYS %]
264
        <tr>
265
        <tr>
265
            <td><a href="#doc3" onclick="go_to_date('[% HOLIDAYS_LOO.date %]')"><span title="[% HOLIDAYS_LOO.DATE_SORT %]">[% HOLIDAYS_LOO.outputdate %]</span></a></td>
266
            <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>
266
            <td>[% HOLIDAYS_LOO.note %]</td>
267
            <td>[% HOLIDAYS_LOO.note | html %]</td>
267
        </tr>
268
        </tr>
268
        [% END %]
269
        [% END %]
269
    </tbody>
270
    </tbody>
Lines 282-289 Link Here
282
    <tbody>
283
    <tbody>
283
        [% FOREACH float_holiday IN FLOAT_HOLIDAYS %]
284
        [% FOREACH float_holiday IN FLOAT_HOLIDAYS %]
284
        <tr>
285
        <tr>
285
            <td><a href="#doc3" onclick="go_to_date('[% float_holiday.date %]')"><span title="[% float_holiday.DATE_SORT %]">[% float_holiday.outputdate %]</span></a></td>
286
            <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>
286
            <td>[% float_holiday.note %]</td>
287
            <td>[% float_holiday.note | html %]</td>
287
        </tr>
288
        </tr>
288
        [% END %]
289
        [% END %]
289
    </tbody>
290
    </tbody>
Lines 292-320 Link Here
292
</div>
293
</div>
293
</div>
294
</div>
294
</div>
295
</div>
295
</div>
296
</div>
297
296
298
<div class="yui-b noprint">
297
            </main>
299
[% INCLUDE 'tools-menu.inc' %]
298
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
300
</div>
299
301
</div>
300
        <div class="col-sm-2 col-sm-pull-10">
301
            <aside>
302
                [% INCLUDE 'tools-menu.inc' %]
303
            </aside>
304
        </div> <!-- .col-sm-2.col-sm-pull-10 -->
305
     </div> <!-- /.row -->
306
302
[% MACRO jsinclude BLOCK %]
307
[% MACRO jsinclude BLOCK %]
303
[% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") %]
308
[% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
304
[% INCLUDE 'calendar.inc' %]
309
[% INCLUDE 'calendar.inc' %]
305
[% INCLUDE 'datatables.inc' %]
310
[% INCLUDE 'datatables.inc' %]
306
<script type="text/javascript">
311
<script>
307
    //<![CDATA[
308
        var weekdays = new Array(_("Sundays"),_("Mondays"),_("Tuesdays"),_("Wednesdays"),_("Thursdays"),_("Fridays"),_("Saturdays"));
312
        var weekdays = new Array(_("Sundays"),_("Mondays"),_("Tuesdays"),_("Wednesdays"),_("Thursdays"),_("Fridays"),_("Saturdays"));
309
        // Array containing all the information about each date in the calendar.
313
        // Array containing all the information about each date in the calendar.
310
        var datesInfos = new Array();
314
        var datesInfos = new Array();
311
        [% FOREACH date IN datesInfos %]
315
        [% FOREACH date IN datesInfos %]
312
            datesInfos["[% date.date %]"] = {
316
            datesInfos["[% date.date | html %]"] = {
313
                title : "[% date.note %]",
317
                title : "[% date.note | html %]",
314
                outputdate : "[% date.outputdate %]",
318
                outputdate : "[% date.outputdate | html %]",
315
                holiday_type:"[% date.holiday_type %]",
319
                holiday_type:"[% date.holiday_type | html %]",
316
                open_hour: "[% date.open_hour %]",
320
                open_hour: "[% date.open_hour | html %]",
317
                close_hour: "[% date.close_hour %]"
321
                close_hour: "[% date.close_hour | html %]"
318
            };
322
            };
319
        [% END %]
323
        [% END %]
320
324
Lines 397-403 Link Here
397
401
398
        function changeBranch () {
402
        function changeBranch () {
399
            var branch = $("#branch option:selected").val();
403
            var branch = $("#branch option:selected").val();
400
            location.href='/cgi-bin/koha/tools/discrete_calendar.pl?branch=' + branch + '&calendardate=' + "[% calendardate %]";
404
            location.href='/cgi-bin/koha/tools/discrete_calendar.pl?branch=' + branch + '&calendardate=' + "[% calendardate | html %]";
401
        }
405
        }
402
406
403
        function Help() {
407
        function Help() {
Lines 597-606 Link Here
597
                beforeShowDay: function(thedate) {
601
                beforeShowDay: function(thedate) {
598
                    return dateStatusHandler(thedate);
602
                    return dateStatusHandler(thedate);
599
                },
603
                },
600
                defaultDate: new Date("[% keydate %]"),
604
                defaultDate: new Date("[% keydate | html %]"),
601
                minDate: new Date("[% minDate %]"),
605
                minDate: new Date("[% minDate | html %]"),
602
                maxDate: new Date("[% maxDate %]"),
606
                maxDate: new Date("[% maxDate | html %]"),
603
                dateFormat: "[% datepickerformat %]"
607
                dateFormat: "[% datepickerformat | html %]"
604
            });
608
            });
605
            //Main datepicker
609
            //Main datepicker
606
            $("#jcalendar-container").datepicker({
610
            $("#jcalendar-container").datepicker({
Lines 677-683 Link Here
677
                }
681
                }
678
            });
682
            });
679
        });
683
        });
680
    //]]>
681
</script>
684
</script>
682
[% END %]
685
[% END %]
683
[% INCLUDE 'intranet-bottom.inc' %]
686
[% INCLUDE 'intranet-bottom.inc' %]
684
- 

Return to bug 17015