Le repo des sources pour le site web des JM2L
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 

135 satır
6.2 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. <div class="center">
  33. Pour un co-voiturage le <u>${Exch.start_time.strftime("%a %d %b")}</u>
  34. vers <strong>${Exch.start_time.strftime("%H:%M")}</strong>
  35. </div>
  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='//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
  61. var osmAttrib='Map data © <a href="//openstreetmap.org">OpenStreetMap</a> contributors';
  62. var osm = new L.TileLayer(osmUrl, {minZoom: 8, maxZoom: 17, attribution: osmAttrib});
  63. map.addLayer(osm);
  64. var great_route = L.Routing.control({
  65. containerClassName: '#map_Itineraire',
  66. show:false,
  67. language:'fr',
  68. waypoints: [
  69. L.latLng(${Exch.Itin.start.gps_coord}),
  70. L.latLng(${Exch.Itin.arrival.gps_coord})
  71. ]
  72. });
  73. great_route.addTo(map);
  74. </script>
  75. </div>
  76. <div class="tab-pane fade in" id="Place_Itin">
  77. <div id="map_Itineraire">
  78. Cliquez sur l'onglet carte pour démarrer la recherche d'intineraire.
  79. </div>
  80. </div>
  81. % endif
  82. </div>
  83. </div>
  84. </%def> \
  85. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  86. ## Proposition de Co-voiturage
  87. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  88. <%def name="Covoit_Proposal(form)"> \
  89. <% ## PlaceHolder, ContainerStyle, FieldStyle
  90. DicFormat = {
  91. "Day_start" :{'ContainerStyle':'float:left;', 'FieldStyle':'width:7em;'},
  92. "Confidence" :{'ContainerStyle':'float:left;', 'FieldStyle':'width:16em;'},
  93. "Hour_start" :{'PlaceHolder':'10:00', 'FieldStyle':'width:4em;margin: 0 2px;'},
  94. "start_place":{'ContainerStyle':'float:left;','FieldStyle':'width:15em;'},
  95. "arrival_place":{'ContainerStyle':'float:left;','FieldStyle':'width:15em;'},
  96. }
  97. %>
  98. ${helper.DisplayForm(form, DicFormat)}
  99. <div clear="both"><br><br><br></div>
  100. <div style="padding: 20px;">
  101. <small style="color:#999">Si je n´ai pas trouvé le lieu dont j´ai besoin dans ces listes...</small>
  102. <br />
  103. <small style="color:#999">Je peux </small>
  104. <a class="btn btn-mini btn-info" role="button" href="javascript:DoGetLieu('/${CurrentYear}/modal/Place/0');">
  105. <i class="icon-plus-sign icon-white"></i> Ajouter un lieu
  106. </a>
  107. </div>
  108. </%def> \
  109. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  110. ## Demande de Co-voiturage
  111. ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  112. <%def name="Covoit_Ask(form)"> \
  113. <% ## PlaceHolder, ContainerStyle, FieldStyle
  114. DicFormat = {
  115. "Day_start" :{'ContainerStyle':'float:left;', 'FieldStyle':'width:7em;'},
  116. "Confidence" :{'ContainerStyle':'float:left;', 'FieldStyle':'width:16em;'},
  117. "Hour_start" :{'PlaceHolder':'10:00', 'FieldStyle':'width:4em;margin: 0 2px;'},
  118. "start_place":{'ContainerStyle':'float:left;','FieldStyle':'width:15em;'},
  119. "arrival_place":{'ContainerStyle':'float:left;','FieldStyle':'width:15em;'},
  120. }
  121. %>
  122. ${helper.DisplayForm(form, DicFormat)}
  123. <div clear="both"><br><br><br></div>
  124. <div style="margin-top: 15px;">
  125. <small style="color:#999">Si je n´ai pas trouvé le lieu dont j´ai besoin dans ces listes...</small>
  126. <br />
  127. <small style="color:#999">Je peux </small>
  128. <a class="btn btn-mini btn-info" role="button" href="javascript:DoGetLieu('/${CurrentYear}/modal/Place/0');">
  129. <i class="icon-plus-sign icon-white"></i> Ajouter un lieu
  130. </a>
  131. </div>
  132. </%def> \