]> git.parisson.com Git - teleforma.git/commitdiff
add warnings, steps module, validation messages
authoryomguy <yomguy@parisson.com>
Thu, 17 Jan 2013 14:31:58 +0000 (15:31 +0100)
committeryomguy <yomguy@parisson.com>
Thu, 17 Jan 2013 14:31:58 +0000 (15:31 +0100)
teleforma/locale/fr/LC_MESSAGES/django.mo
teleforma/locale/fr/LC_MESSAGES/django.po
teleforma/templates/teleforma/answer_form.html
teleforma/templates/teleforma/evaluation_form.html
teleforma/templates/teleforma/messages/answer_validated.txt
teleforma/templates/teleforma/messages/seminar_validated.txt
teleforma/templates/teleforma/seminar_detail.html
teleforma/templates/teleforma/seminar_media_video.html
teleforma/views/pro.py

index 8e85556fc21a90fe7391c439f67d692638dc5037..1951579d8376ea3cd9d8b9a9e10ccb61669eb878 100644 (file)
Binary files a/teleforma/locale/fr/LC_MESSAGES/django.mo and b/teleforma/locale/fr/LC_MESSAGES/django.mo differ
index 41f38da3cf678a05a742c19949a425c47720919a..5d7a12032a45ac82f354daec5f967c61dc58a881 100644 (file)
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-01-17 10:04+0100\n"
+"POT-Creation-Date: 2013-01-17 14:19+0100\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"
@@ -22,7 +22,7 @@ msgid "user"
 msgstr "utilisateur"
 
 #: models/ae.py:47 models/core.py:137 models/core.py:350 models/core.py:410
-#: models/core.py:458 models/crfpa.py:64 models/crfpa.py:109
+#: models/core.py:460 models/crfpa.py:64 models/crfpa.py:109
 msgid "period"
 msgstr "période"
 
@@ -90,11 +90,11 @@ msgstr "adresse"
 msgid "Signature image"
 msgstr ""
 
-#: models/core.py:124 models/core.py:155 models/core.py:456
+#: models/core.py:124 models/core.py:155 models/core.py:458
 msgid "department"
 msgstr "département"
 
-#: models/core.py:149 models/core.py:347 models/core.py:408 models/core.py:461
+#: models/core.py:149 models/core.py:347 models/core.py:408 models/core.py:463
 msgid "course type"
 msgstr "type de matière"
 
@@ -131,7 +131,7 @@ msgstr "magistral"
 msgid "types"
 msgstr "types"
 
-#: models/core.py:179 models/core.py:344 models/core.py:406 models/core.py:460
+#: models/core.py:179 models/core.py:344 models/core.py:406 models/core.py:462
 #: models/pro.py:65 templates/teleforma/inc/seminar_description.html:9
 msgid "course"
 msgstr "matière"
@@ -140,11 +140,11 @@ msgstr "matière"
 msgid "domain"
 msgstr "domaine"
 
-#: models/core.py:217 models/core.py:462 models/pro.py:75
+#: models/core.py:217 models/core.py:464 models/pro.py:75
 msgid "professor"
 msgstr "intervenant"
 
-#: models/core.py:231 models/core.py:466
+#: models/core.py:231 models/core.py:468
 msgid "room"
 msgstr "salle"
 
@@ -172,7 +172,7 @@ msgstr ""
 msgid "streaming server"
 msgstr "serveur de diffusion"
 
-#: models/core.py:259 models/core.py:348 models/core.py:404 models/core.py:551
+#: models/core.py:259 models/core.py:348 models/core.py:404 models/core.py:553
 msgid "conference"
 msgstr "conférence"
 
@@ -224,40 +224,40 @@ msgstr "annale"
 msgid "file"
 msgstr "fichier"
 
-#: models/core.py:358 models/core.py:416 models/core.py:472
+#: models/core.py:358 models/core.py:416 models/core.py:474
 msgid "readers"
 msgstr ""
 
-#: models/core.py:454 models/pro.py:66
+#: models/core.py:456 models/pro.py:66
 #: templates/teleforma/inc/seminar_description.html:7
 msgid "sub title"
 msgstr "sous-titre"
 
-#: models/core.py:455
+#: models/core.py:457
 msgid "public id"
 msgstr "id public"
 
-#: models/core.py:464
+#: models/core.py:466
 msgid "session"
 msgstr "session"
 
-#: models/core.py:468
+#: models/core.py:470
 msgid "comment"
 msgstr "commentaire"
 
-#: models/core.py:469
+#: models/core.py:471
 msgid "begin date"
 msgstr "date de début"
 
-#: models/core.py:470
+#: models/core.py:472
 msgid "end date"
 msgstr "date de fin"
 
-#: models/core.py:471 models/pro.py:69
+#: models/core.py:473 models/pro.py:69
 msgid "price"
 msgstr "prix"
 
-#: models/core.py:475 models/pro.py:77
+#: models/core.py:477 models/pro.py:77
 #, fuzzy
 msgid "description documents"
 msgstr "description"
