|
@@ -8,10 +8,11 @@ now = datetime.datetime.now() |
|
|
%> |
|
|
%> |
|
|
|
|
|
|
|
|
<form class="filterform" action="#"> |
|
|
<form class="filterform" action="#"> |
|
|
<table class="table table-bordered table-hover"> |
|
|
|
|
|
|
|
|
<table class="table table-bordered table-hover"> |
|
|
<thead> |
|
|
<thead> |
|
|
<tr> |
|
|
<tr> |
|
|
<th style="width:7em;text-align:center;"></th> |
|
|
<th style="width:7em;text-align:center;"></th> |
|
|
|
|
|
<th style="text-align:center;">en ${for_year}</th> |
|
|
<th style="width:5em;text-align:center;">Visite</th> |
|
|
<th style="width:5em;text-align:center;">Visite</th> |
|
|
<th style="width:7em;text-align:center;">Activité</th> |
|
|
<th style="width:7em;text-align:center;">Activité</th> |
|
|
<th style="text-align:center;">Arrivée prévue</th> |
|
|
<th style="text-align:center;">Arrivée prévue</th> |
|
@@ -23,118 +24,136 @@ now = datetime.datetime.now() |
|
|
</tr> |
|
|
</tr> |
|
|
</thead> |
|
|
</thead> |
|
|
<tbody id="list"> |
|
|
<tbody id="list"> |
|
|
% for u, s in Users: |
|
|
|
|
|
% if u.is_IntervenantOnYear(for_year): |
|
|
|
|
|
<tr> |
|
|
|
|
|
% else: |
|
|
|
|
|
|
|
|
% for u, s in Users: |
|
|
|
|
|
% if u.is_IntervenantOnYear(for_year): |
|
|
|
|
|
<tr style="color:blue"> |
|
|
|
|
|
% elif s or u.Staff: |
|
|
|
|
|
<tr> |
|
|
|
|
|
% else: |
|
|
<tr style="color:lightgray"> |
|
|
<tr style="color:lightgray"> |
|
|
% endif |
|
|
|
|
|
|
|
|
% endif |
|
|
<td style="text-align:center;"> |
|
|
<td style="text-align:center;"> |
|
|
<span class="data">${u.slug}</span> |
|
|
|
|
|
<a href="/MesJM2L?user=${u.uid}">${u.nom} ${u.prenom}</a><br /> |
|
|
|
|
|
|
|
|
<span class="data">${u.slug}</span> |
|
|
|
|
|
<a href="/MesJM2L?user=${u.uid}">${u.nom} ${u.prenom}</a><br /> |
|
|
<span style="align:center"> |
|
|
<span style="align:center"> |
|
|
${u.vote_logo} |
|
|
|
|
|
|
|
|
${u.vote_logo} |
|
|
<a href="mailto:${u.mail}"> |
|
|
<a href="mailto:${u.mail}"> |
|
|
<i class="icon-envelope"></i> |
|
|
<i class="icon-envelope"></i> |
|
|
</a> |
|
|
</a> |
|
|
% if u.Staff==1: |
|
|
|
|
|
<a href="javascript:alert('${u.nom}, ${u.prenom}\nStaff JM2L');"> |
|
|
|
|
|
<i class="icon-star"></i> |
|
|
|
|
|
</a> |
|
|
|
|
|
% endif |
|
|
|
|
|
% if u.is_IntervenantOnYear(for_year): |
|
|
|
|
|
<a href="javascript:alert('${u.nom}, ${u.prenom}\nIntervenant');"> |
|
|
|
|
|
<i class="icon-user"></i> |
|
|
|
|
|
</a> |
|
|
|
|
|
% endif |
|
|
|
|
|
% if u.active==0: |
|
|
|
|
|
|
|
|
% if u.Staff==1: |
|
|
|
|
|
<a href="javascript:alert('${u.nom}, ${u.prenom}\nStaff JM2L');"> |
|
|
|
|
|
<i class="icon-star"></i> |
|
|
|
|
|
</a> |
|
|
|
|
|
% endif |
|
|
|
|
|
% if u.is_IntervenantOnYear(for_year): |
|
|
|
|
|
<a href="javascript:alert('${u.nom}, ${u.prenom}\nIntervenant');"> |
|
|
|
|
|
<i class="icon-user"></i> |
|
|
|
|
|
</a> |
|
|
|
|
|
% endif |
|
|
|
|
|
% if u.active==0: |
|
|
<a href="javascript:alert('${u.nom}, ${u.prenom}\nInactive');"> |
|
|
<a href="javascript:alert('${u.nom}, ${u.prenom}\nInactive');"> |
|
|
<i class="icon-ban-circle"></i> |
|
|
<i class="icon-ban-circle"></i> |
|
|
</a> |
|
|
</a> |
|
|
% endif |
|
|
|
|
|
% if u.phone: |
|
|
|
|
|
|
|
|
% endif |
|
|
|
|
|
% if u.phone: |
|
|
<a href="javascript:alert('${u.nom}, ${u.prenom}\n${u.phone}');"> |
|
|
<a href="javascript:alert('${u.nom}, ${u.prenom}\n${u.phone}');"> |
|
|
<i class="icon-headphones"></i> |
|
|
<i class="icon-headphones"></i> |
|
|
</a> |
|
|
</a> |
|
|
% endif |
|
|
|
|
|
<a href="/user/${u.slug}/badge"> |
|
|
|
|
|
|
|
|
% endif |
|
|
|
|
|
<a href="/user/${u.slug}/badge"> |
|
|
<i class="icon-qrcode"></i> |
|
|
<i class="icon-qrcode"></i> |
|
|
</a> |
|
|
</a> |
|
|
</span> |
|
|
</span> |
|
|
</td> |
|
|
</td> |
|
|
<td style="text-align:center;"> |
|
|
<td style="text-align:center;"> |
|
|
<span class="data">${(now - u.last_logged).days}</span>${(now - u.last_logged).days} j |
|
|
|
|
|
|
|
|
% if u.is_IntervenantOnYear(for_year): |
|
|
|
|
|
<span class="data">1</span>Intervenant |
|
|
|
|
|
% elif s and s.orga_part: |
|
|
|
|
|
% if u.Staff: |
|
|
|
|
|
<span class="data">2</span>Staff |
|
|
|
|
|
% else: |
|
|
|
|
|
<span class="data">3</span>Bénévole |
|
|
|
|
|
% endif |
|
|
|
|
|
% elif u.Staff: |
|
|
|
|
|
<span class="data">2</span>Staff |
|
|
|
|
|
% elif s: |
|
|
|
|
|
<span class="data">4</span>Visiteur |
|
|
|
|
|
% else: |
|
|
|
|
|
<span class="data"></span><i>Pas d'informations</i> |
|
|
|
|
|
% endif |
|
|
|
|
|
</td> |
|
|
|
|
|
<td style="text-align:center;"> |
|
|
|
|
|
<span class="data">${(now - u.last_logged).days}</span>${(now - u.last_logged).days} j |
|
|
</td> |
|
|
</td> |
|
|
<td style="text-align:center;"> |
|
|
<td style="text-align:center;"> |
|
|
% if u.events: |
|
|
% if u.events: |
|
|
<span class="data">${len(u.events)}</span> |
|
|
|
|
|
<select style="width:7em;"> |
|
|
|
|
|
<option><strong>${len(u.events)} Intérv.</strong></option> |
|
|
|
|
|
% for y, g in itertools.groupby(sorted(u.events, key=lambda k:k.for_year, reverse=True), key=lambda k:k.for_year): |
|
|
|
|
|
<OPTGROUP LABEL="${y}"> |
|
|
|
|
|
% for event in g: |
|
|
|
|
|
${event.for_year} |
|
|
|
|
|
<OPTION onclick="location='/event/${event.for_year}/${event.slug}';">${event.event_type} - ${event.name}</OPTION> |
|
|
|
|
|
% endfor |
|
|
|
|
|
</OPTGROUP> |
|
|
|
|
|
% endfor |
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
<span class="data">${len(u.events)}</span> |
|
|
|
|
|
<select style="width:7em;"> |
|
|
|
|
|
<option><strong>${len(u.events)} Intérv.</strong></option> |
|
|
|
|
|
% for y, g in itertools.groupby(sorted(u.events, key=lambda k:k.for_year, reverse=True), key=lambda k:k.for_year): |
|
|
|
|
|
<OPTGROUP LABEL="${y}"> |
|
|
|
|
|
% for event in g: |
|
|
|
|
|
${event.for_year} |
|
|
|
|
|
<OPTION onclick="location='/event/${event.for_year}/${event.slug}';">${event.event_type} - ${event.name}</OPTION> |
|
|
|
|
|
% endfor |
|
|
|
|
|
</OPTGROUP> |
|
|
|
|
|
% endfor |
|
|
|
|
|
</select> |
|
|
%else: |
|
|
%else: |
|
|
<span class="data"></span> |
|
|
|
|
|
<i> - </i> |
|
|
|
|
|
|
|
|
<span class="data">0</span> |
|
|
|
|
|
<i> - </i> |
|
|
% endif |
|
|
% endif |
|
|
</td> |
|
|
</td> |
|
|
<td style="text-align:center;"> |
|
|
<td style="text-align:center;"> |
|
|
% if s and s.arrival_time: |
|
|
% if s and s.arrival_time: |
|
|
<span class="data">${s.arrival_time.strftime('%m/%d/%Y %H:%M:%S')}</span> |
|
|
|
|
|
${s.arrival_time.strftime('%a %d <strong>%H:%M</strong>') | n}<br/> |
|
|
|
|
|
${s.arrival_place} |
|
|
|
|
|
% if s.arrival_text: |
|
|
|
|
|
- NB: <strong>${s.arrival_text}</strong> |
|
|
|
|
|
% endif |
|
|
|
|
|
|
|
|
<span class="data">${s.arrival_time.strftime('%m/%d/%Y %H:%M:%S')}</span> |
|
|
|
|
|
${s.arrival_time.strftime('%a %d <strong>%H:%M</strong>') | n}<br/> |
|
|
|
|
|
${s.arrival_place} |
|
|
|
|
|
% if s.arrival_text: |
|
|
|
|
|
- NB: <strong>${s.arrival_text}</strong> |
|
|
|
|
|
% endif |
|
|
%else: |
|
|
%else: |
|
|
<span class="data"></span> |
|
|
|
|
|
<i>Pas d'informations</i> |
|
|
|
|
|
|
|
|
<span class="data"></span><i>Pas d'informations</i> |
|
|
% endif |
|
|
% endif |
|
|
</td> |
|
|
</td> |
|
|
% if s and s.repas: |
|
|
|
|
|
% for i, d in enumerate(['Ven Soir', 'Sam midi', 'Sam soir']): |
|
|
|
|
|
<td style="text-align:center"> |
|
|
|
|
|
% if (s.repas & 2**i): |
|
|
|
|
|
<span class="data">Oui</span>Oui |
|
|
|
|
|
% else: |
|
|
|
|
|
<span class="data">Non</span>Non |
|
|
|
|
|
% endif |
|
|
|
|
|
</td> |
|
|
|
|
|
% endfor |
|
|
|
|
|
|
|
|
% if s and s.repas: |
|
|
|
|
|
% for i, d in enumerate(['Ven Soir', 'Sam midi', 'Sam soir']): |
|
|
|
|
|
<td style="text-align:center"> |
|
|
|
|
|
% if (s.repas & 2**i): |
|
|
|
|
|
<span class="data">Oui</span>Oui |
|
|
|
|
|
% else: |
|
|
|
|
|
<span class="data">Non</span>Non |
|
|
|
|
|
% endif |
|
|
|
|
|
</td> |
|
|
|
|
|
% endfor |
|
|
%else: |
|
|
%else: |
|
|
<td style="text-align:center;" colspan="3"> |
|
|
|
|
|
<i>Pas d'informations</i> |
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
|
<td style="text-align:center;" colspan="3"> |
|
|
|
|
|
<span class="data"></span><i>Pas d'informations</i> |
|
|
|
|
|
</td> |
|
|
% endif |
|
|
% endif |
|
|
</td> |
|
|
|
|
|
<td style="text-align:center;"> |
|
|
<td style="text-align:center;"> |
|
|
% if s and s.depart_time: |
|
|
% if s and s.depart_time: |
|
|
<span class="data">${s.depart_time.strftime('%m/%d/%Y %H:%M:%S')}</span> |
|
|
|
|
|
${s.depart_time.strftime('%a %d <strong>%H:%M</strong>') | n}<br/> |
|
|
|
|
|
${s.depart_place} |
|
|
|
|
|
% if s.depart_text: |
|
|
|
|
|
- NB: <strong>${s.arrival_text}</strong> |
|
|
|
|
|
% endif |
|
|
|
|
|
|
|
|
<span class="data">${s.depart_time.strftime('%m/%d/%Y %H:%M:%S')}</span> |
|
|
|
|
|
${s.depart_time.strftime('%a %d <strong>%H:%M</strong>') | n}<br/> |
|
|
|
|
|
${s.depart_place} |
|
|
|
|
|
% if s.depart_text: |
|
|
|
|
|
- NB: <strong>${s.arrival_text}</strong> |
|
|
|
|
|
% endif |
|
|
%else: |
|
|
%else: |
|
|
<span class="data"></span> |
|
|
|
|
|
<i>Pas d'informations</i> |
|
|
|
|
|
|
|
|
<span class="data"></span> |
|
|
|
|
|
<i>Pas d'informations</i> |
|
|
% endif |
|
|
% endif |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
% if s: |
|
|
|
|
|
% if s.repas_allerg: |
|
|
|
|
|
<u>Allergies</u> : ${s.repas_allerg}<br/> |
|
|
|
|
|
% endif |
|
|
|
|
|
% if s.repas_contr: |
|
|
|
|
|
<u>Contraintes</u> : ${s.repas_contr}<br/> |
|
|
|
|
|
% endif |
|
|
|
|
|
|
|
|
% if s: |
|
|
|
|
|
% if s.repas_allerg: |
|
|
|
|
|
<u>Allergies</u> : ${s.repas_allerg}<br/> |
|
|
|
|
|
% endif |
|
|
|
|
|
% if s.repas_contr: |
|
|
|
|
|
<u>Contraintes</u> : ${s.repas_contr}<br/> |
|
|
|
|
|
% endif |
|
|
% endif |
|
|
% endif |
|
|
|
|
|
<span class="data"></span> |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
% endfor |
|
|
% endfor |
|
|