Closed (fixed)
Project:
Office Hours
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Aug 2011 at 12:34 UTC
Updated:
20 Mar 2012 at 13:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
johnvsubscribe
Comment #2
arrowThis patch wouldn't apply to the sept 14 dev, so I rebuilt it.. also cleaned up some whitespace.
Comment #3
johnvThis reworked patch has the following features:
- it adds a new formatter 'in-line' , next to the existing 'default' formatter. This allows to export the office hours to e.g. Google Places via a Views display.
- it adds new settings for both formatters:
-- set Day notation to long/short/numeric/none
-- set separators between each component of an 'office hour'.
-- set 'show closed days' (moved from field settings to formatter settings)
-- set a translatable html-text for the 'Closed' text.
-- 'compress' the hours if you have set 'more hours' (necessary for the Google places, which to not allow mid-day breaks.)
Consequently, there are 'settings' the Manage Display section of the Content Type Administration.
The default formatter has changed a bit, so the hours are aligned better vertically, and now supports short-day-notation out of the box.
Examples: You can now create formatters like:
'Mon: 9:00-12:00 and 13:00-17:00'
'Tue: Sorry we're closed, Hope 2CU another day!'
or an inline string for Google: '2:10:00:18:00,3:10:00:18:00,4:10:00:18:00,5:10:00:18:00,6:10:00:18:00,7:12:00:20:00'
The following is marked as todo, but I leave that to the experts:
-- Extended formatter for hours notation, so you can set '09:30' vs '9:00', etc.
-- Check if the span's/div's are correct, and if some data must go into the css files.
Although the 'Closed' text is customizable now, it is not per day. If you need 'Sun: Closed' and 'Mon: appointments only', we need somthing like #1119406: Add a "description" feature .
Comment #4
johnvHere's the patch.
Comment #5
johnvPerhaps the formatter can better use the standard date-formats: http://us.php.net/manual/en/function.date.php
Comment #6
Ozeuss commentedJohnv, I can't seem to apply the patch, any chance you could re-roll it?
Comment #7
johnvThis one should do it.
please pay attention to my usage of div's and classes - it's not one of my qualities.
Comment #8
mikeytown2 commented#7 did not apply for me; This patch applies against the latest dev.
Comment #9
arrowNeither of the previous apply to the latest dev... Here's another:
Comment #10
johnvcommitted
Comment #11.0
(not verified) commentedremoved personal data