Le repo des sources pour le site web des JM2L
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 

149 linhas
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. <div class="profile-icon" style="float:right;height:250px;width:250px;">
  5. <% photos = uprofil.PhotosLinks %>
  6. <div id="MyPictureCarousel" class="carousel slide">
  7. <div style="text-align: center;line-height:20px;">
  8. <a data-target="#AjaxModal" Myhref="/2015/modal/Password/1" role="button" handle="modal">Changer mon mot de passe</a>
  9. </div>
  10. % if len(photos)>1:
  11. <!-- Carousel nav -->
  12. <a class="Ucarousel-control left" href="#MyPictureCarousel" data-slide="prev">&lsaquo;</a>
  13. <a class="Ucarousel-control right" href="#MyPictureCarousel" data-slide="next">&rsaquo;</a>
  14. % endif
  15. <div style="text-align: center;line-height:20px;">
  16. <a data-target="#AjaxModal" Myhref="/2015/modal/UserPicture/${uprofil.uid}" handle="modal">Changer ma photo</a>
  17. </div>
  18. <!-- Carousel items -->
  19. <div class="carousel-inner" style="height: 220px;">
  20. % if len(photos):
  21. % for num, link in enumerate(photos):
  22. <div class="${['','active '][num==0]}item" id="UserPic${num}">
  23. <div style="margin:auto;">
  24. <img src="${link}" class="img-polaroid" style="max-height:205px;max-width:235px;" alt="Photo ${uprofil.slug}" />
  25. </div>
  26. </div>
  27. % endfor
  28. % else:
  29. <div class="active item" id="UserPic0">
  30. <div style="margin:auto;width:170px;">
  31. <img src="/img/default-user.png" class="img-polaroid" alt="Photo ${uprofil.slug}" style="max-height:205px;" />
  32. </div>
  33. </div>
  34. % endif
  35. </div>
  36. </div>
  37. </div>
  38. <a href="/sign/jm2l/${uprofil.my_hash}">Mon lien</a>
  39. <h3>${profil_form.prenom.data} ${profil_form.nom.data}</h3>
  40. ##<form id="ProfilForm" action="javascript:DoPost('/2015/modal/Place/${form.place_id.data}');">
  41. % if uprofil!=request.user and request.user.uid==1:
  42. <form id="ProfilForm" action="/MesJM2L?user=${uprofil.uid}" method="POST">
  43. % else:
  44. <form id="ProfilForm" action="/MesJM2L" method="POST">
  45. % endif
  46. <%
  47. DicForm = {
  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.DisplayForm(profil_form, DicForm)}
  61. <fieldset>
  62. <legend>Activité</legend>
  63. Si vous ne trouvez pas l'entité que vous souhaitez promouvoir (Association, GULL, Entreprise, Logiciel, ...).
  64. Vous pouvez <a href="/entity"> en ajouter une. </a>
  65. <div class="repeat">
  66. <table class="wrapper table table-striped table-bordered" width="100%">
  67. <thead>
  68. <tr class="row">
  69. <th style="width:4em;text-align:center;">Année</th>
  70. <th style="width:19em;">Entité</th>
  71. <th>Rôle</th>
  72. <th style="width:6em;">Action</th>
  73. </tr>
  74. </thead>
  75. <tbody class="container">
  76. <tr class="row template" style="line-height:2.2em;">
  77. <td style="text-align:center;">
  78. <input type="hidden" style="width:20em;" class="form-control" name="tiersship-{{row-count-placeholder}}-year_uid"
  79. value="2015" /> 2015
  80. </td>
  81. <td style="text-align: center;">
  82. <input type="hidden" class="form-control" name="tiersship-{{row-count-placeholder}}-user_uid"
  83. value="${uprofil.uid}" style="width:4em;" />
  84. <input type="hidden" class="form-control" style="width:20em;" name="tiersship-{{row-count-placeholder}}-tiers_uid"
  85. id="tiersship-{{row-count-placeholder}}-tiers_uid" />
  86. </td>
  87. <td style="text-align:center;">
  88. <input style="width:100%;margin:-7px;" type="text" class="form-control" name="tiersship-{{row-count-placeholder}}-role"
  89. value="" />
  90. </td>
  91. <td>
  92. <span class="remove btn btn-mini btn-danger">
  93. <i class="icon-remove-sign icon-white"></i> Suppr.
  94. </span>
  95. </td>
  96. </tr>
  97. % for num, dicdata in enumerate(profil_form._fields.get("tiersship").data):
  98. <tr class="row" style="padding:5px;line-height:2.2em;">
  99. <td style="text-align:center;">
  100. <input type="hidden" class="form-control" name="tiersship-${num}-year_uid"
  101. value="${dicdata.get('year_uid')}" style="width:4em;" />
  102. ${dicdata.get('year_uid')}
  103. </td>
  104. <td style="text-align:center;">
  105. <input type="hidden" class="form-control" name="tiersship-${num}-user_uid"
  106. value="${dicdata.get('user_uid')}" style="width:4em;" />
  107. <input type="hidden" class="form-control" name="tiersship-${num}-tiers_uid"
  108. value="${dicdata.get('tiers_uid')}" style="width:4em;" />
  109. <%
  110. entity = DBTiers.by_id(dicdata.get('tiers_uid'))
  111. %>
  112. % if entity:
  113. <small>${entity.get_entity_type.entity_subtype}</small>
  114. <a href="/entity/${entity.get_entity_type.entity_type}/${entity.slug}">${entity.name}</a>
  115. % endif
  116. </td>
  117. <td style="text-align:center;">
  118. <input style="width:100%;margin:-7px;" type="text" class="form-control" name="tiersship-${num}-role"
  119. value="${dicdata.get('role')}" />
  120. </td>
  121. <td>
  122. <span class="remove btn btn-mini btn-danger">
  123. <i class="icon-remove-sign icon-white"></i> Suppr.
  124. </span>
  125. </td>
  126. </tr>
  127. % endfor
  128. </tbody>
  129. <tfoot>
  130. <tr>
  131. <td colspan="5" style="text-align:center;line-height: 3em;">
  132. <span class="add btn btn-mini btn-primary"><i class="icon-plus-sign icon-white"></i> Ajouter</span>
  133. </td>
  134. </tr>
  135. </tfoot>
  136. </table>
  137. </div>
  138. </fieldset>
  139. <input class="btn" type="submit" value="Enregistrer !" />
  140. </form>
  141. </%def>