En mode bref affiche deux colonnes, une pour adhésion et une pour connexion.

This commit is contained in:
Pierre-Elliott Bécue 2015-08-26 19:06:46 +02:00
parent 1353f00e17
commit 4a3434847e
2 changed files with 49 additions and 20 deletions

View file

@ -223,28 +223,42 @@ def list_factures(factures, width=None):
width=width)
def list_adherents(adherents, width=None):
return tableau([
[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'),
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'Machines'],
largeur = [5, 35, 5, 1, '*'],
alignement = ['d', 'c', 'c', 'c', 'g'],
width=width)
return tableau(
[
[
a['aid'][0],
u' '.join(unicode(i) for i in a['prenom'] + a['nom']),
a['chbre'][0],
style('o', 'vert') if a.adhesion_ok() else style('n', 'rouge'),
style('o', 'vert') if a.paiement_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'A', u'C', u'Machines'],
largeur=[5, 35, 5, 1, 1, '*'],
alignement=['d', 'c', 'c', 'c', 'c', 'g'],
width=width
)
def list_clubs(clubs, width=None):
return tableau([
[a['cid'][0],
u' '.join(unicode(i) for i in a['nom']),
a['chbre'][0], style('o', 'vert') if a.paiement_ok() else style('n', 'rouge'),
u', '.join(unicode(m['host'][0]).split('.',1)[0] for m in a.machines())
] for a in clubs ],
titre = [u'cid', u'Nom', u'Chbre', u'P', u'Machines'],
largeur = [5, 35, 5, 1, '*'],
alignement = ['d', 'c', 'c', 'c', 'g'],
width=width)
return tableau(
[
[
a['cid'][0],
u' '.join(unicode(i) for i in a['nom']),
a['chbre'][0],
style('o', 'vert') if a.adhesion_ok() else style('n', 'rouge'),
style('o', 'vert') if a.paiement_ok() else style('n', 'rouge'),
u', '.join(unicode(m['host'][0]).split('.',1)[0] for m in a.machines())
]
for a in clubs
],
titre = [u'cid', u'Nom', u'Chbre', u'A', u'C', u'Machines'],
largeur = [5, 35, 5, 1, 1, '*'],
alignement = ['d', 'c', 'c', 'c', 'c', 'g'],
width=width
)
def proprio(proprio, params):
params['o']=proprio