Le repo des sources pour le site web des JM2L
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 

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