]> git.parisson.com Git - teleforma.git/commitdiff
add knowledge validation testimonial
authorGuillaume Pellerin <yomguy@parisson.com>
Wed, 12 Jun 2013 11:09:29 +0000 (13:09 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Wed, 12 Jun 2013 11:09:29 +0000 (13:09 +0200)
teleforma/locale/fr/LC_MESSAGES/django.mo
teleforma/locale/fr/LC_MESSAGES/django.po
teleforma/templates/teleforma/seminar_testimonial_knowledge.html [new file with mode: 0644]
teleforma/templates/teleforma/seminar_testimonial_payback.html
teleforma/templates/teleforma/seminar_testimonial_presence.html [deleted file]
teleforma/templates/teleforma/testimonials.html
teleforma/templatetags/teleforma_tags.py
teleforma/urls.py
teleforma/views/pro.py

index 2fe435a999095db88ab65297317332c6d9582611..6dca9a69825870e1ea4f8ccd101facb0c3e0e92c 100644 (file)
Binary files a/teleforma/locale/fr/LC_MESSAGES/django.mo and b/teleforma/locale/fr/LC_MESSAGES/django.mo differ
index 684add6fe30158e6361403e25ae11f2bc3a33e64..bfc7924300cc0f13527f546ea127289d4abdd687 100644 (file)
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-06-12 12:50+0200\n"
+"POT-Creation-Date: 2013-06-12 13:08+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"
@@ -339,7 +339,7 @@ msgstr "étudiant"
 
 #: models/crfpa.py:147 models/pro.py:267
 #: templates/teleforma/seminar_testimonial.html:36
-#: templates/teleforma/seminar_testimonial_presence.html:36
+#: templates/teleforma/seminar_testimonial_knowledge.html:36
 #: templates/telemeta/profile_detail.html:80
 msgid "Address"
 msgstr "Adresse"
@@ -460,7 +460,7 @@ msgstr "date de validation"
 
 #: models/pro.py:186 templates/teleforma/answer_detail.html:45
 #: templates/teleforma/answer_form.html:115
-#: templates/teleforma/seminar_testimonial_presence.html:43
+#: templates/teleforma/seminar_testimonial_knowledge.html:43
 msgid "Answer"
 msgstr "Réponse à la consultation"
 
@@ -477,8 +477,8 @@ msgid "Testimonial template"
 msgstr "Modèle d'attestation"
 
 #: models/pro.py:249 templates/teleforma/seminar_testimonial.html:13
+#: templates/teleforma/seminar_testimonial_knowledge.html:13
 #: templates/teleforma/seminar_testimonial_payback.html:13
-#: templates/teleforma/seminar_testimonial_presence.html:13
 #: templates/teleforma/inc/testimonial_list.html:7
 #: templates/teleforma/inc/testimonial_step.html:7 views/pro.py:631
 msgid "Testimonial"
@@ -593,7 +593,7 @@ msgstr ""
 
 #: templates/postman/base_folder.html:42
 #: templates/teleforma/seminar_testimonial.html:37
-#: templates/teleforma/seminar_testimonial_presence.html:37
+#: templates/teleforma/seminar_testimonial_knowledge.html:37
 msgid "Subject"
 msgstr ""
 
@@ -978,7 +978,7 @@ msgstr "Audio"
 #: templates/teleforma/course_conference.html:70
 #: templates/teleforma/course_media.html:130
 #: templates/teleforma/seminar_testimonial.html:38
-#: templates/teleforma/seminar_testimonial_presence.html:38
+#: templates/teleforma/seminar_testimonial_knowledge.html:38
 msgid "Course"
 msgstr "Matière"
 
@@ -1176,12 +1176,12 @@ msgid "Training testimonial"
 msgstr "Attestation de formation"
 
 #: templates/teleforma/seminar_testimonial.html:34
-#: templates/teleforma/seminar_testimonial_presence.html:34
+#: templates/teleforma/seminar_testimonial_knowledge.html:34
 msgid "Last name"
 msgstr "Nom"
 
 #: templates/teleforma/seminar_testimonial.html:35
-#: templates/teleforma/seminar_testimonial_presence.html:35
+#: templates/teleforma/seminar_testimonial_knowledge.html:35
 msgid "First name"
 msgstr "Prénom"
 
@@ -1190,51 +1190,49 @@ msgid "Training type"
 msgstr "Type de formation"
 
 #: templates/teleforma/seminar_testimonial.html:40
-#: templates/teleforma/seminar_testimonial_presence.html:39
+#: templates/teleforma/seminar_testimonial_knowledge.html:39
 #: templates/teleforma/inc/media_package_list.html:38
 msgid "Duration"
 msgstr "Durée"
 
 #: templates/teleforma/seminar_testimonial.html:40
+#: templates/teleforma/seminar_testimonial_knowledge.html:39
 #: templates/teleforma/seminar_testimonial_payback.html:95
-#: templates/teleforma/seminar_testimonial_presence.html:39
 #: templates/teleforma/inc/seminar_description.html:12
 msgid "hours"
 msgstr "heures"
 
 #: templates/teleforma/seminar_testimonial.html:41
-#: templates/teleforma/seminar_testimonial_presence.html:41
+#: templates/teleforma/seminar_testimonial_knowledge.html:41
 msgid "Training begin date"
 msgstr "Date de début de formation"
 
 #: templates/teleforma/seminar_testimonial.html:42
-#: templates/teleforma/seminar_testimonial_presence.html:44
+#: templates/teleforma/seminar_testimonial_knowledge.html:44
 msgid "Training end date"
 msgstr "Date de fin de formation"
 
-#: templates/teleforma/seminar_testimonial_payback.html:90
-#: templates/telemeta/search_criteria.html:120
-#: templates/telemeta/search_criteria.html:139
-msgid "to"
-msgstr "au"
-
-#: templates/teleforma/seminar_testimonial_presence.html:28
+#: templates/teleforma/seminar_testimonial_knowledge.html:28
 #: templates/teleforma/testimonials.html:69
-msgid "Remote presence testimonial"
-msgstr "Attestation de suivi à distance"
+msgid "Knowledge validation testimonial"
+msgstr "Attestation de validation des acquis"
 
-#: templates/teleforma/seminar_testimonial_presence.html:40
+#: templates/teleforma/seminar_testimonial_knowledge.html:40
 msgid "Validation mode of the training"
 msgstr "Mode de validation des acquis de la formation"
 
-#: templates/teleforma/seminar_testimonial_presence.html:40
+#: templates/teleforma/seminar_testimonial_knowledge.html:40
 msgid "Reply to questions"
 msgstr "Réalisation de consultations juridiques fictives"
 
-#: templates/teleforma/seminar_testimonial_presence.html:42
+#: templates/teleforma/seminar_testimonial_knowledge.html:42
 msgid "Knowledge validation dates"
 msgstr "Date de validation des acquis"
 
+#: templates/teleforma/seminar_testimonial_payback.html:90
+msgid "until"
+msgstr "au"
+
 #: templates/teleforma/seminars.html:116
 msgid "Access"
 msgstr "Accéder"
@@ -1654,6 +1652,11 @@ msgstr ""
 msgid "Year of recording"
 msgstr ""
 
+#: templates/telemeta/search_criteria.html:120
+#: templates/telemeta/search_criteria.html:139
+msgid "to"
+msgstr ""
+
 #: templates/telemeta/search_criteria.html:132
 msgid "Year of publication"
 msgstr "année de publication"
@@ -1776,8 +1779,8 @@ msgstr "conditions de validation d'une consultation"
 msgid "You have successfully submitted your evaluation"
 msgstr "Vous avez soumis votre évaluation avec succès"
 
-#~ msgid "until"
-#~ msgstr "au"
+#~ msgid "Remote presence testimonial"
+#~ msgstr "Attestation de suivi à distance"
 
 #~ msgid "Subtitle"
 #~ msgstr "Sous-titre"
diff --git a/teleforma/templates/teleforma/seminar_testimonial_knowledge.html b/teleforma/templates/teleforma/seminar_testimonial_knowledge.html
new file mode 100644 (file)
index 0000000..8c6bac6
--- /dev/null
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+{% load i18n %}
+{% load telemeta_utils %}
+{% load teleforma_tags %}
+
+{% get_current_language as LANGUAGE_CODE %}
+{% get_available_languages as LANGUAGES %}
+<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
+
+<head>
+<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
+
+<title>{%block head_title %}{% description %} - {% trans "Testimonial" %}{% endblock %}</title>
+
+{% block stylesheets %}
+<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}teleforma/css/teleforma_pdf.css" />
+{% endblock %}
+
+{% block extra_stylesheets %}{% endblock %}
+
+</head>
+
+<body>
+{% block layout %}
+<div id="layout">
+
+<div id="header">
+    <span style="color: yellow; font-weight: bold;">&gt;</span> {% trans "Knowledge validation testimonial" %}
+</div>
+
+<div id="content">
+
+   <table class="table1">
+      <tr><td class="bold">{% trans "Last name" %} : </td><td>{{ testimonial.user.last_name|upper }}</td></tr>
+      <tr><td class="bold">{% trans "First name" %} : </td><td>{{ testimonial.user.first_name|upper }}</td></tr>
+      <tr><td class="bold">{% trans "Address" %} : </td><td>{{ testimonial.user.auditor.all.0.address }} {{ testimonial.user.auditor.all.0.postal_code }} {{ testimonial.user.auditor.all.0.city }}</td></tr>
+      <tr><td class="bold">{% trans "Subject" %} : </td><td>{{ seminar.title }}</td></tr>
+      <tr><td class="bold">{% trans "Course" %} : </td><td>{{ seminar.course }}</td></tr>
+      <tr><td class="bold">{% trans "Duration" %} : </td><td>{{ seminar.duration|hours }} {% trans "hours" %}</td></tr>
+      <tr><td class="bold">{% trans "Validation mode of the training" %} : </td><td>{% trans "Reply to questions" %}</td></tr>
+      <tr><td class="bold">{% trans "Training begin date" %} : </td><td>{{ first_revision.date|date:'j F Y' }}</td></tr>
+      <tr><td class="bold">{% trans "Knowledge validation dates" %} : </td><td></td></tr>
+      {% for answer in answers %}<tr><td style="padding-left:10px;">{% trans "Answer" %} n°{{ answer.question.rank }} : </td><td>{{ answer.date_validated|date:'j F Y' }}</td></tr>{% endfor %}
+      <tr><td class="bold">{% trans "Training end date" %} : </td><td>{% if testimonial.date_modified %}{{ testimonial.date_modified|date:'j F Y' }}{% else %}{{ testimonial.date_added|date:'j F Y' }}{% endif %}</td></tr>
+    </table>
+
+    <table class="table2">
+      <tr><td>
+        {{ seminar.course.department.address|safe }}
+      </td>
+      <td>
+        <img src="{{ seminar.course.department.signature.url }}" title="Pro-Barreau signature" alt="Pro-Barreau signature" />
+      </td></tr>
+    </table>
+
+</div>
+
+{% block footer %}
+<div id="footer">
+    Copyright &copy; {% current_year %} {{ seminar.course.department }}
+ </div>
+{% endblock %}
+
+</div>
+{% endblock layout %}
+
+</body>
+</html>
index 5747b89657296c9ba4d97ea3641ce23f46dc1203..3b9e8c9f9fab145dfa5746939c28e0d2e2fdfa97 100644 (file)
 
   @frame price-ht {
   -pdf-frame-content: price-ht;
-    top: 730px;
+    top: 729px;
     left: 377px;
   }
 
   @frame price-ttc {
   -pdf-frame-content: price-ttc;
-    top: 730px;
+    top: 729px;
     left: 477px;
   }
 
