volunteers

This commit is contained in:
Élie Bouttier 2016-10-22 00:56:37 +02:00
parent ca549d8d1c
commit 33416fa6d7
11 changed files with 227 additions and 150 deletions

Binary file not shown.

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-10-18 22:01+0000\n" "POT-Creation-Date: 2016-10-21 22:51+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -85,8 +85,8 @@ msgstr "Jaccepte dêtre enregistré en vidéo"
msgid "Video licence" msgid "Video licence"
msgstr "Licence vidéo" msgstr "Licence vidéo"
#: accounts/models.py:80 proposals/models.py:115 #: accounts/models.py:80 proposals/models.py:116
#: proposals/templates/proposals/talk_detail.html:87 #: proposals/templates/proposals/talk_detail.html:86
#: proposals/templates/proposals/user_details.html:57 #: proposals/templates/proposals/user_details.html:57
msgid "Notes" msgid "Notes"
msgstr "Notes" msgstr "Notes"
@ -209,7 +209,7 @@ msgid "Delete These"
msgstr "Supprimer ces" msgstr "Supprimer ces"
#: accounts/templates/registration/login.html:11 #: accounts/templates/registration/login.html:11
#: ponyconf/templates/base.html:101 #: ponyconf/templates/base.html:111
msgid "Login" msgid "Login"
msgstr "Se connecter" msgstr "Se connecter"
@ -274,20 +274,28 @@ msgid "You can use this page to communicate with the staff."
msgstr "" msgstr ""
"Vous pouvez utiliser cette page pour communiquer avec léquipe organisatrice." "Vous pouvez utiliser cette page pour communiquer avec léquipe organisatrice."
#: planning/templates/planning/program.html:9 ponyconf/templates/base.html:76 #: planning/templates/planning/program.html:9 ponyconf/templates/base.html:86
msgid "Program" msgid "Program"
msgstr "Programme" msgstr "Programme"
#: planning/templates/planning/room_detail.html:19 #: planning/templates/planning/room_detail.html:13
#: planning/templates/planning/room_detail.html:28 msgid "Scheduled talks"
msgstr "Exposés planifiés"
#: planning/templates/planning/room_detail.html:22
#: planning/templates/planning/room_detail.html:33
msgid "No talks." msgid "No talks."
msgstr "Aucun exposé." msgstr "Aucun exposé."
#: planning/templates/planning/room_detail.html:25
msgid "Unscheduled talks"
msgstr "Exposés non planifiés"
#: planning/templates/planning/room_form.html:14 #: planning/templates/planning/room_form.html:14
msgid "Room" msgid "Room"
msgstr "Salle" msgstr "Salle"
#: planning/templates/planning/room_list.html:9 ponyconf/templates/base.html:73 #: planning/templates/planning/room_list.html:9 ponyconf/templates/base.html:83
msgid "Rooms" msgid "Rooms"
msgstr "Salles" msgstr "Salles"
@ -300,14 +308,11 @@ msgid "place"
msgstr "" msgstr ""
#: planning/templates/planning/room_list.html:24 #: planning/templates/planning/room_list.html:24
#, fuzzy
#| msgid "Filter talks already / not yet scheduled"
msgid "Some talks are not scheduled yet." msgid "Some talks are not scheduled yet."
msgstr "Filtrer les exposés déjà / pas encore planifiées" msgstr "Certains exposés ne sont pas encore planifiés."
#: planning/templates/planning/room_list.html:25 #: planning/templates/planning/room_list.html:25
#: proposals/templates/proposals/talk_list.html:56 #: proposals/templates/proposals/talk_list.html:41
#: proposals/templates/proposals/talk_list.html:92
#: proposals/templates/proposals/topic_list.html:23 #: proposals/templates/proposals/topic_list.html:23
#: proposals/templates/proposals/track_list.html:23 #: proposals/templates/proposals/track_list.html:23
msgid "talk" msgid "talk"
@ -317,36 +322,11 @@ msgstr "exposé"
msgid "No rooms." msgid "No rooms."
msgstr "Aucune salle." msgstr "Aucune salle."
#: planning/templates/planning/talk_detail.html:20 #: ponyconf/settings.py:140
#: proposals/templates/proposals/talk_detail.html:68
msgid "No speakers."
msgstr "Aucun orateur."
#: planning/templates/planning/talk_detail.html:37 proposals/models.py:47
#: proposals/models.py:70 proposals/models.py:112
#: proposals/templates/proposals/talk_detail.html:57
msgid "Description"
msgstr "Description"
#: planning/templates/planning/talk_detail2.html:62 proposals/models.py:111
msgid "Abstract"
msgstr "Résumé"
#: planning/templates/planning/talk_detail2.html:78
#, fuzzy
#| msgid "average:"
msgid "Coverage"
msgstr "moyenne :"
#: planning/templates/planning/talk_detail2.html:94
msgid "See more"
msgstr "Voir plus"
#: ponyconf/settings.py:139
msgid "English" msgid "English"
msgstr "Anglais" msgstr "Anglais"
#: ponyconf/settings.py:140 #: ponyconf/settings.py:141
msgid "French" msgid "French"
msgstr "Français" msgstr "Français"
@ -354,64 +334,74 @@ msgstr "Français"
msgid "Home" msgid "Home"
msgstr "Accueil" msgstr "Accueil"
#: ponyconf/templates/base.html:47 #: ponyconf/templates/base.html:48
#: proposals/templates/proposals/participate.html:9 #: proposals/templates/proposals/participate.html:9
msgid "Participate" msgid "Participate"
msgstr "Participer" msgstr "Participer"
#: ponyconf/templates/base.html:48 proposals/models.py:113 #: ponyconf/templates/base.html:51
#: proposals/templates/proposals/talk_list.html:47 msgid "Propose an intervention"
msgstr "Proposer une intervention"
#: ponyconf/templates/base.html:54
#: volunteers/templates/volunteers/participate.html:9
msgid "Enrole as volunteer"
msgstr "Devenir bénévole"
#: ponyconf/templates/base.html:58 proposals/models.py:114
#: proposals/templates/proposals/talk_detail.html:22
#: proposals/templates/proposals/talk_list.html:48
#: proposals/templates/proposals/topic_list.html:9 #: proposals/templates/proposals/topic_list.html:9
msgid "Topics" msgid "Topics"
msgstr "Thèmes" msgstr "Thèmes"
#: ponyconf/templates/base.html:50 #: ponyconf/templates/base.html:60
#: proposals/templates/proposals/track_list.html:9 #: proposals/templates/proposals/track_list.html:9
msgid "Tracks" msgid "Tracks"
msgstr "Sessions" msgstr "Sessions"
#: ponyconf/templates/base.html:59 #: ponyconf/templates/base.html:69
msgid "Listing" msgid "Listing"
msgstr "Liste" msgstr "Liste"
#: ponyconf/templates/base.html:62 #: ponyconf/templates/base.html:72
#: proposals/templates/proposals/talk_list.html:9 #: proposals/templates/proposals/talk_list.html:9
#: proposals/templates/proposals/user_details.html:20 #: proposals/templates/proposals/user_details.html:20
msgid "Talks" msgid "Talks"
msgstr "Exposés" msgstr "Exposés"
#: ponyconf/templates/base.html:65 proposals/models.py:108 #: ponyconf/templates/base.html:75 proposals/models.py:109
#: proposals/templates/proposals/speaker_list.html:9 #: proposals/templates/proposals/speaker_list.html:9
#: proposals/templates/proposals/talk_detail.html:61 #: proposals/templates/proposals/talk_detail.html:60
#: proposals/templates/proposals/talk_list.html:46 #: proposals/templates/proposals/talk_list.html:47
msgid "Speakers" msgid "Speakers"
msgstr "Orateurs" msgstr "Orateurs"
#: ponyconf/templates/base.html:70 #: ponyconf/templates/base.html:80
msgid "Planning" msgid "Planning"
msgstr "" msgstr ""
#: ponyconf/templates/base.html:81 #: ponyconf/templates/base.html:91
msgid "Administration" msgid "Administration"
msgstr "Administration" msgstr "Administration"
#: ponyconf/templates/base.html:88 #: ponyconf/templates/base.html:98
msgid "Conference" msgid "Conference"
msgstr "Conférence" msgstr "Conférence"
#: ponyconf/templates/base.html:90 #: ponyconf/templates/base.html:100 volunteers/models.py:15
msgid "Participants" msgid "Participants"
msgstr "Participants" msgstr "Participants"
#: ponyconf/templates/base.html:91 #: ponyconf/templates/base.html:101
msgid "Correspondence" msgid "Correspondence"
msgstr "Correspondance" msgstr "Correspondance"
#: ponyconf/templates/base.html:100 #: ponyconf/templates/base.html:110
msgid "Register" msgid "Register"
msgstr "Sinscrire" msgstr "Sinscrire"
#: ponyconf/templates/base.html:126 #: ponyconf/templates/base.html:136
msgid "Powered by" msgid "Powered by"
msgstr "Propulsé par" msgstr "Propulsé par"
@ -449,56 +439,65 @@ msgstr "Assigner à une session"
msgid "Put in a room" msgid "Put in a room"
msgstr "Assigner à une salle" msgstr "Assigner à une salle"
#: proposals/models.py:45 proposals/models.py:68 #: proposals/models.py:46 proposals/models.py:69 volunteers/models.py:12
msgid "Name" msgid "Name"
msgstr "Nom" msgstr "Nom"
#: proposals/models.py:49 #: proposals/models.py:48 proposals/models.py:71 proposals/models.py:113
#: proposals/templates/proposals/talk_detail.html:56 volunteers/models.py:14
msgid "Description"
msgstr "Description"
#: proposals/models.py:50
msgid "Managers" msgid "Managers"
msgstr "Responsables" msgstr "Responsables"
#: proposals/models.py:71 #: proposals/models.py:72
msgid "Destination track" msgid "Destination track"
msgstr "Session de destination" msgstr "Session de destination"
#: proposals/models.py:73 #: proposals/models.py:74
msgid "Reviewers" msgid "Reviewers"
msgstr "Responsables" msgstr "Responsables"
#: proposals/models.py:89 #: proposals/models.py:90
msgid "Default duration (min)" msgid "Default duration (min)"
msgstr "Durée par défaut (min)" msgstr "Durée par défaut (min)"
#: proposals/models.py:90 #: proposals/models.py:91
msgid "Color on program" msgid "Color on program"
msgstr "Couleur sur le programme" msgstr "Couleur sur le programme"
#: proposals/models.py:109 proposals/templates/proposals/talk_list.html:44 #: proposals/models.py:110 proposals/templates/proposals/talk_list.html:45
msgid "Title" msgid "Title"
msgstr "Titre" msgstr "Titre"
#: proposals/models.py:109 #: proposals/models.py:110
msgid "After submission, title can only be changed by the staff." msgid "After submission, title can only be changed by the staff."
msgstr "" msgstr ""
"Après soumission, le titre ne peut être modifié que par léquipe " "Après soumission, le titre ne peut être modifié que par léquipe "
"dorganisation." "dorganisation."
#: proposals/models.py:113 #: proposals/models.py:112
msgid "Abstract"
msgstr "Résumé"
#: proposals/models.py:114
msgid "The topics can not be changed after submission." msgid "The topics can not be changed after submission."
msgstr "Les thèmes ne peuvent pas être modifiés après soumission." msgstr "Les thèmes ne peuvent pas être modifiés après soumission."
#: proposals/models.py:114 proposals/templates/proposals/talk_detail.html:29 #: proposals/models.py:115 proposals/templates/proposals/talk_detail.html:29
#: proposals/templates/proposals/talk_detail.html:74 #: proposals/templates/proposals/talk_detail.html:73
#: proposals/templates/proposals/talk_list.html:48 #: proposals/templates/proposals/talk_list.html:49
#: proposals/templates/proposals/track_form.html:14 #: proposals/templates/proposals/track_form.html:14
msgid "Track" msgid "Track"
msgstr "Session" msgstr "Session"
#: proposals/models.py:116 proposals/templates/proposals/talk_list.html:45 #: proposals/models.py:117 proposals/templates/proposals/talk_list.html:46
msgid "Intervention kind" msgid "Intervention kind"
msgstr "Type dintervention" msgstr "Type dintervention"
#: proposals/models.py:119 #: proposals/models.py:120
msgid "Duration (min)" msgid "Duration (min)"
msgstr "Durée (min)" msgstr "Durée (min)"
@ -528,7 +527,7 @@ msgstr "par"
#: proposals/templates/proposals/_talk_list.html:11 #: proposals/templates/proposals/_talk_list.html:11
#: proposals/templates/proposals/_talk_list.html:17 #: proposals/templates/proposals/_talk_list.html:17
#: proposals/templates/proposals/talk_list.html:66 #: proposals/templates/proposals/talk_list.html:64
msgid "and" msgid "and"
msgstr "et" msgstr "et"
@ -571,47 +570,46 @@ msgstr "Afficher les options de filtrage…"
msgid "Filter" msgid "Filter"
msgstr "Filtrer" msgstr "Filtrer"
#: proposals/templates/proposals/speaker_list.html:46 #: proposals/templates/proposals/speaker_list.html:44
#: proposals/templates/proposals/talk_list.html:41
msgid "Total:"
msgstr "Total :"
#: proposals/templates/proposals/speaker_list.html:44
msgid "speaker"
msgstr "orateur"
#: proposals/templates/proposals/speaker_list.html:48
msgid "Username" msgid "Username"
msgstr "Nom dutilisateur" msgstr "Nom dutilisateur"
#: proposals/templates/proposals/speaker_list.html:47 #: proposals/templates/proposals/speaker_list.html:49
msgid "Fullname" msgid "Fullname"
msgstr "Prénom et nom" msgstr "Prénom et nom"
#: proposals/templates/proposals/speaker_list.html:48 #: proposals/templates/proposals/speaker_list.html:50
msgid "Talk count" msgid "Talk count"
msgstr "Nombre dexposé" msgstr "Nombre dexposé"
#: proposals/templates/proposals/speaker_list.html:49 #: proposals/templates/proposals/speaker_list.html:51
msgctxt "table column title" msgctxt "table column title"
msgid "Need transport?" msgid "Need transport?"
msgstr "Transport ?" msgstr "Transport ?"
#: proposals/templates/proposals/speaker_list.html:50 #: proposals/templates/proposals/speaker_list.html:52
msgctxt "table column title" msgctxt "table column title"
msgid "Need accommodation?" msgid "Need accommodation?"
msgstr "Hébergement ?" msgstr "Hébergement ?"
#: proposals/templates/proposals/speaker_list.html:51 #: proposals/templates/proposals/speaker_list.html:53
msgid "Need sound?" msgid "Need sound?"
msgstr "Son ?" msgstr "Son ?"
#: proposals/templates/proposals/speaker_list.html:90 #: proposals/templates/proposals/speaker_list.html:92
#: proposals/templates/proposals/user_details.html:9 #: proposals/templates/proposals/user_details.html:9
msgid "Contact" msgid "Contact"
msgstr "Contacter" msgstr "Contacter"
#: proposals/templates/proposals/speaker_list.html:100
#: proposals/templates/proposals/talk_list.html:56
#: proposals/templates/proposals/talk_list.html:92
msgid "Total:"
msgstr "Total :"
#: proposals/templates/proposals/speaker_list.html:100
msgid "speaker"
msgstr "orateur"
#: proposals/templates/proposals/talk_decide.html:9 #: proposals/templates/proposals/talk_decide.html:9
msgid "Are you sure to accept this proposals?" msgid "Are you sure to accept this proposals?"
msgstr "Êtes-vous sûr daccepter cette propositon dintervention ?" msgstr "Êtes-vous sûr daccepter cette propositon dintervention ?"
@ -663,14 +661,8 @@ msgid "No abstract provided."
msgstr "Aucun résumé fourni." msgstr "Aucun résumé fourni."
#: proposals/templates/proposals/talk_detail.html:20 #: proposals/templates/proposals/talk_detail.html:20
#, fuzzy
#| msgid "Format:"
msgid "Format" msgid "Format"
msgstr "Format :" msgstr "Format"
#: proposals/templates/proposals/talk_detail.html:22
msgid "Topics:"
msgstr "Thèmes :"
#: proposals/templates/proposals/talk_detail.html:26 #: proposals/templates/proposals/talk_detail.html:26
#: proposals/templates/proposals/topic_list.html:31 #: proposals/templates/proposals/topic_list.html:31
@ -678,78 +670,78 @@ msgid "No topics."
msgstr "Aucun thème." msgstr "Aucun thème."
#: proposals/templates/proposals/talk_detail.html:33 #: proposals/templates/proposals/talk_detail.html:33
#: proposals/templates/proposals/talk_detail.html:75 #: proposals/templates/proposals/talk_detail.html:74
msgid "No assigned yet." msgid "No assigned yet."
msgstr "Pas encore assigné." msgstr "Pas encore assigné."
#: proposals/templates/proposals/talk_detail.html:41 #: proposals/templates/proposals/talk_detail.html:40
#: proposals/templates/proposals/talk_detail.html:49 #: proposals/templates/proposals/talk_detail.html:48
msgid "not defined" msgid "not defined"
msgstr "non défini" msgstr "non défini"
#: proposals/templates/proposals/talk_detail.html:59 #: proposals/templates/proposals/talk_detail.html:58
msgid "No description provided." msgid "No description provided."
msgstr "Aucune description fournie." msgstr "Aucune description fournie."
#: proposals/templates/proposals/talk_detail.html:79 #: proposals/templates/proposals/talk_detail.html:67
msgid "No speakers."
msgstr "Aucun orateur."
#: proposals/templates/proposals/talk_detail.html:78
msgid "Assign to" msgid "Assign to"
msgstr "Assigner à" msgstr "Assigner à"
#: proposals/templates/proposals/talk_detail.html:89 #: proposals/templates/proposals/talk_detail.html:88
msgid "No notes." msgid "No notes."
msgstr "Aucune note." msgstr "Aucune note."
#: proposals/templates/proposals/talk_detail.html:93 #: proposals/templates/proposals/talk_detail.html:92
msgid "Moderation" msgid "Moderation"
msgstr "Modération" msgstr "Modération"
#: proposals/templates/proposals/talk_detail.html:95 #: proposals/templates/proposals/talk_detail.html:94
#: proposals/templates/proposals/talk_list.html:49 #: proposals/templates/proposals/talk_list.html:50
msgid "Status" msgid "Status"
msgstr "Statut" msgstr "Statut"
#: proposals/templates/proposals/talk_detail.html:100 #: proposals/templates/proposals/talk_detail.html:99
#, fuzzy
#| msgid "Vote:"
msgid "Vote" msgid "Vote"
msgstr "Vote :" msgstr "Vote"
#: proposals/templates/proposals/talk_detail.html:109 #: proposals/templates/proposals/talk_detail.html:108
msgid "vote" msgid "vote"
msgstr "vote" msgstr "vote"
#: proposals/templates/proposals/talk_detail.html:109 #: proposals/templates/proposals/talk_detail.html:108
msgid "average:" msgid "average:"
msgstr "moyenne :" msgstr "moyenne :"
#: proposals/templates/proposals/talk_detail.html:115 #: proposals/templates/proposals/talk_detail.html:114
#, fuzzy
#| msgid "Messages:"
msgid "Messages" msgid "Messages"
msgstr "Messages :" msgstr "Messages"
#: proposals/templates/proposals/talk_detail.html:116 #: proposals/templates/proposals/talk_detail.html:115
msgid "These messages are for organization team only." msgid "These messages are for organization team only."
msgstr "Ces messages sont à destination de la team dorganisation seulement." msgstr "Ces messages sont à destination de la team dorganisation seulement."
#: proposals/templates/proposals/talk_list.html:78 #: proposals/templates/proposals/talk_list.html:76
msgid "Accepted" msgid "Accepted"
msgstr "Accepté" msgstr "Accepté"
#: proposals/templates/proposals/talk_list.html:80 #: proposals/templates/proposals/talk_list.html:78
msgid "Declined" msgid "Declined"
msgstr "Décliné" msgstr "Décliné"
#: proposals/templates/proposals/talk_list.html:82 #: proposals/templates/proposals/talk_list.html:80
#, python-format #, python-format
msgid "Pending, score: %(score)s" msgid "Pending, score: %(score)s"
msgstr "En cours, score : %(score)s" msgstr "En cours, score : %(score)s"
#: proposals/templates/proposals/talk_list.html:100 #: proposals/templates/proposals/talk_list.html:93
msgid "For selected talks:" msgid "For selected talks:"
msgstr "Pour les exposés sélectionnés :" msgstr "Pour les exposés sélectionnés :"
#: proposals/templates/proposals/talk_list.html:108 #: proposals/templates/proposals/talk_list.html:101
msgid "Apply" msgid "Apply"
msgstr "Appliquer" msgstr "Appliquer"
@ -825,44 +817,40 @@ msgstr "Accepte dêtre enregistré en vidéo :"
msgid "Video licence:" msgid "Video licence:"
msgstr "Licence vidéo :" msgstr "Licence vidéo :"
#: proposals/views.py:213 #: proposals/views.py:214
msgid "Talk modified successfully!" msgid "Talk modified successfully!"
msgstr "Exposé modifié avec succès !" msgstr "Exposé modifié avec succès !"
#: proposals/views.py:219 #: proposals/views.py:220
msgid "Talk proposed successfully!" msgid "Talk proposed successfully!"
msgstr "Exposé proposé avec succès !" msgstr "Exposé proposé avec succès !"
#: proposals/views.py:234 #: proposals/views.py:235
msgid "Talk assigned to track successfully!" msgid "Talk assigned to track successfully!"
msgstr "Exposé assigné à la session avec succès !" msgstr "Exposé assigné à la session avec succès !"
#: proposals/views.py:303 #: proposals/views.py:304
msgid "Vote successfully created" msgid "Vote successfully created"
msgstr "A voté !" msgstr "A voté !"
#: proposals/views.py:303 #: proposals/views.py:304
msgid "Vote successfully updated" msgid "Vote successfully updated"
msgstr "Vote mis à jour" msgstr "Vote mis à jour"
#: proposals/views.py:329 #: proposals/views.py:330
msgid "Decision taken in account" msgid "Decision taken in account"
msgstr "Décision enregistrée" msgstr "Décision enregistrée"
#~ msgid "Abstract:" #: volunteers/templates/volunteers/participate.html:19
#~ msgstr "Résumé :" msgid "Sorry, I have a setback"
msgstr "Désolé, jai un contretemps"
#~ msgid "Description:" #: volunteers/templates/volunteers/participate.html:21
#~ msgstr "Description :" msgid "I will be happy to help on that!"
msgstr "Je serai heureux daider à cela !"
#~ msgid "Speakers:" #: volunteers/templates/volunteers/participate.html:28
#~ msgstr "Orateurs :" msgid "We are not yet looking for volunteers … come back later!"
msgstr ""
#~ msgid "Track:" "Nous ne sommes pas encore en recherche de bénévoles … mais revenez plus "
#~ msgstr "Session :" "tard !"
#~ msgid "Notes:"
#~ msgstr "Notes :"
#~ msgid "Status:"
#~ msgstr "Statut :"

