Note: I realize this may be a support request for Date module as date_navigation comes from that module. Please let me know if I am in error posting in this forum. Looking for others who have successfully solved this query, or have advice for where I can look. Or snippets for me to use.

My issue: Trying to adjust the calendar navigation to disable browsing backward in time from today's date.

Ideally I can use a template snippet to hide the << Prev link if a user is viewing the current date. Or validate with views based on relative "now" filter.

Please advise!

Comments

megfrisch’s picture

Title: Disable browsing backwards in time » thoughts on how to implement the following customizations?

I'm changing my request because I am dealing with a new issue for the first time and I'm interested in the following customizations / enhancements - anyone with thoughts on how to implement please advise!

1) Current calendar view displays next available hour for booking by default
Scenario is the timeslots are available until 3pm. I'm looking at the calendar to book a timeslot after 3pm and I should see tomorrow's view.

2) In addition to configuring maximum number of timeslots per booking period, I'd like to also like to be able to fine tune this based on resource availability for each day. For instance, there may be instances on a given day where resources become unavailable if 4 timeslots are simultaneously booked. This setting should be part of the module configuration screen. "Resource Availability" set date and set max number of resources per day. If the number of resources in use is maxed out, the timeslots become unavailable.

kenorb’s picture

Title: thoughts on how to implement the following customizations? » calendar displays next available hour for booking, set date and set max number of resources per day

1) it could be done by the separate submodule, similar to custom_timeslots (you can check how difficult it will be to changed it in your way)
2) calendar-day.tpl.php is already complex, this resource availability functionality will make it more complex, in my opinion calendar-day.tpl.php should be rewritten and most of the code should be moved into module and controlled from there
Currently I've no plans to implement it.

kenorb’s picture

Category: support » feature
kenorb’s picture

Category: feature » support
Status: Active » Fixed

Yes, this is rather Calendar module theme question. You could easily override tpl or theme function.
Please search for existing solution, move this issue into Calendar queue, or raise a separate issue.

Please test as well latest dev version:
http://drupal.org/cvs?commit=460838
Check booking_timeslots.theme.inc file, which preprocess function you can use.

Other theme callbacks provided by Calendar which you can replace: calendar_month_multiple_node, calendar_week_multiple_node, calendar_datebox, calendar_date_combo, calendar_empty_day, calendar_stripe_legend, calendar_stripe_stripe, calendar_colorpicker, calendar_colorfield, calendar_time_row_heading

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.