brie-aurore/Brie/brie/templates/show/member_room_interface_views.html
2013-02-16 09:32:02 +01:00

103 lines
4.4 KiB
HTML

<html
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
<py:def function="back_rooms(preview_room_ldap = None)">
<div py:choose="preview_room_ldap">
<a py:when="None" href="/rooms/index/${residence}/" class="button">RETOUR LIST</a>
<a py:otherwise="" href="/rooms/preview/${residence}/${preview_room_ldap.cn.first()}" class="button">RETOUR PREVIEW</a>
</div>
</py:def>
<py:def function="member_view(member_ldap)">
<div class="section">
<span class="section_name show_section_name">${member_ldap.cn.first()}</span>
<div>
<div>
<span class="item_name">Fin de connexion</span>
<span py:choose="member_ldap.get('x-connectionEnd')">
<span py:when="None">pas de fin de connexion</span>
<span py:otherwise="">${member_ldap.get("x-connectionEnd").first()}</span>
</span>
</div>
<div>
<span class="item_name">E-mail</span>
<span>${member_ldap.mail.first('')}</span>
</div>
<div>
<span class="item_name">Certificat</span>
<py:with vars="certif = member_ldap.get('x-certificatGiven')">
<span py:choose="">
<span py:when="certif is not None and certif.first() == 'TRUE'">oui</span>
<span py:otherwise="">non</span>
</span>
</py:with>
</div>
<div>
<span class="item_name">Commentaire</span>
<span py:choose="member_ldap.get('x-comment')">
<span py:when="None"></span>
<span py:otherwise="">${member_ldap.get("x-comment").first()}</span>
</span>
</div>
<div>
<span class="item_name">Cas spécial</span>
<py:with vars="cas_spec = member_ldap.get('x-specialCase')">
<span py:choose="">
<span py:when="cas_spec is not None and cas_spec.first() == 'TRUE'">oui</span>
<span py:otherwise="">non</span>
</span>
</py:with>
</div>
</div>
</div>
<div class="section">
<span class="section_name show_section_name">DIVERS</span>
<div>
<span class="item_name">Identifiant</span>
<span>${member_ldap.uid.first()}</span>
</div>
<div>
<span class="item_name">Groupes</span>
<py:choose test="groups">
<span py:when="[]">aucun</span>
<span py:otherwise="">
<py:for each="group in groups">${group} </py:for>
</span>
</py:choose>
</div>
<div>
<span class="item_name">Uid unix</span>
<span>${member_ldap.uidNumber.first()}</span>
</div>
<div>
<span class="item_name">Wifi</span>
<span><a href="/edit/wifi/${member_ldap.uid.first()}" class="link_button">mot de passe</a></span>
</div>
</div>
<div class="section">
<span class="section_name show_section_name">MACHINES</span>
<div py:for="name, mac, ip in machines">
<span class="item_name">${name}</span>
<span>${mac} : ${ip}</span>
</div>
</div>
</py:def>
<py:def function="room_view(room, member_in = None)">
<div class="section">
<span class="section_name show_section_name">CHAMBRE ${room.cn.first()}</span>
<a class="link_button some_margin" href="/edit/room/${residence}/${room.uid.first()}/">éditer</a>
<div>
<div py:if="member_in is not None">
<span class="item_name">Membre</span>
<span>
<a href="/show/member/${residence}/${member_in.uid.first()}">${member_in.cn.first()}</a>
</span>
</div>
</div>
</div>
</py:def>
</html>