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.
 
 
 
 
 

132 linhas
6.0 KiB

  1. <%namespace name="helper" file="jm2l:templates/helpers.mako"/>
  2. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  3. ## Détail de l'échange de Co-voiturage
  4. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  5. <%def name="ShowC(Exch)"> \
  6. <div class="tabbable" id="itin_tab">
  7. <ul class="nav nav-tabs">
  8. <li class="active"><a href="#Place_Detail" data-toggle="tab">Détail</a></li>
  9. <li><a href="#Place_Info" data-toggle="tab">Informations</a></li>
  10. % if Exch.Itin.start.gps_coord and Exch.Itin.arrival.gps_coord:
  11. <li><a href="#Place_Plan" id="ItinMap" data-toggle="tab">Carte</a></li>
  12. <li><a href="#Place_Itin" data-toggle="tab">Itineraire</a></li>
  13. % endif
  14. </ul>
  15. <div class="tab-content">
  16. <div class="tab-pane fade active in" id="Place_Detail">
  17. ${helper.show_exchange(Exch, Exch.asker, Exch.provider)}
  18. <table class="table table-bordered table-striped" style="width: 100%">
  19. <thead>
  20. <tr>
  21. <th style="width:50%;text-align:center;">Au départ de</th>
  22. <th style="width:50%;text-align:center;">À destination de</th>
  23. </tr>
  24. </thead>
  25. <tbody>
  26. <tr>
  27. <td>${helper.show_address(Exch.Itin.start)}</td>
  28. <td>${helper.show_address(Exch.Itin.arrival)}</td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. <center>
  33. Pour un co-voiturage le <u>${Exch.start_time.strftime("%a %d %b").decode('utf-8')}</u>
  34. vers <strong>${Exch.start_time.strftime("%H:%M")}</strong>
  35. </center>
  36. Temps de voyage estimé à <span id="summary"></span>
  37. </div>
  38. <div class="tab-pane fade in" id="Place_Info">
  39. <table class="table table-bordered table-striped" style="width: 100%">
  40. <thead>
  41. <tr>
  42. <th>Départ</th>
  43. <th>Arrivée</th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. <tr>
  48. <td style="width:50%">${helper.show_desc(Exch.Itin.start)}</td>
  49. <td style="width:50%">${helper.show_desc(Exch.Itin.arrival)}</td>
  50. </tr>
  51. </tbody>
  52. </table>
  53. </div>
  54. % if Exch.Itin.start.gps_coord and Exch.Itin.arrival.gps_coord:
  55. <div class="tab-pane fade in" id="Place_Plan">
  56. <div id="map"></div>
  57. <script type="text/javascript">
  58. var map = L.map('map');
  59. // create the tile layer with correct attribution
  60. var osmUrl='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
  61. var osmAttrib='Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors';
  62. var osm = new L.TileLayer(osmUrl, {minZoom: 8, maxZoom: 17, attribution: osmAttrib});
  63. map.addLayer(osm);
  64. var toast = L.Routing.control({
  65. containerClassName: '#map_Itineraire',
  66. show:false,
  67. waypoints: [
  68. L.latLng(${Exch.Itin.start.gps_coord}),
  69. L.latLng(${Exch.Itin.arrival.gps_coord})
  70. ]
  71. });
  72. toast.addTo(map);
  73. </script>
  74. </div>
  75. <div class="tab-pane fade in" id="Place_Itin">
  76. <div id="map_Itineraire"></div>
  77. </div>
  78. % endif
  79. </div>
  80. </div>
  81. </%def> \
  82. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  83. ## Proposition de Co-voiturage
  84. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  85. <%def name="Covoit_Proposal(form)"> \
  86. <% ## PlaceHolder, ContainerStyle, FieldStyle
  87. DicFormat = {
  88. "Day_start" :{'ContainerStyle':'float:left;', 'FieldStyle':'width:7em;'},
  89. "Confidence" :{'ContainerStyle':'float:left;', 'FieldStyle':'width:16em;'},
  90. "Hour_start" :{'PlaceHolder':'10:00', 'FieldStyle':'width:4em;margin: 0 2px;'},
  91. "start_place":{'ContainerStyle':'float:left;','FieldStyle':'width:15em;'},
  92. "arrival_place":{'ContainerStyle':'float:left;','FieldStyle':'width:15em;'},
  93. }
  94. %>
  95. ${helper.DisplayForm(form, DicFormat)}
  96. <div clear="both"><br><br><br></div>
  97. <div style="padding: 20px;">
  98. <small style="color:#999">Si je n´ai pas trouvé le lieu dont j´ai besoin dans ces listes...</small>
  99. <br />
  100. <small style="color:#999">Je peux </small>
  101. <a class="btn btn-mini btn-info" role="button" href="javascript:DoGetLieu('/2015/modal/Place/0');">
  102. <i class="icon-plus-sign icon-white"></i> Ajouter un lieu
  103. </a>
  104. </div>
  105. </%def> \
  106. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  107. ## Demande de Co-voiturage
  108. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  109. <%def name="Covoit_Ask(form)"> \
  110. <% ## PlaceHolder, ContainerStyle, FieldStyle
  111. DicFormat = {
  112. "Day_start" :{'ContainerStyle':'float:left;', 'FieldStyle':'width:7em;'},
  113. "Confidence" :{'ContainerStyle':'float:left;', 'FieldStyle':'width:16em;'},
  114. "Hour_start" :{'PlaceHolder':'10:00', 'FieldStyle':'width:4em;margin: 0 2px;'},
  115. "start_place":{'ContainerStyle':'float:left;','FieldStyle':'width:15em;'},
  116. "arrival_place":{'ContainerStyle':'float:left;','FieldStyle':'width:15em;'},
  117. }
  118. %>
  119. ${helper.DisplayForm(form, DicFormat)}
  120. <div clear="both"><br><br><br></div>
  121. <div style="margin-top: 15px;">
  122. <small style="color:#999">Si je n´ai pas trouvé le lieu dont j´ai besoin dans ces listes...</small>
  123. <br />
  124. <small style="color:#999">Je peux </small>
  125. <a class="btn btn-mini btn-info" role="button" href="javascript:DoGetLieu('/2015/modal/Place/0');">
  126. <i class="icon-plus-sign icon-white"></i> Ajouter un lieu
  127. </a>
  128. </div>
  129. </%def> \