brie-aurore/Brie/brie/templates/rooms/index.html

97 lines
4.7 KiB
HTML

<html
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude"
>
<head>
<link rel="stylesheet" type="text/css" href="/css/rooms.css" />
<link rel="stylesheet" type="text/css" href="/css/common.css" />
<xi:include href="common-css-header.html" />
</head>
<body>
<xi:include href="navbar.html" />
<div class="rooms_legend">
<py:def function="display_status(name)">
<div class="room_number ok_color">${"%03d" % status[name]}</div>
</py:def>
<div>
<div class="room_number ok_color">${"%03d" % len(stats['cotisation_paid_members'])}</div>
<span>Cotisations à jour</span>
</div>
<div>
<div class="room_number non_certif_color">${"%03d" % len(stats['cotisation_late_members'])}</div>
<span>Cotisations en retard</span>
<div py:for="member in stats['cotisation_late_members']">
<span><a href="/show/member/${residence}/${member.uid.first()}">${member.cn.first()}</a></span><br />
</div>
</div>
<div>
<div class="room_number non_paye_color">${"%03d" % len(stats['no_cotisation_members'])}</div>
<span>Sans cotisations</span>
<div py:for="member in stats['no_cotisation_members']">
<span><a href="/show/member/${residence}/${member.uid.first()}">${member.cn.first()}</a></span><br />
</div>
</div>
<div>
<div class="room_number vide_color">${"%03d" % len(stats['old_members'])}</div>
<span>Anciens membres</span>
</div>
<div>
<div class="room_number vide_color">${"%03d" % stats['number_of_rooms']}</div>
<span>Pièces</span>
</div>
<div>
<!--${display_status("vide_color")}-->
<div class="room_number vide_color">${"%03d" % len(stats['empty_rooms'])}</div>
<span>Pièces vides</span>
</div>
</div>
<div class="area section">
<span class="section_name">PREVIEW</span>
<div py:if="defined('preview')">
<py:with vars="member_ldap, room_preview = preview">
<div class="room_number">
<span><a href="/show/room/${residence}/${room_preview.uid.first()}">${room_preview.cn.first()}</a></span>
</div>
<div class="preview_part preview_name" py:choose="member_ldap is not None">
<span py:when="True"><a href="/show/member/${residence}/${member_ldap.uid.first()}">${member_ldap.cn.first()}</a></span>
<span py:otherwise=""><a href="/show/room/${residence}/${room_preview.uid.first()}">Pièce Vide</a></span>
</div>
</py:with>
</div>
</div>
<div py:for="area, floors in sorted_name(areas.iteritems())" class="area section">
<div>
<span class="section_name">${(area.cn.first()).upper()}</span>
<div py:for="floor, rooms in reverse_sorted_name(floors.iteritems())" class="floor">
<span class="floor_name">étage ${floor.cn.first()}</span>
<py:for each="room in sorted(rooms, key=lambda t:t.cn.first())" class="room_number">
<py:choose test="room.status.first()">
<py:when test="'cotisation_paid_members'">
<div class="room_number ok_color">
<a href="/rooms/preview/${residence}/${room.uid.first()}"><span>${room.cn.first()}</span></a>
</div>
</py:when>
<py:when test="'cotisation_late_members'">
<div class="room_number non_certif_color">
<a href="/rooms/preview/${residence}/${room.uid.first()}"><span>${room.cn.first()}</span></a>
</div>
</py:when>
<py:when test="'no_cotisation_members'">
<div class="room_number non_paye_color">
<a href="/rooms/preview/${residence}/${room.uid.first()}"><span>${room.cn.first()}</span></a>
</div>
</py:when>
<py:otherwise>
<div class="room_number vide_color">
<a href="/rooms/preview/${residence}/${room.uid.first()}"><span>${room.cn.first()}</span></a>
</div>
</py:otherwise>
</py:choose>
</py:for>
</div>
</div>
</div>
</body>
</html>