%namespace name="h" file="jm2l:templates/helpers.mako"/> ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= <%def name="Main(Exchanges)">
Les échanges ${CurTitle} % if 0: % endif | ||||
---|---|---|---|---|
Détails | ||||
Il n'y a aucun échange ${CurTitle} proposé actuellement... | ||||
% elif item.exch_state=='Proposal': | % endif |
%if item.asker and item.exch_state=='Ask': ${item.asker.prenom} ${item.asker.nom} demande %elif item.provider and item.exch_state=='Proposal': ${item.provider.prenom} ${item.provider.nom} offre % endif % if item.exch_type=="C": un co-voiturage le ${item.start_time.strftime('%a %d %b vers %Hh%M')} de ${item.Itin.start.display_name} à ${item.Itin.arrival.display_name} % elif item.exch_type=="M": % if item.Category: ${item.Category.exch_subtype} % endif % if item.description: ${item.description[:30]} % endif de ${item.start_time.strftime('%a %d %b %Hh%M')} à ${item.end_time.strftime('%a %d %b %Hh%M')} % else: % if item.Category: ${item.Category.exch_subtype} % endif % if item.description: ${item.description[:30]} % endif ${item.start_time.strftime('%a %d %b')} soir % endif |
% if item.provider_id==request.user.uid or item.asker_id==request.user.uid:
% elif (item.provider_id and item.asker_id):
## ## ## ## % else: ## ## ## % endif |
Mes demandes ${CurTitle} Ajouter | ||
---|---|---|
Vous n'avez fait aucune demande ${CurTitle} | ||
Etat | Details | |
% if item.exch_done:
Validé
% elif item.provider_id is None:
Publié
% elif item.asker_id==request.user.uid and type=="Ask":
Je demande
Proposition
% elif item.asker_id==request.user.uid and type=="Proposal":
Je demande
Négociation
% endif
|
%if Type=='C':
${item.start_time.strftime('%A %d %b %Y')} vers ${item.start_time.strftime('%Hh%M')}
de ${item.Itin.start.display_name}
à ${item.Itin.arrival.display_name}
%elif Type=='H':
${item.Category.exch_subtype}, La nuit du ${item.start_time.strftime('%A %d %b %Y')} %elif Type=='M': de ${item.start_time.strftime('%A %d %b %Y')} vers ${item.start_time.strftime('%Hh%M')} à ${item.end_time.strftime('%A %d %b %Y')} vers ${item.end_time.strftime('%Hh%M')} ${item.Category.exch_subtype} %endif %if item.description: ${item.description} %endif |
Mes offres ${CurTitle} Ajouter | ||
---|---|---|
Vous n'avez fait aucune offre ${CurTitle} | ||
Etat | Détails | |
% if item.exch_done:
Validé
% elif item.asker_id is None:
Publié
% elif item.provider_id==request.user.uid and type=="Ask":
Je propose
Négociation
% elif item.provider_id==request.user.uid and type=="Proposal":
Je propose
Proposition
% endif
|
%if Type=='C':
${item.start_time.strftime('%A %d %b %Y')} vers ${item.start_time.strftime('%Hh%M')}
de ${item.Itin.start.display_name}
à ${item.Itin.arrival.display_name}
%elif Type=='H':
${item.Category.exch_subtype}, La nuit du ${item.start_time.strftime('%A %d %b %Y')} %elif Type=='M': de ${item.start_time.strftime('%A %d %b %Y')} vers ${item.start_time.strftime('%Hh%M')} à ${item.end_time.strftime('%A %d %b %Y')} vers ${item.end_time.strftime('%Hh%M')} ${item.Category.exch_subtype} %endif %if item.description: ${item.description} %endif |
Section | Mes demandes | Mes Propositions | Accords |
---|---|---|---|
Miam | ? | - | ? |
${Wrap | h} | <% RecA = filter( lambda (A, B, C, D): A=='Ask' and B==Wrap[0] and C==0, AskSelection ) RecP = filter( lambda (A, B, C, D): A=='Proposal' and B==Wrap[0] and C==0, AskSelection ) RecD = filter( lambda (A, B, C, D): B==Wrap[0] and C==1, AskSelection ) %> % for item in [RecA, RecP, RecD]:% if item: ${item[0][3]} % else: 0 % endif | % endfor
Section | Les demandes | Les propositions | Les Accords |
---|---|---|---|
Miam | ? | - | ? |
${Wrap | h} | <% AllA = filter( lambda (A,B,C,D): A=='Ask' and B==Wrap[0] and C==0, AllSelection ) AllP = filter( lambda (A,B,C,D): A=='Proposal' and B==Wrap[0] and C==0, AllSelection ) AllD = filter( lambda (A,B,C,D): B==Wrap[0] and C==1, AllSelection ) %> % for item in [AllA, AllP, AllD]:% if item: ${item[0][3]} % else: 0 % endif | % endfor