@@ -87,7 +87,7 @@
 
 
 <div id="dates">
-  {{ first_revision.date|date:'j F Y' }} {% trans "to" %} {% if testimonial.date_modified %}{{ testimonial.date_modified|date:'j F Y' }}{% else %}{{ testimonial.date_added|date:'j F Y' }}{% endif %}
+  {{ first_revision.date|date:'j F Y' }} {% trans "until" %} {% if testimonial.date_modified %}{{ testimonial.date_modified|date:'j F Y' }}{% else %}{{ testimonial.date_added|date:'j F Y' }}{% endif %}
 </div>
 
 
 
 
 <div id="price-ht">
-  {{ seminar.price }}
+  {{ seminar.price|integer }}
 </div>
 
 <div id="price-ttc">
-  {{ seminar.price }}
+  {{ seminar.price|integer }}
 </div>
 
 
diff --git a/teleforma/templates/teleforma/seminar_testimonial_presence.html b/teleforma/templates/teleforma/seminar_testimonial_presence.html
deleted file mode 100644 (file)
index ef8d254..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE html>
-{% load i18n %}
-{% load telemeta_utils %}
-{% load teleforma_tags %}
-
-{% get_current_language as LANGUAGE_CODE %}
-{% get_available_languages as LANGUAGES %}
-<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
-
-<head>
-<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
-
-<title>{%block head_title %}{% description %} - {% trans "Testimonial" %}{% endblock %}</title>
-
-{% block stylesheets %}
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}teleforma/css/teleforma_pdf.css" />
-{% endblock %}
-
-{% block extra_stylesheets %}{% endblock %}
-
-</head>
-
-<body>
-{% block layout %}
-<div id="layout">
-
-<div id="header">
-    <span style="color: yellow; font-weight: bold;">&gt;</span> {% trans "Remote presence testimonial" %}
-</div>
-
-<div id="content">
-
-   <table class="table1">
-      <tr><td class="bold">{% trans "Last name" %} : </td><td>{{ testimonial.user.last_name|upper }}</td></tr>
-      <tr><td class="bold">{% trans "First name" %} : </td><td>{{ testimonial.user.first_name|upper }}</td></tr>
-      <tr><td class="bold">{% trans "Address" %} : </td><td>{{ testimonial.user.auditor.all.0.address }} {{ testimonial.user.auditor.all.0.postal_code }} {{ testimonial.user.auditor.all.0.city }}</td></tr>
-      <tr><td class="bold">{% trans "Subject" %} : </td><td>{{ seminar.title }}</td></tr>
-      <tr><td class="bold">{% trans "Course" %} : </td><td>{{ seminar.course }}</td></tr>
-      <tr><td class="bold">{% trans "Duration" %} : </td><td>{{ seminar.duration|hours }} {% trans "hours" %}</td></tr>
-      <tr><td class="bold">{% trans "Validation mode of the training" %} : </td><td>{% trans "Reply to questions" %}</td></tr>
-      <tr><td class="bold">{% trans "Training begin date" %} : </td><td>{{ first_revision.date|date:'j F Y' }}</td></tr>
-      <tr><td class="bold">{% trans "Knowledge validation dates" %} : </td><td></td></tr>
-      {% for answer in answers %}<tr><td style="padding-left:10px;">{% trans "Answer" %} n°{{ answer.question.rank }} : </td><td>{{ answer.date_validated|date:'j F Y' }}</td></tr>{% endfor %}
-      <tr><td class="bold">{% trans "Training end date" %} : </td><td>{% if testimonial.date_modified %}{{ testimonial.date_modified|date:'j F Y' }}{% else %}{{ testimonial.date_added|date:'j F Y' }}{% endif %}</td></tr>
-    </table>
-
-    <table class="table2">
-      <tr><td>
-        {{ seminar.course.department.address|safe }}
-      </td>
-      <td>
-        <img src="{{ seminar.course.department.signature.url }}" title="Pro-Barreau signature" alt="Pro-Barreau signature" />
-      </td></tr>
-    </table>
-
-</div>
-
-{% block footer %}
-<div id="footer">
-    Copyright &copy; {% current_year %} {{ seminar.course.department }}
- </div>
-{% endblock %}
-
-</div>
-{% endblock layout %}
-
-</body>
-</html>
index 663e247db4dee712913f3b0a41c8b3ea27b6280f..af766716aec0222cabbef0eefa98055f69f04b03 100644 (file)
@@ -66,9 +66,9 @@
     </tr>
 
     <tr>
