Closed (fixed)
Project:
Office Hours
Version:
8.x-1.11
Component:
Integrating Views
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Nov 2016 at 16:23 UTC
Updated:
13 Oct 2023 at 12:39 UTC
Jump to comment: Most recent
Comments
Comment #2
christophedg commentedWould be great to have this functionality!
Comment #3
johnvComment #4
johnvComment #5
socialnicheguru commentedYes. I want to show which stores are open. A views filter would be great
Comment #6
tuthanh commentedSubscribe
Comment #7
johnvComment #8
johnvComment #9
xtazSubscribe
Comment #10
johnvPlease add a use case, so i can work on it.
Patches are greatly appreciated.
Comment #11
johnvComment #12
johnvComment #13
alfthecat commentedYes, much needed. For a collection of stores that do instant delivery, and a nearby businesses directory, there needs to be a way to filter on open / closed.
Comment #14
johnvComment #16
johnvIt took a while...
Above commit adds an open/closed status filter with the following options:
It was tested for authorized and anonymous users (for page_cache module).
The filtering is in the Render phase, so no worries about the caching. Each time a view is refreshed, the status is recalculated.
Note: Timezone handling is not handled at all in this module, despite efforts. That totally depends on the entity's address and user's timezone. A hook is provided, though.
Comment #18
umnick commentedRefreshing this convo, current use case is to show active bus routes. The filter Open Now/Temp Closed/Perm Closed doesn't account for things that are open today at some point, maybe just not right "now"... would love a patch.