Jump to:

10994 Posts in 2728 Topics by 1819 members

All other Modules

SilverStripe Forums » All other Modules » Event Calendar: the bug or the feature?

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 858 Views
  • Victor
    Avatar
    Community Member
    128 Posts

    Event Calendar: the bug or the feature? Link to this post

    We run our custom module built on the top of EC (DateTime with extra fields like Location, Speaker,....,Content) and observed the following behaviour: if the same Event has more than one occurrence in one single day (but different times) then clicking on see more displays all the occurrences of this date come out. Is it an expected behaviour?

    Victor

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar: the bug or the feature? Link to this post

    Do you have a link?

  • Victor
    Avatar
    Community Member
    128 Posts
  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar: the bug or the feature? Link to this post

    Can I see your template for CalendarEvent (or subclass thereof)?

  • Victor
    Avatar
    Community Member
    128 Posts

    Re: Event Calendar: the bug or the feature? Link to this post

    I cannot provide you with the "final" as one of our sysadmins changed my code to a certain degree but my own testsite exhibits the same behaviour

    http://weyl.math.toronto.edu:8888/testsite/analysis-and-applied-math-seminar/2010-02-05

    and I post it there

    <% require css(event_calendar/css/calendar.css) %>
    <% require javascript(event_calendar/javascript/calendar_core.js) %>
    <script type="text/javascript" src="../mathjax/MathJax.js"></script>

    <div id="primaryContent" class="clearfix">
    <div class="innerpad">
    <div id="calendar-sidebar">
    <h3><% _t('Calendar.BROWSECALENDAR','Browse the Calendar') %></h3>
    <div id="monthNav">
    <p><% _t('Calendar.USECALENDAR','Use the calendar below to navigate dates') %></p>
    $CalendarWidget
    <h4><% _t('Calendar.FILTERCALENDAR','Fitler calendar') %>:</h4>
    $CalendarFilterForm
    </div>
    </div>
    <div id="calendar-main">
    <div id="topHeading" class="clearfix">
    <span class="back"><a href="$CalendarBackLink"><% _t('CalendarEvent.BACKTO','Back to') %> $Parent.Title</a></span>
    <span class="feed"><a href="$RSSLink"><% _t('Calendar.SUBSCRIBE','Subscribe to the Calendar') %></a></span>
    <h2>$Parent.Title</h2>
    </div>

    <% if Menu(2) %>
    <% include SideBar %>
    <div id="Content">
    <% end_if %>

    <% if Level(2) %>
    <% include BreadCrumbs %>
    <% end_if %>
    </div>
    <div>

    <div class="event">
    <% if OtherDates %>
    <div id="additionalDates">
    <h4><% _t('CalendarEvent.LDATES','Dates') %></h4>
    <dl class="date clearfix">
    <% control Dates %>
    <dt><a href="$Link" title="$Event.Title">$_Dates</a> $Title, <% if SpeakerWebsite %><a href="$SpeakerWebsite"><% end_if %>$Speaker<% if SpeakerWebsite %></a><% end_if %>, $Institution</dt>

    <% end_control %>
    </dl>
    <% end_if %>
    </div>
    <div>

    <h3 class="summary">$Title</h3>

    <% control CurrentDate %>
    <h4><a href="$ICSLink" title="Add to Calendar">$_Dates</a></h4>

    <% if StartTime %>
    <ul id="times">
    <li>$_Times $Location, $Title, <% if SpeakerWebsite %><a href="$SpeakerWebsite"><% end_if %>$Speaker<% if SpeakerWebsite %></a><% end_if %>, $Institution</li>
    <li>
    $Abstract</li><li>$TeXAbstract</li>
    </ul>
    <% end_if %>
    <% end_control %>

    $Content
    $Form
    $PageComments
    </div>
    <% if Menu(2) %>
    </div>
    <% end_if %>

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar: the bug or the feature? Link to this post

    A couple things..

    You're testing for OtherDates, but then you're controlling Dates. That doesn't make sense. Pick one or the other.

    The way an Event template should work is that you have all of the Event properties available to you like so:

    <h3>$Title</h3>

    <h4>$SomeCustomProperty</h4>

    Then, to show the date that was clicked by the user, you should use the CurrentDate control:

    <% control CurrentDate %>$_Dates<% end_control %>

    Next, you probably want to show any other dates that are associated with this event, that is, everything but the date that was clicked by the user.

    <% control OtherDates %>$_Dates<% end_control %>

    Make sense?

  • Victor
    Avatar
    Community Member
    128 Posts

    Re: Event Calendar: the bug or the feature? Link to this post

    BTW we also would like to have a "Print" button returning cropped page (without banners, navigations ... see attached file)

  • Victor
    Avatar
    Community Member
    128 Posts

    Re: Event Calendar: the bug or the feature? Link to this post

    UC:

    <% control OtherDates %>$_Dates<% end_control %>

    Make sense?


    Yes - I changed it but still the same behaviour as possibly CurrentDate means really "Current Date" not "Current Date-Time"

    Victor

    858 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.