-     <td><a href="{% url teleforma-seminar-testimonial-presence testimonial.seminar.id %}?format=pdf" target="_blank"><img src="{{ STATIC_URL }}/teleforma/images/application-msword.png" style="vertical-align:middle" alt="" /> {% trans "Remote presence testimonial" %}</a></td>
+     <td><a href="{% url teleforma-seminar-testimonial-knowledge testimonial.seminar.id %}?format=pdf" target="_blank"><img src="{{ STATIC_URL }}/teleforma/images/application-msword.png" style="vertical-align:middle" alt="" /> {% trans "Knowledge validation testimonial" %}</a></td>
      <td>{% trans "validated on" %} {{ testimonial.date_added }}</td>
-     <td><a href="{% url teleforma-seminar-testimonial-presence testimonial.seminar.id %}?format=pdf" target="_blank"><img src="{{ STATIC_URL }}teleforma/images/download.png" style="vertical-align:middle" alt="" title="{% trans "Download" %}" /></a></td>
+     <td><a href="{% url teleforma-seminar-testimonial-knowledge testimonial.seminar.id %}?format=pdf" target="_blank"><img src="{{ STATIC_URL }}teleforma/images/download.png" style="vertical-align:middle" alt="" title="{% trans "Download" %}" /></a></td>
     </tr>
 
     <tr>