@@ -455,7 +455,7 @@ msgid "Testimonial template"
 msgstr "Modèle d'attestation"
 
 #: models/pro.py:196 templates/teleforma/inc/testimonial_list.html:7
-#: templates/teleforma/inc/testimonial_step.html:7 views/pro.py:484
+#: templates/teleforma/inc/testimonial_step.html:7 views/pro.py:492
 msgid "Testimonial"
 msgstr "Attestation"
 
@@ -708,7 +708,7 @@ msgstr ""
 msgid "Reply"
 msgstr ""
 
-#: templates/postman/seminar_validated.txt:3
+#: templates/postman/seminar_validated.txt:2
 #, fuzzy
 msgid ""
 "Congratulations!\n"
@@ -1273,6 +1273,37 @@ msgstr "durée"
 msgid "hours"
 msgstr "heures"
 
+#: templates/teleforma/messages/answer_validated.txt:2
+#, fuzzy
+msgid ""
+"Congratulations!\n"
+"\n"
+"Your seminar has been completed and validated. \n"
+"You can now download the training testimonial following this link:\n"
+msgstr ""
+"Félicitations!\n"
+"\n"
+"Votre dernière consultation a été validée.\n"
+"Vous pouvez accéder à la prochaine étape de votre séminaire en suivant ce "
+"lien :\n"
+
+#: templates/teleforma/messages/seminar_validated.txt:2
+#, fuzzy, python-format
+msgid ""
+"Congratulations!\n"
+"\n"
+"Your answer has been validated.\n"
+"You can continue to the next step of your seminar following this link:\n"
+"                           \n"
+"http://%(site.name)s%(seminar_url)s\n"
+"\n"
+msgstr ""
+"Félicitations!\n"
+"\n"
+"Votre dernière consultation a été validée.\n"
+"Vous pouvez accéder à la prochaine étape de votre séminaire en suivant ce "
+"lien :\n"
+
 #: templates/telemeta/base.html:96
 msgid "Desk"
 msgstr "Bureau"
@@ -1554,15 +1585,19 @@ msgstr "Vous avez enregistré votre consultation avec succès"
 msgid "You have successfully submitted your answer"
 msgstr "Vous avez soumis votre consultation avec succès"
 
-#: views/pro.py:262
-msgid "Your answer has been validated"
-msgstr "Votre consultation a été validée"
+#: views/pro.py:270
+#, fuzzy
+msgid "Answer validated"
+msgstr "validé"
 
-#: views/pro.py:357
+#: views/pro.py:365
 #, fuzzy
 msgid "You have successfully submitted your evaluation"
 msgstr "Vous avez soumis votre évaluation avec succès"
 
+#~ msgid "Your answer has been validated"
+#~ msgstr "Votre consultation a été validée"
+
 #~ msgid "Index"
 #~ msgstr "Index"
 
