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.
 
 
 
 
 

118 Zeilen
5.7 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. <div id="Photos">
  5. ${helpers.show_my_pictures(uprofil)}
  6. </div>
  7. <a href="/sign/jm2l/${uprofil.my_hash}">Mon lien</a>
  8. <h3>${profil_form.prenom.data} ${profil_form.nom.data}</h3>
  9. ##<form id="ProfilForm" action="javascript:DoPost('/2015/modal/Place/${form.place_id.data}');">
  10. % if uprofil!=request.user and request.user.uid==1:
  11. <form id="ProfilForm" action="/MesJM2L?user=${uprofil.uid}" method="POST">
  12. % else:
  13. <form id="ProfilForm" action="/MesJM2L" method="POST">
  14. % endif
  15. <%
  16. DicForm = {
  17. 'nom': {'PlaceHolder':u"Mon Nom", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
  18. 'prenom': {'PlaceHolder':u"Mon Prénom", "FieldStyle":"width:16em;"},
  19. 'pseudo': {'PlaceHolder':u"Mon Pseudo", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
  20. 'mail': {'PlaceHolder':u"mon.mail@fqdn.tld", "FieldStyle":"width:16em;"},
  21. 'phone': {'PlaceHolder':u"0612345678", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
  22. 'website': {'PlaceHolder':u"http://ma-page-web.moi","FieldStyle":"width:16em;"},
  23. 'gpg_key': {'PlaceHolder':u"Ma clé gpg", "FieldStyle":"width:90%;"},
  24. 'soc_link':{'PlaceHolder':u"#jm2l sur irc.freenode.org","FieldStyle":"width:90%;"},
  25. 'bio': {'PlaceHolder':u"Ma Bilibiographie", "FieldStyle":"width:95%;min-height:150px;", "fieldset":True, "ckeditor":1 },
  26. 'tiersship': {'Ignore':True}
  27. }
  28. %>
  29. ${helpers.DisplayForm(profil_form, DicForm)}
  30. <fieldset>
  31. <legend>Activité</legend>
  32. Si vous ne trouvez pas l'entité que vous souhaitez promouvoir (Association, GULL, Entreprise, Logiciel, ...).
  33. Vous pouvez <a href="/entity"> en ajouter une. </a>
  34. <div class="repeat">
  35. <table class="wrapper table table-striped table-bordered" width="100%">
  36. <thead>
  37. <tr class="row">
  38. <th style="width:4em;text-align:center;">Année</th>
  39. <th style="width:19em;">Entité</th>
  40. <th>Rôle</th>
  41. <th style="width:6em;">Action</th>
  42. </tr>
  43. </thead>
  44. <tbody class="container">
  45. <tr class="row template" style="line-height:2.2em;">
  46. <td style="text-align:center;">
  47. <input type="hidden" style="width:20em;" class="form-control" name="tiersship-{{row-count-placeholder}}-year_uid"
  48. value="2015" /> 2015
  49. </td>
  50. <td style="text-align: center;">
  51. <input type="hidden" class="form-control" name="tiersship-{{row-count-placeholder}}-user_uid"
  52. value="${uprofil.uid}" style="width:4em;" />
  53. <input type="hidden" class="form-control" style="width:20em;" name="tiersship-{{row-count-placeholder}}-tiers_uid"
  54. id="tiersship-{{row-count-placeholder}}-tiers_uid" />
  55. </td>
  56. <td style="text-align:center;">
  57. <input style="width:100%;margin:-7px;" type="text" class="form-control" name="tiersship-{{row-count-placeholder}}-role"
  58. value="" />
  59. </td>
  60. <td>
  61. <span class="remove btn btn-mini btn-danger">
  62. <i class="icon-remove-sign icon-white"></i> Suppr.
  63. </span>
  64. </td>
  65. </tr>
  66. % for num, dicdata in enumerate(profil_form._fields.get("tiersship").data):
  67. <tr class="row" style="padding:5px;line-height:2.2em;">
  68. <td style="text-align:center;">
  69. <input type="hidden" class="form-control" name="tiersship-${num}-year_uid"
  70. value="${dicdata.get('year_uid')}" style="width:4em;" />
  71. ${dicdata.get('year_uid')}
  72. </td>
  73. <td style="text-align:center;">
  74. <input type="hidden" class="form-control" name="tiersship-${num}-user_uid"
  75. value="${dicdata.get('user_uid')}" style="width:4em;" />
  76. <input type="hidden" class="form-control" name="tiersship-${num}-tiers_uid"
  77. value="${dicdata.get('tiers_uid')}" style="width:4em;" />
  78. <%
  79. entity = DBTiers.by_id(dicdata.get('tiers_uid'))
  80. %>
  81. % if entity:
  82. <small>${entity.get_entity_type.entity_subtype}</small>
  83. <a href="/entity/${entity.get_entity_type.entity_type}/${entity.slug}">${entity.name}</a>
  84. % endif
  85. </td>
  86. <td style="text-align:center;">
  87. <input style="width:100%;margin:-7px;" type="text" class="form-control" name="tiersship-${num}-role"
  88. value="${dicdata.get('role')}" />
  89. </td>
  90. <td>
  91. <span class="remove btn btn-mini btn-danger">
  92. <i class="icon-remove-sign icon-white"></i> Suppr.
  93. </span>
  94. </td>
  95. </tr>
  96. % endfor
  97. </tbody>
  98. <tfoot>
  99. <tr>
  100. <td colspan="5" style="text-align:center;line-height: 3em;">
  101. <span class="add btn btn-mini btn-primary"><i class="icon-plus-sign icon-white"></i> Ajouter</span>
  102. </td>
  103. </tr>
  104. </tfoot>
  105. </table>
  106. </div>
  107. </fieldset>
  108. <input class="btn" type="submit" value="Enregistrer !" />
  109. </form>
  110. </%def>