From: Emilie Date: Mon, 7 Nov 2016 19:25:46 +0000 (+0100) Subject: Person : add data in detail view X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=921460ce8f73b50e302cd14027f09e4d9754b856;p=mezzo.git Person : add data in detail view --- 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 %}