root/branches/REL-3.1rc4/calendar3/webclient/war/docs/header.jsp

Revision 641 (checked in by johnsa, 7 years ago)

adding updated rc4 branch with final modifications prior to release

Line 
1 <%@ page contentType="text/xml;charset=UTF-8" language="java" %>
2 <%@ taglib uri='struts-bean' prefix='bean' %>
3 <%@ taglib uri='struts-logic' prefix='logic' %>
4 <%@ taglib uri='struts-genurl' prefix='genurl' %>
5 <%
6 try {
7 %>
8
9 <bedework>
10   <bean:define id="bwconfig" name="calForm" property="config" toScope="session" />
11
12   <now><%-- The actual date right "now" - this may not be the same as currentdate --%>
13     <date><bean:write name="calForm" property="today.dateDigits"/></date><%--
14       Value: YYYYMMDD --%>
15     <longdate><bean:write name="calForm" property="today.longDateString"/></longdate><%--
16       Value (example): February 8, 2004 - long representation of the date --%>
17     <shortdate><bean:write name="calForm" property="today.dateString"/></shortdate><%--
18       Value (example): 2/8/04 - short representation of the date --%>
19     <time><bean:write name="calForm" property="today.timeString"/></time><%--
20       Value (example): 10:15 PM --%>
21   </now>
22   <bean:define id="ctView" name="calForm" property="curTimeView"/>
23   <currentdate><%-- The current user-selected date --%>
24     <date><bean:write name="ctView" property="curDay.dateDigits"/></date><%--
25       Value: yyyymmdd - date value --%>
26     <longdate><bean:write name="ctView"
27                           property="curDay.fullDateString"/></longdate><%--
28       Value (example): Wednesday, February 11, 2004 --%>
29     <shortdate><bean:write name="ctView" property="curDay.dateString"/></shortdate><%--
30       Value (example): 2/8/04 - short representation of the date --%>
31     <monthname><bean:write name="ctView" property="curDay.monthName"/></monthname><%--
32       Value (example): January - full month name --%>
33   </currentdate>
34   <firstday><%-- The first date appearing in the currently selected time period --%>
35     <date><bean:write name="ctView" property="firstDay.dateDigits"/></date><%--
36       Value: yyyymmdd - date value --%>
37     <longdate><bean:write name="ctView"
38                           property="firstDay.fullDateString"/></longdate><%--
39       Value (example): Wednesday, February 11, 2004 --%>
40     <shortdate><bean:write name="ctView" property="firstDay.dateString"/></shortdate><%--
41       Value (example): 2/8/04 - short representation of the date --%>
42     <monthname><bean:write name="ctView" property="firstDay.monthName"/></monthname><%--
43       Value (example): January - full month name --%>
44   </firstday>
45   <lastday><%-- The last date appearing in the currently selected time period --%>
46     <date><bean:write name="ctView" property="lastDay.dateDigits"/></date><%--
47       Value: yyyymmdd - date value --%>
48     <longdate><bean:write name="ctView"
49                           property="lastDay.fullDateString"/></longdate><%--
50       Value (example): Wednesday, February 11, 2004 --%>
51     <shortdate><bean:write name="ctView" property="lastDay.dateString"/></shortdate><%--
52       Value (example): 2/8/04 - short representation of the date --%>
53     <monthname><bean:write name="ctView" property="lastDay.monthName"/></monthname><%--
54       Value (example): January - full month name --%>
55   </lastday>
56   <previousdate><bean:write name="ctView" property="prevDate"/></previousdate><%--
57     Value: YYYYMMDD - The previous "firstdate" in the selected time period  --%>
58   <nextdate><bean:write name="ctView" property="nextDate"/></nextdate><%--
59     Value: YYYYMMDD - The next "firstdate" in the selected time period --%>
60   <periodname><bean:write name="ctView" property="periodName"/></periodname><%--
61     Values: Day, Week, Month, Year - The current time period name.   --%>
62   <multiday><bean:write name="ctView" property="multiDay"/></multiday><%--
63     Values: true, false - Flag if we are viewing multiple days --%>
64   <hour24><bean:write name="calForm" property="hour24" /></hour24><%--
65     Values: true, false - Flag if we are using 24 hour time --%>
66
67   <publicview><bean:write name="calForm" property="publicView" /></publicview><%--
68     Values: true, false - Flag if we are in the guest (public) view  --%>
69   <guest><bean:write name="calForm" property="guest" /></guest><%--
70     Value: true, false - Flag if we are a guest --%>
71   <logic:equal name="calForm" property="guest" value="false">
72     <userid><bean:write name="calForm" property="currentUser" /></userid><%--
73       Value: string - Userid of non-guest user --%>
74   </logic:equal>
75
76   <logic:iterate id="msg" name="calForm" property="msg.msgList">
77     <message>
78       <id><bean:write name="msg" property="msgId" /></id>
79       <logic:iterate id="param" name="msg" property="params" >
80         <param><bean:write name="param" /></param>
81       </logic:iterate>
82     </message>
83   </logic:iterate>
84
85   <logic:iterate id="errBean" name="calForm" property="err.msgList">
86     <error>
87       <id><bean:write name="errBean" property="msgId" /></id>
88       <logic:iterate id="param" name="errBean" property="params" >
89         <param><bean:write name="param" /></param>
90       </logic:iterate>
91     </error>
92   </logic:iterate>
93
94   <approot><bean:write name="calForm" property="presentationState.appRoot"/></approot><%--
95         Value: URI - the location of web resources used by the code to find the
96         XSLT files.  This element is defined prior to build in
97         ../../../../clones/democal.properties
98         as pubevents.app.root and personal.app.root. Note that references to
99         html web resources such as images are set in the xsl stylesheets. --%>
100   <urlprefix><bean:write name="calForm" property="urlPrefix"/></urlprefix><%--
101         Value: URI - this is prefix of the calendar application.
102         e.g. http://localhost:8080/cal
103         Use this value to prefix calls to the application actions in your XSLT.
104         e.g. <a href="{$urlPrefix}/eventView.do?eventId=8">View Event</a> --%>
105   <urlpattern><genurl:rewrite action="DUMMYACTION.DO" /></urlpattern>
106
107   <personaluri><bean:message key="org.bedework.personal.calendar.uri"/></personaluri>
108   <publicuri><bean:message key="org.bedework.public.calendar.uri"/></publicuri>
109   <adminuri><bean:message key="org.bedework.public.admin.uri"/></adminuri>
110   <bean:define id="personalUri"><bean:message key="org.bedework.personal.calendar.uri"/></bean:define>
111   <urlPrefixes>
112     <%--urlPrefixes are used to generate appropriately encoded urls for
113         calls into the application; these are required for use within portals
114         and are generated in header.jsp. --%>
115
116     <%-- render urls --%>
117     <initialise><genurl:rewrite forward="initialise"/></initialise>
118     <eventMore><genurl:rewrite forward="eventMore"/></eventMore>
119     <initUpload><genurl:rewrite forward="initUpload"/></initUpload>
120
121     <%-- action urls --%>
122     <setup><genurl:rewrite action="setup.do"/></setup>
123     <setSelection><genurl:rewrite action="setSelection.do"/></setSelection>
124     <setViewPeriod><genurl:rewrite action="setViewPeriod.do"/></setViewPeriod>
125     <eventView><genurl:rewrite action="eventView.do"/></eventView>
126     <mailEvent><genurl:rewrite action="mailEvent.do"/></mailEvent>
127     <showPage><genurl:rewrite action="showPage.do"/></showPage>
128
129     <export><genurl:rewrite action="export.do"/></export>
130     <stats><genurl:rewrite action="stats.do?be=d"/></stats>
131
132     <fetchPublicCalendars><genurl:rewrite action="fetchPublicCalendars"/></fetchPublicCalendars>
133     <fetchCalendars><genurl:rewrite action="fetchCalendars"/></fetchCalendars>
134
135     <!-- The following URLs are used only in the personal client -->
136     <logic:equal name="calForm" property="guest" value="false">
137       <initEvent><genurl:rewrite action="initEvent.do"/></initEvent>
138       <addEvent><genurl:rewrite action="addEvent.do"/></addEvent>
139       <addEventUsingPage><genurl:rewrite action="addEventUsingPage.do"/></addEventUsingPage>
140       <editEvent><genurl:rewrite action="editEvent.do"/></editEvent>
141       <delEvent><genurl:rewrite action="delEvent.do"/></delEvent>
142       <event>
143         <setAccess><genurl:link page="/event/setAccess.do?b=de"/></setAccess>
144         <addEventRefComplete><genurl:link page="/event/addEventRefComplete.do?b=de"/></addEventRefComplete>
145         <selectCalForEvent><genurl:link page="/event/selectCalForEvent.do?b=de"/></selectCalForEvent>
146       </event>
147
148       <freeBusy>
149         <fetch><genurl:link page="/freeBusy/getFreeBusy.do?b=de"/></fetch>
150         <setAccess><genurl:link page="/freeBusy/setAccess.do?b=de"/></setAccess>
151       </freeBusy>
152
153       <calendar>
154         <fetch><genurl:link page="/calendar/showUpdateList.rdo?b=de"/></fetch><!-- keep -->
155         <fetchDescriptions><genurl:link page="/calendar/showDescriptionList.rdo?b=de"/></fetchDescriptions><!-- keep -->
156         <initAdd><genurl:link page="/calendar/initAdd.do?b=de"/></initAdd><!-- keep -->
157         <delete><genurl:link page="/calendar/delete.do?b=de"/></delete>
158         <fetchForDisplay><genurl:link page="/calendar/fetchForDisplay.do?b=de"/></fetchForDisplay>
159         <fetchForUpdate><genurl:link page="/calendar/fetchForUpdate.do?b=de"/></fetchForUpdate><!-- keep -->
160         <update><genurl:link page="/calendar/update.do?b=de"/></update><!-- keep -->
161         <setAccess><genurl:link page="/calendar/setAccess.do?b=de"/></setAccess>
162       </calendar>
163
164       <subscriptions> <!-- only those listed are used here (no need to clean up) -->
165         <fetch><genurl:link page="/subs/fetch.do?b=de"/></fetch>
166         <fetchForUpdate><genurl:link page="/subs/fetchForUpdate.do?b=de"/></fetchForUpdate>
167         <addSubByUri><genurl:link page="/subs/showAddByUriForm.rdo?b=de"/></addSubByUri>
168         <subscribeByUri><genurl:link page="/subs/subscribeByUri.do?b=de"/></subscribeByUri>
169         <initAdd><genurl:link page="/subs/initAdd.do?b=de"/></initAdd>
170         <subscribe><genurl:link page="/subs/subscribe.do?b=de"/></subscribe>
171       </subscriptions>
172
173       <manageLocations><genurl:rewrite action="manageLocations.do"/></manageLocations>
174       <addLocation><genurl:rewrite action="addLocation.do"/></addLocation>
175       <editLocation><genurl:rewrite action="editLoc.do"/></editLocation>
176       <delLocation><genurl:rewrite action="delLocation.do"/></delLocation>
177
178       <prefs>
179         <fetchForUpdate><genurl:link page="/prefs/fetchForUpdate.do?b=de"/></fetchForUpdate>
180         <update><genurl:link page="/prefs/update.do?b=de"/></update>
181       </prefs>
182
183       <initEventAlarm><genurl:rewrite action="initEventAlarm.do"/></initEventAlarm>
184       <setAlarm><genurl:rewrite action="setAlarm.do"/></setAlarm>
185       <addEventRef><genurl:rewrite action="addEventRef.do"/></addEventRef>
186       <upload><genurl:rewrite action="upload.do"/></upload>
187     </logic:equal>
188   </urlPrefixes>
189   <confirmationid><bean:write name="calForm" property="confirmationId"/></confirmationid><%--
190         Value: String - a 16 character random string used to allow users to confirm
191         additions to thier private calendar --%>
192   <logic:iterate id="appvar" name="calForm" property="appVars">
193     <appvar><%--
194         Application variables can be set arbitrarily by the stylesheet designer.
195         Use an "appvar" by adding setappvar=key(value) to the query string of
196         a URL.  This feature is useful for setting up state during a user's session.
197         e.g. <a href="{$urlPrefix}/eventView.do?eventId=8&setappvar=currentTab(event)">View Event</a>
198         To change the value of an appvar, call the same key with a different value.
199         e.g. <a href="{$urlPrefix}/setup.do?setappvar=currentTab(home)">Return Home</a>
200         If appvars exist, they will be output in the following form:  --%>
201       <key><bean:write name="appvar" property="key" /></key>
202       <value><bean:write name="appvar" property="value" /></value>
203
204       <logic:equal name="appvar" property="key" value="summaryMode"><%--
205         This is a special use of the appvar feature.  Normally, we don't return
206         all details about events except when we display a single event (to keep the
207         XML lighter).  To return all event details in an events listing, append a
208         query string with setappvar=summaryMode(details).  Turn the detailed view
209         off with setappvar=summaryMode(summary).--%>
210         <logic:equal name="appvar" property="value" value="details">
211           <bean:define id="detailView" value="true" toScope="request"/><%--
212             Send this bean to the request scope so we can test for it on the page
213             that builds the calendar tree (main.jsp) --%>
214         </logic:equal>
215       </logic:equal>
216     </appvar>
217   </logic:iterate>
218
219   <selectionState><%--
220     What type of information have we selected to display?  Used to
221     branch between different templates in the xsl based on user selections. --%>
222     <selectionType><bean:write name="calForm" property="selectionType"/></selectionType><%--
223         Value: view,search,calendar,subscription,filter
224         Used to branch into different presentation depending on the type of
225         output we expect --%>
226     <view>
227       <logic:present name="calForm" property="currentView" >
228         <name><bean:write name="calForm" property="currentView.name"/></name><%--
229           Value: string - Name of selected view for display --%>
230         <id><bean:write name="calForm" property="currentView.id"/></id><%--
231           Value: string - String ID of selected view for display --%>
232       </logic:present>
233       <logic:notPresent name="calForm" property="currentView" >
234         <name>All</name><%-- change: this should be the default not "All" --%>
235         <id>-1</id>
236       </logic:notPresent>
237     </view>
238     <search><bean:write name="calForm" property="search"/></search><%--
239       Value: string - Current search string for display
240       Note: this will change when proper searching is implemented --%>
241     <subscriptions>
242       <logic:iterate id="sub" name="calForm" property="currentSubscriptions">
243         <subscription>
244           <name><bean:write name="sub" property="name" /></name>
245           <logic:present name="sub" property="calendar" >
246             <calendar>
247               <name><bean:write name="sub" property="calendar.name" /></name>
248               <path><bean:write name="sub" property="calendar.path" /></path>
249               <encodedPath><bean:write name="sub" property="calendar.encodedPath" /></encodedPath>
250             </calendar>
251           </logic:present>
252           <logic:notPresent name="sub" property="calendar" >
253             <calendar><name></name></calendar>
254           </logic:notPresent>
255         </subscription>
256       </logic:iterate>
257     </subscriptions><%--
258       Value: string - currently selected subscription ("calendar" too) --%>
259     <filter></filter> <%-- unimplemented --%>
260   </selectionState>
261
262   <%-- List of views for menuing --%>
263   <views>
264     <logic:present name="calForm" property="views">
265       <logic:iterate id="view" name="calForm" property="views" >
266         <view>
267           <name><bean:write name="view" property="name"/></name>
268           <id><bean:write name="view" property="id"/></id>
269         </view>
270       </logic:iterate>
271     </logic:present>
272   </views>
273
274 <%-- ****************************************************************
275       the following code should not be produced in the public client
276      **************************************************************** --%>
277   <logic:equal name="calForm" property="guest" value="false">
278     <myCalendars>
279       <jsp:include page="/docs/calendar/emitCalendars.jsp"/>
280     </myCalendars>
281
282     <mySubscriptions>
283       <jsp:include page="/docs/subs/emitSubscriptions.jsp"/>
284     </mySubscriptions>
285
286     <myPreferences>
287     </myPreferences>
288   </logic:equal>
289
290 <%
291 } catch (Throwable t) {
292   t.printStackTrace();
293 }
294 %>
295
Note: See TracBrowser for help on using the browser.