View File

@ -43,7 +43,17 @@
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li{% block hometab %}{% endblock %}><a href="{% url 'home' %}">{% trans "Home" %}</a></li> <li{% block hometab %}{% endblock %}><a href="{% url 'home' %}">{% trans "Home" %}</a></li>
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<li{% block participatetab %}{% endblock %}><a href="{% url 'participate' %}">{% trans "Participate" %}</a></li> <li class="dropdown{% block participatetab %}{% endblock %}">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-th"></span>&nbsp;{% trans "Participate" %}&nbsp;<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="{% url 'participate-as-speaker' %}"><span class="glyphicon glyphicon-bullhorn"></span>&nbsp;{% trans "Propose an intervention" %}</a>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" href="{% url 'participate-as-volunteer' %}"><span class="glyphicon glyphicon-thumbs-up"></span>&nbsp;{% trans "Enrole as volunteer" %}</a>
</li>
</ul>
</li>
<li{% block topictab %}{% endblock %}><a href="{% url 'list-topics' %}">{% trans "Topics" %}</a></li> <li{% block topictab %}{% endblock %}><a href="{% url 'list-topics' %}">{% trans "Topics" %}</a></li>
{% if request|staff %} {% if request|staff %}
<li{% block tracktab %}{% endblock %}><a href="{% url 'list-tracks' %}">{% trans "Tracks" %}</a></li> <li{% block tracktab %}{% endblock %}><a href="{% url 'list-tracks' %}">{% trans "Tracks" %}</a></li>

