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.
 
 
 
 
 

194 Zeilen
9.2 KiB

  1. <%namespace name="Modals" file="jm2l:templates/modals.mako"/>
  2. <%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
  3. <%def name="profil_wrapper(uprofil, profil_form)">
  4. ##<form id="ProfilForm" action="javascript:DoPost('/2015/modal/Place/${form.place_id.data}');">
  5. % if uprofil!=request.user and request.user.uid==1:
  6. <form id="ProfilForm" action="#" method="POST">
  7. % else:
  8. <form id="ProfilForm" action="/MesJM2L" method="POST">
  9. % endif
  10. <div class="row-fluid">
  11. <div class="span8">
  12. % if uprofil!=request.user and request.user.Staff==1:
  13. <a href="/sign/jm2l/${uprofil.my_hash}">Se connecter "en tant que" ${uprofil.nom} ${uprofil.prenom}</a> -
  14. <a href="/user/${uprofil.slug}">Son profil public</a><br>
  15. % else:
  16. <a href="/sign/jm2l/${uprofil.my_hash}">Mon lien de connection</a> -
  17. <a href="/user/${request.user.slug}">Mon profil public</a><br>
  18. % endif
  19. <h3>${profil_form.prenom.data} ${profil_form.nom.data}</h3>
  20. <%
  21. DicFormA = {
  22. 'nom': {'PlaceHolder':u"Mon Nom", 'ContainerClass':"span6", 'next':False},
  23. 'prenom': {'PlaceHolder':u"Mon Prénom", 'ContainerClass':"span6", 'next':True},
  24. 'pseudo': {'PlaceHolder':u"Mon Pseudo", 'ContainerClass':"span6", 'next':False},
  25. 'mail': {'PlaceHolder':u"mon.mail@fqdn.tld", 'ContainerClass':"span6", 'next':True},
  26. 'phone': {'PlaceHolder':u"0612345678", 'ContainerClass':"span6", 'next':False},
  27. 'website': {'PlaceHolder':u"http://ma-page-web.moi",'ContainerClass':"span6", 'next':True},
  28. 'gpg_key': {'PlaceHolder':u"Ma clé gpg", 'ContainerClass':"span6", 'next':False},
  29. 'soc_link':{'PlaceHolder':u"#jm2l sur irc.freenode.org",'ContainerClass':"span6", 'next':True},
  30. 'bio': {'Ignore':True},
  31. 'tiersship': {'Ignore':True},
  32. 'id': {'Ignore':True},
  33. 'user_id': {'Ignore':True},
  34. }
  35. DicFormB = {
  36. 'nom': {'Ignore':True },
  37. 'prenom': {'Ignore':True },
  38. 'pseudo': {'Ignore':True },
  39. 'mail': {'Ignore':True },
  40. 'phone': {'Ignore':True },
  41. 'website': {'Ignore':True },
  42. 'gpg_key': {'Ignore':True},
  43. 'soc_link': {'Ignore':True},
  44. 'bio': {'PlaceHolder':u"Ma Bilibiographie", "ckeditor":1, 'ContainerClass':"span11", 'next':False },
  45. 'tiersship': {'Ignore':True}
  46. }
  47. DicForm2 = {
  48. 'nom': {'PlaceHolder':u"Mon Nom", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
  49. 'prenom': {'PlaceHolder':u"Mon Prénom", "FieldStyle":"width:16em;"},
  50. 'pseudo': {'PlaceHolder':u"Mon Pseudo", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
  51. 'mail': {'PlaceHolder':u"mon.mail@fqdn.tld", "FieldStyle":"width:16em;"},
  52. 'phone': {'PlaceHolder':u"0612345678", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
  53. 'website': {'PlaceHolder':u"http://ma-page-web.moi","FieldStyle":"width:16em;"},
  54. 'gpg_key': {'PlaceHolder':u"Ma clé gpg", "FieldStyle":"width:90%;"},
  55. 'soc_link':{'PlaceHolder':u"#jm2l sur irc.freenode.org","FieldStyle":"width:90%;"},
  56. 'bio': {'PlaceHolder':u"Ma Bilibiographie", "FieldStyle":"width:95%;min-height:150px;", "fieldset":True, "ckeditor":1 },
  57. 'tiersship': {'Ignore':True}
  58. }
  59. %>
  60. ${helpers.DisplayRespForm(profil_form, DicFormA)}
  61. </div>
  62. <div class="span4">
  63. ${helpers.show_my_pictures(uprofil)}
  64. <div class="borderbox" style="background: rgb(240, 250, 250) url(/img/wifi.png) no-repeat scroll 0px 0px;width: 220px;text-align:center;margin: auto;">
  65. <u>Vos identifiants wifi:</u>
  66. <dl>
  67. <dt>SSID</dt>
  68. <dd>Unice-HotSpot</dd>
  69. <!--
  70. <dt>Votre utilisateur:</dt>
  71. <dd>${uprofil.wifi_user}</dd>
  72. <dt>Le mot de passe:</dt>
  73. <dd>${uprofil.wifi_pass}</dd>
  74. -->
  75. <dt>Vos identifiants:</dt>
  76. <dd>Nous n'avons pas encore l'information</dd>
  77. </dl>
  78. <a href="https://wifi.unice.fr/">Plus de d&eacute;tails ...</a>
  79. </div>
  80. </div>
  81. </div>
  82. ${helpers.DisplayRespForm(profil_form, DicFormB)}
  83. <fieldset>
  84. <legend>Activit&eacute;</legend>
  85. <div class="pull-right">
  86. <a href="/entities" class="add btn btn-block btn-mini btn-info"><i class="icon-list-alt icon-white"> </i> La Liste des entit&eacute;s </a>
  87. <a href="/entity" class="add btn btn-block btn-mini btn-primary"><i class="icon-plus-sign icon-white"> </i> Ajouter une entit&eacute; </a>
  88. </div>
  89. Saisissez ci-dessous les entit&eacute;s que vous souhaiter repr&eacute;senter pendant l'&eacute;v&eacute;nement.
  90. (Association, GULL, Entreprise, Logiciel, ...).<br>
  91. Si elle n'existe pas dans la liste propos&eacute;e, vous pouvez <a href="/entity"> en ajouter une. </a>
  92. <div class="repeat">
  93. <table class="wrapper table" width="100%">
  94. <thead>
  95. <tr class="row">
  96. <th style="width:4em;text-align:center;">Ann&eacute;e</th>
  97. <th style="width:19em;text-align:center;">Entit&eacute;</th>
  98. <th style="text-align:center";>Rôle</th>
  99. <th style="width:6em;text-align:center;">Action</th>
  100. </tr>
  101. </thead>
  102. <tbody class="container">
  103. <tr class="row template" style="line-height:2.2em;">
  104. <td style="text-align:center;">
  105. <input type="hidden" style="width:20em;" class="form-control" name="tiersship-{{row-count-placeholder}}-year_uid"
  106. value="${CurrentYear}" /> ${CurrentYear}
  107. </td>
  108. <td style="text-align: center;">
  109. <input type="hidden" class="form-control" name="tiersship-{{row-count-placeholder}}-user_uid"
  110. value="${uprofil.uid}" style="width:4em;" />
  111. <input type="hidden" class="form-control" style="width:20em;" name="tiersship-{{row-count-placeholder}}-tiers_uid"
  112. id="tiersship-{{row-count-placeholder}}-tiers_uid" />
  113. </td>
  114. <td style="text-align:center;">
  115. <input style="width:100%;margin:-7px;" type="text" class="form-control" name="tiersship-{{row-count-placeholder}}-role"
  116. value="" />
  117. </td>
  118. <td>
  119. <a class="remove btn btn-mini btn-danger">
  120. <i class="icon-remove-sign icon-white"> </i> Suppr.
  121. </a>
  122. </td>
  123. </tr>
  124. % for num, dicdata in enumerate(profil_form._fields.get("tiersship").data):
  125. <tr class="row" style="padding:5px;line-height:2.2em;">
  126. <td style="text-align:center;">
  127. <input type="hidden" class="form-control" name="tiersship-${num}-year_uid"
  128. value="${dicdata.get('year_uid')}" style="width:4em;" />
  129. ${dicdata.get('year_uid')}
  130. </td>
  131. <td style="text-align:center;">
  132. <input type="hidden" class="form-control" name="tiersship-${num}-user_uid"
  133. value="${dicdata.get('user_uid')}" style="width:4em;" />
  134. <input type="hidden" class="form-control" name="tiersship-${num}-tiers_uid"
  135. value="${dicdata.get('tiers_uid')}" style="width:4em;" />
  136. <%
  137. entity = DBTiers.by_id(dicdata.get('tiers_uid'))
  138. %>
  139. % if entity:
  140. <small>${entity.get_entity_type.entity_subtype}</small>
  141. <a href="/entity/${entity.get_entity_type.entity_type}/${entity.slug}">${entity.name}</a>
  142. % endif
  143. </td>
  144. <td style="text-align:center;">
  145. <input style="width:100%;margin:-7px;" type="text" class="form-control" name="tiersship-${num}-role"
  146. value="${dicdata.get('role')}" />
  147. </td>
  148. <td>
  149. <a class="remove btn btn-mini btn-danger">
  150. <i class="icon-remove-sign icon-white"></i> Suppr.
  151. </a>
  152. </td>
  153. </tr>
  154. % endfor
  155. </tbody>
  156. <tfoot>
  157. <tr>
  158. <td colspan="5" style="text-align:center;line-height: 3em;">
  159. % if uprofil==request.user:
  160. <span class="add btn btn-mini btn-primary"><i class="icon-plus-sign icon-white"></i> Je fais partie de ...</span>
  161. % endif
  162. </td>
  163. </tr>
  164. </tfoot>
  165. </table>
  166. </div>
  167. </fieldset>
  168. <div class="span2 offset5">
  169. % if uprofil!=request.user and request.user.Staff==1:
  170. En tant que Staff des JM2L, <br />
  171. Je me connecte "en tant que" <br />
  172. <a href="/sign/jm2l/${uprofil.my_hash}"> ${uprofil.nom} ${uprofil.prenom}</a><br />
  173. pour modifier sa fiche ...
  174. % else:
  175. <input class="btn btn-primary" type="submit" value="Enregistrer !" />
  176. % endif
  177. </div>
  178. </form>
  179. </%def>