]> git.parisson.com Git - teleforma.git/commitdiff
locales
authorGuillaume Pellerin <yomguy@parisson.com>
Fri, 13 Jun 2014 00:59:13 +0000 (02:59 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Fri, 13 Jun 2014 00:59:13 +0000 (02:59 +0200)
teleforma/exam/templates/exam/script_detail.html
teleforma/exam/templates/exam/scripts.html
teleforma/exam/views.py
teleforma/locale/fr/LC_MESSAGES/django.mo
teleforma/locale/fr/LC_MESSAGES/django.po

index d46dde5b9defe1562c2b0f6c5630f96043014378..15597b6eee4b0b6485f9d6e9a0ddba05ef4af5c0 100644 (file)
         {% if not field.html_name in mark_fields %}
             <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
         {% else %}
-            <tr><td class="error">{{ field.errors }}</td></tr>
-            <td>{{ field.label_tag }}:</td><td> {{ field }}</td>
+               {% if field.html_name == 'score' %}
+             <td>{{ field.label_tag }}:</td><td> {{ field }}/20</td>
+            {% else %}
+             <td>{{ field.label_tag }}:</td><td> {{ field }}</td>
+               {% endif %}    
+           
         {% endif %}
         </tr>
        {% endfor %}
        </table>
     </form>
     <br />
-    <a href="#" id="validate_button" class="component_icon button icon_ok">{% trans "Validate" %}</a>
-
+    <center>
+    <a href="#" id="validate_button" class="component_icon button icon_ok">{% trans "Scoring" %}</a>
+    </center>
+    <br /><br />
 </div>
 
 <div id="dialog_reject" title="{% trans "Reject" %}">
             <td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
         {% else %}
             <tr><td class="error">{{ field.errors }}</td></tr>
-            <td>{{ field.label_tag }}:</td><td> {{ field }}</td>
+            <td>{{ field.label_tag }}:</td><td> {{ field }}</td> 
         {% endif %}
         </tr>
        {% endfor %}
        </table>
     </form>
     <br />
-        <a href="#" id="reject_button" class="component_icon button icon_delete">{% trans "Reject" %}</a>
+    <center>
+     <a href="#" id="reject_button" class="component_icon button icon_delete">{% trans "Reject" %}</a>
+    </center>
+    <br /><br />
 </div>
 
 
index 3b8b7173a65582284df8902743ddd20edfb13e6c..e0a7130ed7bc02b8fe4dab8ac740388e70622942 100644 (file)
@@ -32,7 +32,7 @@
 
 {% block module-action %}
 <div class="module_action">
-<a href="{% url teleforma-exam-script-create perdiod.id %}" class="component_icon button" id="action_green">{% trans "New script" %}</a>
+<a href="{% url teleforma-exam-script-create period.id %}" class="component_icon button" id="action_green">{% trans "New script" %}</a>
 </div>
 {% endblock module-action %}
 
@@ -48,7 +48,7 @@
 {% endif %}
 
 {% block answers %}
-<div class="course_title">{% trans "Scripts" %}</div>
+<div class="course_title">{{ title }}</div>
 <br />
  {% if object_list %}
   {% include "exam/inc/script_list.html" %}
index 7960decdc496a554839346ef1bd432c28da7d7da..cd009ed19af8050e3e99275959f9d11c703bb5e1 100644 (file)
@@ -24,9 +24,9 @@ class ScriptView(CourseAccessMixin, UpdateView):
         context['reject_fields'] = ['reject_reason' ]
 
         access = self.request.user == script.author or \
-                               self.request.user == script.corrector or \
-                               self.request.user.is_superuser or \
-                                self.request.user.is_staff
+                    self.request.user == script.corrector or \
+                    self.request.user.is_superuser or \
+                     self.request.user.is_staff
 
         if not access:
             context['access_error'] = access_error
@@ -44,8 +44,8 @@ class ScriptsView(ListView):
     template_name='exam/scripts.html'
 
     def get_context_data(self, **kwargs):
-       context = super(ScriptsView, self).get_context_data(**kwargs)
-       context['period'] = Period.objects.get(id=self.kwargs['period_id'])
+        context = super(ScriptsView, self).get_context_data(**kwargs)
+        context['period'] = Period.objects.get(id=self.kwargs['period_id'])
         return context
 
     @method_decorator(login_required)
@@ -56,25 +56,40 @@ class ScriptsView(ListView):
 class ScriptsPendingView(ScriptsView):
 
     def get_queryset(self):
-       user = self.request.user
-       scripts = Script.objects.filter(Q(status=3, author=user) | Q(status=3, corrector__user=user))
+        user = self.request.user
+        scripts = Script.objects.filter(Q(status=3, author=user) | Q(status=3, corrector__user=user))
         return scripts
 
+    def get_context_data(self, **kwargs):
+        context = super(ScriptsPendingView, self).get_context_data(**kwargs)
+        context['title'] = ugettext('Pending scripts')
+        return context
+
 
 class ScriptsTreatedView(ScriptsView):
 
     def get_queryset(self):
-       user = self.request.user
-       scripts = Script.objects.filter(Q(status=4, author=user) | Q(status=4, corrector__user=user))
+        user = self.request.user
+        scripts = Script.objects.filter(Q(status=4, author=user) | Q(status=4, corrector__user=user))
         return scripts
 
+    def get_context_data(self, **kwargs):
+        context = super(ScriptsTreatedView, self).get_context_data(**kwargs)
+        context['title'] = ugettext('Treated scripts')
+        return context
+
 
 class ScriptsRejectedView(ScriptsView):
 
     def get_queryset(self):
-       user = self.request.user
-       scripts = Script.objects.filter(Q(status=0, author=user) | Q(status=0, corrector__user=user))
+        user = self.request.user
+        scripts = Script.objects.filter(Q(status=0, author=user) | Q(status=0, corrector__user=user))
         return scripts
+    
+    def get_context_data(self, **kwargs):
+        context = super(ScriptsRejectedView, self).get_context_data(**kwargs)
+        context['title'] = ugettext('Rejected scripts')
+        return context
 
 
 class ScriptCreateView(CreateView):
index 8459be5df0bfc06309154bee70977f938c6f536f..14745f68d7192f6ca7bf079f18a941fe49888cd7 100644 (file)
Binary files a/teleforma/locale/fr/LC_MESSAGES/django.mo and b/teleforma/locale/fr/LC_MESSAGES/django.mo differ
index 5d5bdddfb6008a3c4f276b4b3664490dd16a1993..f51c0684185deabf77452719241c31606dffd9ba 100644 (file)
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-13 02:42+0200\n"
+"POT-Creation-Date: 2014-06-13 02:59+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: Guillaume Pellerin <yomguy@parisson.com>\n"
 "Language-Team: LANGUAGE <lists@parisson.com>\n"
@@ -218,10 +218,22 @@ msgid "Script"
 msgstr "Copie"
 
 #: exam/models.py:214 exam/templates/exam/scripts.html:21
-#: exam/templates/exam/scripts.html:51 templates/telemeta/base.html:116
+#: templates/telemeta/base.html:116
 msgid "Scripts"
 msgstr "Copies"
 
+#: exam/views.py:65
+msgid "Pending scripts"
+msgstr "Copies en attente"
+
+#: exam/views.py:78
+msgid "Treated scripts"
+msgstr "Copie traitées"
+
+#: exam/views.py:91
+msgid "Rejected scripts"
+msgstr "Copies rejetées"
+
 #: exam/templates/exam/script_detail.html:85
 #: exam/templates/exam/inc/script_list.html:15 models/core.py:503
 #: templates/teleforma/course.html:50
@@ -252,12 +264,13 @@ msgid "Rejected"
 msgstr "Rejeté"
 
 #: exam/templates/exam/script_detail.html:96
+#: exam/templates/exam/script_detail.html:133
 msgid "Scoring"
 msgstr "Noter"
 
 #: exam/templates/exam/script_detail.html:97
-#: exam/templates/exam/script_detail.html:132
-#: exam/templates/exam/script_detail.html:149
+#: exam/templates/exam/script_detail.html:138
+#: exam/templates/exam/script_detail.html:156
 msgid "Reject"
 msgstr "Rejeter"
 
@@ -269,10 +282,6 @@ msgstr "Soumise"
 msgid "Mark"
 msgstr "Note"
 
-#: exam/templates/exam/script_detail.html:128
-msgid "Validate"
-msgstr "Validée"
-
 #: exam/templates/exam/script_form.html:25 exam/templates/exam/scripts.html:35
 msgid "New script"
 msgstr "Nouvelle copie"
@@ -291,7 +300,7 @@ msgstr "En attente"
 
 #: exam/templates/exam/scripts.html:26
 msgid "Treated"
-msgstr "Traîtées"
+msgstr "Traitées"
 
 #: exam/templates/exam/scripts.html:56
 msgid "No scripts"
@@ -1441,6 +1450,9 @@ msgstr ""
 msgid "A new live conference has started : "
 msgstr "Une nouvelle conférence en direct a commencé : "
 
+#~ msgid "Validate"
+#~ msgstr "Validée"
+
 #, fuzzy
 #~ msgid "Score : "
 #~ msgstr "Note"