Le repo des sources pour le site web des JM2L
Não pode escolher mais do que 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.
 
 
 
 
 

519 linhas
28 KiB

  1. <%namespace name="h" file="jm2l:templates/helpers.mako"/>
  2. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  3. <%def name="Main(Exchanges)">
  4. <div class="tabbable tabs-left" id="Intendance_tab">
  5. <ul class="nav nav-tabs navbar" style="margin-bottom:0;">
  6. <li class="active"> <a href="#ResumeInt" data-toggle="tab">Resum&eacute;</a> </li>
  7. <li> <a href="#Miam" data-toggle="tab">Miam</a> </li>
  8. <li> <a href="#Covoiturage" data-toggle="tab">Covoiturage</a> </li>
  9. <li> <a href="#Hebergement" data-toggle="tab">H&eacute;bergement</a> </li>
  10. <li> <a href="#Materiel" data-toggle="tab">Mat&eacute;riel</a> </li>
  11. </ul>
  12. <div class="tab-content">
  13. <div class="tab-pane fade active in" id="ResumeInt">${Route_wrapper(Exchanges)}</div>
  14. <div class="tab-pane fade" id="Miam">${Miam_wrapper()}</div>
  15. <div class="tab-pane fade" id="Covoiturage">${Exchange_wrapper('C', Exchanges)}</div>
  16. <div class="tab-pane fade" id="Hebergement">${Exchange_wrapper('H', Exchanges)}</div>
  17. <div class="tab-pane fade" id="Materiel">${Exchange_wrapper('M', Exchanges)}</div>
  18. </div>
  19. </div>
  20. </%def>
  21. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  22. <%def name="Exchange_wrapper(Type, Exchanges)">
  23. <%
  24. AllSelection = Exchanges.get_pub_list( Type )
  25. DicExch = Exchanges.get_my_list( request.user.uid, Type )
  26. %>
  27. ${Ask(Type, DicExch)}
  28. ${Proposal(Type, DicExch)}
  29. <fieldset>
  30. <legend>Tous les échanges</legend>
  31. ${Missing(Type, AllSelection)}
  32. </fieldset>
  33. </%def>
  34. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  35. <%def name="Miam_wrapper()">
  36. <fieldset>
  37. <legend>Qu'est ce qu'on mange ?</legend>
  38. </fieldset>
  39. </%def>
  40. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  41. <%def name="Missing(Type, Selection)">
  42. <%
  43. if Type=='H':
  44. CurTitle = u"d'hébergement"
  45. CurIcon = "icon-home"
  46. elif Type=='C':
  47. CurTitle = "de co-voiturage"
  48. CurIcon = "icon-road"
  49. elif Type=='M':
  50. CurTitle = u"de prêt de matériel"
  51. CurIcon = "icon-shopping-cart"
  52. %>
  53. <table class="table table-striped table-bordered table-hover">
  54. <thead>
  55. <tr>
  56. <th colspan="5">
  57. Les échanges ${CurTitle}
  58. % if 0:
  59. <span style="float:right;">
  60. <a data-original-title="Afficher les demandes" data-toggle="tooltip" id="${Type}_Demande">
  61. <label class="checkbox inline">
  62. <input type="checkbox" id="Demandes">
  63. <i class="icon-comment"></i>
  64. </input>
  65. </label>
  66. </a>
  67. <a data-original-title="Afficher les propositions" data-toggle="tooltip" id="${Type}_Props">
  68. <label class="checkbox inline">
  69. <input type="checkbox" value="#">
  70. <i class="${CurIcon}"></i>
  71. </input>
  72. </label>
  73. </a>
  74. <span>
  75. % endif
  76. </th>
  77. </tr>
  78. <tr>
  79. <th style="width:1em;"></th>
  80. <th>Détails</th>
  81. <th style="width:1em;"></th>
  82. <tr>
  83. </thead>
  84. <tbody id="Missing${Type}Table">
  85. % if len(Selection)==0:
  86. <tr>
  87. <td colspan="5" style="text-align:center;">
  88. <i>Il n'y a aucun échange ${CurTitle} proposé actuellement...</i>
  89. </td>
  90. </tr>
  91. % else:
  92. % for item in Selection:
  93. <%
  94. if (item.provider_id and item.asker_id):
  95. continue
  96. %>
  97. <tr style="cursor:pointer;">
  98. % if item.exch_state=='Ask':
  99. <td style="vertical-align: middle;"><i class="${CurIcon}"></i></td>
  100. % elif item.exch_state=='Proposal':
  101. <td style="vertical-align: middle;"><i class="icon-comment"></i></td>
  102. % endif
  103. <td>
  104. <p style="text-align:center">
  105. %if item.asker and item.exch_state=='Ask':
  106. <a href="/user/${item.asker.slug}"> ${item.asker.prenom} ${item.asker.nom} </a> demande
  107. %elif item.provider and item.exch_state=='Proposal':
  108. <a href="/user/${item.provider.slug}"> ${item.provider.prenom} ${item.provider.nom} </a> offre
  109. % endif
  110. % if item.exch_type=="C":
  111. un co-voiturage le ${item.start_time.strftime('%a %d %b vers %Hh%M')}
  112. de <a href="javascript:DoGetLieu('/2015/modal/Place/${item.Itin.start.place_id}')">${item.Itin.start.display_name}</a>
  113. à <a href="javascript:DoGetLieu('/2015/modal/Place/${item.Itin.arrival.place_id}')">${item.Itin.arrival.display_name}</a>
  114. % elif item.exch_type=="M":
  115. % if item.Category:
  116. <i>${item.Category.exch_subtype}</i>
  117. % endif
  118. % if item.description:
  119. ${item.description[:30]}
  120. % endif
  121. de ${item.start_time.strftime('%a %d %b %Hh%M')}
  122. à ${item.end_time.strftime('%a %d %b %Hh%M')}
  123. % else:
  124. % if item.Category:
  125. <i>${item.Category.exch_subtype}</i>
  126. % endif
  127. % if item.description:
  128. ${item.description[:30]}
  129. % endif
  130. ${item.start_time.strftime('%a %d %b')} soir
  131. % endif
  132. </p>
  133. </td>
  134. <td style="vertical-align: middle;">
  135. % if item.provider_id==request.user.uid or item.asker_id==request.user.uid:
  136. <a class="btn btn-mini btn-primary" style="float:right"
  137. href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')">
  138. <i class="icon-search icon-white"></i>
  139. </a>
  140. % elif (item.provider_id and item.asker_id):
  141. <a class="btn btn-mini btn-primary" style="float:right"
  142. href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')">
  143. <i class="icon-search icon-white"></i>
  144. </a> <br/> <br/>
  145. ## <a id="Ask${Type}-${item.exch_id}"
  146. ## class="btn btn-mini btn-info" style="float:right"
  147. ## data-original-title="En attente"
  148. ## data-toggle="popover" data-placement="left"
  149. ## data-content="Déjà en attente d'une réponse."
  150. ## href="#Missing${Type}Table">
  151. ## <i class="icon-random icon-white"></i>
  152. ## </a>
  153. ## <script>$("#Ask${Type}-${item.exch_id}").popover();</script>
  154. % else:
  155. <a class="btn btn-mini btn-primary" style="float:right"
  156. href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')">
  157. <i class="icon-search icon-white"></i>
  158. </a> <br/> <br/>
  159. ## <a class="btn btn-mini btn-primary" style="float:right"
  160. ## href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/deal')">
  161. ## <i class="icon-random icon-white"></i>
  162. ## </a>
  163. % endif
  164. </td>
  165. </tr>
  166. % endfor
  167. % endif
  168. </tbody>
  169. </table>
  170. <script>
  171. $('#${Type}_Props').tooltip()
  172. $('#${Type}_Demande').tooltip()
  173. </script>
  174. </%def>
  175. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  176. <%def name="Ask(Type, Selection)">
  177. <%
  178. if Type=='H':
  179. CurTitle = u"d'hébergement"
  180. CurIcon = "icon-home"
  181. elif Type=='C':
  182. CurTitle = "de co-voiturage"
  183. CurIcon = "icon-road"
  184. elif Type=='M':
  185. CurTitle = u"de prêt de matériel"
  186. CurIcon = "icon-shopping-cart"
  187. %>
  188. <table class="table table-striped table-bordered table-hover">
  189. <thead>
  190. <tr>
  191. <th colspan="3"><i class="icon-comment"></i> Mes demandes ${CurTitle}
  192. <a class="btn btn-mini btn-primary" Myhref="/2015/modal/Ask${Type}/0"
  193. role="button" data-target="#AjaxModal" style="float:right" handle="modal">
  194. <i class="icon-plus-sign icon-white"></i> Ajouter
  195. </a>
  196. </th>
  197. </tr>
  198. </thead>
  199. <tbody id="Ask${Type}Table">
  200. % if len(Selection['Ask'])==0 and len(Selection['Proposal'])==0:
  201. <tr>
  202. <td colspan="2" style="text-align:center;">
  203. <i>Vous n'avez fait aucune demande ${CurTitle}</i>
  204. </td>
  205. </tr>
  206. % else:
  207. <tr>
  208. <th style="width:7em;">Etat</th>
  209. <th>Details</th>
  210. </tr>
  211. % for type in ['Ask', 'Proposal']:
  212. % for item in Selection[type]:
  213. <%
  214. if item.provider_id==request.user.uid:
  215. continue
  216. %>
  217. <tr style="cursor:pointer;">
  218. <td>
  219. % if item.exch_done:
  220. <div class="btn-group">
  221. <a class="btn btn-small btn-success" href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-ok icon-white"></i> Validé</a>
  222. <a class="btn btn-small btn-success dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
  223. <ul class="dropdown-menu">
  224. <li><a href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-search"></i> Détails</a></li>
  225. <li class="divider"></li>
  226. <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Annuler</a></li>
  227. </ul>
  228. % elif item.provider_id is None:
  229. <div class="btn-group">
  230. <a class="btn btn-small"><i class="icon-signal"></i> Publié</a>
  231. <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
  232. <ul class="dropdown-menu">
  233. <li><a href="javascript:DoGet('/2015/modal/Ask${Type}/${item.exch_id}')"><i class="icon-pencil"></i> Modifier</a></li>
  234. <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/delete')"><i class="icon-trash"></i> Supprimer</a></li>
  235. </ul>
  236. % elif item.asker_id==request.user.uid and type=="Ask":
  237. Je demande <br>
  238. <div class="btn-group">
  239. <a class="btn btn-small btn-warning" href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-question-sign icon-white"></i> Proposition</a>
  240. <a class="btn btn-small btn-warning dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
  241. <ul class="dropdown-menu">
  242. <li><a href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-search"></i> Détails</a></li>
  243. <li class="divider"></li>
  244. <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/accept')"><i class="icon-ok"></i> Accepter</a></li>
  245. <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Refuser</a></li>
  246. <li class="divider"></li>
  247. <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/delete')"><i class="icon-trash"></i> Supprimer</a></li>
  248. </ul>
  249. % elif item.asker_id==request.user.uid and type=="Proposal":
  250. Je demande <br>
  251. <div class="btn-group">
  252. <a class="btn btn-small btn-info" href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-question-sign icon-white"></i> Négociation</a>
  253. <a class="btn btn-small btn-info dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
  254. <ul class="dropdown-menu">
  255. <li><a href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-search"></i> Détails</a></li>
  256. <li><a href="#"><i class="icon-question-sign"></i> En Attente de réponse </a></li>
  257. <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Se désister </a></li>
  258. </ul>
  259. % endif
  260. </div>
  261. </div>
  262. </td>
  263. <td>
  264. %if Type=='C':
  265. ${item.start_time.strftime('%A %d %b %Y')} vers ${item.start_time.strftime('%Hh%M')}
  266. de <a href="javascript:DoGetLieu('/2015/modal/Place/${item.Itin.start.place_id}')">${item.Itin.start.display_name}</a>
  267. à <a href="javascript:DoGetLieu('/2015/modal/Place/${item.Itin.arrival.place_id}')">${item.Itin.arrival.display_name}</a>
  268. %elif Type=='H':
  269. <i>${item.Category.exch_subtype}</i>, La nuit du ${item.start_time.strftime('%A %d %b %Y')}<br>
  270. %elif Type=='M':
  271. de ${item.start_time.strftime('%A %d %b %Y')} vers ${item.start_time.strftime('%Hh%M')}
  272. à ${item.end_time.strftime('%A %d %b %Y')} vers ${item.end_time.strftime('%Hh%M')}<br>
  273. ${item.Category.exch_subtype}
  274. %endif
  275. %if item.description:
  276. ${item.description}
  277. %endif
  278. </td>
  279. </tr>
  280. % endfor
  281. % endfor
  282. % endif
  283. </tbody>
  284. </table>
  285. </%def>
  286. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  287. <%def name="Proposal(Type, Selection)">
  288. <%
  289. if Type=='H':
  290. CurTitle = u"d'hébergement"
  291. CurIcon = "icon-home"
  292. elif Type=='C':
  293. CurTitle = "de co-voiturage"
  294. CurIcon = "icon-road"
  295. elif Type=='M':
  296. CurTitle = u"de prêt de matériel"
  297. CurIcon = "icon-shopping-cart"
  298. %>
  299. <table class="table table-striped table-bordered table-hover">
  300. <thead>
  301. <tr>
  302. <th colspan="3"><i class="${CurIcon}"></i> Mes offres ${CurTitle}
  303. <a class="btn btn-mini btn-primary" Myhref="/2015/modal/Prop${Type}/0"
  304. role="button" data-target="#AjaxModal" style="float:right" handle="modal">
  305. <i class="icon-plus-sign icon-white"></i> Ajouter
  306. </a>
  307. </th>
  308. </tr>
  309. </thead>
  310. <tbody id="Prop${Type}Table">
  311. % if len(Selection['Ask'])==0 and len(Selection['Proposal'])==0:
  312. <tr>
  313. <td colspan="2" style="text-align:center;">
  314. <i>Vous n'avez fait aucune offre ${CurTitle}</i>
  315. </td>
  316. </tr>
  317. % else:
  318. <tr>
  319. <th style="width:7em;">Etat</th>
  320. <th>Détails</th>
  321. </tr>
  322. % for type in ['Ask', 'Proposal']:
  323. % for item in Selection[type]:
  324. <%
  325. if item.asker_id==request.user.uid:
  326. continue
  327. %>
  328. <tr style="cursor:pointer;">
  329. <td>
  330. % if item.exch_done:
  331. <div class="btn-group">
  332. <a class="btn btn-small btn-success" href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-ok icon-white"></i> Validé</a>
  333. <a class="btn btn-small btn-success dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
  334. <ul class="dropdown-menu">
  335. <li><a href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-search"></i> Détails</a></li>
  336. <li class="divider"></li>
  337. <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Annuler</a></li>
  338. </ul>
  339. % elif item.asker_id is None:
  340. <div class="btn-group">
  341. <a class="btn btn-small"><i class="icon-signal"></i> Publié</a>
  342. <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
  343. <ul class="dropdown-menu">
  344. <li><a href="javascript:DoGet('/2015/modal/Prop${Type}/${item.exch_id}')"><i class="icon-pencil"></i> Modifier</a></li>
  345. <li><a href="javascript:DoGet('/2015/exchange/Prop${Type}/${item.exch_id}/delete')"><i class="icon-trash"></i> Supprimer</a></li>
  346. </ul>
  347. % elif item.provider_id==request.user.uid and type=="Ask":
  348. Je propose <br>
  349. <div class="btn-group">
  350. <a class="btn btn-small btn-info" href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-question-sign icon-white"></i> Négociation</a>
  351. <a class="btn btn-small btn-info dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
  352. <ul class="dropdown-menu">
  353. <li><a href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-search"></i> Détails</a></li>
  354. <li><a href="#"><i class="icon-question-sign"></i> En Attente de réponse </a></li>
  355. <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Se désister </a></li>
  356. </ul>
  357. % elif item.provider_id==request.user.uid and type=="Proposal":
  358. Je propose <br>
  359. <div class="btn-group">
  360. <a class="btn btn-small btn-warning" href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-question-sign icon-white"></i> Proposition</a>
  361. <a class="btn btn-small btn-warning dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
  362. <ul class="dropdown-menu">
  363. <li><a href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-search"></i> Détails</a></li>
  364. <li class="divider"></li>
  365. <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/accept')"><i class="icon-ok"></i> Accepter</a></li>
  366. <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Refuser</a></li>
  367. <li class="divider"></li>
  368. <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/delete')"><i class="icon-trash"></i> Supprimer</a></li>
  369. </ul>
  370. % endif
  371. </div>
  372. </td>
  373. <td>
  374. %if Type=='C':
  375. ${item.start_time.strftime('%A %d %b %Y')} vers ${item.start_time.strftime('%Hh%M')}
  376. de <a href="javascript:DoGetLieu('/2015/modal/Place/${item.Itin.start.place_id}')">${item.Itin.start.display_name}</a>
  377. à <a href="javascript:DoGetLieu('/2015/modal/Place/${item.Itin.arrival.place_id}')">${item.Itin.arrival.display_name}</a>
  378. %elif Type=='H':
  379. <i>${item.Category.exch_subtype}</i>, La nuit du ${item.start_time.strftime('%A %d %b %Y')}<br>
  380. %elif Type=='M':
  381. de ${item.start_time.strftime('%A %d %b %Y')} vers ${item.start_time.strftime('%Hh%M')}
  382. à ${item.end_time.strftime('%A %d %b %Y')} vers ${item.end_time.strftime('%Hh%M')}<br>
  383. ${item.Category.exch_subtype}
  384. %endif
  385. %if item.description:
  386. ${item.description}
  387. %endif
  388. </td>
  389. </tr>
  390. % endfor
  391. % endfor
  392. % endif
  393. </tbody>
  394. </table>
  395. </%def>
  396. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  397. <%def name="Route_wrapper(Exchanges)">
  398. <%
  399. AskSelection = Exchanges.get_my_counters( int(request.user.uid) )
  400. AllSelection = Exchanges.get_counters()
  401. ListWrap = ["Co-voiturage",u"Hébergement","Matos"]
  402. %>
  403. <div class="accordion" id="AccordionCounter">
  404. <div class="accordion-group">
  405. <div class="accordion-heading">
  406. <a class="accordion-toggle" data-toggle="collapse" data-parent="#AccordionCounter" href="#collapseMe"> Mes compteurs </a>
  407. </div>
  408. <div id="collapseMe" class="accordion-body collapse in">
  409. <div class="accordion-inner">
  410. <table width="100%" class="table table-striped table-bordered table-hover">
  411. <thead style="text-align:center">
  412. <tr>
  413. <th>Section</th>
  414. <th style="text-align:center">Mes demandes</th>
  415. <th style="text-align:center">Mes Propositions</th>
  416. <th style="text-align:center">Accords</th>
  417. </tr>
  418. </thead>
  419. <tbody id="MyCounters">
  420. <tr>
  421. <td>Miam</td>
  422. <td style="text-align:center">?</td>
  423. <td style="text-align:center">-</td>
  424. <td style="text-align:center">?</td>
  425. </tr>
  426. % for Wrap in ListWrap:
  427. <tr>
  428. <td>${Wrap | h}</td>
  429. <%
  430. RecA = filter( lambda (A, B, C, D): A=='Ask' and B==Wrap[0] and C==0, AskSelection )
  431. RecP = filter( lambda (A, B, C, D): A=='Proposal' and B==Wrap[0] and C==0, AskSelection )
  432. RecD = filter( lambda (A, B, C, D): B==Wrap[0] and C==1, AskSelection )
  433. %>
  434. % for item in [RecA, RecP, RecD]:
  435. <td style="text-align:center">
  436. % if item:
  437. <span class="badge">${item[0][3]}</span>
  438. % else:
  439. <span class="badge">0</span>
  440. % endif
  441. </td>
  442. % endfor
  443. </tr>
  444. % endfor
  445. </tbody>
  446. </table>
  447. </div>
  448. </div>
  449. </div>
  450. <div class="accordion-group">
  451. <div class="accordion-heading">
  452. <a class="accordion-toggle" data-toggle="collapse" data-parent="#AccordionCounter" href="#collapseAll">Les compteur de l´évenement</a>
  453. </div>
  454. <div id="collapseAll" class="accordion-body collapse">
  455. <div class="accordion-inner">
  456. <table width="100%" class="table table-striped table-bordered table-hover">
  457. <thead style="text-align:center">
  458. <tr>
  459. <th>Section</th>
  460. <th style="text-align:center">Les demandes</th>
  461. <th style="text-align:center">Les propositions</th>
  462. <th style="text-align:center">Les Accords</th>
  463. </tr>
  464. </thead>
  465. <tbody id="AllCounters">
  466. <tr>
  467. <td>Miam</td>
  468. <td style="text-align:center">?</td>
  469. <td style="text-align:center">-</td>
  470. <td style="text-align:center">?</td>
  471. </tr>
  472. % for Wrap in ListWrap:
  473. <tr>
  474. <td>${Wrap | h}</td>
  475. <%
  476. AllA = filter( lambda (A,B,C,D): A=='Ask' and B==Wrap[0] and C==0, AllSelection )
  477. AllP = filter( lambda (A,B,C,D): A=='Proposal' and B==Wrap[0] and C==0, AllSelection )
  478. AllD = filter( lambda (A,B,C,D): B==Wrap[0] and C==1, AllSelection )
  479. %>
  480. % for item in [AllA, AllP, AllD]:
  481. <td style="text-align:center">
  482. % if item:
  483. <span class="badge">${item[0][3]}</span>
  484. % else:
  485. <span class="badge">0</span>
  486. % endif
  487. </td>
  488. % endfor
  489. </tr>
  490. % endfor
  491. </tbody>
  492. </table>
  493. </div>
  494. </div>
  495. </div>
  496. </div>
  497. <fieldset>
  498. <legend>Mon Badge</legend>
  499. </fieldset>
  500. </%def>
  501. % if reload:
  502. ${Route_wrapper(Exchanges)}
  503. ${Exchange_wrapper(Type, Exchanges)}
  504. %endif