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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt (-1 / +68 lines)
Lines 1-6 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE KohaTimes %]
4
[% PROCESS 'display-library-address.inc' %]
5
[% PROCESS 'display-library-address.inc' %]
5
[% USE AdditionalContents %]
6
[% USE AdditionalContents %]
6
[% IF library %][% SET OpacLibraryInfo = library.opac_info( lang => lang ) %][% END %]
7
[% IF library %][% SET OpacLibraryInfo = library.opac_info( lang => lang ) %][% END %]
Lines 33-38 Link Here
33
            border: 0;
34
            border: 0;
34
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
35
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
35
        }
36
        }
37
        .library_hours_table {
38
            width: auto;
39
        }
36
    </style>
40
    </style>
37
[% END %]
41
[% END %]
38
</head>
42
</head>
Lines 40-45 Link Here
40
[% INCLUDE 'bodytag.inc' bodyid='opac-library' bodyclass='scrollto' %]
44
[% INCLUDE 'bodytag.inc' bodyid='opac-library' bodyclass='scrollto' %]
41
[% INCLUDE 'masthead.inc' %]
45
[% INCLUDE 'masthead.inc' %]
42
46
47
[% BLOCK dayname %]
48
    [% IF day == 0 %]
49
        <span>Sunday</span>
50
    [% ELSIF day == 1 %]
51
        <span>Monday</span>
52
    [% ELSIF day == 2 %]
53
        <span>Tuesday</span>
54
    [% ELSIF day == 3 %]
55
        <span>Wednesday</span>
56
    [% ELSIF day == 4 %]
57
        <span>Thursday</span>
58
    [% ELSIF day == 5 %]
59
        <span>Friday</span>
60
    [% ELSE %]
61
        <span>Saturday</span>
62
    [% END %]
63
[% END %]
64
43
[% BLOCK library_description %]
65
[% BLOCK library_description %]
44
    <div property="description"> [% IF OpacLibraryInfo %][% OpacLibraryInfo.content | $raw %][% END %] </div>
66
    <div property="description"> [% IF OpacLibraryInfo %][% OpacLibraryInfo.content | $raw %][% END %] </div>
45
[% END %]
67
[% END %]
Lines 60-65 Link Here
60
            <p class="branchurl"><a href="[% library.branchurl | url %]" property="url">[% library.branchurl | html %]</a></p>
82
            <p class="branchurl"><a href="[% library.branchurl | url %]" property="url">[% library.branchurl | html %]</a></p>
61
        [% END %]
83
        [% END %]
62
    [% END %]
84
    [% END %]
85
86
    [% SET CalendarFirstDayOfWeek = Koha.Preference("CalendarFirstDayOfWeek") %]
87
    [% SET set_hours = 0 %]
88
    [% IF library.library_hours.count > 0 %]
89
        [% FOR i IN [0..6] %]
90
            [% IF library.library_hours.as_list.$i.open_time != null || library.library_hours.as_list.$i.close_time != null %]
91
                [% set_hours = 1 %]
92
            [% END %]
93
        [% END %]
94
    [% END %]
95
    [% IF set_hours > 0 # Existing library %]
96
        [% SET library_hours = library.library_hours.as_list %]
97
        <div id="library_hours">
98
            <table id="[% library.branchcode | html %]_hours_table" class="table library_hours_table">
99
                <caption>Hours</caption>
100
                <thead>
101
                    <tr>
102
                        <th>&nbsp;</th>
103
                        <th>Opening time</th>
104
                        <th>Closing time</th>
105
                    </tr>
106
                </thead>
107
                <tbody>
108
                    [% FOR i IN [0..6] %]
109
                        [% SET d = ( CalendarFirstDayOfWeek + i) % 7 %]
110
                        [% SET hr = library_hours.$d %]
111
                        <tr id="hours_[% d | html %]">
112
                            <th scope="row">
113
                                <span>[% PROCESS dayname day=d %]</span>
114
                            </th>
115
                            [% IF ( hr.open_time == null && hr.close_time == null ) %]
116
                                <td colspan="2">Closed</td>
117
                            [% ELSE %]
118
                                <td>
119
                                    <span>[% IF hr.open_time != null %][% hr.open_time | $KohaTimes %][% END %]</span>
120
                                </td>
121
                                <td>
122
                                    <span>[% IF hr.close_time != null %][% hr.close_time | $KohaTimes %][% END %]</span>
123
                                </td>
124
                            [% END %]
125
                        </tr>
126
                    [% END %]
127
                </tbody>
128
            </table>
129
        </div>
130
    [% END %]
63
[% END %]
131
[% END %]
64
132
65
<div class="main">
133
<div class="main">
66
- 

Return to bug 39593