Le repo des sources pour le site web des JM2L
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

156 lines
7.5 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="/MesJM2L?user=${uprofil.uid}" method="POST">
  7. % else:
  8. <form id="ProfilForm" action="/MesJM2L" method="POST">
  9. % endif
  10. <div class="row-fluid">
  11. <div class="span8">
  12. <a href="/sign/jm2l/${uprofil.my_hash}">Mon lien de connection</a> -
  13. <a href="/user/${request.user.slug}">Mon profil public</a><br>
  14. <h3>${profil_form.prenom.data} ${profil_form.nom.data}</h3>
  15. <%
  16. DicFormA = {
  17. 'nom': {'PlaceHolder':u"Mon Nom", 'ContainerClass':"span6", 'next':False},
  18. 'prenom': {'PlaceHolder':u"Mon Prénom", 'ContainerClass':"span6", 'next':True},
  19. 'pseudo': {'PlaceHolder':u"Mon Pseudo", 'ContainerClass':"span6", 'next':False},
  20. 'mail': {'PlaceHolder':u"mon.mail@fqdn.tld", 'ContainerClass':"span6", 'next':True},
  21. 'phone': {'PlaceHolder':u"0612345678", 'ContainerClass':"span6", 'next':False},
  22. 'website': {'PlaceHolder':u"http://ma-page-web.moi",'ContainerClass':"span6", 'next':True},
  23. 'gpg_key': {'PlaceHolder':u"Ma clé gpg", 'ContainerClass':"span6", 'next':False},
  24. 'soc_link':{'PlaceHolder':u"#jm2l sur irc.freenode.org",'ContainerClass':"span6", 'next':True},
  25. 'bio': {'Ignore':True},
  26. 'tiersship': {'Ignore':True},
  27. 'id': {'Ignore':True},
  28. 'user_id': {'Ignore':True},
  29. }
  30. DicFormB = {
  31. 'nom': {'Ignore':True },
  32. 'prenom': {'Ignore':True },
  33. 'pseudo': {'Ignore':True },
  34. 'mail': {'Ignore':True },
  35. 'phone': {'Ignore':True },
  36. 'website': {'Ignore':True },
  37. 'gpg_key': {'Ignore':True},
  38. 'soc_link': {'Ignore':True},
  39. 'bio': {'PlaceHolder':u"Ma Bilibiographie", "ckeditor":1, 'ContainerClass':"span11", 'next':False },
  40. 'tiersship': {'Ignore':True}
  41. }
  42. DicForm2 = {
  43. 'nom': {'PlaceHolder':u"Mon Nom", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
  44. 'prenom': {'PlaceHolder':u"Mon Prénom", "FieldStyle":"width:16em;"},
  45. 'pseudo': {'PlaceHolder':u"Mon Pseudo", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
  46. 'mail': {'PlaceHolder':u"mon.mail@fqdn.tld", "FieldStyle":"width:16em;"},
  47. 'phone': {'PlaceHolder':u"0612345678", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
  48. 'website': {'PlaceHolder':u"http://ma-page-web.moi","FieldStyle":"width:16em;"},
  49. 'gpg_key': {'PlaceHolder':u"Ma clé gpg", "FieldStyle":"width:90%;"},
  50. 'soc_link':{'PlaceHolder':u"#jm2l sur irc.freenode.org","FieldStyle":"width:90%;"},
  51. 'bio': {'PlaceHolder':u"Ma Bilibiographie", "FieldStyle":"width:95%;min-height:150px;", "fieldset":True, "ckeditor":1 },
  52. 'tiersship': {'Ignore':True}
  53. }
  54. %>
  55. ${helpers.DisplayRespForm(profil_form, DicFormA)}
  56. </div>
  57. <div class="span4">
  58. ${helpers.show_my_pictures(uprofil)}
  59. </div>
  60. </div>
  61. ${helpers.DisplayRespForm(profil_form, DicFormB)}
  62. <fieldset>
  63. <legend>Activité</legend>
  64. Saisissez ci-dessous les entités que vous souhaiter représenter pendant l'événement.
  65. (Association, GULL, Entreprise, Logiciel, ...).<br>
  66. Si elle n'existe pas dans la liste proposée, vous pouvez <a href="/entity"> en ajouter une. </a>
  67. <div class="repeat">
  68. <table class="wrapper table" width="100%">
  69. <thead>
  70. <tr class="row">
  71. <th style="width:4em;text-align:center;">Année</th>
  72. <th style="width:19em;text-align:center;">Entitée</th>
  73. <th style="text-align:center";>Rôle</th>
  74. <th style="width:6em;text-align:center;">Action</th>
  75. </tr>
  76. </thead>
  77. <tbody class="container">
  78. <tr class="row template" style="line-height:2.2em;">
  79. <td style="text-align:center;">
  80. <input type="hidden" style="width:20em;" class="form-control" name="tiersship-{{row-count-placeholder}}-year_uid"
  81. value="2015" /> 2015
  82. </td>
  83. <td style="text-align: center;">
  84. <input type="hidden" class="form-control" name="tiersship-{{row-count-placeholder}}-user_uid"
  85. value="${uprofil.uid}" style="width:4em;" />
  86. <input type="hidden" class="form-control" style="width:20em;" name="tiersship-{{row-count-placeholder}}-tiers_uid"
  87. id="tiersship-{{row-count-placeholder}}-tiers_uid" />
  88. </td>
  89. <td style="text-align:center;">
  90. <input style="width:100%;margin:-7px;" type="text" class="form-control" name="tiersship-{{row-count-placeholder}}-role"
  91. value="" />
  92. </td>
  93. <td>
  94. <span class="remove btn btn-mini btn-danger">
  95. <i class="icon-remove-sign icon-white"></i> Suppr.
  96. </span>
  97. </td>
  98. </tr>
  99. % for num, dicdata in enumerate(profil_form._fields.get("tiersship").data):
  100. <tr class="row" style="padding:5px;line-height:2.2em;">
  101. <td style="text-align:center;">
  102. <input type="hidden" class="form-control" name="tiersship-${num}-year_uid"
  103. value="${dicdata.get('year_uid')}" style="width:4em;" />
  104. ${dicdata.get('year_uid')}
  105. </td>
  106. <td style="text-align:center;">
  107. <input type="hidden" class="form-control" name="tiersship-${num}-user_uid"
  108. value="${dicdata.get('user_uid')}" style="width:4em;" />
  109. <input type="hidden" class="form-control" name="tiersship-${num}-tiers_uid"
  110. value="${dicdata.get('tiers_uid')}" style="width:4em;" />
  111. <%
  112. entity = DBTiers.by_id(dicdata.get('tiers_uid'))
  113. %>
  114. % if entity:
  115. <small>${entity.get_entity_type.entity_subtype}</small>
  116. <a href="/entity/${entity.get_entity_type.entity_type}/${entity.slug}">${entity.name}</a>
  117. % endif
  118. </td>
  119. <td style="text-align:center;">
  120. <input style="width:100%;margin:-7px;" type="text" class="form-control" name="tiersship-${num}-role"
  121. value="${dicdata.get('role')}" />
  122. </td>
  123. <td>
  124. <span class="remove btn btn-mini btn-danger">
  125. <i class="icon-remove-sign icon-white"></i> Suppr.
  126. </span>
  127. </td>
  128. </tr>
  129. % endfor
  130. </tbody>
  131. <tfoot>
  132. <tr>
  133. <td colspan="5" style="text-align:center;line-height: 3em;">
  134. <span class="add btn btn-mini btn-primary"><i class="icon-plus-sign icon-white"></i> Je fais partie de ...</span>
  135. </td>
  136. </tr>
  137. </tfoot>
  138. </table>
  139. </div>
  140. </fieldset>
  141. <div class="span2 offset5">
  142. <input class="btn btn-primary" type="submit" value="Enregistrer !" />
  143. </div>
  144. </form>
  145. </%def>