|
- <%namespace name="Modals" file="jm2l:templates/modals.mako"/>
- <%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
- <%def name="profil_wrapper(uprofil, profil_form)">
- <div id="Photos">
- ${helpers.show_my_pictures(uprofil)}
- </div>
- <a href="/sign/jm2l/${uprofil.my_hash}">Mon lien</a>
- <h3>${profil_form.prenom.data} ${profil_form.nom.data}</h3>
-
- ##<form id="ProfilForm" action="javascript:DoPost('/2015/modal/Place/${form.place_id.data}');">
- % if uprofil!=request.user and request.user.uid==1:
- <form id="ProfilForm" action="/MesJM2L?user=${uprofil.uid}" method="POST">
- % else:
- <form id="ProfilForm" action="/MesJM2L" method="POST">
- % endif
-
- <%
- DicForm = {
- 'nom': {'PlaceHolder':u"Mon Nom", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
- 'prenom': {'PlaceHolder':u"Mon Prénom", "FieldStyle":"width:16em;"},
- 'pseudo': {'PlaceHolder':u"Mon Pseudo", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
- 'mail': {'PlaceHolder':u"mon.mail@fqdn.tld", "FieldStyle":"width:16em;"},
- 'phone': {'PlaceHolder':u"0612345678", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
- 'website': {'PlaceHolder':u"http://ma-page-web.moi","FieldStyle":"width:16em;"},
- 'gpg_key': {'PlaceHolder':u"Ma clé gpg", "FieldStyle":"width:90%;"},
- 'soc_link':{'PlaceHolder':u"#jm2l sur irc.freenode.org","FieldStyle":"width:90%;"},
- 'bio': {'PlaceHolder':u"Ma Bilibiographie", "FieldStyle":"width:95%;min-height:150px;", "fieldset":True, "ckeditor":1 },
- 'tiersship': {'Ignore':True}
- }
- %>
- ${helpers.DisplayForm(profil_form, DicForm)}
-
- <fieldset>
- <legend>Activité</legend>
- Si vous ne trouvez pas l'entité que vous souhaitez promouvoir (Association, GULL, Entreprise, Logiciel, ...).
- Vous pouvez <a href="/entity"> en ajouter une. </a>
-
- <div class="repeat">
- <table class="wrapper table table-striped table-bordered" width="100%">
- <thead>
- <tr class="row">
- <th style="width:4em;text-align:center;">Année</th>
- <th style="width:19em;">Entité</th>
- <th>Rôle</th>
- <th style="width:6em;">Action</th>
- </tr>
- </thead>
- <tbody class="container">
- <tr class="row template" style="line-height:2.2em;">
- <td style="text-align:center;">
- <input type="hidden" style="width:20em;" class="form-control" name="tiersship-{{row-count-placeholder}}-year_uid"
- value="2015" /> 2015
- </td>
- <td style="text-align: center;">
- <input type="hidden" class="form-control" name="tiersship-{{row-count-placeholder}}-user_uid"
- value="${uprofil.uid}" style="width:4em;" />
- <input type="hidden" class="form-control" style="width:20em;" name="tiersship-{{row-count-placeholder}}-tiers_uid"
- id="tiersship-{{row-count-placeholder}}-tiers_uid" />
- </td>
- <td style="text-align:center;">
- <input style="width:100%;margin:-7px;" type="text" class="form-control" name="tiersship-{{row-count-placeholder}}-role"
- value="" />
- </td>
- <td>
- <span class="remove btn btn-mini btn-danger">
- <i class="icon-remove-sign icon-white"></i> Suppr.
- </span>
- </td>
- </tr>
- % for num, dicdata in enumerate(profil_form._fields.get("tiersship").data):
- <tr class="row" style="padding:5px;line-height:2.2em;">
- <td style="text-align:center;">
- <input type="hidden" class="form-control" name="tiersship-${num}-year_uid"
- value="${dicdata.get('year_uid')}" style="width:4em;" />
- ${dicdata.get('year_uid')}
- </td>
- <td style="text-align:center;">
- <input type="hidden" class="form-control" name="tiersship-${num}-user_uid"
- value="${dicdata.get('user_uid')}" style="width:4em;" />
- <input type="hidden" class="form-control" name="tiersship-${num}-tiers_uid"
- value="${dicdata.get('tiers_uid')}" style="width:4em;" />
- <%
- entity = DBTiers.by_id(dicdata.get('tiers_uid'))
- %>
- % if entity:
- <small>${entity.get_entity_type.entity_subtype}</small>
- <a href="/entity/${entity.get_entity_type.entity_type}/${entity.slug}">${entity.name}</a>
- % endif
- </td>
- <td style="text-align:center;">
- <input style="width:100%;margin:-7px;" type="text" class="form-control" name="tiersship-${num}-role"
- value="${dicdata.get('role')}" />
- </td>
- <td>
- <span class="remove btn btn-mini btn-danger">
- <i class="icon-remove-sign icon-white"></i> Suppr.
- </span>
- </td>
- </tr>
- % endfor
- </tbody>
- <tfoot>
- <tr>
- <td colspan="5" style="text-align:center;line-height: 3em;">
- <span class="add btn btn-mini btn-primary"><i class="icon-plus-sign icon-white"></i> Ajouter</span>
- </td>
- </tr>
- </tfoot>
- </table>
- </div>
- </fieldset>
-
- <input class="btn" type="submit" value="Enregistrer !" />
-
- </form>
-
- </%def>
|