From 742aec627051da7fd1c615f6e6aa09cd613e4208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89lie=20Bouttier?= Date: Wed, 15 Nov 2017 00:03:13 +0100 Subject: [PATCH] allow speakers to upload their slides --- cfp/forms.py | 5 +- cfp/templates/cfp/proposal_talk_details.html | 14 ++++ cfp/templates/cfp/proposal_talk_form.html | 2 +- cfp/views.py | 2 +- locale/fr/LC_MESSAGES/django.mo | Bin 22999 -> 23054 bytes locale/fr/LC_MESSAGES/django.po | 83 ++++++++++--------- 6 files changed, 64 insertions(+), 42 deletions(-) diff --git a/cfp/forms.py b/cfp/forms.py index 603207c..befbf6b 100644 --- a/cfp/forms.py +++ b/cfp/forms.py @@ -80,10 +80,12 @@ class TalkForm(forms.ModelForm): del self.fields['category'] else: self.fields['category'].queryset = categories + if self.instance and self.instance.accepted is not True: + del self.fields['materials'] class Meta: model = Talk - fields = ('category', 'title', 'description', 'notes') + fields = ('category', 'title', 'description', 'notes', 'materials',) class TalkStaffForm(forms.ModelForm): @@ -93,7 +95,6 @@ class TalkStaffForm(forms.ModelForm): self.fields['category'].queryset = TalkCategory.objects.filter(site=conference.site) self.fields['track'].queryset = Track.objects.filter(site=conference.site) self.fields['room'].queryset = Room.objects.filter(site=conference.site) - self.fields['materials'].required = False if self.instance and self.instance.category and self.instance.category.duration: self.fields['duration'].help_text = _('Default duration: %(duration)d min') % {'duration': self.instance.duration} diff --git a/cfp/templates/cfp/proposal_talk_details.html b/cfp/templates/cfp/proposal_talk_details.html index 7a0fd6a..b564e19 100644 --- a/cfp/templates/cfp/proposal_talk_details.html +++ b/cfp/templates/cfp/proposal_talk_details.html @@ -82,6 +82,20 @@ {% endif %}

+{% if talk.materials or talk.video %} +

{% trans "Materials and video" %}

+
+ {% if talk.materials %} +
{% trans "Materials" %}
+
{{ talk.materials_name }}
+ {% endif %} + {% if talk.video %} +
{% trans "Video" %}
+
{% trans "download" %}
+ {% endif %} +
+{% endif %} +

{% trans "Message to organizers" %}

diff --git a/cfp/templates/cfp/proposal_talk_form.html b/cfp/templates/cfp/proposal_talk_form.html index b7ba544..6f56fd9 100644 --- a/cfp/templates/cfp/proposal_talk_form.html +++ b/cfp/templates/cfp/proposal_talk_form.html @@ -21,7 +21,7 @@

