root/trunk/calendar3/webclient/war/docs/header.jsp

Revision 131 (checked in by douglm, 7 years ago)

Add current subscriptions and calendars to header

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