index c43c99fec60474926f1fb759fcd0cf91e1457ac0..d3ff6bb4fc793a056e6df4994a8d759b166cd7fc 100644 (file)
@@ -311,3 +311,7 @@ def untreated_answer_count():
         return ' (' + str(len(answers)) + ')'
     else:
         return ''
+
+@register.filter
+def integer(value):
+    return int(value)
\ No newline at end of file
index 8bea98a5bf5e448f3af62baa11b82f774574ae25..b4e87353f7314126a60dcc16c4fe03771a6917e9 100644 (file)
@@ -111,8 +111,8 @@ urlpatterns = patterns('',
                                                     name="teleforma-seminar-testimonial-download"),
     url(r'^desk/testimonials/$', TestimonialListView.as_view(),
                                                     name="teleforma-testimonials"),
-    url(r'^desk/seminars/(?P<pk>.*)/testimonial-presence/$', TestimonialPresenceView.as_view(),
-                                                    name="teleforma-seminar-testimonial-presence"),
+    url(r'^desk/seminars/(?P<pk>.*)/testimonial-knowledge/$', TestimonialKnowledgeView.as_view(),
+                                                    name="teleforma-seminar-testimonial-knowledge"),
     url(r'^desk/seminars/(?P<pk>.*)/testimonial-payback/$', TestimonialPaybackView.as_view(),
                                                     name="teleforma-seminar-testimonial-payback"),
 