-
+ {% csrf_token %} {{ form|crispy }}
diff --git a/cfp/views.py b/cfp/views.py index 67c667a..36fe02d 100644 --- a/cfp/views.py +++ b/cfp/views.py @@ -287,7 +287,7 @@ def proposal_talk_edit(request, speaker, talk_id=None): categories = TalkCategory.objects.filter(site=request.conference.site) else: categories = request.conference.opened_categories - form = TalkForm(request.POST or None, categories=categories, instance=talk) + form = TalkForm(request.POST or None, request.FILES or None, categories=categories, instance=talk) if request.method == 'POST' and form.is_valid(): talk = form.save(commit=False) talk.site = request.conference.site diff --git a/locale/fr/LC_MESSAGES/django.mo b/locale/fr/LC_MESSAGES/django.mo index 66a61d3479ab439dd7f065e2000a5c14c7019258..2f16375000f52e70c9b6da282071c1379bb64e30 100644 GIT binary patch delta 6020 zcmYk=30PKD9>?*6$|{Sp2)MwDh){~)@;U~nRF3dymgE_j&$)&N=tqbI$#rbMH%iR^>N$ zi=XFWWSxbEBhk;8#uy!JjE8b)q*{#$iZdn$gRwdGzyKVBp;(4dSb>djAqL@Qq${%x z8{!8Tf|u<1YZ%T@<`#u|oTwG=YcNr$3!7pXrlUH_w(Z@qF7^HxfkTmwOeuE6spyZ@ zs0r`FRJ@AyF`U^%qYGmh-?%AgfWFuOhoGKttZko!nve(eWV2BNda(|!#QSj#w!-76 z3HXr?Jy;+P!Z=hvrKpKNgTah%W>V0T&O;_?mSZ4Rqh`7XHSj6a1TSGz{0Wtbc-D<1 zniSN;I-&0Gi<)4*ZGQ}P{V3FUlhC8WGzuDE9%|W_pi;E~^(4Dc*L{e}%n8&0XHoZk zfy&@@d;T`IrhXUGuvHT#heI$4pU0NCyb1Z&<~dA*QuR4112w3D>Lxfwq6UmdolipD zmyONvVLX6k_!4$ZG^PZPU~@KedzUepIE>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udh$(VX}@p<@V9l50oj*POo-%2JOY zo;kmC`9~%vj}xEUi+;=Tis(}!XIPc(C45{_uKGy{iJpdu(JD7cN~o99H!&(CXJ*Ri Gpx*(S4TYNk diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 320dae7..ab8af8a 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-11-11 17:45+0000\n" -"PO-Revision-Date: 2017-11-11 18:46+0100\n" +"POT-Creation-Date: 2017-11-14 23:02+0000\n" +"PO-Revision-Date: 2017-11-15 00:03+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -22,7 +22,7 @@ msgstr "" msgid "Pending decision" msgstr "Décision en attente" -#: cfp/forms.py:18 cfp/forms.py:124 cfp/forms.py:221 +#: cfp/forms.py:18 cfp/forms.py:125 cfp/forms.py:222 msgid "Accepted" msgstr "Accepté" @@ -34,7 +34,7 @@ msgstr "Décliné" msgid "Waiting" msgstr "En attente" -#: cfp/forms.py:29 cfp/forms.py:130 cfp/forms.py:227 cfp/models.py:373 +#: cfp/forms.py:29 cfp/forms.py:131 cfp/forms.py:228 cfp/models.py:373 msgid "Confirmed" msgstr "Confirmé" @@ -51,132 +51,134 @@ msgctxt "activity" msgid "None" msgstr "Aucune" -#: cfp/forms.py:98 +#: cfp/forms.py:99 #, python-format msgid "Default duration: %(duration)d min" msgstr "Durée par défaut : %(duration)d min" -#: cfp/forms.py:106 cfp/forms.py:118 cfp/forms.py:215 +#: cfp/forms.py:107 cfp/forms.py:119 cfp/forms.py:216 #: cfp/templates/cfp/staff/talk_details.html:15 msgid "Category" msgstr "Catégorie" -#: cfp/forms.py:107 cfp/templates/cfp/staff/talk_list.html:43 +#: cfp/forms.py:108 cfp/templates/cfp/staff/talk_list.html:43 msgid "Title" msgstr "Titre" -#: cfp/forms.py:108 cfp/models.py:158 cfp/models.py:499 +#: cfp/forms.py:109 cfp/models.py:158 cfp/models.py:499 #: cfp/templates/cfp/proposal_talk_details.html:75 #: cfp/templates/cfp/staff/talk_details.html:64 msgid "Description" msgstr "Description" -#: cfp/forms.py:109 cfp/models.py:112 cfp/models.py:464 +#: cfp/forms.py:110 cfp/models.py:112 cfp/models.py:464 #: cfp/templates/cfp/staff/participant_details.html:19 #: cfp/templates/cfp/staff/talk_details.html:78 #: cfp/templates/cfp/staff/volunteer_details.html:22 msgid "Notes" msgstr "Notes" -#: cfp/forms.py:112 +#: cfp/forms.py:113 msgid "Visible by speakers" msgstr "Visible par les orateurs" -#: cfp/forms.py:136 cfp/forms.py:233 cfp/models.py:330 +#: cfp/forms.py:137 cfp/forms.py:234 cfp/models.py:330 #: cfp/templates/cfp/staff/talk_details.html:21 #: cfp/templates/cfp/staff/talk_list.html:46 #: cfp/templates/cfp/staff/track_form.html:14 msgid "Track" msgstr "Session" -#: cfp/forms.py:142 +#: cfp/forms.py:143 msgid "Tag" msgstr "Étiquette" -#: cfp/forms.py:148 cfp/templates/cfp/staff/talk_details.html:83 +#: cfp/forms.py:149 cfp/templates/cfp/staff/talk_details.html:83 msgid "Vote" msgstr "Vote" -#: cfp/forms.py:149 +#: cfp/forms.py:150 msgid "Filter talks you already / not yet voted for" msgstr "" "Filtrer les propositions pour lesquelles vous avez déjà voté / pas encore " "voté" -#: cfp/forms.py:152 cfp/templates/cfp/staff/room_form.html:14 +#: cfp/forms.py:153 cfp/templates/cfp/staff/room_form.html:14 #: cfp/templates/cfp/staff/talk_details.html:38 msgid "Room" msgstr "Salle" -#: cfp/forms.py:153 +#: cfp/forms.py:154 msgid "Filter talks already / not yet affected to a room" msgstr "Filtrer les exposés déjà / pas encore affectées à une salle" -#: cfp/forms.py:156 +#: cfp/forms.py:157 msgid "Scheduled" msgstr "Programmé" -#: cfp/forms.py:157 +#: cfp/forms.py:158 msgid "Filter talks already / not yet scheduled" msgstr "Filtrer les exposés déjà / pas encore planifiées" -#: cfp/forms.py:160 cfp/models.py:347 +#: cfp/forms.py:161 cfp/models.py:347 +#: cfp/templates/cfp/proposal_talk_details.html:89 #: cfp/templates/cfp/staff/talk_details.html:54 msgid "Materials" msgstr "Supports" -#: cfp/forms.py:161 +#: cfp/forms.py:162 msgid "Filter talks with / without materials" msgstr "Filtrer les exposés avec / sans supports" -#: cfp/forms.py:164 cfp/templates/cfp/staff/talk_details.html:58 +#: cfp/forms.py:165 cfp/templates/cfp/proposal_talk_details.html:93 +#: cfp/templates/cfp/staff/talk_details.html:58 msgid "Video" msgstr "Vidéo" -#: cfp/forms.py:165 +#: cfp/forms.py:166 msgid "Filter talks with / without video" msgstr "Filtrer les exposés avec / sans vidéo" -#: cfp/forms.py:174 cfp/forms.py:245 +#: cfp/forms.py:175 cfp/forms.py:246 msgid "Not assigned" msgstr "Pas encore assignée" -#: cfp/forms.py:180 +#: cfp/forms.py:181 msgid "Accept talk?" msgstr "Accepter la proposition ?" -#: cfp/forms.py:181 +#: cfp/forms.py:182 msgid "Assign to a track" msgstr "Assigner à une session" -#: cfp/forms.py:182 cfp/templates/cfp/admin/tag_list.html:11 +#: cfp/forms.py:183 cfp/templates/cfp/admin/tag_list.html:11 msgid "Add a tag" msgstr "Ajouter une étiquette" -#: cfp/forms.py:183 +#: cfp/forms.py:184 msgid "Put in a room" msgstr "Assigner à une salle" -#: cfp/forms.py:199 +#: cfp/forms.py:200 msgid "Notify by mail?" msgstr "Notifier par e-mail ?" -#: cfp/forms.py:249 cfp/models.py:459 +#: cfp/forms.py:250 cfp/models.py:459 #: cfp/templates/cfp/staff/volunteer_list.html:30 msgid "Email" msgstr "E-mail" -#: cfp/forms.py:268 +#: cfp/forms.py:269 msgid "New staff members will be informed of their new position by e-mail." msgstr "" "Les nouveaux membres du staff seront informés de leur nouveau rôle par " "courrier électronique." -#: cfp/forms.py:288 +#: cfp/forms.py:289 msgid "An user with that firstname and that lastname already exists." msgstr "Un utilisateur avec ce prénom et ce nom existe déjà." -#: cfp/forms.py:293 +#: cfp/forms.py:294 msgid "A user with that email already exists." msgstr "Un utilisateur avec cet email existe déjà." @@ -328,7 +330,7 @@ msgstr "Titre de la proposition" msgid "Description of your talk" msgstr "Description de votre proposition" -#: cfp/models.py:332 cfp/templates/cfp/proposal_talk_details.html:85 +#: cfp/models.py:332 cfp/templates/cfp/proposal_talk_details.html:99 msgid "Message to organizers" msgstr "Message aux organisateurs" @@ -722,11 +724,20 @@ msgid "remove" msgstr "supprimer" #: cfp/templates/cfp/proposal_talk_details.html:81 -#: cfp/templates/cfp/proposal_talk_details.html:91 +#: cfp/templates/cfp/proposal_talk_details.html:105 #: cfp/templates/cfp/staff/talk_details.html:66 msgid "No description provided." msgstr "Aucune description fournie." +#: cfp/templates/cfp/proposal_talk_details.html:86 +msgid "Materials and video" +msgstr "Supports et vidéo" + +#: cfp/templates/cfp/proposal_talk_details.html:94 +#: cfp/templates/cfp/staff/talk_details.html:59 +msgid "download" +msgstr "télécharger" + #: cfp/templates/cfp/proposal_talk_form.html:14 msgid "Submit a proposal" msgstr "Soumettre une proposition" @@ -971,10 +982,6 @@ msgstr "Créneau" msgid "not defined" msgstr "non défini" -#: cfp/templates/cfp/staff/talk_details.html:59 -msgid "download" -msgstr "télécharger" - #: cfp/templates/cfp/staff/talk_details.html:75 msgid "No speakers." msgstr "Aucun orateur."