<%-- /** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ --%> <%@ include file="/init.jsp" %> <% String backURL = ParamUtil.getString(request, "backURL"); int instanceIndex = BeanParamUtil.getInteger(calendarBooking, request, "instanceIndex"); calendarBooking = RecurrenceUtil.getCalendarBookingInstance(calendarBooking, instanceIndex); Calendar calendar = calendarBooking.getCalendar(); long startTime = calendarBooking.getStartTime(); java.util.Calendar startTimeJCalendar = JCalendarUtil.getJCalendar(startTime, userTimeZone); long endTime = calendarBooking.getEndTime(); java.util.Calendar endTimeJCalendar = JCalendarUtil.getJCalendar(endTime, userTimeZone); AssetEntry layoutAssetEntry = AssetEntryLocalServiceUtil.getEntry(CalendarBooking.class.getName(), calendarBooking.getCalendarBookingId()); %>
:
<%= dateFormatLongDate.format(startTimeJCalendar.getTime()) + ", " + dateFormatTime.format(startTimeJCalendar.getTime()) %>
:
<%= dateFormatLongDate.format(endTimeJCalendar.getTime()) + ", " + dateFormatTime.format(endTimeJCalendar.getTime()) %>
<% List childCalendarBookings = calendarBooking.getChildCalendarBookings(); %>
:
<% List calendarResourcesNames = new ArrayList(); for (CalendarBooking childCalendarBooking : childCalendarBookings) { CalendarResource calendarResource = childCalendarBooking.getCalendarResource(); calendarResourcesNames.add(calendarResource.getName(locale)); } %> <%= HtmlUtil.escape(StringUtil.merge(calendarResourcesNames, ", ")) %>
:
<%= HtmlUtil.escape(calendarBooking.getLocation()) %>
:

<%= calendarBooking.getDescription(locale) %>

<% boolean hasManageBookingsPermission = CalendarPermission.contains(permissionChecker, calendar, ActionKeys.MANAGE_BOOKINGS); %> function invokeTransition(status) { document.fm.status.value = status; submitForm(document.fm); } var summaryNode = A.one('#recurrenceSummary'); var endValue = 'never'; var untilDate = null; <% Recurrence recurrence = calendarBooking.getRecurrenceObj(); java.util.Calendar untilJCalendar = recurrence.getUntilJCalendar(); %> endValue = 'on'; untilDate = new Date('<%= dateFormatLongDate.format(untilJCalendar.getTimeInMillis()) %>'); endValue = 'after'; <% JSONSerializer jsonSerializer = JSONFactoryUtil.createJSONSerializer(); List weekdays = new ArrayList(); for (PositionalWeekday positionalWeekday : recurrence.getPositionalWeekdays()) { weekdays.add(positionalWeekday.getWeekday()); } %> var recurrence = { count: <%= recurrence.getCount() %>, endValue: endValue, frequency: '<%= String.valueOf(recurrence.getFrequency()) %>', interval: <%= recurrence.getInterval() %>, untilDate: untilDate, weekdays: <%= jsonSerializer.serialize(weekdays) %> } var recurrenceSummary = Liferay.RecurrenceUtil.getSummary(recurrence); summaryNode.html(recurrenceSummary);