use of org.olat.commons.calendar.ui.components.FullCalendarElement in project OpenOLAT by OpenOLAT.
the class WeeklyCalendarController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
boolean isGuest = ureq.getUserSession().getRoles().isGuestOnly();
Collections.sort(calendarWrappers, KalendarComparator.getInstance());
calendarEl = new FullCalendarElement(ureq, "weeklyCalendar", calendarWrappers, getTranslator());
formLayout.add("calendar", calendarEl);
calendarEl.setConfigurationEnabled(true);
calendarEl.setAggregatedFeedEnabled(true);
calendarEl.setAlwaysVisibleCalendar(getCallerKalendarRenderWrapper());
if (formLayout instanceof FormLayoutContainer) {
FormLayoutContainer layoutCont = (FormLayoutContainer) formLayout;
if (!isGuest && !calendarWrappers.isEmpty()) {
subsContext = calendarNotificationsManager.getSubscriptionContext(calendarWrappers.get(0));
// if sc is null, then no subscription is desired
if (subsContext != null) {
csc = getContextualSubscriptionController(ureq, calendarWrappers.get(0), subsContext);
layoutCont.put("calsubscription", csc.getInitialComponent());
}
}
}
}
use of org.olat.commons.calendar.ui.components.FullCalendarElement in project openolat by klemens.
the class WeeklyCalendarController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
boolean isGuest = ureq.getUserSession().getRoles().isGuestOnly();
Collections.sort(calendarWrappers, KalendarComparator.getInstance());
calendarEl = new FullCalendarElement(ureq, "weeklyCalendar", calendarWrappers, getTranslator());
formLayout.add("calendar", calendarEl);
calendarEl.setConfigurationEnabled(true);
calendarEl.setAggregatedFeedEnabled(true);
calendarEl.setAlwaysVisibleCalendar(getCallerKalendarRenderWrapper());
if (formLayout instanceof FormLayoutContainer) {
FormLayoutContainer layoutCont = (FormLayoutContainer) formLayout;
if (!isGuest && !calendarWrappers.isEmpty()) {
subsContext = calendarNotificationsManager.getSubscriptionContext(calendarWrappers.get(0));
// if sc is null, then no subscription is desired
if (subsContext != null) {
csc = getContextualSubscriptionController(ureq, calendarWrappers.get(0), subsContext);
layoutCont.put("calsubscription", csc.getInitialComponent());
}
}
}
}
Aggregations