mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Merge branch '3.8'
Conflicts: lib/Alchemy/Phrasea/Authentication/Phrasea/NativeAuthentication.php lib/Alchemy/Phrasea/Controller/Report/Root.php templates/web/report/ajax_dashboard_content_child.html.twig templates/web/report/all_content.html.twig templates/web/report/report_layout_child.html.twig tests/Alchemy/Tests/Phrasea/Controller/Report/RootTest.php
This commit is contained in:
@@ -1,91 +1,84 @@
|
||||
{% extends "report/ajax_dashboard_content.html.twig" %}
|
||||
{% import "report/dashboard_macro.html.twig" as dash %}
|
||||
|
||||
|
||||
|
||||
{% block currentDashboard %}
|
||||
|
||||
{% set item = dashboard.dashboard %}
|
||||
|
||||
|
||||
{% if "activity"|key_exists(item) %}
|
||||
{% set title = 'report:: activite par heure' | trans %}
|
||||
{% set title_abscisse = 'report:: Connexion' | trans %}
|
||||
{{ dash.table_activity("mytablehour", title, title_abscisse, item.activity)}}
|
||||
{% endif %}
|
||||
{% if "activity_day"|key_exists(item) %}
|
||||
{% set title = 'report:: activite par jour' | trans %}
|
||||
{% set title_abscisse = 'report:: Connexion' | trans %}
|
||||
{{dash.table_activity("mytabledaytotal", title , title_abscisse, item.activity_day)}}
|
||||
{%endif%}
|
||||
{% if "activity_added"|key_exists(item) %}
|
||||
{% set title = 'report:: activite document ajoute' | trans %}
|
||||
{{ dash.table_activity("mytableadded", title , "", item.activity_added)}}
|
||||
{%endif %}
|
||||
{% if "activity_edited"|key_exists(item) %}
|
||||
{% set title = 'report:: activite document edite' | trans %}
|
||||
{{ dash.table_activity("mytableedited", title , "", item.activity_edited)}}
|
||||
{% endif %}
|
||||
{% if "nb_conn"|key_exists(item) and "nb_dl"|key_exists(item)%}
|
||||
{% set title = 'report:: Cumul telechargements & connexions' | trans %}
|
||||
{% set title_left = 'report:: telechargements' | trans %}
|
||||
{% set title_right = 'report::Connexion' | trans %}
|
||||
{{ dash.connexion_download(title, title_left, title_right, item.nb_dl, item.nb_conn, dashboard.getTitleDate('dmin'),dashboard.getTitleDate('dmax'))}}
|
||||
{% endif %}
|
||||
{% if "top_ten_user_doc"|key_exists(item)%}
|
||||
{% set title = 'report:: Utilisateurs les plus actifs' | trans %}
|
||||
{% set title_left = 'report:: utilisateurs' | trans %}
|
||||
{% set title_right = 'report:: telechargements document' | trans %}
|
||||
{{ dash.table(title, title_left, title_right, item.top_ten_user_doc, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
|
||||
{% endif %}
|
||||
{% if "top_ten_user_prev"|key_exists(item) %}
|
||||
{% set title = 'report:: Utilisateurs les plus actifs' | trans %}
|
||||
{% set title_left = 'report:: utilisateurs' | trans %}
|
||||
{% set title_right = 'report:: telechargements preview' | trans %}
|
||||
{{ dash.table(title, title_left, title_right, item.top_ten_user_prev, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
|
||||
{%endif %}
|
||||
{% if "top_ten_user_poiddoc"|key_exists(item) %}
|
||||
{% set title = 'report:: Utilisateurs les plus actifs' | trans %}
|
||||
{% set title_left = 'report:: utilisateurs' | trans %}
|
||||
{% set title_right = 'report:: poids document' | trans %}
|
||||
{{ dash.table(title, title_left, title_right, item.top_ten_user_poiddoc, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "true", "false") }}
|
||||
{%endif %}
|
||||
{% if "top_ten_user_poidprev"|key_exists(item) %}
|
||||
{% set title = 'report:: Utilisateurs les plus actifs' | trans %}
|
||||
{% set title_left = 'report:: utilisateurs' | trans %}
|
||||
{% set title_right = 'report:: poids preview' | trans %}
|
||||
{{ dash.table(title, title_left, title_right, item.top_ten_user_poidprev, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "true", "false") }}
|
||||
{%endif %}
|
||||
{% if "top_dl_doc"|key_exists(item) %}
|
||||
{% set title = 'report:: documents les plus telecharges' | trans %}
|
||||
{% set title_left = 'report:: document' | trans %}
|
||||
{% set title_right = 'report:: telechargements' | trans %}
|
||||
{{ dash.table(title, title_left, title_right, item.top_dl_doc, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "true") }}
|
||||
{%endif %}
|
||||
{% if "top_dl_preview"|key_exists(item) %}
|
||||
{% set title = 'report:: preview les plus telecharges' | trans %}
|
||||
{% set title_left = 'report:: preview' | trans %}
|
||||
{% set title_right = 'report:: telechargements' | trans %}
|
||||
{{ dash.table(title, title_left, title_right, item.top_dl_preview, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "true") }}
|
||||
{%endif %}
|
||||
{% if "ask"|key_exists(item) %}
|
||||
{% set title = 'report:: Les questions les plus posees' | trans %}
|
||||
{% set title_left = 'report:: utilisateurs' | trans %}
|
||||
{% set title_right = 'report:: question' | trans %}
|
||||
{{ dash.table(title, title_left, title_right, item.ask, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
|
||||
{%endif %}
|
||||
{% if "top_ten_question"|key_exists(item) %}
|
||||
{% set title = 'report:: question' | trans %}
|
||||
{% set title_left = 'report:: question' | trans %}
|
||||
{% set title_right = 'report:: poids preview' | trans %}
|
||||
{{dash.top_ten_question(app['conf'].get(['registry', 'general', 'title']), title_left, title_right, item.top_ten_question,dashboard.getTitleDate('dmin') , dashboard.getTitleDate('dmax')) }}
|
||||
{%endif %}
|
||||
{% if "top_ten_site"|key_exists(item) %}
|
||||
{% set title_left = 'report:: site' | trans %}
|
||||
{% set title_right = 'report:: nombre de vue' | trans %}
|
||||
{% set title = 'report:: site d\'ou les photo sont les plus consultees' | trans %}
|
||||
{{ dash.table(title , title_left, title_right, item.top_ten_site, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
|
||||
{%endif %}
|
||||
|
||||
{%endblock currentDashboard %}
|
||||
{% set item = dashboard.dashboard %}
|
||||
{% if "activity"|key_exists(item) %}
|
||||
{% 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) %}
|
||||
{% 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) %}
|
||||
{% set title1 = "report:: activite document ajoute" | trans %}
|
||||
{{ dash.table_activity("mytableadded", title1 , "", item.activity_added)}}
|
||||
{%endif %}
|
||||
{% if "activity_edited"|key_exists(item) %}
|
||||
{% 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)%}
|
||||
{% 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)%}
|
||||
{% 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) %}
|
||||
{% 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) %}
|
||||
{% 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) %}
|
||||
{% 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) %}
|
||||
{% 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) %}
|
||||
{% 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) %}
|
||||
{% 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) %}
|
||||
{% 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) %}
|
||||
{% 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 %}
|
||||
|
||||
|
@@ -12,20 +12,15 @@
|
||||
{% block javascript %}
|
||||
<script type="text/javascript" >
|
||||
|
||||
var usrId = '{{ dashboard.usr.getId() }}' ;
|
||||
var usrId = '{{ app['authentication'].user.get_id }}' ;
|
||||
|
||||
var language = {
|
||||
valider : '{{ "boutton::valider" | trans }}',
|
||||
choix_collection : '{{ "veuillez choisir au minimum une collection" | trans }}',
|
||||
annuler : '{{ "boutton::annuler" | trans }}',
|
||||
fermer : '{{ "boutton::fermer" | trans }}',
|
||||
connexion : '{{ "report:: Connexion" | trans }}',
|
||||
heure : '{{ "report::Heures" | trans }}'
|
||||
};
|
||||
|
||||
var date = {
|
||||
dmin : '{{ dashboard.dmin }}',
|
||||
dmax : '{{ dashboard.dmax }}'
|
||||
valider : '{% trans "boutton::valider" %}',
|
||||
choix_collection : '{% trans "veuillez choisir au minimum une collection" %}',
|
||||
annuler : '{% trans "boutton::annuler" %}',
|
||||
fermer : '{% trans "boutton::fermer" %}',
|
||||
connexion : '{% trans "report:: Connexion" %}',
|
||||
heure : '{% trans "report::Heures" %}'
|
||||
};
|
||||
|
||||
var dashboard ={
|
||||
@@ -47,8 +42,7 @@
|
||||
{% endblock javascript%}
|
||||
|
||||
{% block content %}
|
||||
{% block report_layout %}
|
||||
{% endblock report_layout %}
|
||||
<div id="DIALOG" style="color:white;"></div>
|
||||
{% block report_layout %}{% endblock report_layout %}
|
||||
<div id="DIALOG" style="color:white;"></div>
|
||||
{% endblock content %}
|
||||
|
||||
|
@@ -5,17 +5,16 @@
|
||||
<div class="control-group">
|
||||
<label for="dmin">{{ "report:: Du (date)" | trans }}</label>
|
||||
<div class="controls" style="display:inline-block">
|
||||
<input class= "dmin" name="dmin" type="text" value="{{ dashboard.dmin}}" size="10" style='width:100px'/>
|
||||
<input class= "dmin" name="dmin" type="text" value="{{ "-1 month"|date("Y-m-d") }}" size="10" style='width:100px'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label for="dmax">{{ "report:: Au (date)" | trans }}</label>
|
||||
<div class="controls" style="display:inline-block">
|
||||
<input class="dmax" name="dmax" type="text" value="{{dashboard.dmax}}" size="10" style='width:100px'/>
|
||||
<input class="dmax" name="dmax" type="text" value="{{ "now"|date("Y-m-d") }}" size="10" style='width:100px'/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% set all_coll = dashboard.getAllColl() %}
|
||||
<div class="form2">
|
||||
<div class="form_titre">{{ "report:: 2 - Bases" | trans }}</div>
|
||||
<div id="select_one">
|
||||
@@ -28,14 +27,14 @@
|
||||
{% trans %}Deselect all{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
{% for the_base_coll in all_coll %}
|
||||
<li><label data-group-id="{{ loop.index }}" class="multiselect-group"><b>{{ the_base_coll.name_sbas }}</b></label></li>
|
||||
{% for a_coll in the_base_coll.sbas_collections %}
|
||||
{% for databox in granted_bases %}
|
||||
<li><label data-group-id="{{ loop.index }}" class="multiselect-group"><b>{{ databox.name }}</b></label></li>
|
||||
{% for collection in databox.collections %}
|
||||
<li>
|
||||
<a href="javascript:void(0);">
|
||||
<label class="checkbox">
|
||||
<input name="popbases[]" checked="checked" type="checkbox" class="coll-checkbox checkbox-{{ loop.parent.loop.index }}" value="{{ a_coll.sbas_id}}_{{ a_coll.coll_id }}">
|
||||
{{ a_coll.name }}
|
||||
<input name="popbases[]" checked="checked" type="checkbox" class="coll-checkbox checkbox-{{ loop.parent.loop.index }}" value="{{ collection.base_id}}_{{ collection.id }}">
|
||||
{{ collection.name }}
|
||||
</label>
|
||||
</a>
|
||||
</li>
|
||||
|
@@ -2,22 +2,34 @@
|
||||
|
||||
{% block report_dashboard_layout %}
|
||||
<div id="dash" class="inside-container">
|
||||
<div class="answers">
|
||||
<div class="answers container-fluid">
|
||||
<div class="content">
|
||||
<div id='dashboard'>
|
||||
<div id="panel" style="height:40px;width:100%;display:none;">
|
||||
<div style="margin-top:15px;float:left;margin-bottom:20px;">
|
||||
<div style="float:left;" >
|
||||
<label for="dmin" class="form_titre">{{ "report:: Du (date)" | trans }}</label>
|
||||
<input class= "dminDash" name="dmin" type="text" value="{{ dashboard.dmin}}" size="10" />
|
||||
<div class="row-fluid">
|
||||
<div class="well-large well" style="background: #313131;margin-top:20px;border:none;">
|
||||
<form id="dashboard-form" class="form-inline" method="GET" action="{{ path("report_dashboard") }}">
|
||||
<label for="dminDash" style="color:#eee">{{ "from"|trans|title }}</label>
|
||||
<div class="input-prepend">
|
||||
<span class="add-on"><i class="icon icon-calendar"></i></span>
|
||||
<input id="dminDash" name="dmin" style="font-size: 14px;width:220px;" size="10" type="text" placeholder="{{ "from"|trans }}" value="{{ "-1 month"|date("Y-m-d") }}">
|
||||
</div>
|
||||
<div style="float:left;margin-left:15px;">
|
||||
<label for="dmax" class="form_titre">{{ "report:: Au (date)" | trans }}</label>
|
||||
<input class="dmaxDash" name="dmax" type="text" value="{{dashboard.dmax}}" size="10" />
|
||||
<label for="dmaxDash" style="color:#eee">{{ "to"|trans|title }}</label>
|
||||
<div class="input-prepend">
|
||||
to
|
||||
<span class="add-on"><i class="icon icon-calendar"></i></span>
|
||||
<input id="dmaxDash" name="dmax" style="font-size: 14px;width:220px;" size="10" type="text" placeholder="{{ "to"|trans }}" value="{{ "now"|date("Y-m-d") }}">
|
||||
</div>
|
||||
<button class="btn submit-dashboard" type="button">{{ "Generate" | trans }}</button>
|
||||
</form>
|
||||
<div>
|
||||
<span class="text-info" style="font-style: italic">
|
||||
<i class="icon icon-warning-sign"></i>
|
||||
{{
|
||||
"Report generation may take a long time to generate, depending on the number of collections and the period selected." | trans
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
{# <div id="chooose" style="margin-left:15px;float:left;margin-top:15px;"> #}
|
||||
{# <div class="form_titre">{{ "report:: 2 - Bases" | trans }}</div> #}
|
||||
{# <div class="form_titre">{% trans "report:: 2 - Bases" %}</div> #}
|
||||
{# <label for="nameDash"></label> #}
|
||||
{# <select name="nameDash" style = "background-color:#555;color:orange;border:none;"> #}
|
||||
{# <option value="all">Global</option> #}
|
||||
@@ -27,20 +39,22 @@
|
||||
{#</select> #}
|
||||
{#</div> #}
|
||||
</div>
|
||||
<div class="slide" style="margin-top:-5px;"><a class="btn-slide arrowDown"
|
||||
style="width:100px;height:20px;padding:5px;float:right; text-align:center;display:block;color:#999;
|
||||
">options</a></div>
|
||||
|
||||
<div id="dashdash" style="float:left;width:100%;">
|
||||
{% if ajax_dash %}
|
||||
{% include "report/ajax_dashboard_content_child.html.twig" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div id='dashboard' class="well well-large text-center" style="background-color:#696969;border:none;">
|
||||
<button class="btn btn-primary submit-dashboard" style="
|
||||
padding: 18px 28px;
|
||||
font-size: 22px; //change this to your desired size
|
||||
line-height: normal;
|
||||
-webkit-border-radius: 8px;
|
||||
-moz-border-radius: 8px;
|
||||
border-radius: 8px;"
|
||||
>
|
||||
{{ "Generate dashboard" | trans }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock report_dashboard_layout %}
|
||||
|
||||
{% block report_connexion_layout %}
|
||||
|
Reference in New Issue
Block a user