Supprime ce qui concerne la carte d'étudiant
This commit is contained in:
parent
20dd2d64cd
commit
f0de8bd515
4 changed files with 15 additions and 53 deletions
|
@ -15,6 +15,4 @@
|
|||
|
||||
{{conn}} {% if o.get('controle', []) and 'p' in o.controle.0.value %}{{"(OK)"|coul('vert')}}{% endif %}
|
||||
|
||||
{{cetud}} {% if o.get('controle', []) and 'c' in o.controle.0.value %}{{"(OK)"|coul('vert')}}{% endif %}
|
||||
|
||||
{% endblock%}
|
||||
|
|
|
@ -227,12 +227,11 @@ def list_adherents(adherents, width=None):
|
|||
[a['aid'][0],
|
||||
u' '.join(unicode(i) for i in a['prenom'] + a['nom']),
|
||||
a['chbre'][0], style('o', 'vert') if a.paiement_ok() else style('n', 'rouge'),
|
||||
style('o', 'vert') if a.carte_ok() else style('n', 'rouge'),
|
||||
u', '.join(unicode(m['host'][0]).split('.',1)[0] for m in a.machines())
|
||||
] for a in adherents ],
|
||||
titre = [u'aid', u'Prénom Nom', u'Chbre', u'P', u'C', u'Machines'],
|
||||
largeur = [5, 35, 5, 1, 1, '*'],
|
||||
alignement = ['d', 'c', 'c', 'c', 'c', 'g'],
|
||||
titre = [u'aid', u'Prénom Nom', u'Chbre', u'P', u'Machines'],
|
||||
largeur = [5, 35, 5, 1, '*'],
|
||||
alignement = ['d', 'c', 'c', 'c', 'g'],
|
||||
width=width)
|
||||
|
||||
def list_clubs(clubs, width=None):
|
||||
|
@ -250,16 +249,12 @@ def list_clubs(clubs, width=None):
|
|||
def proprio(proprio, params):
|
||||
params['o']=proprio
|
||||
etat_administratif=[]
|
||||
if proprio.paiement_ok() and proprio.carte_ok():
|
||||
if proprio.paiement_ok():
|
||||
etat_administratif.append(style(u"à jour", "vert"))
|
||||
if not proprio.carte_ok():
|
||||
etat_administratif.append(style(u"manque carte d'étudiant", "violet"))
|
||||
if not proprio.paiement_ok():
|
||||
etat_administratif.append(style(u"cotisation non réglée", "violet"))
|
||||
if proprio.fin_adhesion() >= time.time():
|
||||
adh = style(u"Adhésion jusqu'au %s" % (time.strftime("%d/%m/%Y %H:%M:%S", time.localtime(proprio.fin_adhesion())),), "vert")
|
||||
elif config.ann_scol in proprio['paiement']:
|
||||
adh = style(u"Adhésion pour la période %s-%s ok." % (config.ann_scol, config.ann_scol+1), "vert")
|
||||
elif proprio.paiement_ok():
|
||||
adh = style(u"Adhésion terminée, mais il y a un sursis.", 'orange')
|
||||
else:
|
||||
|
@ -267,27 +262,18 @@ def proprio(proprio, params):
|
|||
params["adh"] = adh
|
||||
if proprio.fin_connexion() >= time.time():
|
||||
conn = style(u"Connexion jusqu'au %s" % (time.strftime("%d/%m/%Y %H:%M:%S", time.localtime(proprio.fin_connexion())),), "vert")
|
||||
elif config.ann_scol in proprio['paiement']:
|
||||
conn = style(u"Connexion pour la période %s-%s ok." % (config.ann_scol, config.ann_scol+1), "vert")
|
||||
elif proprio.paiement_ok():
|
||||
conn = style(u"Connexion terminée, mais il y a un sursis.", 'orange')
|
||||
else:
|
||||
conn = style(u"Pas connecté actuellement.", 'rouge')
|
||||
params["conn"] = conn
|
||||
if proprio.get('carteEtudiant', []):
|
||||
cetud = style(u"Carte d'étudiant fournie.", 'vert')
|
||||
elif proprio.sursis_carte() or proprio.carte_ok():
|
||||
cetud = style(u"Carte d'étudiant non fournie, mais en sursis.", 'orange')
|
||||
else:
|
||||
cetud = style(u"Pas de carte d'étudiant")
|
||||
params["cetud"] = cetud
|
||||
params['etat_administratif']=etat_administratif
|
||||
params['etat_administratif'] = etat_administratif
|
||||
|
||||
try:
|
||||
if proprio.machines():
|
||||
params['machines']=list_machines(proprio.machines())
|
||||
params['machines'] = list_machines(proprio.machines())
|
||||
if proprio.factures():
|
||||
params['factures']=list_factures(proprio.factures())
|
||||
params['factures'] = list_factures(proprio.factures())
|
||||
# On essaye d'afficher un adhérent qui n'existe pas encore
|
||||
# et donc, on ne peut pas récupérer ses objets enfant
|
||||
except ldap.NO_SUCH_OBJECT:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue