Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expanded calendar module to work with opencms 8.0.2 #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
187 changes: 187 additions & 0 deletions com.alkacon.opencms.calendar/resources/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,96 @@
<relations/>
<accesscontrol/>
</file>
<file>
<source>system/modules/com.alkacon.opencms.calendar/.config</source>
<destination>system/modules/com.alkacon.opencms.calendar/.config</destination>
<type>module_config</type>
<uuidstructure>a2d1453d-5ae0-11dc-b7ed-5fc9fa232c01</uuidstructure>
<datelastmodified>Mon, 04 Jul 2011 15:59:39 GMT</datelastmodified>
<userlastmodified>Admin</userlastmodified>
<datecreated>Mon, 04 Jul 2011 15:58:59 GMT</datecreated>
<usercreated>Admin</usercreated>
<flags>0</flags>
<properties>
<property>
<name>locale</name>
<value><![CDATA[en]]></value>
</property>
<property>
<name>locale-available</name>
<value><![CDATA[en]]></value>
</property>
</properties>
<relations/>
<accesscontrol/>
</file>
<file>
<destination>system/modules/com.alkacon.opencms.calendar/formatters</destination>
<type>folder</type>
<uuidstructure>a2435d19-5ae0-11dc-b7ed-5fc9fa232c02</uuidstructure>
<datelastmodified>Tue, 04 Sep 2007 12:16:15 GMT</datelastmodified>
<userlastmodified>Admin</userlastmodified>
<datecreated>Tue, 04 Sep 2007 12:16:15 GMT</datecreated>
<usercreated>Admin</usercreated>
<flags>0</flags>
<properties/>
<relations/>
<accesscontrol/>
</file>
<file>
<source>system/modules/com.alkacon.opencms.calendar/formatters/formatter-entry.jsp</source>
<destination>system/modules/com.alkacon.opencms.calendar/formatters/formatter-entry.jsp</destination>
<type>jsp</type>
<uuidstructure>02b448be-11e7-11dd-b9fc-d3ac683d9e03</uuidstructure>
<datelastmodified>Thu, 24 Apr 2008 12:25:41 GMT</datelastmodified>
<userlastmodified>Admin</userlastmodified>
<datecreated>Thu, 24 Apr 2008 10:12:57 GMT</datecreated>
<usercreated>Admin</usercreated>
<flags>0</flags>
<properties>
<property>
<name>Title</name>
<value><![CDATA[Formatter for calendar entry]]></value>
</property>
<property>
<name>cache</name>
<value><![CDATA[uri;params=(count);timeout=720]]></value>
</property>
<property type="shared">
<name>export</name>
<value><![CDATA[false]]></value>
</property>
</properties>
<relations/>
<accesscontrol/>
</file>
<file>
<source>system/modules/com.alkacon.opencms.calendar/formatters/formatter-serialentry.jsp</source>
<destination>system/modules/com.alkacon.opencms.calendar/formatters/formatter-serialentry.jsp</destination>
<type>jsp</type>
<uuidstructure>02b448be-11e7-11dd-b9fc-d3ac683d9e04</uuidstructure>
<datelastmodified>Thu, 24 Apr 2008 12:25:41 GMT</datelastmodified>
<userlastmodified>Admin</userlastmodified>
<datecreated>Thu, 24 Apr 2008 10:12:57 GMT</datecreated>
<usercreated>Admin</usercreated>
<flags>0</flags>
<properties>
<property>
<name>Title</name>
<value><![CDATA[Formatter for calendar serialentry]]></value>
</property>
<property>
<name>cache</name>
<value><![CDATA[uri;params=(count);timeout=720]]></value>
</property>
<property type="shared">
<name>export</name>
<value><![CDATA[false]]></value>
</property>
</properties>
<relations/>
<accesscontrol/>
</file>
<file>
<destination>system/modules/com.alkacon.opencms.calendar/classes</destination>
<type>folder</type>
Expand Down Expand Up @@ -544,6 +634,103 @@
<relations/>
<accesscontrol/>
</file>
<file>
<destination>system/modules/com.alkacon.opencms.calendar/functions</destination>
<type>folder</type>
<uuidstructure>441ff7a2-057a-11e1-a03e-7f953b89ceff</uuidstructure>
<datelastmodified>Wed, 02 Nov 2011 17:44:08 GMT</datelastmodified>
<userlastmodified>Admin</userlastmodified>
<datecreated>Wed, 02 Nov 2011 17:44:08 GMT</datecreated>
<usercreated>Admin</usercreated>
<flags>0</flags>
<properties/>
<relations/>
<accesscontrol/>
</file>
<file>
<source>system/modules/com.alkacon.opencms.calendar/functions/calendar-side-currententries.jsp</source>
<destination>system/modules/com.alkacon.opencms.calendar/functions/calendar-side-currententries.jsp</destination>
<type>jsp</type>
<uuidstructure>666b43a4-057a-11e1-a03e-7f953b89ceff</uuidstructure>
<uuidresource>666b43a5-057a-11e1-a03e-7f953b89ceff</uuidresource>
<datelastmodified>Wed, 02 Nov 2011 17:48:54 GMT</datelastmodified>
<userlastmodified>Admin</userlastmodified>
<datecreated>Wed, 02 Nov 2011 17:45:06 GMT</datecreated>
<usercreated>Admin</usercreated>
<flags>0</flags>
<properties>
<property>
<name>Title</name>
<value><![CDATA[Calendar current entries side element]]></value>
</property>
<property>
<name>cache</name>
<value><![CDATA[uri;params=(count);timeout=720]]></value>
</property>
<property type="shared">
<name>export</name>
<value><![CDATA[false]]></value>
</property>
</properties>
<relations/>
<accesscontrol/>
</file>
<file>
<source>system/modules/com.alkacon.opencms.calendar/functions/calendar-side-month.jsp</source>
<destination>system/modules/com.alkacon.opencms.calendar/functions/calendar-side-month.jsp</destination>
<type>jsp</type>
<uuidstructure>666fb079-057a-11e1-a03e-7f953b89ceff</uuidstructure>
<uuidresource>666fb07a-057a-11e1-a03e-7f953b89ceff</uuidresource>
<datelastmodified>Thu, 03 Nov 2011 17:22:23 GMT</datelastmodified>
<userlastmodified>Admin</userlastmodified>
<datecreated>Wed, 02 Nov 2011 17:45:06 GMT</datecreated>
<usercreated>Admin</usercreated>
<flags>0</flags>
<properties>
<property>
<name>Title</name>
<value><![CDATA[Calendar month side element]]></value>
</property>
<property>
<name>cache</name>
<value><![CDATA[uri;params=(calYear,calMonth);timeout=720]]></value>
</property>
<property type="shared">
<name>export</name>
<value><![CDATA[false]]></value>
</property>
</properties>
<relations/>
<accesscontrol/>
</file>
<file>
<source>system/modules/com.alkacon.opencms.calendar/functions/detail-calendar.jsp</source>
<destination>system/modules/com.alkacon.opencms.calendar/functions/detail-calendar.jsp</destination>
<type>jsp</type>
<uuidstructure>c7b6a4be-057a-11e1-a03e-7f953b89ceff</uuidstructure>
<uuidresource>c7b6a4bf-057a-11e1-a03e-7f953b89ceff</uuidresource>
<datelastmodified>Wed, 02 Nov 2011 19:25:29 GMT</datelastmodified>
<userlastmodified>Admin</userlastmodified>
<datecreated>Wed, 02 Nov 2011 17:47:49 GMT</datecreated>
<usercreated>Admin</usercreated>
<flags>0</flags>
<properties>
<property>
<name>Title</name>
<value><![CDATA[Calendar views detail page]]></value>
</property>
<property>
<name>cache</name>
<value><![CDATA[uri;params=(calYear,calMonth,calDay,calView)]]></value>
</property>
<property type="shared">
<name>export</name>
<value><![CDATA[false]]></value>
</property>
</properties>
<relations/>
<accesscontrol/>
</file>
<file>
<destination>system/modules/com.alkacon.opencms.calendar/lib</destination>
<type>folder</type>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>

