From 8ae5870468890354cb9318d5d44f9e45e2e5531d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= Date: Wed, 26 Aug 2015 17:22:51 +0200 Subject: [PATCH] =?UTF-8?q?Prise=20en=20charge=20des=20sshfp,=20et=20switc?= =?UTF-8?q?hes=20pour=20adresse/t=C3=A9l=C3=A9phone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- printing/templates/adherent | 4 ++++ printing/templates/machine | 3 +++ printing/templates/templates.py | 5 ++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/printing/templates/adherent b/printing/templates/adherent index 74c7e36..139bc59 100644 --- a/printing/templates/adherent +++ b/printing/templates/adherent @@ -3,13 +3,17 @@ {{["aid=",o.aid.0]|join|coul('bleu')}} {{"Nom : "|coul('gras')}}{{o.prenom|join(' ')}} {{o.nom|join(' ')}} {% endblock%} {% block proprio %} +{% if disp_telephone %} {{"Numéro de téléphone : "|coul('gras')}}{{o.tel|telephone|join(', ')}} +{% endif %} +{% if disp_adresse %} {% if o.chbre.0 == 'EXT' and o.postalAddress %} {{"Adresse : "|coul('gras')}}{{o.postalAddress.0}} {{o.postalAddress.1}} {{o.postalAddress.2}} {{o.postalAddress.3}} {% else %} {{"Chambre : "|coul('gras')}}{{o.chbre.0}} ({{o.chbre.0|string|prise_etat}}) {% endif %} +{% endif %} {{"Études : "|coul('gras')}}{{o.etudes|join(' ')}} {{adh}} {% if o.get('controle', []) and 'p' in o.controle.0.value %}{{"(OK)"|coul('vert')}}{% endif %} diff --git a/printing/templates/machine b/printing/templates/machine index 4b99f77..572984b 100644 --- a/printing/templates/machine +++ b/printing/templates/machine @@ -6,6 +6,9 @@ {{"IPv4 : "|coul('gras')}}{{o.ipHostNumber|join(', ')}} {% if o.ip6HostNumber %}{{"IPv6 : "|coul('gras')}}{{o.ip6HostNumber|join(', ')}} {% endif %} +{% if sshfp and o.sshFingerprint %} +{{"Fingerprints SSH : "|coul('gras')}}{{o.sshFingerprint|join('\n ')}} +{% endif %} {{"DnsIpv6 : "|coul('gras')}}{% if not o.dnsIpv6 or o.dnsIpv6.0.value %} {{"TRUE"|coul('vert')}} {% else %} diff --git a/printing/templates/templates.py b/printing/templates/templates.py index 404a381..f71e6bb 100644 --- a/printing/templates/templates.py +++ b/printing/templates/templates.py @@ -298,7 +298,10 @@ def blacklist(blacklist, params): def sprint(object, historique=5, blacklist_len=5, **params): from lc_ldap import objets, attributs - params.update({'historique':historique, "blacklist":blacklist_len}) + params.update({ + 'historique': historique, + 'blacklist': blacklist_len, + }) if isinstance(object, objets.machine): return machine(object, params) elif isinstance(object, objets.adherent):