From abe904f6855d278d3a78d6de2740bb7a2c45fe9e Mon Sep 17 00:00:00 2001 From: Jailson Dias Date: Fri, 5 May 2017 22:15:13 -0300 Subject: [PATCH] colocando a tradução do tipo de ação realizada em webpage --- webpage/templates/webpages/relatorios.html | 2 +- webpage/views.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/webpage/templates/webpages/relatorios.html b/webpage/templates/webpages/relatorios.html index 17f7ced..b70d0c5 100644 --- a/webpage/templates/webpages/relatorios.html +++ b/webpage/templates/webpages/relatorios.html @@ -11,7 +11,7 @@ var array_history = []; {%for data_json in json_history.data %} - array_history.push(["{{data_json.0}}","{{data_json.1}}","{{data_json.2}}",{% if data_json.3 is not None %}new Date('{{data_json.3.isoformat}}'){% else%}null{% endif %}]); + array_history.push(["{{data_json.0}}","{{data_json.1}}","{{view}}",{% if data_json.3 is not None %}new Date('{{data_json.3.isoformat}}'){% else%}null{% endif %}]); {% endfor%} var json_history = {"data":array_history}; var column_history = [{"string":'{% trans "User" %}'},{"string":'{% trans "Group" %}'},{"string":'{% trans "Action" %}'},{"date":'{% trans "Date of Action" %}'}]; diff --git a/webpage/views.py b/webpage/views.py index 72f81f0..c090ecd 100644 --- a/webpage/views.py +++ b/webpage/views.py @@ -497,14 +497,15 @@ class StatisticsView(LoginRequiredMixin, LogMixin, generic.DetailView): context["json_n_did"] = json_n_did context["json_history"] = json_history c_visualizou = vis_ou.distinct("user_email").count() + column_view = str(_('View')) re.append([str(_('Webpage')),did,n_did]) - re.append([str(_('View')),c_visualizou, alunos.count() - c_visualizou]) + re.append([column_view,c_visualizou, alunos.count() - c_visualizou]) context['topic'] = webpage.topic context['subject'] = webpage.topic.subject context['db_data'] = re context['title_chart'] = _('Actions about resource') context['title_vAxis'] = _('Quantity') - + context['view'] = column_view context["n_did_table"] = n_did context["did_table"] = did context["history_table"] = history -- libgit2 0.21.2