<ModuleConfigurations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="opencms://system/modules/org.opencms.ade.config/schemas/module_config.xsd">
<ModuleConfiguration language="en">
<ResourceType>
<TypeName><![CDATA[alkacon-cal-entry]]></TypeName>
<Folder>
<Name><![CDATA[calendar-entry]]></Name>
</Folder>
<NamePattern><![CDATA[entry_%(number).html]]></NamePattern>
</ResourceType>
<ResourceType>
<TypeName><![CDATA[alkacon-cal-serial]]></TypeName>
<Folder>
<Name><![CDATA[calendar-serial]]></Name>
</Folder>
<NamePattern><![CDATA[serial_%(number).html]]></NamePattern>
</ResourceType>
</ModuleConfiguration>
</ModuleConfigurations>
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<%@ page session="false" buffer="none" import="java.util.*, org.opencms.jsp.*, com.alkacon.opencms.calendar.*" %><%
<%@ page session="false" buffer="none" import="java.util.*, org.opencms.jsp.*, com.alkacon.opencms.calendar.*, org.opencms.file.*" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>

<div>
<%

// initialize the calendar bean
CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, response);
Expand All @@ -23,5 +27,29 @@ calendarBean.getStyle().setStyleDayEntryLink("cal_mon_day_event");
calendarBean.getStyle().setStyleDayHoliday("cal_mon_day_holiday");
calendarBean.getStyle().setStyleDayMaybeHoliday("cal_mon_day_maybeholiday");

