root/yapcasia2008/actdocs/templates/talk/add

Revision 2438 (checked in by miyagawa, 12 years ago)

tweaked adding talk template a bit

Line 
1 [% WRAPPER ui title = loc("Submit/Edit a talk") %]
2
3 <center>
4
5 [% PROCESS error
6    msgs = {
7      ERR_USER           => loc("You must specify a user"),
8      ERR_TITLE          => loc("You must enter a title for the talk"),
9      ERR_ABSTRACT       => loc("You must provide an abstract"),
10      ERR_DATE           => loc("The supplied date is invalid"),
11      ERR_TIME           => loc("The supplied time is invalid"),
12      ERR_DATERANGE      => loc("The date/time is out of range"),
13      ERR_DURATION       => loc("Please choose a duration"),
14      ERR_URL_ABSTRACT   => loc("Abstract URL is not a valid URL"),
15      ERR_URL_TALK       => loc("Talk URL is not a valid URL"),
16      ERR_ROOM           => loc("Incorrect room submitted"),
17      ERR_LEVEL          => loc("Please choose a target audience"),
18      ERR_LANG           => loc("Incorrect language"),
19   }
20 %]
21
22 <form method="POST" action="[% global.request.r.uri %]">
23
24 [% IF return_url %]
25 <input type="hidden" name="return_url" value="[% return_url %]" />
26 [% END %]
27
28 [% IF talk_id %]
29 <input type="hidden" name="talk_id" value="[% talk_id %]" />
30 <p>
31  {{View}}
32  <a href="[% make_uri_info('talk', talk_id) %]" >[% title %]</a>
33 </p><p>
34 <input type="checkbox" name="delete" />
35 {{Delete this talk}}
36 </p>
37 [% END %]
38 <table border="1" cellpadding="10" cellspacing="0"><tr><td>
39 <table border="0" cellpadding="0" cellspacing="10">
40 [% IF global.request.user.is_orga %]
41 <tr>
42   <td align="right">{{User}}</td>
43   <td>&nbsp;</td>
44   <td>
45     <select name="user_id">
46     [% uid = user_id ? user_id : global.request.user.user_id %]
47     [% FOREACH u=users %]
48       <option value="[% u.user_id %]"[% ' selected="selected"' IF u.user_id == uid %]>
49         [% u.first_name %] [% u.last_name %]
50       </option>
51     [% END %]
52     </select>
53   </td>
54 </tr>
55 <tr>
56   <td align="right">{{Date}}</td>
57   <td>&nbsp;</td>
58   <td>
59    <select name="date">
60      <option value=""[% ' selected="selected"' UNLESS datetime %] />
61    [% FOREACH d=dates %]
62      <option value="[% d.ymd %]"[% ' selected="selected"' IF datetime.ymd == d.ymd %]>[% d.ymd %]</option>
63    [% END %]
64     </select>
65    {{Time}}
66     <input type="text" name="time" value="[% datetime.strftime('%H:%M') %]" size="5" maxlength="5" />
67    {{Room}}
68     <select name="room">
69      <option value=""[% ' selected="selected"' UNLESS room %] />
70     [% FOREACH r = rooms.keys.sort %]
71      <option value="[% r %]"[% ' selected="selected"' IF room == r %]>[% rooms.$r %]</option>
72     [% END %]
73     </select>
74    </td>
75 </tr>
76 [% END %]
77 <tr>
78   <td align="right">{{Title}}</td>
79   <td>&nbsp;</td>
80   <td>
81     <input type="text" name="title" value="[% title %]" size="51" maxlength="100" />
82   </td>
83 </tr>
84 [% IF tracks.size != 0 %]
85   [% IF global.request.user.is_orga %]
86 <tr>
87   <td align="right" valign="top">
88   {{Track}}</td>
89   <td>&nbsp;</td>
90   <td>
91    <select name="track_id">
92      <option value=""[% ' selected="selected"' UNLESS track_id %] />
93    [% FOREACH t=tracks %]
94      <option value="[% t.track_id %]"[% ' selected="selected"' IF t.track_id == track_id %]>[% t.title %]</option>
95    [% END %]
96    </select>
97   </td>
98 </tr>
99   [% ELSE %]
100    <input type="hidden" name="track_id" value="[% track_id %]" />
101   [% END %]
102 [% END %]
103 <tr>
104  <td align="right" valign="top">
105  {{Tags}}</td>
106   <td>&nbsp;</td>
107   <td>
108     <input type="text" name="tags" value="[% tags %]" size="51" maxlength="100" />
109   </td>
110 </tr>
111 [% IF global.config.talks_languages %]
112 <tr>
113   <td align="right" valign="top">
114   {{Language}}</td>
115   <td>&nbsp;</td>
116   <td><select name="lang" size="1">
117         <option value=""[% ' selected="selected"' UNLESS lang %] />
118       [% FOREACH lg = global.config.talks_languages.keys.sort %]
119         <option value="[% lg %]"[% ' selected="selected"' IF lang==lg %]>[% global.config.talks_languages.$lg %]</option>
120       [% END %]
121   </select></td>
122 </tr>
123 [% END %]
124 <tr>
125   <td align="right" valign="top">
126   {{Abstract}}<br />{{(plain text)}}</td>
127   <td>&nbsp;</td>
128   <td>
129     <textarea name="abstract" cols="50" rows="10">[% abstract | form_unescape %]</textarea>
130   </td>
131 </tr>
132 <!-- tr>
133   <td align="right">{{Abstract URL}}</td>
134   <td>&nbsp;</td>
135   <td>
136     <input type="text" name="url_abstract" value="[% url_abstract %]" size="51" maxlength="256" />
137   </td>
138 </tr>
139 <tr>
140   <td align="right">{{Talk URL}}</td>
141   <td>&nbsp;</td>
142   <td>
143     <input type="text" name="url_talk" value="[% url_talk %]" size="51" maxlength="256" />
144   </td>
145 </tr -->
146 <tr>
147   <td align="right" valign="top">{{Duration}}</td>
148   <td>&nbsp;</td>
149   <td>
150   [% IF global.request.user.is_orga %]
151     [% loc("Standard durations for <confname> are:", global.conference.name) %]
152     <b>[% global.config.talks_durations.keys.nsort.join('</b>, <b>') %]</b> {{minutes}}
153     <br />
154     <input name="duration" value="[% duration == 'lightning' ? '' : duration %]" size="3" />
155     <input type="checkbox" name="is_lightning"[% ' checked' IF duration=='lightning' %] />
156     {{Lightning talk}}
157   [% ELSE %]
158     [% IF talk_id %]
159       [% IF duration == 'lightning' %]
160         {{Lightning talk}}
161       [% ELSE %]
162         [% duration %] {{minutes}}
163       [% END %]
164     [% ELSE %]
165       <select name="duration">
166        <option value=""[% ' selected="selected"' UNLESS duration %] />
167        <!-- option value="lightning"[% ' selected="selected"' IF lightning %]>
168           {{Lightning talk}}
169        </option -->
170        [% FOREACH d = global.config.talks_durations.keys.nsort %]
171        <option value="[% d %]"[% ' selected="selected"' IF d == duration %]>[% d %] {{minutes}}</option>
172        [% END %]
173        {{If the proposed durations do not quite fit your talk, please}}
174      [% END %]
175    [% END %]
176     </select>
177   </td>
178 </tr>
179 [% IF global.config.talks_levels %]
180 <tr>
181   <td align="right" valign="top">{{Target audience}}</td>
182   <td>&nbsp;</td>
183   <td><select name="level">
184        [% FOREACH levelname = global.config.talks_levels_names %]
185          <option value="[% loop.count %]"[% ' selected="selected"' IF level == loop.count %]>[% levelname %]</option>
186        [% END %]
187   </td>
188 </tr>
189 [% END %]
190 <tr>
191   <td align="right" valign="top">{{Comments}}</td>
192   <td>&nbsp;</td>
193   <td>
194     {{The comment field is used for communicating information about}}<br />
195     <textarea name="comment" cols="50" rows="3">[% comment | form_unescape %]</textarea>
196   </td>
197 </tr>
198 <tr>
199   <td align="right" valign="top">{{Status}}</td>
200   <td>&nbsp;</td>
201   <td>
202     [% IF global.request.user.is_orga %]
203     <input type="checkbox" name="accepted"[% ' checked' IF accepted %] />
204     {{accepted}}<br />
205     <input type="checkbox" name="confirmed"[% ' checked' IF confirmed %] />
206     {{confirmed}}<br />
207     [% ELSE %]
208       [% IF accepted %]
209         {{Accepted}}<br />
210         <input type="checkbox" name="confirmed"[% ' checked' IF confirmed %] />
211         {{confirmed}}<br />
212       [% ELSE %]
213         {{Pending}}
214       [% END %]
215     [% END %]
216    </td>
217 </tr>
218 <tr>
219    <td colspan="3" align="right">
220       <input type="submit" name="submit" value="{{Submit this talk}}" />
221    </td>
222 </tr>
223 </table>
224 </td></tr></table>
225
226 </form>
227 </center>
228
229 [% END %]
Note: See TracBrowser for help on using the browser.