When the user goes to "View Schedules" tab for a resource the page displays a table with 10 instances of schedules from the first date of availability in the past for the resource. Sorting the table by "Start" date displays the last 10 instances in the future. There is no paging link and hence no way to display any schedules between the first 10 and last 10. The "Overview" tab only displays active and future bookings. The Views page only displays bookings, not resource availability. Is there any way to filter this table to only show "Start" >= 'now' and allow paging?

System:
PHP 5.2.5
Drupal 6.14
Bookings API 6.x-1.0-alpha5
Public Bookings 6.x-1.0-alpha5
Date API 6.x-2.4
CCK 6.x-2.5
Views 6.x-2.6

Comments

Anonymous’s picture

Priority: Critical » Normal
Status: Active » Fixed

You can simply edit the view displayed. "View Schedules" can be found at admin/build/views/edit/publicbookings_view_schedules. Adding a filter "Bookings Instance end date" >= +0 would display all upcoming or current bookings, "start date >= 0" all upcoming, "start <= 0, end >= 0" all current.
Sorting is possible too.

Paging should be possible by allowing AJAX (basic settings, ajax).

But this sould all be set at publicbookings/overview

Anonymous’s picture

Which views would you prefer for

a) the public interface
b) the administrative interface?

mauryg’s picture

The administrative interface is not much of a problem to me. It's the public interface that is critical so that the user is not confused.
The current and upcoming BOOKINGS are not a problem. It's the current and future SCHEDULES that appear to be the problem. For the moment I solved the problem by redoing all the schedules with a current beginning date (it had been back in September) and the pager works. I am going to play with Views and see if I can create something a little more user friendly for my purposes. Will let you know how it works.
For version 3 you described the parent/child relationship for resources (e.g. room/table). Is that possible in the current version and if so, how do I implement it?

Anonymous’s picture

Status: Fixed » Active

The beginning date of the shedules should always be "now" (or -1h, depending on the view) .. If its back in September thats a strange bug - I'll look into it, thanks.

API version 1.x does not support recursive relationships I'm afraid .. One-level relationships are possible (room->table in contrast to restaurant->room->table) - simply set a parent-resource when creating the child-resources. Be aware though that resources inherit the default availability of their parent resource too - bu

Anonymous’s picture

Status: Active » Needs review

I've committed a change to the views in question - there was a stupid bug in the way the views were created .. Please download the new DEV-1.x (as soon as it is available), run update.php and look whether this repairs your views :) (Perhaps you could save your own settings previously)

mauryg’s picture

OK will do and let you know

Anonymous’s picture

Status: Needs review » Postponed (maintainer needs more info)
Anonymous’s picture

Status: Postponed (maintainer needs more info) » Fixed

No reply for 3 month - setting this to fixed. Feel free to reopen :)

Status: Fixed » Closed (fixed)

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