Commit 9f1aff8c authored by Sli's avatar Sli

pedagogy: add retries on search form and make uv table clickable

parent 94bbdf37
Pipeline #1888 passed with stage
in 27 minutes and 45 seconds
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-07-07 21:37+0200\n" "POT-Creation-Date: 2019-07-07 23:44+0200\n"
"PO-Revision-Date: 2016-07-18\n" "PO-Revision-Date: 2016-07-18\n"
"Last-Translator: Skia <skia@libskia.so>\n" "Last-Translator: Skia <skia@libskia.so>\n"
"Language-Team: AE info <ae.info@utbm.fr>\n" "Language-Team: AE info <ae.info@utbm.fr>\n"
...@@ -382,7 +382,7 @@ msgstr "Compte en banque : " ...@@ -382,7 +382,7 @@ msgstr "Compte en banque : "
#: pedagogy/templates/pedagogy/guide.jinja:115 #: pedagogy/templates/pedagogy/guide.jinja:115
#: pedagogy/templates/pedagogy/moderation.jinja:18 #: pedagogy/templates/pedagogy/moderation.jinja:18
#: pedagogy/templates/pedagogy/moderation.jinja:45 #: pedagogy/templates/pedagogy/moderation.jinja:45
#: pedagogy/templates/pedagogy/uv_detail.jinja:171 #: pedagogy/templates/pedagogy/uv_detail.jinja:172
#: sas/templates/sas/album.jinja:26 sas/templates/sas/moderation.jinja:18 #: sas/templates/sas/album.jinja:26 sas/templates/sas/moderation.jinja:18
#: sas/templates/sas/picture.jinja:74 sas/templates/sas/picture.jinja:124 #: sas/templates/sas/picture.jinja:74 sas/templates/sas/picture.jinja:124
#: stock/templates/stock/stock_shopping_list.jinja:43 #: stock/templates/stock/stock_shopping_list.jinja:43
...@@ -441,7 +441,7 @@ msgstr "Nouveau compte club" ...@@ -441,7 +441,7 @@ msgstr "Nouveau compte club"
#: pedagogy/templates/pedagogy/guide.jinja:55 #: pedagogy/templates/pedagogy/guide.jinja:55
#: pedagogy/templates/pedagogy/guide.jinja:78 #: pedagogy/templates/pedagogy/guide.jinja:78
#: pedagogy/templates/pedagogy/guide.jinja:114 #: pedagogy/templates/pedagogy/guide.jinja:114
#: pedagogy/templates/pedagogy/uv_detail.jinja:170 #: pedagogy/templates/pedagogy/uv_detail.jinja:171
#: sas/templates/sas/album.jinja:18 sas/templates/sas/picture.jinja:100 #: sas/templates/sas/album.jinja:18 sas/templates/sas/picture.jinja:100
#: trombi/templates/trombi/detail.jinja:9 #: trombi/templates/trombi/detail.jinja:9
#: trombi/templates/trombi/edit_profile.jinja:34 #: trombi/templates/trombi/edit_profile.jinja:34
...@@ -673,7 +673,7 @@ msgstr "Effectuées" ...@@ -673,7 +673,7 @@ msgstr "Effectuées"
#: counter/templates/counter/cash_summary_list.jinja:37 counter/views.py:1162 #: counter/templates/counter/cash_summary_list.jinja:37 counter/views.py:1162
#: pedagogy/templates/pedagogy/moderation.jinja:16 #: pedagogy/templates/pedagogy/moderation.jinja:16
#: pedagogy/templates/pedagogy/moderation.jinja:43 #: pedagogy/templates/pedagogy/moderation.jinja:43
#: pedagogy/templates/pedagogy/uv_detail.jinja:131 #: pedagogy/templates/pedagogy/uv_detail.jinja:132
#: trombi/templates/trombi/comment.jinja:4 #: trombi/templates/trombi/comment.jinja:4
#: trombi/templates/trombi/comment.jinja:8 #: trombi/templates/trombi/comment.jinja:8
#: trombi/templates/trombi/user_tools.jinja:50 #: trombi/templates/trombi/user_tools.jinja:50
...@@ -4870,8 +4870,8 @@ msgstr "heures TE" ...@@ -4870,8 +4870,8 @@ msgstr "heures TE"
msgid "uv" msgid "uv"
msgstr "uv" msgstr "uv"
#: pedagogy/models.py:229 pedagogy/templates/pedagogy/uv_detail.jinja:55 #: pedagogy/models.py:229 pedagogy/templates/pedagogy/uv_detail.jinja:56
#: pedagogy/templates/pedagogy/uv_detail.jinja:143 #: pedagogy/templates/pedagogy/uv_detail.jinja:144
msgid "global grade" msgid "global grade"
msgstr "note globale" msgstr "note globale"
...@@ -4986,6 +4986,10 @@ msgstr "Département" ...@@ -4986,6 +4986,10 @@ msgstr "Département"
msgid "Credit type" msgid "Credit type"
msgstr "Type de crédit" msgstr "Type de crédit"
#: pedagogy/templates/pedagogy/guide.jinja:204
msgid "Error connecting to the server"
msgstr "Erreur lors de la connection au serveur"
#: pedagogy/templates/pedagogy/macros.jinja:13 #: pedagogy/templates/pedagogy/macros.jinja:13
msgid " not rated " msgid " not rated "
msgstr "non noté" msgstr "non noté"
...@@ -5011,83 +5015,83 @@ msgstr "Supprimer signalement" ...@@ -5011,83 +5015,83 @@ msgstr "Supprimer signalement"
msgid "UV Details" msgid "UV Details"
msgstr "Détails d'UV" msgstr "Détails d'UV"
#: pedagogy/templates/pedagogy/uv_detail.jinja:35 #: pedagogy/templates/pedagogy/uv_detail.jinja:26
msgid "CM: " msgid "CM: "
msgstr "CM : " msgstr "CM : "
#: pedagogy/templates/pedagogy/uv_detail.jinja:38 #: pedagogy/templates/pedagogy/uv_detail.jinja:29
msgid "TD: " msgid "TD: "
msgstr "TD : " msgstr "TD : "
#: pedagogy/templates/pedagogy/uv_detail.jinja:41 #: pedagogy/templates/pedagogy/uv_detail.jinja:32
msgid "TP: " msgid "TP: "
msgstr "TP : " msgstr "TP : "
#: pedagogy/templates/pedagogy/uv_detail.jinja:44 #: pedagogy/templates/pedagogy/uv_detail.jinja:35
msgid "TE: " msgid "TE: "
msgstr "TE : " msgstr "TE : "
#: pedagogy/templates/pedagogy/uv_detail.jinja:47 #: pedagogy/templates/pedagogy/uv_detail.jinja:38
msgid "THE: " msgid "THE: "
msgstr "THE : " msgstr "THE : "
#: pedagogy/templates/pedagogy/uv_detail.jinja:56 #: pedagogy/templates/pedagogy/uv_detail.jinja:57
#: pedagogy/templates/pedagogy/uv_detail.jinja:144 #: pedagogy/templates/pedagogy/uv_detail.jinja:145
msgid "utility" msgid "utility"
msgstr "utilité" msgstr "utilité"
#: pedagogy/templates/pedagogy/uv_detail.jinja:57 #: pedagogy/templates/pedagogy/uv_detail.jinja:58
#: pedagogy/templates/pedagogy/uv_detail.jinja:145 #: pedagogy/templates/pedagogy/uv_detail.jinja:146
#, fuzzy #, fuzzy
#| msgid "Counters" #| msgid "Counters"
msgid "interest" msgid "interest"
msgstr "intérêt" msgstr "intérêt"
#: pedagogy/templates/pedagogy/uv_detail.jinja:58 #: pedagogy/templates/pedagogy/uv_detail.jinja:59
#: pedagogy/templates/pedagogy/uv_detail.jinja:146 #: pedagogy/templates/pedagogy/uv_detail.jinja:147
msgid "teaching" msgid "teaching"
msgstr "enseignement" msgstr "enseignement"
#: pedagogy/templates/pedagogy/uv_detail.jinja:59 #: pedagogy/templates/pedagogy/uv_detail.jinja:60
#: pedagogy/templates/pedagogy/uv_detail.jinja:147 #: pedagogy/templates/pedagogy/uv_detail.jinja:148
msgid "work load" msgid "work load"
msgstr "charge de travail" msgstr "charge de travail"
#: pedagogy/templates/pedagogy/uv_detail.jinja:69 #: pedagogy/templates/pedagogy/uv_detail.jinja:70
msgid "Objectives" msgid "Objectives"
msgstr "Objectifs" msgstr "Objectifs"
#: pedagogy/templates/pedagogy/uv_detail.jinja:71 #: pedagogy/templates/pedagogy/uv_detail.jinja:72
msgid "Program" msgid "Program"
msgstr "Programme" msgstr "Programme"
#: pedagogy/templates/pedagogy/uv_detail.jinja:73 #: pedagogy/templates/pedagogy/uv_detail.jinja:74
msgid "Earned skills" msgid "Earned skills"
msgstr "Compétences acquises" msgstr "Compétences acquises"
#: pedagogy/templates/pedagogy/uv_detail.jinja:75 #: pedagogy/templates/pedagogy/uv_detail.jinja:76
msgid "Key concepts" msgid "Key concepts"
msgstr "Concepts clefs" msgstr "Concepts clefs"
#: pedagogy/templates/pedagogy/uv_detail.jinja:77 #: pedagogy/templates/pedagogy/uv_detail.jinja:78
msgid "UV manager: " msgid "UV manager: "
msgstr "Gestionnaire d'UV : " msgstr "Gestionnaire d'UV : "
#: pedagogy/templates/pedagogy/uv_detail.jinja:83 #: pedagogy/templates/pedagogy/uv_detail.jinja:84
msgid "Leave comment" msgid "Leave comment"
msgstr "Laisser un commentaire" msgstr "Laisser un commentaire"
#: pedagogy/templates/pedagogy/uv_detail.jinja:138 #: pedagogy/templates/pedagogy/uv_detail.jinja:139
#: stock/templates/stock/shopping_list_items.jinja:42 stock/views.py:278 #: stock/templates/stock/shopping_list_items.jinja:42 stock/views.py:278
#: trombi/templates/trombi/export.jinja:70 #: trombi/templates/trombi/export.jinja:70
msgid "Comments" msgid "Comments"
msgstr "Commentaires" msgstr "Commentaires"
#: pedagogy/templates/pedagogy/uv_detail.jinja:164 #: pedagogy/templates/pedagogy/uv_detail.jinja:165
msgid "This comment has been reported" msgid "This comment has been reported"
msgstr "Ce commentaire a été signalé" msgstr "Ce commentaire a été signalé"
#: pedagogy/templates/pedagogy/uv_detail.jinja:176 #: pedagogy/templates/pedagogy/uv_detail.jinja:177
msgid "Report this comment" msgid "Report this comment"
msgstr "Signaler ce commentaire" msgstr "Signaler ce commentaire"
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</thead> </thead>
<tbody id="dynamic_view_content"> <tbody id="dynamic_view_content">
{% for uv in object_list %} {% for uv in object_list %}
<tr> <tr onclick="window.location.href = `{{ url('pedagogy:uv_detail', uv_id=uv.id) }}`">
<td><a href="{{ url('pedagogy:uv_detail', uv_id=uv.id) }}">{{ uv.code }}</a></td> <td><a href="{{ url('pedagogy:uv_detail', uv_id=uv.id) }}">{{ uv.code }}</a></td>
<td>{{ uv.title }}</td> <td>{{ uv.title }}</td>
<td>{{ uv.department }}</td> <td>{{ uv.department }}</td>
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
spring = "<i class='fa fa-sun-o'></i>"; spring = "<i class='fa fa-sun-o'></i>";
var html = ` var html = `
<tr> <tr onclick="window.location.href = '${uv.absolute_url}';">
<td><a href="${uv.absolute_url}">${uv.code}</a></td> <td><a href="${uv.absolute_url}">${uv.code}</a></td>
<td>${uv.title}</td> <td>${uv.title}</td>
<td>${uv.department}</td> <td>${uv.department}</td>
...@@ -180,6 +180,8 @@ ...@@ -180,6 +180,8 @@
type: "GET", type: "GET",
url: "{{ url('pedagogy:guide') }}", url: "{{ url('pedagogy:guide') }}",
data: $(this).serialize(), data: $(this).serialize(),
tryCount: 0,
retryLimit: 10,
xhr: function(){ xhr: function(){
return xhr; return xhr;
}, },
...@@ -192,6 +194,15 @@ ...@@ -192,6 +194,15 @@
$("#dynamic_view_content").append(uvJSONToHTML(data[key])); $("#dynamic_view_content").append(uvJSONToHTML(data[key]));
} }
}, },
error: function(){
console.log(`try ${this.tryCount}`);
if (this.tryCount++ <= this.retryLimit){
$("dynamic_view_content").html("");
$.ajax(this);
return;
}
$("#dynamic_view_content").html("<tr><td></td><td>{% trans %}Error connecting to the server{% endtrans %}</td></tr>");
}
}); });
// Restore autumn and spring for perfect illusion // Restore autumn and spring for perfect illusion
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment