Commit ff253eb2 authored by Romain Bignon's avatar Romain Bignon

simplify code

parent 643e1044
<%inherit file="layout.html"/>
<%namespace name="partials" file="partials.html"/>
<%
event_classes = {
event.USER_WAITING: 'waiting',
event.USER_MAYBE: 'maybe',
event.USER_CONFIRMED: 'confirmed',
event.USER_DECLINED: 'declined',
}
%>
<article class="info event">
<section>
......@@ -38,7 +30,7 @@ event_classes = {
<ul class="users">
% for event_user in event.iter_users():
<% state = event.users[event_user.name] %>
<li class="${event_classes[state] | h}">
<li class="${event.STATES_LABEL[state] | h}">
<span class="state">[${event.get_sign(state) | h}]</span> ${partials.display_user(event_user)}
</li>
% endfor
......@@ -49,16 +41,7 @@ event_classes = {
<section>
<h3>Confirmation</h3>
<p>
Your current status is:
% if user_state == event.USER_WAITING:
<strong>waiting</strong>.
% elif user_state == event.USER_CONFIRMED:
<strong>confirmed</strong>.
% elif user_state == event.USER_MAYBE:
<strong>maybe</strong>.
% elif user_state == event.USER_DECLINED:
<strong>declined</strong>.
% endif
Your current status is: <strong>${event.STATES_LABEL[user_state]}</strong>.
</p>
% if user_state != event.USER_CONFIRMED:
<form class="change-status accept" method="post" action="${url | n,U,h}">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment