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.
 
 
 
 
 

160 lines
7.8 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. <div class="pull-right">
  65. <a href="/entities" class="add btn btn-block btn-mini btn-info"><i class="icon-list-alt icon-white"> </i> La Liste des entités </a>
  66. <a href="/entity" class="add btn btn-block btn-mini btn-primary"><i class="icon-plus-sign icon-white"> </i> Ajouter une entité </a>
  67. </div>
  68. Saisissez ci-dessous les entités que vous souhaiter représenter pendant l'événement.
  69. (Association, GULL, Entreprise, Logiciel, ...).<br>
  70. Si elle n'existe pas dans la liste proposée, vous pouvez <a href="/entity"> en ajouter une. </a>
  71. <div class="repeat">
  72. <table class="wrapper table" width="100%">
  73. <thead>
  74. <tr class="row">
  75. <th style="width:4em;text-align:center;">Année</th>
  76. <th style="width:19em;text-align:center;">Entité</th>
  77. <th style="text-align:center";>Rôle</th>
  78. <th style="width:6em;text-align:center;">Action</th>
  79. </tr>
  80. </thead>
  81. <tbody class="container">
  82. <tr class="row template" style="line-height:2.2em;">
  83. <td style="text-align:center;">
  84. <input type="hidden" style="width:20em;" class="form-control" name="tiersship-{{row-count-placeholder}}-year_uid"
  85. value="2015" /> 2015
  86. </td>
  87. <td style="text-align: center;">
  88. <input type="hidden" class="form-control" name="tiersship-{{row-count-placeholder}}-user_uid"
  89. value="${uprofil.uid}" style="width:4em;" />
  90. <input type="hidden" class="form-control" style="width:20em;" name="tiersship-{{row-count-placeholder}}-tiers_uid"
  91. id="tiersship-{{row-count-placeholder}}-tiers_uid" />
  92. </td>
  93. <td style="text-align:center;">
  94. <input style="width:100%;margin:-7px;" type="text" class="form-control" name="tiersship-{{row-count-placeholder}}-role"
  95. value="" />
  96. </td>
  97. <td>
  98. <span class="remove btn btn-mini btn-danger">
  99. <i class="icon-remove-sign icon-white"> </i> Suppr.
  100. </span>
  101. </td>
  102. </tr>
  103. % for num, dicdata in enumerate(profil_form._fields.get("tiersship").data):
  104. <tr class="row" style="padding:5px;line-height:2.2em;">
  105. <td style="text-align:center;">
  106. <input type="hidden" class="form-control" name="tiersship-${num}-year_uid"
  107. value="${dicdata.get('year_uid')}" style="width:4em;" />
  108. ${dicdata.get('year_uid')}
  109. </td>
  110. <td style="text-align:center;">
  111. <input type="hidden" class="form-control" name="tiersship-${num}-user_uid"
  112. value="${dicdata.get('user_uid')}" style="width:4em;" />
  113. <input type="hidden" class="form-control" name="tiersship-${num}-tiers_uid"
  114. value="${dicdata.get('tiers_uid')}" style="width:4em;" />
  115. <%
  116. entity = DBTiers.by_id(dicdata.get('tiers_uid'))
  117. %>
  118. % if entity:
  119. <small>${entity.get_entity_type.entity_subtype}</small>
  120. <a href="/entity/${entity.get_entity_type.entity_type}/${entity.slug}">${entity.name}</a>
  121. % endif
  122. </td>
  123. <td style="text-align:center;">
  124. <input style="width:100%;margin:-7px;" type="text" class="form-control" name="tiersship-${num}-role"
  125. value="${dicdata.get('role')}" />
  126. </td>
  127. <td>
  128. <span class="remove btn btn-mini btn-danger">
  129. <i class="icon-remove-sign icon-white"></i> Suppr.
  130. </span>
  131. </td>
  132. </tr>
  133. % endfor
  134. </tbody>
  135. <tfoot>
  136. <tr>
  137. <td colspan="5" style="text-align:center;line-height: 3em;">
  138. <span class="add btn btn-mini btn-primary"><i class="icon-plus-sign icon-white"></i> Je fais partie de ...</span>
  139. </td>
  140. </tr>
  141. </tfoot>
  142. </table>
  143. </div>
  144. </fieldset>
  145. <div class="span2 offset5">
  146. <input class="btn btn-primary" type="submit" value="Enregistrer !" />
  147. </div>
  148. </form>
  149. </%def>