index d5300b86ecef32343c22f325dee3599858684b08..f97c9255f086bec58b783dd63b147360e0220c4d 100644 (file)
@@ -655,13 +655,13 @@ class TestimonialListView(ListView):
         return super(TestimonialListView, self).dispatch(*args, **kwargs)
 
 
-class TestimonialPresenceView(TestimonialView):
+class TestimonialKnowledgeView(TestimonialView):
 
-    template_name = 'teleforma/seminar_testimonial_presence.html'
+    template_name = 'teleforma/seminar_testimonial_knowledge.html'
     pdf_template_name = template_name
 
     def get_context_data(self, **kwargs):
-        context = super(TestimonialPresenceView, self).get_context_data(**kwargs)
+        context = super(TestimonialKnowledgeView, self).get_context_data(**kwargs)
         seminar = context['seminar']
         context['answers'] = Answer.objects.filter(question__in=seminar.question.all(),
                                                    user=self.request.user,
@@ -670,7 +670,7 @@ class TestimonialPresenceView(TestimonialView):
 
     @method_decorator(login_required)
     def dispatch(self, *args, **kwargs):
-        return super(TestimonialPresenceView, self).dispatch(*args, **kwargs)
+        return super(TestimonialKnowledgeView, self).dispatch(*args, **kwargs)
 
 
 class TestimonialPaybackView(TestimonialView):