diff --git a/lib/classes/module/report/filter.php b/lib/classes/module/report/filter.php
index 9804458ec6..1d1bf44faa 100644
--- a/lib/classes/module/report/filter.php
+++ b/lib/classes/module/report/filter.php
@@ -17,21 +17,6 @@ class module_report_filter
private $posting_filter = array();
private $cor_query = array();
private $active_column = array();
- private $trans = array(
- 'user' => 'phraseanet::utilisateurs',
- 'ddate' => 'report:: date',
- 'ip' => 'report:: IP',
- 'appli' => 'report:: modules',
- 'fonction' => 'report::fonction',
- 'activite' => 'report::activite',
- 'pays' => 'report::pays',
- 'societe' => 'report::societe',
- 'record_id' => 'report:: record id',
- 'final' => 'phraseanet:: sous definition',
- 'coll_id' => 'report:: collections',
- 'comment' => 'report:: commentaire',
- 'search' => 'report:: question',
- );
public function __construct(Application $app, $current_filter, $correspondance)
{
@@ -69,6 +54,22 @@ class module_report_filter
public function getPostingFilter()
{
+ $trans = array(
+ 'user' => _('phraseanet::utilisateurs'),
+ 'ddate' => _('report:: date'),
+ 'ip' => _('report:: IP'),
+ 'appli' => _('report:: modules'),
+ 'fonction' => _('report::fonction'),
+ 'activite' => _('report::activite'),
+ 'pays' => _('report::pays'),
+ 'societe' => _('report::societe'),
+ 'record_id' => _('report:: record id'),
+ 'final' => _('phraseanet:: sous definition'),
+ 'coll_id' => _('report:: collections'),
+ 'comment' => _('report:: commentaire'),
+ 'search' => _('report:: question'),
+ );
+
if (sizeof($this->tab_filter) > 0) {
foreach ($this->tab_filter as $key => $filter) {
if (empty($filter['v']))
@@ -76,8 +77,8 @@ class module_report_filter
else
$value = $filter['v'];
- if (array_key_exists($filter['f'], $this->trans))
- $field = _($this->trans[$filter['f']]);
+ if (array_key_exists($filter['f'], $trans))
+ $field = _($trans[$filter['f']]);
else
$field = $filter['f'];
diff --git a/templates/web/report/ajax_dashboard_content_child.html.twig b/templates/web/report/ajax_dashboard_content_child.html.twig
index cd6ec340ba..29e49596ba 100644
--- a/templates/web/report/ajax_dashboard_content_child.html.twig
+++ b/templates/web/report/ajax_dashboard_content_child.html.twig
@@ -9,46 +9,81 @@
{% if "activity"|key_exists(item) %}
- {{ dash.table_activity("mytablehour", "report:: activite par heure", "report:: Connexion", item.activity)}}
+ {% set title1 = "report:: activite par heure" | trans %}
+ {% set title2 = "report:: Connexion" | trans %}
+ {{ dash.table_activity("mytablehour", title1, title2, item.activity)}}
{% endif %}
{% if "activity_day"|key_exists(item) %}
- {{dash.table_activity("mytabledaytotal", "report:: activite par jour" , "report:: Connexion", item.activity_day)}}
+ {% set title1 = "report:: activite par jour" | trans %}
+ {% set title2 = "report:: Connexion" | trans %}
+ {{dash.table_activity("mytabledaytotal", title1, title2, item.activity_day)}}
{%endif%}
{% if "activity_added"|key_exists(item) %}
- {{ dash.table_activity("mytableadded", "report:: activite document ajoute" , "", item.activity_added)}}
+ {% set title1 = "report:: activite document ajoute" | trans %}
+ {{ dash.table_activity("mytableadded", title1 , "", item.activity_added)}}
{%endif %}
{% if "activity_edited"|key_exists(item) %}
- {{ dash.table_activity("mytableedited", "report:: activite document edite" , "", item.activity_edited)}}
+ {% set title1 = "report:: activite document edite" | trans %}
+ {{ dash.table_activity("mytableedited", title1 , "", item.activity_edited)}}
{% endif %}
{% if "nb_conn"|key_exists(item) and "nb_dl"|key_exists(item)%}
- {{ dash.connexion_download("report:: Cumul telechargements & connexions", "report:: telechargements", "report::Connexion", item.nb_dl, item.nb_conn, dashboard.getTitleDate('dmin'),dashboard.getTitleDate('dmax'))}}
+ {% set title1 = "report:: Cumul telechargements & connexions" | trans %}
+ {% set title2 = "report:: telechargements" | trans %}
+ {% set title3 = "report::Connexion" | trans %}
+ {{ dash.connexion_download(title1, title2, title3, item.nb_dl, item.nb_conn, dashboard.getTitleDate('dmin'),dashboard.getTitleDate('dmax'))}}
{% endif %}
{% if "top_ten_user_doc"|key_exists(item)%}
- {{ dash.table('report:: Utilisateurs les plus actifs' , 'report:: utilisateurs' , 'report:: telechargements document', item.top_ten_user_doc, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
+ {% set title1 = "report:: Utilisateurs les plus actifs" | trans %}
+ {% set title2 = "report:: utilisateurs" | trans %}
+ {% set title3 = "report:: telechargements document" | trans %}
+ {{ dash.table(title1 , title2, title3, item.top_ten_user_doc, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
{% endif %}
{% if "top_ten_user_prev"|key_exists(item) %}
- {{ dash.table('report:: Utilisateurs les plus actifs' , 'report:: utilisateurs' , 'report:: telechargements preview', item.top_ten_user_prev, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
+ {% set title1 = "report:: Utilisateurs les plus actifs" | trans %}
+ {% set title2 = "report:: utilisateurs" | trans %}
+ {% set title3 = "report:: telechargements preview" | trans %}
+ {{ dash.table(title1 , title2, title3, item.top_ten_user_prev, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
{%endif %}
{% if "top_ten_user_poiddoc"|key_exists(item) %}
- {{ dash.table('report:: Utilisateurs les plus actifs' , 'report:: utilisateurs' , 'report:: poids document', item.top_ten_user_poiddoc, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "true", "false") }}
+ {% set title1 = "report:: Utilisateurs les plus actifs" | trans %}
+ {% set title2 = "report:: utilisateurs" | trans %}
+ {% set title3 = "report:: poids document" | trans %}
+ {{ dash.table(title1 , title2, title3, item.top_ten_user_poiddoc, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "true", "false") }}
{%endif %}
{% if "top_ten_user_poidprev"|key_exists(item) %}
- {{ dash.table('report:: Utilisateurs les plus actifs' , 'report:: utilisateurs' , 'report:: poids preview', item.top_ten_user_poidprev, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "true", "false") }}
+ {% set title1 = "report:: Utilisateurs les plus actifs" | trans %}
+ {% set title2 = "report:: utilisateurs" | trans %}
+ {% set title3 = "report:: poids preview" | trans %}
+ {{ dash.table(title1, title2, title3, item.top_ten_user_poidprev, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "true", "false") }}
{%endif %}
{% if "top_dl_doc"|key_exists(item) %}
- {{ dash.table('report:: documents les plus telecharges' , 'report:: document' , 'report:: telechargements', item.top_dl_doc, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "true") }}
+ {% set title1 = "report:: documents les plus telecharges" | trans %}
+ {% set title2 = "report:: document" | trans %}
+ {% set title3 = "report:: telechargements" | trans %}
+ {{ dash.table(title1, title2, title3, item.top_dl_doc, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "true") }}
{%endif %}
{% if "top_dl_preview"|key_exists(item) %}
- {{ dash.table('report:: preview les plus telecharges' , 'report:: preview' , 'report:: telechargements', item.top_dl_preview, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "true") }}
+ {% set title1 = "report:: preview les plus telecharges" | trans %}
+ {% set title2 = "report:: preview" | trans %}
+ {% set title3 = "report:: telechargements" | trans %}
+ {{ dash.table(title1, title2, title3, item.top_dl_preview, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "true") }}
{%endif %}
{% if "ask"|key_exists(item) %}
- {{ dash.table('report:: Les questions les plus posees' , 'report:: utilisateurs' , 'report:: question', item.ask, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
+ {% set title1 = "report:: Les questions les plus posees" | trans %}
+ {% set title2 = "report:: utilisateurs" | trans %}
+ {% set title3 = "report:: question" | trans %}
+ {{ dash.table(title1, title2, title3, item.ask, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
{%endif %}
{% if "top_ten_question"|key_exists(item) %}
- {{dash.top_ten_question(app['phraseanet.registry'].get('GV_homeTitle'), "report:: question", "report:: poids preview" , item.top_ten_question,dashboard.getTitleDate('dmin') , dashboard.getTitleDate('dmax')) }}
+ {% set title1 = "report:: question" | trans %}
+ {% set title2 = "report:: poids preview" | trans %}
+ {{dash.top_ten_question(app['phraseanet.registry'].get('GV_homeTitle'), title1, title2, item.top_ten_question,dashboard.getTitleDate('dmin') , dashboard.getTitleDate('dmax')) }}
{%endif %}
{% if "top_ten_site"|key_exists(item) %}
- {{ dash.table('report:: site d\'ou les photo sont les plus consultees' , 'report:: site' , 'report:: nombre de vue', item.top_ten_site, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
+ {% set title1 = "report:: site d\'ou les photo sont les plus consultees" | trans %}
+ {% set title2 = "report:: site" | trans %}
+ {% set title3 = "report:: nombre de vue" | trans %}
+ {{ dash.table(title1, title2, title3, item.top_ten_site, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
{%endif %}
{%endblock currentDashboard %}
diff --git a/templates/web/report/dashboard_macro.html.twig b/templates/web/report/dashboard_macro.html.twig
index 619fe128fd..b32a8bf2c2 100644
--- a/templates/web/report/dashboard_macro.html.twig
+++ b/templates/web/report/dashboard_macro.html.twig
@@ -2,11 +2,11 @@
{% macro table(title, titleLeft, titleRight, object, dmin, dmax, unite, sbasid) %}
{% if object|length > 0 %}
- {% trans title %}
+ {{ title }}
- {% trans titleLeft %} |
- {% trans titleRight %} |
+ {{ titleLeft }} |
+ {{ titleRight }} |
@@ -41,8 +41,8 @@
{% trans %} report:: Volumetrie des questions posees sur {{home_title}} {% endtrans %}
- {% trans title_left %} |
- {% trans title_right %} |
+ {{ title_left }} |
+ {{ title_right }} |
@@ -64,17 +64,17 @@
{% macro connexion_download(title, title_left, title_right, itemco, itemdl, dmin, dmax ) %}
- {% trans title %}
+ {{ title }}
- {% trans title_left %} |
- {% trans title_right %} |
+ {{ title_left }} |
+ {{ title_right }} |
{{ itemco }} |
- {{ itemdl }} |
+ {{ itemdl }} |
@@ -88,7 +88,7 @@
{% macro table_activity( id, title, title_abscisse, item) %}
{% if item|length > 0 %}
- {% trans title %}
+ {{ title }}
|
@@ -101,7 +101,7 @@
{% if title_abscisse|length > 0 %}
- {% trans title_abscisse%}
+ {{ title_abscisse }}
{% endif %}
|
{% for value in item %}