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

(-)a/installer/data/mysql/atomicupdate/bug_6796_-_add_branch_hours_table.pl (-1 / +1 lines)
Lines 11-17 return { Link Here
11
            $dbh->do(q{
11
            $dbh->do(q{
12
                CREATE TABLE branch_hours (
12
                CREATE TABLE branch_hours (
13
                    branchcode varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
13
                    branchcode varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
14
                    day int(1) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 0,
14
                    day enum('0','1','2','3','4','5','6') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
15
                    open_time time COLLATE utf8mb4_unicode_ci DEFAULT NULL,
15
                    open_time time COLLATE utf8mb4_unicode_ci DEFAULT NULL,
16
                    close_time time COLLATE utf8mb4_unicode_ci DEFAULT NULL,
16
                    close_time time COLLATE utf8mb4_unicode_ci DEFAULT NULL,
17
                    PRIMARY KEY (branchcode, day),
17
                    PRIMARY KEY (branchcode, day),
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1570-1576 DROP TABLE IF EXISTS branch_hours; Link Here
1570
/*!40101 SET character_set_client = utf8 */;
1570
/*!40101 SET character_set_client = utf8 */;
1571
CREATE TABLE branch_hours (
1571
CREATE TABLE branch_hours (
1572
    branchcode varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
1572
    branchcode varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
1573
    day int(1) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 0,
1573
    day enum('0','1','2','3','4','5','6') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
1574
    open_time time COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1574
    open_time time COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1575
    close_time time COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1575
    close_time time COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1576
    PRIMARY KEY (branchcode, day),
1576
    PRIMARY KEY (branchcode, day),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt (-7 / +6 lines)
Lines 289-309 Libraries › Administration › Koha Link Here
289
                            [% IF opening_hours # Existing library %]
289
                            [% IF opening_hours # Existing library %]
290
                                [% daycount = 0 %]
290
                                [% daycount = 0 %]
291
                                [% FOREACH hr IN opening_hours %]
291
                                [% FOREACH hr IN opening_hours %]
292
                                <tr id="hours_[% daycount %]">
292
                                <tr id="hours_[% daycount | html %]">
293
                                    <td>
293
                                    <td>
294
                                        [% PROCESS dayname day=daycount %]
294
                                        [% PROCESS dayname day=daycount %]
295
                                        <input type="hidden" value="[% daycount %]" name="day">
295
                                        <input type="hidden" value="[% daycount | html %]" name="day">
296
                                    </td>
296
                                    </td>
297
                                    <td>
297
                                    <td>
298
                                        [% IF hr.day == daycount && hr.open_time %]
298
                                        [% IF hr.day == daycount && hr.open_time %]
299
                                        <input type="time" value="[% hr.open_time %]" name="open_time">
299
                                        <input type="time" value="[% hr.open_time | html %]" name="open_time">
300
                                        [% ELSE %]
300
                                        [% ELSE %]
301
                                        <input type="time" value="" name="open_time">
301
                                        <input type="time" value="" name="open_time">
302
                                        [% END %]
302
                                        [% END %]
303
                                    </td>
303
                                    </td>
304
                                    <td>
304
                                    <td>
305
                                        [% IF hr.day == daycount && hr.close_time %]
305
                                        [% IF hr.day == daycount && hr.close_time %]
306
                                        <input type="time" value="[% hr.close_time %]" name="close_time">
306
                                        <input type="time" value="[% hr.close_time | html %]" name="close_time">
307
                                        [% ELSE %]
307
                                        [% ELSE %]
308
                                        <input type="time" value="" name="close_time">
308
                                        <input type="time" value="" name="close_time">
309
                                        [% END %]
309
                                        [% END %]
Lines 313-322 Libraries &rsaquo; Administration &rsaquo; Koha Link Here
313
                                [% END %]
313
                                [% END %]
314
                            [% ELSE # New library %]
314
                            [% ELSE # New library %]
315
                                [% FOREACH daycount IN [0..6] %]
315
                                [% FOREACH daycount IN [0..6] %]
316
                                <tr id="hours_[% day %]">
316
                                <tr id="hours_[% day | html %]">
317
                                    <td>
317
                                    <td>
318
                                        [% PROCESS dayname day=daycount %]
318
                                        [% PROCESS dayname day=daycount %]
319
                                        <input type="hidden" value="[% daycount %]" name="day">
319
                                        <input type="hidden" value="[% daycount | html %]" name="day">
320
                                    </td>
320
                                    </td>
321
                                    <td>
321
                                    <td>
322
                                        <input type="time" value="" name="open_time">
322
                                        <input type="time" value="" name="open_time">
323
- 

Return to bug 6796