13dbc9c00c5c43e315fcc9318b22478f5a502f92
[citadel.git] / webcit / static / t / ical / attachment / display.html
1 aaa
2 <?ICAL:ITEM(#"ICAL_SUMMARY_PROPERTY", "X")>
3 abc
4
5 <?!("COND:ICAL:PROPERTY", 1, #"ICAL_SUMMARY_PROPERTY")>
6 blarg
7 <?ICAL:PROPERTY:STR("X")>
8 blub
9 <??("X", 1)>
10
11 datum:
12 <?!("COND:ICAL:PROPERTY", 2, #"ICAL_DTSTART_PROPERTY")>
13 <?ICAL:PROPERTY:DATE()>
14 <??("X", 2)>
15 xxxx
16
17 <?ICAL:ITEM(#"ICAL_SUMMARY_PROPERTY", "X")>
18
19 cde
20
21 <?ICAL:ITEM(#"ICAL_LOCATION_PROPERTY", "X")>
22
23 efg
24
25
26 <?ICAL:ITEM(#"ICAL_DESCRIPTION_PROPERTY", "X")>
27
28 hij
29
30
31
32 <div class="mimepart">
33
34 <div id="<?BSTR("divname")>_title">
35 <img src="static/webcit_icons/essen/32x32/calendar.png">
36 <span>
37 &nbsp;&nbsp;
38 <div id="unknown_method"> <?_("This is an unknown type of calendar item.")></div>
39
40 <??("COND:ICAL:METHOD", 11, #"ICAL_METHOD_REQUEST")>
41 <?_("Meeting invitation")><script type="text/javascript">remove_something('unknown_method', 'hidden');</script>
42 <??("X", 11)>
43 <??("COND:ICAL:METHOD", 12, #"ICAL_METHOD_REPLY")>
44 <?_("Attendee's reply to your invitation")><script type="text/javascript">remove_something('unknown_method', 'hidden');</script>
45 <??("X", 12)>
46 <??("COND:ICAL:METHOD", 13 #"ICAL_METHOD_PUBLISH")>
47 <?_("Published event")><script type="text/javascript">remove_something('unknown_method', 'hidden');</script>
48 <??("X", 13)>
49 </span>
50 </div>
51 <dl>
52 <?!("COND:ICAL:PROPERTY", 44, #"ICAL_SUMMARY_PROPERTY")>
53 <dt><?_("Summary:")></dt><dd><?ICAL:PROPERTY:STR("X")></dd>
54 <?!("X", 44)>
55 <?!("COND:ICAL:PROPERTY", 55, #"ICAL_LOCATION_PROPERTY")>
56 <dt><?_("Location:")></dt><dd><?ICAL:PROPERTY:STR("X")></dd>
57 <?!("X", 55)>
58
59
60
61 <?!("COND:ICAL:IS:A", 66, #"ICAL_VEVENT_COMPONENT")>
62
63 <?!("COND:ICAL:DT:PROPERTY", 67, #"ICAL_DTSTART_PROPERTY")>
64 <??("COND:ICAL:DT:ISDATE", 68)>
65 <dt><?_("Date:")></dt><dd><?ICAL:DT:DATE()></dd>
66 <?!("X", 68)>
67 <?!("COND:ICAL:DT:ISDATE", 69)>
68 <dt><?_("Starting date/time:")></dt><dd><?ICAL:DT:DATETIME()></dd>
69 <?!("X", 69)>
70 <?!("X", 67)>
71
72 <?!("COND:ICAL:DT:PROPERTY", 77, #"ICAL_DTEND_PROPERTY")>
73 <dt><?_("Ending date/time:")></dt><dd><?ICAL:DT:DATETIME()></dd>
74 <?!("X", 77)>
75
76 <?!("X", 66)>
77
78
79 <?!("COND:ICAL:PROPERTY", 88, #"ICAL_DESCRIPTION_PROPERTY")>
80 <dt><?_("Description:")></dt><dd><?ICAL:PROPERTY:STR("X")></dd>
81 <?!("X", 88)>
82
83 <?!("COND:ICAL:PROPERTY", 99, #"ICAL_DESCRIPTION_PROPERTY")>
84 <?--("Unusual string syntax used here in order to re-use existing translations")>
85 <dt><?_("Recurrence")></dt><dd><?_("This is a recurring event")>.</dd>
86 <?!("X", 99)>
87
88         /* If the component has attendees, iterate through them. */
89         for (p = icalcomponent_get_first_property(cal, ICAL_ATTENDEE_PROPERTY); 
90              (p != NULL); 
91              p = icalcomponent_get_next_property(cal, ICAL_ATTENDEE_PROPERTY)) {
92                 StrBufAppendPrintf(Target, "<dt>");
93                 StrBufAppendPrintf(Target, _("Attendee:"));
94                 StrBufAppendPrintf(Target, "</dt><dd>");
95                 ch = icalproperty_get_attendee(p);
96                 if ((ch != NULL) && !strncasecmp(buf, "MAILTO:", 7)) {
97
98                         /** screen name or email address */
99                         safestrncpy(buf, ch + 7, sizeof(buf));
100                         striplt(buf);
101                         StrEscAppend(Target, NULL, buf, 0, 0);
102                         StrBufAppendPrintf(Target, " ");
103
104                         /** participant status */
105                         partstat_as_string(buf, p);
106                         StrEscAppend(Target, NULL, buf, 0, 0);
107                 }
108                 StrBufAppendPrintf(Target, "</dd>\n");
109         }
110
111         /* If the component has subcomponents, recurse through them. */
112         for (c = icalcomponent_get_first_component(cal, ICAL_ANY_COMPONENT);
113              (c != 0);
114              c = icalcomponent_get_next_component(cal, ICAL_ANY_COMPONENT)) {
115                 /* Recursively process subcomponent */
116                 cal_process_object(Target, c, recursion_level+1, msgnum, cal_partnum);
117         }
118
119 <??("COND:ICAL:METHOD", 110, #"ICAL_METHOD_REQUEST")>
120 <?--("If this is a REQUEST, display conflicts and buttons")>
121 <?--("Check for conflicts")>
122 <?ICAL:SERV:CHECK:CONFLICT()>
123
124 </dl>
125
126 <?--("Display the Accept/Decline buttons")>
127 <p id="<?BSTR("divname")>_question">
128 <?_("How would you like to respond to this invitation?")>
129 &nbsp;&nbsp;&nbsp;<span class="button_link">
130 <a href="javascript:RespondToInvitation('<?BSTR("divname")>_question','<?BSTR("divname")>_title','<?BSTR("msgnum")>','<?BSTR("cal_partnum")>','Accept');"><?_("Accept")></a>
131 </span>&nbsp;&nbsp;&nbsp;<span class="button_link">
132 <a href="javascript:RespondToInvitation('<?BSTR("divname")>_question','<?BSTR("divname")>_title','<?BSTR("msgnum")>','<?BSTR("cal_partnum")>','Tentative');"><?_("Tentative")></a>
133 </span>&nbsp;&nbsp;&nbsp;<span class="button_link">
134 <a href="javascript:RespondToInvitation('<?BSTR("divname")>_question','<?BSTR("divname")>_title','<?BSTR("msgnum")>','<?BSTR("cal_partnum")>','Decline');"><?_("Decline")></a>
135 </span></p>
136 <??("X", 100)>
137
138 <?--("If this is a REPLY, display update button")>
139 <??("COND:ICAL:METHOD", 110, #"ICAL_METHOD_REPLY")>
140 <?--("Display the update buttons")>
141 <p id="<?BSTR("divname")>_question" >
142 <?_("Click <i>Update</i> to accept this reply and update your calendar.")>
143 &nbsp;&nbsp;&nbsp;<span class="button_link">
144 <a href="javascript:HandleRSVP('<?BSTR("divname")>_question','<?BSTR("divname")>_title','<?BSTR("msgnum")>','<?BSTR("cal_partnum")>','Update');"><?_("Update")></a>
145 </span>&nbsp;&nbsp;&nbsp;<span class="button_link">
146 <a href="javascript:HandleRSVP('<?BSTR("divname")>_question','<?BSTR("divname")>_title','<?BSTR("msgnum")>','<?BSTR("cal_partnum")>','Ignore');"><?_("Ignore")></a>
147 </span></p>
148 <??("X", 110)>
149
150 <?--("Trailing HTML for the display of this object")>
151         if (recursion_level == 0) {
152 <p>&nbsp;</p></div>
153         }