It would be great if there were a way to display the library hours defined in libraries on the OPAC library listing. Preferably in the desired format (24hr or 12hr). I am not finding any information about whether this is possible yet.
Bug 39593: Show branch hours in OPAC
Created attachment 180765 [details] [review] Bug 39593: Show library hours in OPAC This patch adds library hours to the information display on the OPAC's libraries page. To test, apply the patch and add hours to one or more libraries if necessary (Administration -> Libraries). - In the OPAC, go to the Libraries page. - The libraries you added hours for should show a table of days with opening and closing times. - If both opening and closing times on a day are empty the table shows "Closed". - Libraries without hours should not show the table of hours. Sponsored-by: Athens County Public Libraries
This works, but are you able to address the option of time format mentioned in the bug?
Works on my end and I'd almost be ready to sign it off. Opening hours are defined with the library. They display just fine. (Except for the format issue outlined by Christopher. We could live with that.) Closing days, holidays etc however, defined via Tools / Calendar are not (yet?) taken into account. I think those would be quite relevant for the user. Shouldn't they end up here as well? Say, the regular opening hours for Friday is 09:00 .. 14:00, and they show on the libraries page. But just this week Friday, April 18th the library is closed due to a public holiday in my region. PS: It is a bit strange from the Koha admin UI, that those two, IMHO closely related things live so far apart. But that's a different story.
(In reply to Alexander Wagner from comment #4) > Works on my end and I'd almost be ready to sign it off. > > Opening hours are defined with the library. They display just fine. (Except > for the format issue outlined by Christopher. We could live with that.) > > Closing days, holidays etc however, defined via Tools / Calendar are not > (yet?) taken into account. > > I think those would be quite relevant for the user. Shouldn't they end up > here as well? > > Say, the regular opening hours for Friday is 09:00 .. 14:00, and they show > on the libraries page. But just this week Friday, April 18th the library is > closed due to a public holiday in my region. > > PS: It is a bit strange from the Koha admin UI, that those two, IMHO closely > related things live so far apart. But that's a different story. Hi Alexander, the calender in the tools is relevant for calculating due dates, overdue notices and fines. Although our library is open 24/7 on 365 days per year we have holidays in our calender because we don't want to have due dates on weekends or to send out overdue letters on christmas ;-) But thats why we would not display them in the opac, they have nothing to do with our opening hours.
> the calender in the tools is relevant for calculating due dates, overdue notices and fines. Sure. I understood that as well. (Still I wonder why the two are so far away from each other.) I was mainly wondering if for the implementation done here it was a conscious decision to hook up with the per library opening hours only, or if the holiday calendar was just missed out. If holidays should be neglected in this display I'd work myself through the sign-off ASAP. :) > our library is open 24/7 on 365 days per year Same here as well. However, you will not find any library staff on the major holidays. It might be quite helpful for the patron to hint on this fact. One may also argue that "we are open 24/7" does not require any opening hours and their display in the first place ;) BTW: I intend give our opening hours as the staffed hours. Not as "in principle the building is not locked" hours.
(In reply to Christopher Brannon from comment #3) > This works, but are you able to address the option of time format mentioned > in the bug? In my testing the time format was correct according to the system preference. Can you describe what you're seeing? (In reply to Alexander Wagner from comment #4) > Closing days, holidays etc however, defined via Tools / Calendar are not > (yet?) taken into account. The patch re-uses code which is used in the staff interface for displaying library hours in library administration. That view doesn't take holidays into account.
(In reply to Owen Leonard from comment #7) > (In reply to Christopher Brannon from comment #3) > > This works, but are you able to address the option of time format mentioned > > in the bug? > > In my testing the time format was correct according to the system > preference. Can you describe what you're seeing? Well, how about that. I didn't even know there was a setting for that. Is it supposed to show 12 hour time with a leading zero? > (In reply to Alexander Wagner from comment #4) > > Closing days, holidays etc however, defined via Tools / Calendar are not > > (yet?) taken into account. > > The patch re-uses code which is used in the staff interface for displaying > library hours in library administration. That view doesn't take holidays > into account. I do think at some time the calendars need to be folded into the branches, and holidays need to be considered for showing on page, even if in a separate holiday table. But that is for another bug. I also think that there needs to be some marriage between the hours and the calendar. It is weird to define the hours one place, then having to define closed days somewhere else. It is redundant. We should be able to define regular hours, and then define holiday exceptions. Its all a bit muddy and needs cleaning up. But again, that is for another bug. I will sign off on this. Thanks for your help on this!
Created attachment 180974 [details] [review] Bug 39593: Show library hours in OPAC This patch adds library hours to the information display on the OPAC's libraries page. To test, apply the patch and add hours to one or more libraries if necessary (Administration -> Libraries). - In the OPAC, go to the Libraries page. - The libraries you added hours for should show a table of days with opening and closing times. - If both opening and closing times on a day are empty the table shows "Closed". - Libraries without hours should not show the table of hours. Sponsored-by: Athens County Public Libraries Signed-off-by: Christopher <cbrannon@cdalibrary.org>
Works as expected.
Created attachment 180976 [details] [review] Bug 39593: Show library hours in OPAC This patch adds library hours to the information display on the OPAC's libraries page. To test, apply the patch and add hours to one or more libraries if necessary (Administration -> Libraries). - In the OPAC, go to the Libraries page. - The libraries you added hours for should show a table of days with opening and closing times. - If both opening and closing times on a day are empty the table shows "Closed". - Libraries without hours should not show the table of hours. Sponsored-by: Athens County Public Libraries Signed-off-by: Christopher <cbrannon@cdalibrary.org> Signed-off-by: Alexander Wagner <alexander.wagner@desy.de>
Note: the diff shows some "magics" that might pose a miss-handling in non-english OPAC displays. IOW I am unsure if the literal `Sunday` gets translated, or a literal `Opening time`. (I don't know enough of the tt-handling yet, especially wrt NLS.)
Hi Alexander, I have checked the patch - everything in there is translatable. Our tools parse the HTML for strings. Constructs like <span>Sunday</span> etc. will be picked up by the tools.