index b89fd5fb5d4e2779a5ff5862f87f77a7202527be..4daacea24086688af5a7efb2100a4be459637f7a 100644 (file)
@@ -22,9 +22,10 @@ $(document).ready(function(){
     });
 
 $(document).ready(function(){
-    var b = $('#submit_button');
+    var b1 = $('#submit_button');
     var c = $('#counter')
-    b.unbind('click').click(function() {
+    b1.unbind('click').click(function() {
+        $(window).unbind('beforeunload');
         if (c.hasClass('deceed')){
           new Messi(gettext('You must reach the required number of characters.'), {buttons: [{id: 0, label: gettext('OK'), val: 'X'}], modal: true});
         }
@@ -33,8 +34,23 @@ $(document).ready(function(){
             $('#_AnswerForm').submit(); 
         }
       });
+    
+    var b2 = $('#save_button');
+    b2.unbind('click').click(function() {
+      $(window).unbind('beforeunload');
+      $('#_AnswerForm').submit();
     });
 
+    {% if status != 3 %}
+    $(window).bind('beforeunload', function(){
+      return '{% trans "You have NOT save your work!" %}';
+    });
+    {% endif  %}
+
+});
+
+$('#seminars').css({'max-height': '200px'});
+
 </script>
 {% endblock extra_javascript %}
 
@@ -68,8 +84,7 @@ $(document).ready(function(){
 
 {% if status != 3 %}
 <br />
-<a href="#" class="component_icon button icon_save"
-   onclick="document.getElementById('_AnswerForm').submit();">{% trans "Save" %}</a>
+<a href="#" id="save_button" class="component_icon button icon_save">{% trans "Save" %}</a>
 <a href="#" id="submit_button" class="component_icon button icon_ok">{% trans "Submit it" %}</a>
 {% endif %}
 
index 112d0897924f8c4c4421f47321ad5b277e9726cd..9c8ab4ca39fc26b639ff50995522d17c476e44a7 100644 (file)
   </div>  
 </div>
 
+<script type="text/javascript">
+$(window).ready(function(){
+$('#seminars').css({'max-height': '200px'});
+});
+</script>
 
 {% endblock course_content %}
 
@@ -25,3 +30,4 @@
  </div>
 </div>
 {% endblock index %}
+
index da8ce631c5454dc926d9c498bc7352f876b05ed8..55e24566ae8f5cf70c3f1535743e325dd8989334 100644 (file)
@@ -1,10 +1,9 @@
 {% load i18n %}{% load telemeta_utils %}{% load teleforma_tags %}
-{% blocktrans %}
-Congratulations!
+{% blocktrans %}Congratulations!
 
-Your answer have been validated. 
-You can now download the training testimonial following this link:
-                           
-http://{{ site.name }}{{ testimonial_url }}
+Your answer has been validated. 
+You can go to the next step of your seminar following this link:
+{% endblocktrans %}                           
+http://{{ site.name }}{{ url }}
 
-{% endblocktrans }
\ No newline at end of file
+{% organization %}
\ No newline at end of file
index 5617cf6fefcc0b1bb5d655206675ea06e0acdc7e..3d3e65d282ecec42aec1d9a64b172adbed76414b 100644 (file)
@@ -1,10 +1,9 @@
 {% load i18n %}{% load telemeta_utils %}{% load teleforma_tags %}
-{% blocktrans %}
-Congratulations!
+{% blocktrans %}Congratulations!
 
-Your answer has been validated.
-You can continue to the next step of your seminar following this link:
-                           
-http://{{ site.name }}{{ seminar_url }}
+Your seminar has been validated.                
+You can now download the training testimonial following this link:
+{% endblocktrans %}
+http://{{ site.name }}{{ url }}
 
-{% endblocktrans }
\ No newline at end of file
+{% organization %}
\ No newline at end of file
index e7b8b3f7c89b1f0e6121c2287d10b6189c36295f..b6bf2e5868087481107e592daeb4fb376aeea040 100644 (file)
@@ -129,7 +129,7 @@ $(function () {
       {% endwith %}
      {% endif %}
       
-     {% if seminar_validated %}
+     {% if seminar_validated and seminar_progress == 100 %}
        <div class="course_content">
         <div class="course_subtitle">
           <h3><img src="{{ STATIC_URL }}/telemeta/images/item_title.png" width="10px" alt="" /> {% trans "Step" %} 7 : {% trans "download your testimonial" %}</h3>
index 343310ea4b87c3f735510c7b7c5cbc70f7307ca9..676c78f5b32bb96ef76bfa64ce2c68b02fbb8094 100644 (file)
@@ -45,8 +45,7 @@ $(window).ready(function(){
         }
         );
 
-    var module = $('#seminars');
-    module.css({'max-height': '200px'});
+    $('#seminars').css({'max-height': '200px'});
 
     });
 
index 3ef141d71b9ac0c59c02c3c8feb199e6733f8c77..9896942b95b4485a942e7792c176cc549b3c5073 100644 (file)
@@ -259,20 +259,26 @@ class AnswersView(ListView):
         user = answer.user
         sender = request.user
         seminar = answer.question.seminar
+        site = Site.objects.get_current()
+
         if seminar_validated(user, seminar):
             testimonial = Testimonial(user=user, seminar=seminar)
             testimonial.save()
-            site = Site.objects.get_current()
-            seminar_url = reverse('teleforma-seminar-detail', kwargs={'pk':seminar.id})
-            ctx_dict = {'site': site, 'seminar_url': seminar_url,}
+            url = reverse('teleforma-seminar-testimonial-download', kwargs={'pk':seminar.id}) + '?format=pdf'
+            ctx_dict = {'site': site, 'url': url,}
+            subject = _('Seminar validated') + ' : ' + seminar.title
             text = render_to_string('teleforma/messages/seminar_validated.txt', ctx_dict)
-            mess = Message(sender=sender, recipient=user, 
-                           subject=_('Answer validated') + ' : ' + seminar.title,
-                           body=text)
-            mess.moderation_status = 'a'
-            mess.save()
-            notify_user(mess, 'acceptance')
-
+        else:
+            url = reverse('teleforma-seminar-detail', kwargs={'pk':seminar.id})
+            ctx_dict = {'site': site, 'url': url,}
+            text = render_to_string('teleforma/messages/answer_validated.txt', ctx_dict)
+            subject = _('Answer validated') + ' : ' + seminar.title
+
+        mess = Message(sender=sender, recipient=user, subject=subject, body=text)
+        mess.moderation_status = 'a'
+        mess.save()
+        notify_user(mess, 'acceptance')
+    
     @jsonrpc_method('teleforma.reject_answer')
     def reject(request, id):
         answer = Answer.objects.get(id=id)
@@ -462,8 +468,6 @@ class PDFTemplateResponseMixin(TemplateResponseMixin):
             context, **response_kwargs)
 
 
-
-
 class TestimonialView(PDFTemplateResponseMixin, SeminarView):
 
     model = Seminar