From 921460ce8f73b50e302cd14027f09e4d9754b856 Mon Sep 17 00:00:00 2001 From: Emilie Date: Mon, 7 Nov 2016 20:25:46 +0100 Subject: [PATCH] Person : add data in detail view --- app/organization/network/views.py | 5 ++++ app/templates/network/person_detail.html | 31 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/app/organization/network/views.py b/app/organization/network/views.py index 5b2fd351..a204329c 100644 --- a/app/organization/network/views.py +++ b/app/organization/network/views.py @@ -17,6 +17,11 @@ class PersonDetailView(SlugMixin, DetailView): template_name='network/person_detail.html' context_object_name = 'person' + def get_context_data(self, **kwargs): + context = super(PersonDetailView, self).get_context_data(**kwargs) + context["person_email"] = self.object.email if self.object.email else self.object.slug.replace('-', '.')+" @ ircam.fr" + return context + class PersonListBlockAutocompleteView(autocomplete.Select2QuerySetView): diff --git a/app/templates/network/person_detail.html b/app/templates/network/person_detail.html index b95ad364..d5158f25 100644 --- a/app/templates/network/person_detail.html +++ b/app/templates/network/person_detail.html @@ -30,6 +30,37 @@ {% editable person.bio %} {{ person.bio|richtext_filters|safe }} {% endeditable %} + +

{% trans 'Email' %} : {{ person_email }}

+
+

+ {% trans 'Activities' %}: +

+

{% endblock %} {% block page_sidebar %} -- 2.39.5