Le repo des sources pour le site web des JM2L
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 

371 Zeilen
16 KiB

  1. <%namespace name="h" file="jm2l:templates/helpers.mako"/>
  2. <%namespace name="tables" file="jm2l:templates/Logistique/Tables.mako"/>
  3. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  4. <%def name="Main(Exchanges, miam_form)">
  5. <%
  6. DicExch = Exchanges.get_overview( request.user.uid )
  7. %>
  8. <div class="tabbable tabs-left" id="Intendance_tab">
  9. <ul class="nav nav-tabs navbar" style="margin-bottom:0;background-color: #f7f7f7;">
  10. <li class="active"> <a href="#ResumeInt" data-toggle="tab">Resumé</a> </li>
  11. <li> <a href="#Miam" data-toggle="tab"><span style="font-size:1.8em;">&#127869;</span> Miam</a> </li>
  12. <li> <a href="#Covoiturage" data-toggle="tab"><span style="font-size:1.8em;">&#128664;</span> Covoiturage</a> </li>
  13. <li> <a href="#Hebergement" data-toggle="tab"><span style="font-size:1.8em;">&#127962;</span> Hébergement</a> </li>
  14. <li> <a href="#Materiel" data-toggle="tab"><span style="font-size:1.8em;">&#128722;</span> Matériel</a> </li>
  15. </ul>
  16. <div class="tab-content">
  17. <div class="tab-pane fade active in" id="ResumeInt">${Route_wrapper(DicExch)}</div>
  18. <div class="tab-pane fade" id="Miam">${Miam_wrapper(miam_form)}</div>
  19. <div class="tab-pane fade" id="Covoiturage">${Exchange_wrapper('C', DicExch['C'])}</div>
  20. <div class="tab-pane fade" id="Hebergement">${Exchange_wrapper('H', DicExch['H'])}</div>
  21. <div class="tab-pane fade" id="Materiel">${Exchange_wrapper('M', DicExch['M'])}</div>
  22. </div>
  23. </div>
  24. </%def>
  25. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  26. <%def name="Exchange_wrapper(Type, DicExch)">
  27. ${tables.DoTable(Type, 'Ask', DicExch)}
  28. ${tables.DoTable(Type, 'Proposal', DicExch)}
  29. <fieldset>
  30. <legend>Tous les échanges</legend>
  31. ${Missing(Type, DicExch['Missing'])}
  32. </fieldset>
  33. </%def>
  34. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  35. <%def name="Miam_wrapper(miam_form)">
  36. <table>
  37. <tr>
  38. <td>
  39. <fieldset>
  40. <legend>Qu'est ce qu'on mange ?</legend>
  41. <form id="MiamForm" action="/MonMiam" method="POST">
  42. <%
  43. DicForm = {
  44. }
  45. %>
  46. ${h.DisplayForm(miam_form, DicForm)}
  47. <div class="span2 offset5">
  48. <input class="btn btn-primary" type="submit" value="Enregistrer !" />
  49. </div>
  50. </form>
  51. </fieldset>
  52. </td>
  53. <td>
  54. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  55. </td>
  56. <td>
  57. <p>
  58. Complétez dès à présent votre partie repas afin que l'on puisse faire les réservations nécessaires !
  59. </p>
  60. <u>Vendredi soir :</u>
  61. <p>
  62. Certains conférenciers viennent de très loin et seront présent dés le vendredi.<br />
  63. Nous vous proposons de nous retrouver à proximité, à la CASA.<br />
  64. <a href="http://groupelacasa.com/la-carte-et-les-menus-1-2-75"> La carte CASA </a>
  65. le vendredi soir autour d'un verre et d'un bon repas !
  66. </p>
  67. <u>Samedi Midi :</u>
  68. <p>
  69. &Agrave; la pause du midi, nous vous proposons un repas avec le food-truck 'les frères toqués' qui sera présent sur le parking de PolyTech<br />
  70. </p>
  71. <u>Samedi Soir :</u>
  72. <p>
  73. Pour conclure la journée nous avons l'habitude de nous retrouver au repas de cloture.<br />
  74. Nous vous proposons de nous retrouver à Antibes au restaurant Les Tonnelles<br />
  75. <a href="https://fr-fr.facebook.com/lestonnellesantibes/?_fb_noscript=1"> Les Tonnelles </a>
  76. </p>
  77. </td>
  78. </tr>
  79. </table>
  80. </%def>
  81. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  82. <%def name="Missing(Type, Selection)">
  83. <%
  84. if Type=='H':
  85. CurTitle = u"d'hébergement"
  86. CurIcon = "icon-home"
  87. elif Type=='C':
  88. CurTitle = "de co-voiturage"
  89. CurIcon = "icon-road"
  90. elif Type=='M':
  91. CurTitle = u"de prêt de matériel"
  92. CurIcon = "icon-shopping-cart"
  93. %>
  94. <table class="table table-striped table-bordered table-hover">
  95. <thead>
  96. <tr>
  97. <th colspan="5">
  98. Les échanges ${CurTitle}
  99. % if 0:
  100. <span style="float:right;">
  101. <a data-original-title="Afficher les demandes" data-toggle="tooltip" id="${Type}_Demande">
  102. <label class="checkbox inline">
  103. <input type="checkbox" id="Demandes">
  104. <i class="icon-comment"></i>
  105. </input>
  106. </label>
  107. </a>
  108. <a data-original-title="Afficher les propositions" data-toggle="tooltip" id="${Type}_Props">
  109. <label class="checkbox inline">
  110. <input type="checkbox" value="#">
  111. <i class="${CurIcon}"></i>
  112. </input>
  113. </label>
  114. </a>
  115. <span>
  116. % endif
  117. </th>
  118. </tr>
  119. <tr>
  120. <th style="width:1em;"></th>
  121. <th>Détails</th>
  122. <th style="width:1em;"></th>
  123. <tr>
  124. </thead>
  125. <tbody id="Missing${Type}Table">
  126. % if len(Selection)==0:
  127. <tr>
  128. <td colspan="5" style="text-align:center;">
  129. <i>Il n'y a aucun échange ${CurTitle} proposé actuellement...</i>
  130. </td>
  131. </tr>
  132. % else:
  133. % for item in Selection:
  134. <%
  135. if (item.provider_id and item.asker_id):
  136. continue
  137. %>
  138. <tr style="cursor:pointer;">
  139. % if item.exch_state=='Ask':
  140. <td style="vertical-align: middle;"><i class="${CurIcon}"></i></td>
  141. % elif item.exch_state=='Proposal':
  142. <td style="vertical-align: middle;"><i class="icon-comment"></i></td>
  143. % endif
  144. <td>
  145. <p style="text-align:center">
  146. %if item.asker and item.exch_state=='Ask':
  147. <a href="/user/${item.asker.slug}"> ${item.asker.prenom} ${item.asker.nom} </a> demande
  148. %elif item.provider and item.exch_state=='Proposal':
  149. <a href="/user/${item.provider.slug}"> ${item.provider.prenom} ${item.provider.nom} </a> offre
  150. % endif
  151. % if item.exch_type=="C":
  152. un co-voiturage le ${item.start_time.strftime('%a %d %b vers %Hh%M')}
  153. de <a href="javascript:DoGetLieu('/${CurrentYear}/modal/Place/${item.Itin.start.place_id}')">${item.Itin.start.display_name}</a>
  154. à <a href="javascript:DoGetLieu('/${CurrentYear}/modal/Place/${item.Itin.arrival.place_id}')">${item.Itin.arrival.display_name}</a>
  155. % elif item.exch_type=="M":
  156. % if item.Category:
  157. <i>${item.Category.exch_subtype}</i>
  158. % endif
  159. % if item.description:
  160. ${item.description[:30]}
  161. % endif
  162. de ${item.start_time.strftime('%a %d %b %Hh%M')}
  163. à ${item.end_time.strftime('%a %d %b %Hh%M')}
  164. % else:
  165. % if item.Category:
  166. <i>${item.Category.exch_subtype}</i>
  167. % endif
  168. % if item.description:
  169. ${item.description[:30]}
  170. % endif
  171. ${item.start_time.strftime('%a %d %b')} soir
  172. % endif
  173. </p>
  174. </td>
  175. <td style="vertical-align: middle;">
  176. % if item.provider_id==request.user.uid or item.asker_id==request.user.uid:
  177. <a class="btn btn-mini btn-primary" style="float:right"
  178. href="javascript:DoGet('/${CurrentYear}/modal/Show${Type}/${item.exch_id}')">
  179. <i class="icon-search icon-white"></i>
  180. </a>
  181. % elif (item.provider_id and item.asker_id):
  182. <a class="btn btn-mini btn-primary" style="float:right"
  183. href="javascript:DoGet('/${CurrentYear}/modal/Show${Type}/${item.exch_id}')">
  184. <i class="icon-search icon-white"></i>
  185. </a> <br/> <br/>
  186. ## <a id="Ask${Type}-${item.exch_id}"
  187. ## class="btn btn-mini btn-info" style="float:right"
  188. ## data-original-title="En attente"
  189. ## data-toggle="popover" data-placement="left"
  190. ## data-content="Déjà en attente d'une réponse."
  191. ## href="#Missing${Type}Table">
  192. ## <i class="icon-random icon-white"></i>
  193. ## </a>
  194. ## <script>$("#Ask${Type}-${item.exch_id}").popover();</script>
  195. % else:
  196. <a class="btn btn-mini btn-primary" style="float:right"
  197. href="javascript:DoGet('/${CurrentYear}/modal/Show${Type}/${item.exch_id}')">
  198. <i class="icon-search icon-white"></i>
  199. </a> <br/> <br/>
  200. ## <a class="btn btn-mini btn-primary" style="float:right"
  201. ## href="javascript:DoGet('/${CurrentYear}/exchange/Ask${Type}/${item.exch_id}/deal')">
  202. ## <i class="icon-random icon-white"></i>
  203. ## </a>
  204. % endif
  205. </td>
  206. </tr>
  207. % endfor
  208. % endif
  209. </tbody>
  210. </table>
  211. <%
  212. context._kwargs['postpone_js'].append( "$('#%s_Props').tooltip();" % Type )
  213. context._kwargs['postpone_js'].append( "$('#%s_Demande').tooltip();" % Type )
  214. %>
  215. ## <script>
  216. ## $('#${Type}_Props').tooltip()
  217. ## $('#${Type}_Demande').tooltip()
  218. ## </script>
  219. </%def>
  220. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  221. <%def name="Route_wrapper(DicExch)">
  222. <%
  223. AskSelection = Exchanges.get_my_counters( int(request.user.uid) )
  224. AllSelection = Exchanges.get_counters()
  225. ListWrap = ["Co-voiturage",u"Hébergement","Matos"]
  226. %>
  227. <div class="accordion" id="AccordionCounter">
  228. <div class="accordion-group">
  229. <div class="accordion-heading">
  230. <a class="accordion-toggle" data-toggle="collapse" data-parent="#AccordionCounter" href="#collapseMe"> Mes compteurs </a>
  231. </div>
  232. <div id="collapseMe" class="accordion-body collapse in">
  233. <div class="accordion-inner">
  234. <table class="table table-striped table-bordered table-hover LogistiqueTable">
  235. <thead style="text-align:center">
  236. <tr>
  237. <th>Section</th>
  238. <th>Mes demandes</th>
  239. <th>Mes offres</th>
  240. <th>Accords</th>
  241. </tr>
  242. </thead>
  243. <tbody id="MyCounters">
  244. <tr>
  245. <td>Miam</td>
  246. <td>?</td>
  247. <td>-</td>
  248. <td>?</td>
  249. </tr>
  250. % for Wrap in ListWrap:
  251. <tr>
  252. <td>${Wrap | h}</td>
  253. <td>
  254. <span class="badge">
  255. ${len(DicExch[Wrap[0]]['Ask'])}
  256. </span>
  257. </td>
  258. <td>
  259. <span class="badge">
  260. ${len(DicExch[Wrap[0]]['Proposal'])}
  261. </span>
  262. </td>
  263. <td>
  264. <span class="badge">
  265. ${len(DicExch[Wrap[0]]['Agree'])}
  266. </span>
  267. </td>
  268. </tr>
  269. % endfor
  270. </tbody>
  271. </table>
  272. </div>
  273. </div>
  274. </div>
  275. <div class="accordion-group">
  276. <div class="accordion-heading">
  277. <a class="accordion-toggle" data-toggle="collapse" data-parent="#AccordionCounter" href="#collapseAll">Les compteurs de l´év&eacute;nement</a>
  278. </div>
  279. <div id="collapseAll" class="accordion-body collapse">
  280. <div class="accordion-inner">
  281. <table class="table table-striped table-bordered table-hover LogistiqueTable">
  282. <thead style="text-align:center">
  283. <tr>
  284. <th>Section</th>
  285. <th>Les demandes</th>
  286. <th>Les propositions</th>
  287. <th>Les Accords</th>
  288. </tr>
  289. </thead>
  290. <tbody id="AllCounters">
  291. <tr>
  292. <td>Miam</td>
  293. <td>?</td>
  294. <td>-</td>
  295. <td>?</td>
  296. </tr>
  297. % for Wrap in ListWrap:
  298. <tr>
  299. <td>${Wrap | h}</td>
  300. <td>
  301. <span class="badge">
  302. ${DicExch[Wrap[0]]['Counters']['AllAsk']}
  303. </span>
  304. </td>
  305. <td>
  306. <span class="badge">
  307. ${DicExch[Wrap[0]]['Counters']['AllProp']}
  308. </span>
  309. </td>
  310. <td>
  311. <span class="badge">
  312. ${DicExch[Wrap[0]]['Counters']['AllAgree']}
  313. </span>
  314. </td>
  315. </tr>
  316. % endfor
  317. </tbody>
  318. </table>
  319. </div>
  320. </div>
  321. </div>
  322. </div>
  323. <fieldset>
  324. <legend>Mon Badge</legend>
  325. <p>
  326. Rendez-vous à l'accueil pour retirer votre badge !
  327. <br>
  328. Pour que tout se passe pour le mieux dans l'organisation de l'&eacute;vénement, nous vous invitons à :
  329. <ul>
  330. <li>Renseigner et valider vos horaires d'arrivée / de départ dans la section "Mon Séjour".</li>
  331. <li>Procéder à la réservation de vos repas dans la section "Miam" !</li>
  332. <li>Préparer et réserver vos transports au plus vite dans la section "Mes Frais".</li>
  333. </ul>
  334. </p>
  335. <div class="center">
  336. <a href="/user/${request.user.slug}/badge"> Télécharger mon badge (PDF)</a>
  337. <br>
  338. </div>
  339. <br>
  340. <div align="center">
  341. <a href="/user/${request.user.slug}/badge">
  342. <img style="border:solid black 1px;" src="/user/${request.user.slug}/badge?png=true" alt="Badge de ${request.user.slug}" />
  343. </a>
  344. </div>
  345. </fieldset>
  346. </%def>
  347. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  348. ## Handle the Javascript Refresh to live update Current Page
  349. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  350. % if reload:
  351. <%
  352. DicExch = Exchanges.get_overview( request.user.uid )
  353. context._kwargs['postpone_js'] = []
  354. %>
  355. ${Route_wrapper(DicExch)}
  356. ${Exchange_wrapper(Type, DicExch[Type])}
  357. %endif