// set the URI to the view which is displayed when clicking on a day
//calendarBean.setViewUri("/flower-en/calendario/");

// show the calender monthly view for the requested locale
%><%= calendarBean.buildCalendarMonth() %>
%><%= calendarBean.buildCalendarMonth() %>


<%
CmsObject cmsObject = cms.getCmsObject();
CmsRequestContext cmsContext = cmsObject.getRequestContext();
CmsProject Project = cmsContext.currentProject();
if (!Project.isOnlineProject()) {
%>
<cms:contentload collector="allInFolderDateReleasedDesc" param="/.content/calendar-entry/entry_%(number).html|alkacon-cal-entry|1" editable="true"><div>
Click + for new calendar entry
</div></cms:contentload>

<cms:contentload collector="allInFolderDateReleasedDesc" param="/.content/calendar-serial/serial_%(number).html|alkacon-cal-serial|1" editable="true"><div>
Click + for new serial calendar entry
</div></cms:contentload>
<%
} // end if (!(Project.isOnlineProject()))
%>


</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<%@ page session="false" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<cms:formatter var="content" val="value">
<div>

<c:set var="vfs" value="${cms:vfs(pageContext)}" />
<c:set var="locale" value="${vfs.requestContext.locale}"/>

<fmt:setLocale value="${locale}" />
<fmt:bundle basename="com.alkacon.opencms.calendar.display">

<%-- Headline --%>
<h1 class="cal_detail_headline">${value.Title}</h1>

<%-- Dates --%>
<p class="cal_detail_date">
<span class="cal_detail_label"><fmt:message key="calendar.detail.date" /></span>:
<c:set var="dateType" value="date"/>
<c:if test="${value.Showtime == 'true'}">
<c:set var="dateType" value="both"/>
</c:if>
<fmt:formatDate value="${cms:convertDate(value.Date)}" dateStyle="long" timeStyle="short" type="${dateType}" />
<c:if test="${value.End.exists}">
<c:set var="start"><fmt:formatDate value="${cms:convertDate(value.Date)}" dateStyle="short" type="date" /></c:set>
<c:set var="end"><fmt:formatDate value="${cms:convertDate(value.End)}" dateStyle="short" type="date" /></c:set>
<c:if test="${start == end && value.Showtime == 'true'}">
<fmt:message key="calendar.detail.date.to" />
<fmt:formatDate value="${cms:convertDate(value.End)}" timeStyle="short" type="time" />
</c:if>
<c:if test="${start != end}">
<fmt:message key="calendar.detail.date.to" />
<fmt:formatDate value="${cms:convertDate(value.End)}" dateStyle="long" timeStyle="short" type="${dateType}" />
</c:if>
</c:if>

</p>

<%-- Location --%>
<c:if test="${!value.Location.isEmptyOrWhitespaceOnly}">
<p class="cal_detail_location">
<span class="cal_detail_label"><fmt:message key="calendar.detail.location" /></span>: ${value.Location}
</p>
</c:if>

<%-- Text --%>
<div class="cal_detail_text">
${value.Text}
</div>

<%-- Links --%>
<c:if test="${value.Links.exists}">
<p class="cal_detail_links"><span class="cal_detail_label"><fmt:message key="calendar.detail.links" /></span>:</p><ul>
<c:forEach var="link" items="${valueList.Links}">
<c:if test="${fn:indexOf(link.value.Uri, '/') == 0 && vfs.existsResource[link.value.Uri] || fn:indexOf(link.value.Uri, '/') != 0}">
<li>
<c:set var="linktext">${link.value.Uri}</c:set>
<c:if test="${link.value.Description.exists}">
<c:set var="linktext">${link.value.Description}</c:set>
</c:if>
<a href="<cms:link>${link.value.Uri}</cms:link>">${linktext}</a>
</li>
</c:if>
</c:forEach>
</ul>
</c:if>

<p>
<a href="javascript:history.back();"><fmt:message key="calendar.detail.back" /></a>
</p>

</fmt:bundle>

</div>
</cms:formatter>
Loading