Le repo des sources pour le site web des JM2L
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 

229 linhas
8.5 KiB

  1. ## -*- coding: utf-8 -*-
  2. <%inherit file="jm2l:templates/layout.mako"/>
  3. <%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
  4. <%def name="jsAddOn()">
  5. <script src="/static/third-party/ckeditor/ckeditor.js"></script>
  6. <script src="/static/select2.js"></script>
  7. </%def>
  8. <%def name="cssAddOn()">
  9. <link rel="stylesheet" href="/static/select2.css" type="text/css" media="screen" />
  10. <link rel="stylesheet" href="/static/css/jquery.fileupload.css">
  11. <link rel="stylesheet" href="/static/css/jquery.fileupload-ui.css">
  12. <link rel="stylesheet" href="/static/leaflet.css" />
  13. <!-- CSS adjustments for browsers with JavaScript disabled -->
  14. <noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-noscript.css"></noscript>
  15. <noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-ui-noscript.css"></noscript>
  16. </%def>
  17. <% from datetime import datetime %>
  18. <style>
  19. .borderbox {
  20. border: 1px solid #e1e4e5;
  21. margin: 1px 0 24px;
  22. color: #404040;
  23. line-height: 1.5;
  24. margin: 0;
  25. overflow: auto;
  26. padding: 12px;
  27. background: none repeat scroll 0 0 #fcfcfc;
  28. font-family: "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;
  29. }
  30. .titleborderbox {
  31. background: none repeat scroll 0 0 #ffffff;
  32. border: 1px solid #eee;
  33. display: inline;
  34. left: 16px;
  35. padding: 2px 7px;
  36. position: relative;
  37. top: 10px;
  38. }
  39. .borderboxtime {
  40. float:right;
  41. padding:1px 15px;
  42. border: 1px solid #eee;
  43. }
  44. </style>
  45. % if 'uid' in form._fields:
  46. <div class="borderboxtime">
  47. ${event.start_time.strftime('%d %b %Y').decode('utf-8')} -
  48. ${event.start_time.strftime('%H:%M')} à ${event.end_time.strftime('%H:%M')}
  49. %if event.Salle:
  50. - <strong>Salle</strong>: ${event.Salle.name}
  51. %endif
  52. </div>
  53. %endif
  54. <h3 style="line-height:30px;">${form.event_type.data}</h3>
  55. % if 'uid' in form._fields:
  56. <div class="borderbox">
  57. Intrevenants programmés:
  58. <ul>
  59. % if event.intervenants.count()==0:
  60. <i><b>Aucun</b></i>
  61. % else:
  62. % for num, iterv in enumerate(event.intervenants):
  63. <li>
  64. <strong><a href="/MesJM2L?user=${iterv.uid}">${iterv.prenom} ${iterv.nom}</a></strong>.
  65. % if iterv.pseudo:
  66. (${iterv.pseudo})
  67. %endif
  68. </li>
  69. % endfor
  70. % endif
  71. </ul>
  72. </div>
  73. <a href="/event/${event.for_year}/${event.slug}" class="pull-right">Voir la version publiée de cet évenement</a>
  74. <br clear="both">
  75. %endif
  76. <fieldset>
  77. <legend>Proposer un événement</legend>
  78. <form action="" method="POST">
  79. ${form.csrf_token}
  80. % if 'uid' in form._fields:
  81. ${form.uid}
  82. %endif
  83. <%
  84. TabFields = [
  85. ( form._fields.get("for_year"), u"Prénom", "padding-right:5px;float:left;" , "" ),
  86. ( form._fields.get("event_type"), u"Nom", "padding-right:5px;" , "" ),
  87. ( form._fields.get("start_sel"), u"Début", "padding-right:15px;float:left;" , "width:15em;" ),
  88. ( form._fields.get("duration"), u"Durée", "padding-right:15px;float:left;" , "width:15em;" ),
  89. ( form._fields.get("salle_uid"), u"Salle", "padding-right:15px;", "width:15em;" ),
  90. ( form._fields.get("name"), u"Nom", "padding-right:5px;" , "width:95%;" ),
  91. ( form._fields.get("description"), u"Description", "padding-right:5px;" , "width:90%;height:500px;" ),
  92. ]
  93. %>
  94. ${form.start_time}
  95. ${form.end_time}
  96. % for Field, PlaceHolder, DivClass, FieldClass in TabFields:
  97. % if Field is None:
  98. <% continue %>
  99. % endif
  100. % if Field.type=='HiddenField':
  101. ${Field()}
  102. <% continue %>
  103. % endif
  104. <div style="padding-right:5px;${DivClass}">
  105. <label for="${Field.label.field_id}">${Field.label.text}
  106. % if len(Field.description):
  107. <a id="${Field.label.field_id}-help" data-toggle="popover"
  108. data-original-title="${Field.label.text}"
  109. data-content="${Field.description}">
  110. <i class="icon-me" style="background-image: url('/static/Help.png');background-position:1px 2px;"></i>
  111. </a>
  112. % endif
  113. </label>
  114. % for error in Field.errors:
  115. <div class="alert alert-error">
  116. <button type="button" class="close" data-dismiss="alert">&times;</button>
  117. <h4>Erreur!</h4>
  118. ${ error }
  119. </div>
  120. % endfor
  121. ${Field(placeholder=PlaceHolder, style=FieldClass)}
  122. </div>
  123. % endfor
  124. <button type="submit">Proposer</button>
  125. </form>
  126. </fieldset>
  127. % if 'uid' in form._fields:
  128. <fieldset>
  129. <legend>Vos support de présentation</legend>
  130. <div style="float:right;width:60%">
  131. <p> En plus de vos support de présentation classique.
  132. Pensez aussi aux affiches, aux flyers, aux stickers,
  133. au bulletin d'adhésion à une association, à la documentation technique...
  134. Tous ce qui peut être utile, de près ou de loin à la promotion de votre évenement.
  135. </p>
  136. </div>
  137. ${helpers.uploader("event", form.uid.data, u"un support de présentation" )}
  138. </fieldset>
  139. %else:
  140. <br>NB: Vous devez proposer votre conférence avant de pouvoir
  141. téléverser votre support de présentation.
  142. % endif
  143. % if 'uid' in form._fields:
  144. <fieldset>
  145. <legend>Ajouter vos co-intervenants</legend>
  146. <p>
  147. Vous avez la possibilité d'être plusieurs pour un même évenement.
  148. Pour enregistrer une autre personne, deux cas peuvent se présenter:
  149. <ul>
  150. <li>Votre partenaire n'est pas inscrit sur le site</li>
  151. <p>
  152. Inscrivez son email avec son accord dans le champ suivant,
  153. Un mail lui sera envoyé pour qu'il procède à son inscription.
  154. Un fois son inscription effectué, reportez vous au deuxième cas.
  155. </p>
  156. <li>Votre partenaire est inscrit sur le site</li>
  157. <p>
  158. Demandez lui l'email utilisé lors de son inscription sur le site des JM2L.
  159. Complétez le champ suivant et validez.
  160. </p>
  161. </ul>
  162. Notez que les intervenants d'un même évenement ont tous les droits de modification.
  163. </p>
  164. <form action="/MesJM2L/${form.for_year.data}/${form.event_type.data}/link" method="POST">
  165. ${formAdd.event_uid}
  166. <%
  167. TabFields = [
  168. ( formAdd._fields["prenom"], u"Prénom", "padding-right:5px;float:left;" ),
  169. ( formAdd._fields["nom"], u"Nom", "padding-right:5px;" ),
  170. ( formAdd._fields["email"], u"son.mail@fqdn.tld", "padding-right:5px;" ),
  171. ]
  172. %>
  173. % for Field, PlaceHolder, DivClass in TabFields:
  174. <div style="padding-right:5px;${DivClass}">
  175. <label for="${Field.label.field_id}">${Field.label.text}
  176. % if len(Field.description):
  177. <a id="${Field.label.field_id}-help" data-toggle="popover"
  178. data-original-title="${Field.label.text}"
  179. data-content="${Field.description}">
  180. <i class="icon-me" style="background-image: url('/static/Help.png');background-position:1px 2px;"></i>
  181. </a>
  182. % endif
  183. </label>
  184. % for error in Field.errors:
  185. <div class="alert alert-error">
  186. <button type="button" class="close" data-dismiss="alert">&times;</button>
  187. <h4>Erreur!</h4>
  188. ${ error }
  189. </div>
  190. % endfor
  191. ${Field(placeholder=PlaceHolder, style="width:16em;")}
  192. </div>
  193. % endfor
  194. ## Then the submit for this form
  195. ${formAdd.add}
  196. </form>
  197. </fieldset>
  198. <p style="float:right;">Créé le ${event.created.strftime('%d %b %Y').decode('utf-8')}</p>
  199. %else:
  200. <p style="float:right;">Créé le
  201. ${datetime.now().strftime('%d %b %Y').decode('utf-8')}
  202. </p>
  203. % endif
  204. <br/>
  205. <hr/>
  206. % if 'uid' in form._fields:
  207. ${helpers.uploader_js()}
  208. % endif
  209. <script type="text/javascript">
  210. ## Handle Popover of this form
  211. % for field in form._fields.keys():
  212. $('#${field}-help').popover();
  213. % if form._fields[field].type=='SelectField':
  214. $('#${field}').select2({width:'resolve'});
  215. % endif
  216. %endfor
  217. % if formAdd:
  218. % for field in formAdd._fields.keys():
  219. $('#${field}-help').popover();
  220. %endfor
  221. % endif
  222. var editor = CKEDITOR.replace('description', { autoGrow_onStartup: true, language: 'fr' } );
  223. </script>