Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

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

Event Calendar: the bug or the feature?


Reply

8 Posts   869 Views

Avatar
Victor

26 February 2010 at 8:32am (Last edited: 26 February 2010 8:41am), Community Member, 128 Posts

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

Avatar
UncleCheese

26 February 2010 at 8:50am 4085 Posts

Do you have a link?

Avatar
Victor

26 February 2010 at 8:59am Community Member, 128 Posts

Page displays two meeting of the same seminars on the single day (belonging to the same Event [extended] but to different DateTime

http://www.math.toronto.edu/cms/analysis-and-applied-math-seminar/2010-01-22?filter=1&CalendarStart=2010-01-22&CalendarEnd=2010-01-25

Clicking on each returns the same =>

http://www.math.toronto.edu/cms/analysis-and-applied-math-seminar/2010-01-22?filter=1&CalendarStart=2010-01-22&CalendarEnd=2010-01-25

****
http://www.math.toronto.edu/cms/events/2010-02-24/2010-02-25?filter=1&filter_SeminarEvent_Category=Special+Seminar

contains two such paired links

BTW Thanks again for EC

Victor

Avatar
UncleCheese

26 February 2010 at 9:11am 4085 Posts

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

Avatar
Victor

26 February 2010 at 9:20am Community Member, 128 Posts

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 %>

Avatar
UncleCheese

26 February 2010 at 9:27am 4085 Posts

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?

Avatar
Victor

26 February 2010 at 9:32am Community Member, 128 Posts

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

Avatar
Victor

26 February 2010 at 9:43am (Last edited: 26 February 2010 9:45am), Community Member, 128 Posts

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