Jump to:

10930 Posts in 2613 Topics by 1810 members

All other Modules

SilverStripe Forums » All other Modules » Event Resources - Event Calendar (View Bookings from Front End)

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 572 Views
  • woodb2
    Avatar
    Community Member
    48 Posts

    Event Resources - Event Calendar (View Bookings from Front End) Link to this post

    I'm just starting out using the Event Calendar with Event Resources. I would like for the users to be able to see the Bookings calendar that is part of the EventResources DOM. Is there a way (easy way) to make this visible in the front end?

    Thanks,
    Brian

  • redactuk
    Avatar
    Community Member
    115 Posts

    Re: Event Resources - Event Calendar (View Bookings from Front End) Link to this post

    I was thinking about doing the same, but after looking at the code realised there was no 'easy' way. That said the entire display is handled via jQuery, so it should be possible to code a new extension based on code in EventResourceCalendar.php utilising the jQuery already written, but I've not attempted it as was too much work for what I needed.

    Note: I did contact the module writer (and posted in these forums) but he seems to not be supporting it.

  • ajshort
    Avatar
    Community Member
    244 Posts

    Re: Event Resources - Event Calendar (View Bookings from Front End) Link to this post

    Hey,

    The EventResourceCalendar is just a standard form field, so you should be able to use it in the frontend. You would probably need to write a couple of lines of custom JS to initialise the calendar (since it's currently attached to some tab events in the backend), but you shouldn't need to edit the PHP code.

    PHP:
    $fields->push(new EventResourceCalendar($eventResource, 'Calendar'));

    JS:
    $("#Form_MyForm_Calendar").fullCalendar("render");

    572 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.