From 72f254b3d3184e05abfa3bcf1348503e504181e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89lie=20Bouttier?= Date: Fri, 3 Nov 2017 20:35:24 +0100 Subject: [PATCH] VIP speakers --- cfp/forms.py | 1 + cfp/migrations/0017_auto_20171103_1922.py | 20 ++++++++++++++ cfp/models.py | 2 +- .../cfp/staff/participant_details.html | 6 +++- cfp/templates/cfp/staff/participant_list.html | 5 +++- cfp/templates/cfp/staff/talk_details.html | 2 +- locale/fr/LC_MESSAGES/django.mo | Bin 17583 -> 17631 bytes locale/fr/LC_MESSAGES/django.po | 26 ++++++++++-------- 8 files changed, 47 insertions(+), 15 deletions(-) create mode 100644 cfp/migrations/0017_auto_20171103_1922.py diff --git a/cfp/forms.py b/cfp/forms.py index 84c7891..b0bef9e 100644 --- a/cfp/forms.py +++ b/cfp/forms.py @@ -179,6 +179,7 @@ ParticipantForm = modelform_factory(Participant, fields=('name', 'email', 'biogr class ParticipantStaffForm(ParticipantForm): class Meta(ParticipantForm.Meta): + fields = ('name', 'vip', 'email', 'biography') labels = { 'name': _('Name'), } diff --git a/cfp/migrations/0017_auto_20171103_1922.py b/cfp/migrations/0017_auto_20171103_1922.py new file mode 100644 index 0000000..267d497 --- /dev/null +++ b/cfp/migrations/0017_auto_20171103_1922.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.1 on 2017-11-03 19:22 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cfp', '0016_auto_20171103_1842'), + ] + + operations = [ + migrations.AlterField( + model_name='participant', + name='vip', + field=models.BooleanField(default=False, verbose_name='Invited speaker'), + ), + ] diff --git a/cfp/models.py b/cfp/models.py index b8bf6e3..09090eb 100644 --- a/cfp/models.py +++ b/cfp/models.py @@ -104,7 +104,7 @@ class Participant(PonyConfModel): language = models.CharField(max_length=10, blank=True) notes = models.TextField(default='', blank=True, verbose_name=_("Notes"), help_text=_('This field is only visible by organizers.')) - vip = models.BooleanField(default=False) + vip = models.BooleanField(default=False, verbose_name=_('Invited speaker')) conversation = models.OneToOneField(MessageThread) objects = ParticipantManager() diff --git a/cfp/templates/cfp/staff/participant_details.html b/cfp/templates/cfp/staff/participant_details.html index 0b55dcd..91a8073 100644 --- a/cfp/templates/cfp/staff/participant_details.html +++ b/cfp/templates/cfp/staff/participant_details.html @@ -5,7 +5,10 @@ {% block content %} -

{{ participant }}

+

+ {{ participant }} + {% if participant.vip %}{% trans "VIP" %}{% endif %} +

{% trans "Edit" %}

@@ -19,6 +22,7 @@

{% trans "Informations" %}