From ec7ef9030b7641c12c3212875dd0ae724d239415 Mon Sep 17 00:00:00 2001 From: Matt Bernhardt Date: Thu, 21 Oct 2021 13:58:41 -0400 Subject: [PATCH 1/5] closes UXWS-1193; updates label on study spaces partial --- page-study-spaces.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page-study-spaces.php b/page-study-spaces.php index f64f9fbb..7ae470ed 100644 --- a/page-study-spaces.php +++ b/page-study-spaces.php @@ -119,7 +119,7 @@ Show on map:

- Open today
+ Today's hours:
Date: Thu, 21 Oct 2021 14:55:31 -0400 Subject: [PATCH 2/5] closes UXWS-1242; adds condition to link builder on locations page --- page-main-locations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page-main-locations.php b/page-main-locations.php index e1a56ce7..d68be0c5 100755 --- a/page-main-locations.php +++ b/page-main-locations.php @@ -198,7 +198,7 @@ $pageLink = get_permalink( $pageID ); ?>
  • - +

    From fda9c6b941ec52bbe856d303e2fa0db69dfe973d Mon Sep 17 00:00:00 2001 From: Matt Bernhardt Date: Thu, 21 Oct 2021 14:59:27 -0400 Subject: [PATCH 3/5] Addresses UXWS-1243; expands static content --- page-hours-json.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/page-hours-json.php b/page-hours-json.php index 66c263cc..30c299a8 100644 --- a/page-hours-json.php +++ b/page-hours-json.php @@ -379,6 +379,9 @@

    Locations without hours

    + +

    Building 9 book drop

    +

    Map:  9-Samuel Tak Lee Building

    Digital Instruction Resource Center (DIRC)

    Map:  14N-132

    From 6338301f3b7c4eca423857fbc8a5772b41c2a661 Mon Sep 17 00:00:00 2001 From: Matt Bernhardt Date: Thu, 21 Oct 2021 15:07:07 -0400 Subject: [PATCH 4/5] Adds new conditional for location page to display cafe hours on Hayden location --- content-location-2021.php | 4 ++++ content-location.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/content-location-2021.php b/content-location-2021.php index 92575fc6..338f9c18 100644 --- a/content-location-2021.php +++ b/content-location-2021.php @@ -97,6 +97,10 @@ | Study 24/7 + +
    Cafe hours: +

    + See all hours
    diff --git a/content-location.php b/content-location.php index 39c19e76..6df584fd 100644 --- a/content-location.php +++ b/content-location.php @@ -123,6 +123,10 @@ | Study 24/7 + +
    Cafe hours: +

    + See all hours From 1b1c6db2c118d9900942811649e85f2af313c468 Mon Sep 17 00:00:00 2001 From: Matt Bernhardt Date: Fri, 22 Oct 2021 15:48:32 -0400 Subject: [PATCH 5/5] Alternate widgetized solution to uxws-1281 ** Why are these changes being introduced: * Rather than adding a content-specific condition to the location template, hard-coding the Courtyard hours to the Hayden location page, this adds a sidebar to that area of the location template, with a default condition of the current content, allowing site builders to drop any number of widgets into the location header that will display hours information. * If accepted, this would be matched with a new release of our Pull Hours plugin, which would release a slim widget that would be placed in this sidebar for the Hayden page. ** Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/uxws-1281 ** How does this address that need: * Adds a new Location Hours sidebar to the theme, with rendering of the sidebar added to the two location content templates (content-location and content-location-2021). The templates will continue to render their existing content for all location pages until a widget is added, making the transition seamless and requiring only two widgets be created. ** Document any side effects to this change: * The theme gets slightly more complex, with another sidebar added. The theme already has six sidebars defined, such as the front page hours area, the migrated content notice on the 404 template, and the search area of the home and search templates. * The designation of a location being available as a 24x7 study space is moved to the bottom of the "sidebar", just above the link to the hours grid. When there are no widgets in this sidebar, the display is unchanged, appearing after the location's hours information after a pipe. * Some improvements have been made in how this markup is handled. This includes treatment of boolean fields from the location record, and escaping the URL being output for the Study24 link. --- content-location-2021.php | 28 +++++++++++++++++----------- content-location.php | 28 +++++++++++++++++----------- functions.php | 10 ++++++++++ 3 files changed, 44 insertions(+), 22 deletions(-) diff --git a/content-location-2021.php b/content-location-2021.php index 338f9c18..27639dd3 100644 --- a/content-location-2021.php +++ b/content-location-2021.php @@ -92,17 +92,23 @@ -
    - Today's hours: - - | Study 24/7 - - -
    Cafe hours: -

    - - See all hours -
    + + + +
    + Today's hours: + + | Study 24/7 + + See all hours +
    +
    diff --git a/content-location.php b/content-location.php index 6df584fd..25caab9c 100644 --- a/content-location.php +++ b/content-location.php @@ -118,17 +118,23 @@
    -
    - Today's hours: - - | Study 24/7 - - -
    Cafe hours: -

    - - See all hours -
    + + + +
    + Today's hours: + + | Study 24/7 + + See all hours +
    + diff --git a/functions.php b/functions.php index 0aca5381..e99b4b6a 100644 --- a/functions.php +++ b/functions.php @@ -343,6 +343,16 @@ function mitlib_widgets_init() { 'after_title' => '', ) ); + register_sidebar( array( + 'name' => __( 'Location Hours Area', 'twentytwelve' ), + 'id' => 'sidebar-location-hours', + 'description' => __( 'Appears on library location pages, displaying a widget which displays the current hours for arbitrary locations. This enables a single location to display multiple sets of hours.', 'twentytwelve' ), + 'before_widget' => '', + 'before_title' => '

    ', + 'after_title' => '

    ', + ) ); + } add_action( 'widgets_init', 'mitlib_widgets_init' );