{{extend 'MyLayout.html'}} {{def voted(Q_id):}} {{if auth.is_logged_in():}} {{vote=db((db.Votes.U_id==auth.user.id)&(db.Votes.Q_id==Q_id)).select()}} {{if len(vote)>0:}} {{aspect_num = 'qu_number_v'}} {{pass}} {{if len(vote)==0:}} {{aspect_num = 'qu_number_nv'}} {{pass}} {{else:}} {{aspect_num = 'qu_number_nc'}} {{pass}} {{return aspect_num}}
{{nb_r=0}}
{{for r in db((db.Reponses.Q_id==q.id)
&(db.Reponses.visibilite=='True')).select(db.Reponses.ALL):}}
{{champ=champ_q+'_'+str(r.id)}}
{{nb_r+=1}}
{{pass}}
[ {{=A("Proposer une nouvelle réponse",_href=URL(r=request,f="new_R",args=[q.id]))}} | {{if nb_r>1:}} {{if q.date_limite > request.now:}} {{=A("Voter" ,_href=URL(r=request,f='vote',args=[q.id]))}} | {{=A("Déleguer son Vote" ,_href=URL(r=request,f='deleg_vote',args=[q.id]))}} {{else:}} {{="cloturée"}} {{pass}} {{pass}} ] |