View File

@ -24,5 +24,6 @@ urlpatterns = [
url(r'', include('proposals.urls')), url(r'', include('proposals.urls')),
url(r'^conversations/', include('conversations.urls')), url(r'^conversations/', include('conversations.urls')),
url(r'^planning/', include('planning.urls')), url(r'^planning/', include('planning.urls')),
url(r'^volunteers/', include('volunteers.urls')),
url(r'^select2/', include('django_select2.urls')), url(r'^select2/', include('django_select2.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

View File

@ -6,7 +6,7 @@ urlpatterns = [
url(r'^markdown/$', views.markdown_preview, name='markdown'), url(r'^markdown/$', views.markdown_preview, name='markdown'),
url(r'^$', views.home, name='home'), url(r'^$', views.home, name='home'),
url(r'^conference/$', views.conference, name='conference'), url(r'^conference/$', views.conference, name='conference'),
url(r'^participate/$', views.participate, name='participate'), url(r'^talk/propose/$', views.participate, name='participate-as-speaker'),
url(r'^talk/$', views.talk_list, name='list-talks'), url(r'^talk/$', views.talk_list, name='list-talks'),
url(r'^talk/add/$', views.talk_edit, name='add-talk'), url(r'^talk/add/$', views.talk_edit, name='add-talk'),
url(r'^talk/edit/(?P<talk>[-\w]+)$', views.talk_edit, name='edit-talk'), url(r'^talk/edit/(?P<talk>[-\w]+)$', views.talk_edit, name='edit-talk'),

9
volunteers/forms.py Normal file
View File

@ -0,0 +1,9 @@
from django import forms
from .models import Activity
class ActivityForm(forms.ModelForm):
class Meta:
model = Activity
fields=['name', 'description', 'participants']

View File

@ -1,7 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-10-19 21:17 # Generated by Django 1.10.1 on 2016-10-21 22:12
from __future__ import unicode_literals from __future__ import unicode_literals
import autoslug.fields
from django.conf import settings from django.conf import settings
from django.db import migrations, models from django.db import migrations, models
import django.db.models.deletion import django.db.models.deletion
@ -12,8 +13,8 @@ class Migration(migrations.Migration):
initial = True initial = True
dependencies = [ dependencies = [
('sites', '0002_alter_domain_unique'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL), migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('sites', '0002_alter_domain_unique'),
] ]
operations = [ operations = [
@ -22,6 +23,7 @@ class Migration(migrations.Migration):
fields=[ fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=256, verbose_name='Name')), ('name', models.CharField(max_length=256, verbose_name='Name')),
('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name')),
('description', models.TextField(blank=True, verbose_name='Description')), ('description', models.TextField(blank=True, verbose_name='Description')),
('participants', models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL, verbose_name='Participants')), ('participants', models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL, verbose_name='Participants')),
('site', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sites.Site')), ('site', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),

View File

@ -3,11 +3,14 @@ from django.contrib.sites.models import Site
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User from django.contrib.auth.models import User
from autoslug import AutoSlugField
class Activity(models.Model): class Activity(models.Model):
site = models.ForeignKey(Site, on_delete=models.CASCADE) site = models.ForeignKey(Site, on_delete=models.CASCADE)
name = models.CharField(max_length=256, verbose_name=_('Name')) name = models.CharField(max_length=256, verbose_name=_('Name'))
slug = AutoSlugField(populate_from='name')
description = models.TextField(blank=True, verbose_name=_('Description')) description = models.TextField(blank=True, verbose_name=_('Description'))
participants = models.ManyToManyField(User, blank=True, verbose_name=_('Participants')) participants = models.ManyToManyField(User, blank=True, verbose_name=_('Participants'))

View File

@ -0,0 +1,31 @@
{% extends 'base.html' %}
{% load accounts_tags i18n %}
{% block participatetab %} class="active"{% endblock %}
{% block content %}
<h1>{% trans "Enrole as volunteer" %}</h1>
{% for activity in activities %}
{% if forloop.first %}<div class="list-group">{% endif %}
<div class="list-group-item{% if request.user in activity.participants.all %} list-group-item-info{% endif %}">
<h4 clas="list-group-item-heading">{{ activity.name }}</h4>
<p class="list-group-item-text">
<p>{{ activity.description }}</p>
<p>
{% if request.user in activity.participants.all %}
<a class="btn btn-danger" href="{% url 'enrole-in-activity' slug=activity.slug %}">{% trans "Sorry, I have a setback" %}</a>
{% else %}
<a class="btn btn-primary" href="{% url 'enrole-in-activity' slug=activity.slug %}">{% trans "I will be happy to help on that!" %}</a>
{% endif %}
</p>
</p>
</div>
{% if forloop.last %}</div>{% endif %}
{% empty %}
<em>{% trans "We are not yet looking for volunteers … come back later!" %}</em>
{% endfor %}
{% endblock %}

12
volunteers/urls.py Normal file
View File

@ -0,0 +1,12 @@
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^enrole/$', views.participate, name='participate-as-volunteer'),
url(r'^activities/$', views.ActivityList.as_view(), name='list-activities'),
url(r'^activities/add/$', views.ActivityCreate.as_view(), name='add-activity'),
url(r'^activities/(?P<slug>[-\w]+)/edit/$', views.ActivityUpdate.as_view(), name='edit-activity'),
url(r'^activities/(?P<slug>[-\w]+)/enrole/$', views.participate, name='enrole-in-activity'),
]

View File

@ -1,11 +1,32 @@
from django.shortcuts import render from django.shortcuts import render, get_object_or_404, redirect
from django.contrib.sites.shortcuts import get_current_site from django.contrib.sites.shortcuts import get_current_site
from django.views.generic import CreateView, DetailView, ListView, UpdateView from django.views.generic import CreateView, DetailView, ListView, UpdateView
from django.contrib.auth.decorators import login_required
from ponyconf.mixins import OnSiteFormMixin from ponyconf.mixins import OnSiteFormMixin
from accounts.mixins import OrgaRequiredMixin, StaffRequiredMixin from accounts.mixins import OrgaRequiredMixin, StaffRequiredMixin
from .models import Activity
from .forms import ActivityForm
@login_required
def participate(request, slug=None):
if slug:
# TODO: enrole action should be done on post (with bootstrap modal confirmation box?)
activity = get_object_or_404(Activity, site=get_current_site(request), slug=slug)
if request.user in activity.participants.all():
activity.participants.remove(request.user)
else:
activity.participants.add(request.user)
activity.save()
return redirect('participate-as-volunteer')
activities = Activity.objects.filter(site=get_current_site(request))
return render(request, 'volunteers/participate.html', {
'activities': activities,
})
class ActivityMixin(object): class ActivityMixin(object):
@ -17,17 +38,17 @@ class ActivityFormMixin(OnSiteFormMixin):
form_class = ActivityForm form_class = ActivityForm
class ActivityList(StaffRequiredMixin, RoomMixin, ListView): class ActivityList(StaffRequiredMixin, ActivityMixin, ListView):
pass pass
class ActivityCreate(OrgaRequiredMixin, RoomMixin, RoomFormMixin, CreateView): class ActivityCreate(OrgaRequiredMixin, ActivityMixin, ActivityFormMixin, CreateView):
model = Activity model = Activity
class ActivityUpdate(OrgaRequiredMixin, RoomMixin, RoomFormMixin, UpdateView): class ActivityUpdate(OrgaRequiredMixin, ActivityMixin, ActivityFormMixin, UpdateView):
pass pass
class ActivityDetail(StaffRequiredMixin, RoomMixin, DetailView): class ActivityDetail(StaffRequiredMixin, ActivityMixin, DetailView):
pass pass