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:
@@ -125,7 +125,7 @@ class Step31 implements DatasUpgraderInterface
|
|||||||
$uuid = Uuid::uuid4();
|
$uuid = Uuid::uuid4();
|
||||||
try {
|
try {
|
||||||
$media = $this->app['mediavorus']->guess($pathfile);
|
$media = $this->app['mediavorus']->guess($pathfile);
|
||||||
$collection = \collection::get_from_coll_id($app, $databox, (int) $record['coll_id']);
|
$collection = \collection::get_from_coll_id($this->$app, $databox, (int) $record['coll_id']);
|
||||||
|
|
||||||
$file = new File($this->app, $media, $collection);
|
$file = new File($this->app, $media, $collection);
|
||||||
$uuid = $file->getUUID(true, true);
|
$uuid = $file->getUUID(true, true);
|
||||||
|
@@ -68,38 +68,54 @@ class Root implements ControllerProviderInterface
|
|||||||
*/
|
*/
|
||||||
public function getDashboard(Application $app, Request $request)
|
public function getDashboard(Application $app, Request $request)
|
||||||
{
|
{
|
||||||
$dashboard = new \module_report_dashboard($app, $app['authentication']->getUser());
|
if ('json' !== $request->getRequestFormat()) {
|
||||||
|
\Session_Logger::updateClientInfos($app, 4);
|
||||||
|
|
||||||
if ('json' !== $request->getRequestFormat()) {
|
$dashboard = new \module_report_dashboard($app, $app['authentication']->getUser());
|
||||||
\Session_Logger::updateClientInfos($app, 4);
|
|
||||||
|
$dmin = $request->query->get('dmin');
|
||||||
|
$dmax = $request->query->get('dmax');
|
||||||
|
|
||||||
|
if ($dmin && $dmax) {
|
||||||
|
$dashboard->setDate($dmin, $dmax);
|
||||||
|
}
|
||||||
|
|
||||||
$dashboard->execute();
|
$dashboard->execute();
|
||||||
|
|
||||||
return $app['twig']->render('report/report_layout_child.html.twig', [
|
return $app->json(array('html' => $app['twig']->render('report/ajax_dashboard_content_child.html.twig', array(
|
||||||
'ajax_dash' => true,
|
'dashboard' => $dashboard
|
||||||
'dashboard' => $dashboard,
|
))));
|
||||||
'home_title' => $app['conf']->get(['registry', 'general', 'title']),
|
|
||||||
'module' => 'report',
|
|
||||||
'module_name' => 'Report',
|
|
||||||
'anonymous' => $app['conf']->get(['registry', 'modules', 'anonymous-report']),
|
|
||||||
'g_anal' => $app['conf']->get(['registry', 'general', 'analytics']),
|
|
||||||
'ajax' => false,
|
|
||||||
'ajax_chart' => false
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$dmin = $request->request->get('dmin');
|
$granted = array();
|
||||||
$dmax = $request->request->get('dmax');
|
|
||||||
|
|
||||||
if ($dmin && $dmax) {
|
foreach($app['acl']->get($app['authentication']->getUser())->get_granted_base(array('canreport')) as $collection) {
|
||||||
$dashboard->setDate($dmin, $dmax);
|
if (!isset($granted[$collection->get_sbas_id()])) {
|
||||||
|
$granted[$collection->get_sbas_id()] = array(
|
||||||
|
'id' => $collection->get_sbas_id(),
|
||||||
|
'name' => $collection->get_databox()->get_viewname(),
|
||||||
|
'collections' => array()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$granted[$collection->get_sbas_id()]['collections'][] = array(
|
||||||
|
'id' => $collection->get_coll_id(),
|
||||||
|
'base_id' => $collection->get_base_id(),
|
||||||
|
'name' => $collection->get_name()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$dashboard->execute();
|
return $app['twig']->render('report/report_layout_child.html.twig', array(
|
||||||
|
'ajax_dash' => true,
|
||||||
return $app->json(['html' => $app['twig']->render('report/ajax_dashboard_content_child.html.twig', [
|
'dashboard' => null,
|
||||||
'dashboard' => $dashboard
|
'granted_bases' => $granted,
|
||||||
])]);
|
'home_title' => $app['phraseanet.registry']->get('GV_homeTitle'),
|
||||||
|
'module' => 'report',
|
||||||
|
'module_name' => 'Report',
|
||||||
|
'anonymous' => $app['phraseanet.registry']->get('GV_anonymousReport'),
|
||||||
|
'g_anal' => $app['phraseanet.registry']->get('GV_googleAnalytics'),
|
||||||
|
'ajax' => false,
|
||||||
|
'ajax_chart' => false
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -115,15 +131,15 @@ class Root implements ControllerProviderInterface
|
|||||||
$popbases = $request->request->get('popbases', []);
|
$popbases = $request->request->get('popbases', []);
|
||||||
|
|
||||||
if ('' === $dmin = $request->request->get('dmin', '')) {
|
if ('' === $dmin = $request->request->get('dmin', '')) {
|
||||||
$dmin = '01-' . date('m') . '-' . date('Y');
|
$dmin = date('Y') . '-' . date('m') . '-01';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('' === $dmax = $request->request->get('dmax', '')) {
|
if ('' === $dmax = $request->request->get('dmax', '')) {
|
||||||
$dmax = date('d') . '-' . date('m') . '-' . date('Y');
|
$dmax = date('Y') . '-' . date('m') . '-' . date('d');
|
||||||
}
|
}
|
||||||
|
|
||||||
$dmin = \DateTime::createFromFormat('d-m-Y H:i:s', sprintf('%s 00:00:00', $dmin));
|
$dmin = \DateTime::createFromFormat('Y-m-d H:i:s', sprintf('%s 00:00:00', $dmin));
|
||||||
$dmax = \DateTime::createFromFormat('d-m-Y H:i:s', sprintf('%s 23:59:59', $dmax));
|
$dmax = \DateTime::createFromFormat('Y-m-d H:i:s', sprintf('%s 23:59:59', $dmax));
|
||||||
|
|
||||||
//get user's sbas & collections selection from popbases
|
//get user's sbas & collections selection from popbases
|
||||||
$selection = [];
|
$selection = [];
|
||||||
|
@@ -1,91 +1,84 @@
|
|||||||
{% extends "report/ajax_dashboard_content.html.twig" %}
|
{% extends "report/ajax_dashboard_content.html.twig" %}
|
||||||
{% import "report/dashboard_macro.html.twig" as dash %}
|
{% import "report/dashboard_macro.html.twig" as dash %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% block currentDashboard %}
|
{% block currentDashboard %}
|
||||||
|
{% set item = dashboard.dashboard %}
|
||||||
{% set item = dashboard.dashboard %}
|
{% if "activity"|key_exists(item) %}
|
||||||
|
{% set title1 = "report:: activite par heure" | trans %}
|
||||||
|
{% set title2 = "report:: Connexion" | trans %}
|
||||||
{% if "activity"|key_exists(item) %}
|
{{ dash.table_activity("mytablehour", title1, title2, item.activity)}}
|
||||||
{% set title = 'report:: activite par heure' | trans %}
|
{% endif %}
|
||||||
{% set title_abscisse = 'report:: Connexion' | trans %}
|
{% if "activity_day"|key_exists(item) %}
|
||||||
{{ dash.table_activity("mytablehour", title, title_abscisse, item.activity)}}
|
{% set title1 = "report:: activite par jour" | trans %}
|
||||||
{% endif %}
|
{% set title2 = "report:: Connexion" | trans %}
|
||||||
{% if "activity_day"|key_exists(item) %}
|
{{dash.table_activity("mytabledaytotal", title1, title2, item.activity_day)}}
|
||||||
{% set title = 'report:: activite par jour' | trans %}
|
{%endif%}
|
||||||
{% set title_abscisse = 'report:: Connexion' | trans %}
|
{% if "activity_added"|key_exists(item) %}
|
||||||
{{dash.table_activity("mytabledaytotal", title , title_abscisse, item.activity_day)}}
|
{% set title1 = "report:: activite document ajoute" | trans %}
|
||||||
{%endif%}
|
{{ dash.table_activity("mytableadded", title1 , "", item.activity_added)}}
|
||||||
{% if "activity_added"|key_exists(item) %}
|
{%endif %}
|
||||||
{% set title = 'report:: activite document ajoute' | trans %}
|
{% if "activity_edited"|key_exists(item) %}
|
||||||
{{ dash.table_activity("mytableadded", title , "", item.activity_added)}}
|
{% set title1 = "report:: activite document edite" | trans %}
|
||||||
{%endif %}
|
{{ dash.table_activity("mytableedited", title1 , "", item.activity_edited)}}
|
||||||
{% if "activity_edited"|key_exists(item) %}
|
{% endif %}
|
||||||
{% set title = 'report:: activite document edite' | trans %}
|
{% if "nb_conn"|key_exists(item) and "nb_dl"|key_exists(item)%}
|
||||||
{{ dash.table_activity("mytableedited", title , "", item.activity_edited)}}
|
{% set title1 = "report:: Cumul telechargements & connexions" | trans %}
|
||||||
{% endif %}
|
{% set title2 = "report:: telechargements" | trans %}
|
||||||
{% if "nb_conn"|key_exists(item) and "nb_dl"|key_exists(item)%}
|
{% set title3 = "report::Connexion" | trans %}
|
||||||
{% set title = 'report:: Cumul telechargements & connexions' | trans %}
|
{{ dash.connexion_download(title1, title2, title3, item.nb_dl, item.nb_conn, dashboard.getTitleDate('dmin'),dashboard.getTitleDate('dmax'))}}
|
||||||
{% set title_left = 'report:: telechargements' | trans %}
|
{% endif %}
|
||||||
{% set title_right = 'report::Connexion' | trans %}
|
{% if "top_ten_user_doc"|key_exists(item)%}
|
||||||
{{ dash.connexion_download(title, title_left, title_right, item.nb_dl, item.nb_conn, dashboard.getTitleDate('dmin'),dashboard.getTitleDate('dmax'))}}
|
{% set title1 = "report:: Utilisateurs les plus actifs" | trans %}
|
||||||
{% endif %}
|
{% set title2 = "report:: utilisateurs" | trans %}
|
||||||
{% if "top_ten_user_doc"|key_exists(item)%}
|
{% set title3 = "report:: telechargements document" | trans %}
|
||||||
{% set title = 'report:: Utilisateurs les plus actifs' | trans %}
|
{{ dash.table(title1 , title2, title3, item.top_ten_user_doc, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
|
||||||
{% set title_left = 'report:: utilisateurs' | trans %}
|
{% endif %}
|
||||||
{% set title_right = 'report:: telechargements document' | trans %}
|
{% if "top_ten_user_prev"|key_exists(item) %}
|
||||||
{{ dash.table(title, title_left, title_right, item.top_ten_user_doc, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
|
{% set title1 = "report:: Utilisateurs les plus actifs" | trans %}
|
||||||
{% endif %}
|
{% set title2 = "report:: utilisateurs" | trans %}
|
||||||
{% if "top_ten_user_prev"|key_exists(item) %}
|
{% set title3 = "report:: telechargements preview" | trans %}
|
||||||
{% set title = 'report:: Utilisateurs les plus actifs' | trans %}
|
{{ dash.table(title1 , title2, title3, item.top_ten_user_prev, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
|
||||||
{% set title_left = 'report:: utilisateurs' | trans %}
|
{%endif %}
|
||||||
{% set title_right = 'report:: telechargements preview' | trans %}
|
{% if "top_ten_user_poiddoc"|key_exists(item) %}
|
||||||
{{ dash.table(title, title_left, title_right, item.top_ten_user_prev, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
|
{% set title1 = "report:: Utilisateurs les plus actifs" | trans %}
|
||||||
{%endif %}
|
{% set title2 = "report:: utilisateurs" | trans %}
|
||||||
{% if "top_ten_user_poiddoc"|key_exists(item) %}
|
{% set title3 = "report:: poids document" | trans %}
|
||||||
{% set title = 'report:: Utilisateurs les plus actifs' | trans %}
|
{{ dash.table(title1 , title2, title3, item.top_ten_user_poiddoc, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "true", "false") }}
|
||||||
{% set title_left = 'report:: utilisateurs' | trans %}
|
{%endif %}
|
||||||
{% set title_right = 'report:: poids document' | trans %}
|
{% if "top_ten_user_poidprev"|key_exists(item) %}
|
||||||
{{ dash.table(title, title_left, title_right, item.top_ten_user_poiddoc, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "true", "false") }}
|
{% set title1 = "report:: Utilisateurs les plus actifs" | trans %}
|
||||||
{%endif %}
|
{% set title2 = "report:: utilisateurs" | trans %}
|
||||||
{% if "top_ten_user_poidprev"|key_exists(item) %}
|
{% set title3 = "report:: poids preview" | trans %}
|
||||||
{% set title = 'report:: Utilisateurs les plus actifs' | trans %}
|
{{ dash.table(title1, title2, title3, item.top_ten_user_poidprev, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "true", "false") }}
|
||||||
{% set title_left = 'report:: utilisateurs' | trans %}
|
{%endif %}
|
||||||
{% set title_right = 'report:: poids preview' | trans %}
|
{% if "top_dl_doc"|key_exists(item) %}
|
||||||
{{ dash.table(title, title_left, title_right, item.top_ten_user_poidprev, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "true", "false") }}
|
{% set title1 = "report:: documents les plus telecharges" | trans %}
|
||||||
{%endif %}
|
{% set title2 = "report:: document" | trans %}
|
||||||
{% if "top_dl_doc"|key_exists(item) %}
|
{% set title3 = "report:: telechargements" | trans %}
|
||||||
{% set title = 'report:: documents les plus telecharges' | trans %}
|
{{ dash.table(title1, title2, title3, item.top_dl_doc, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "true") }}
|
||||||
{% set title_left = 'report:: document' | trans %}
|
{%endif %}
|
||||||
{% set title_right = 'report:: telechargements' | trans %}
|
{% if "top_dl_preview"|key_exists(item) %}
|
||||||
{{ dash.table(title, title_left, title_right, item.top_dl_doc, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "true") }}
|
{% set title1 = "report:: preview les plus telecharges" | trans %}
|
||||||
{%endif %}
|
{% set title2 = "report:: preview" | trans %}
|
||||||
{% if "top_dl_preview"|key_exists(item) %}
|
{% set title3 = "report:: telechargements" | trans %}
|
||||||
{% set title = 'report:: preview les plus telecharges' | trans %}
|
{{ dash.table(title1, title2, title3, item.top_dl_preview, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "true") }}
|
||||||
{% set title_left = 'report:: preview' | trans %}
|
{%endif %}
|
||||||
{% set title_right = 'report:: telechargements' | trans %}
|
{% if "ask"|key_exists(item) %}
|
||||||
{{ dash.table(title, title_left, title_right, item.top_dl_preview, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "true") }}
|
{% set title1 = "report:: Les questions les plus posees" | trans %}
|
||||||
{%endif %}
|
{% set title2 = "report:: utilisateurs" | trans %}
|
||||||
{% if "ask"|key_exists(item) %}
|
{% set title3 = "report:: question" | trans %}
|
||||||
{% set title = 'report:: Les questions les plus posees' | trans %}
|
{{ dash.table(title1, title2, title3, item.ask, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
|
||||||
{% set title_left = 'report:: utilisateurs' | trans %}
|
{%endif %}
|
||||||
{% set title_right = 'report:: question' | trans %}
|
{% if "top_ten_question"|key_exists(item) %}
|
||||||
{{ dash.table(title, title_left, title_right, item.ask, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
|
{% set title1 = "report:: question" | trans %}
|
||||||
{%endif %}
|
{% set title2 = "report:: poids preview" | trans %}
|
||||||
{% if "top_ten_question"|key_exists(item) %}
|
{{dash.top_ten_question(app['phraseanet.registry'].get('GV_homeTitle'), title1, title2, item.top_ten_question,dashboard.getTitleDate('dmin') , dashboard.getTitleDate('dmax')) }}
|
||||||
{% set title = 'report:: question' | trans %}
|
{%endif %}
|
||||||
{% set title_left = 'report:: question' | trans %}
|
{% if "top_ten_site"|key_exists(item) %}
|
||||||
{% set title_right = 'report:: poids preview' | trans %}
|
{% set title1 = "report:: site d\'ou les photo sont les plus consultees" | 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')) }}
|
{% set title2 = "report:: site" | trans %}
|
||||||
{%endif %}
|
{% set title3 = "report:: nombre de vue" | trans %}
|
||||||
{% if "top_ten_site"|key_exists(item) %}
|
{{ dash.table(title1, title2, title3, item.top_ten_site, dashboard.getTitleDate('dmin'), dashboard.getTitleDate('dmax'), "false", "false") }}
|
||||||
{% set title_left = 'report:: site' | trans %}
|
{%endif %}
|
||||||
{% set title_right = 'report:: nombre de vue' | trans %}
|
{%endblock currentDashboard %}
|
||||||
{% 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 %}
|
|
||||||
|
|
||||||
|
@@ -12,20 +12,15 @@
|
|||||||
{% block javascript %}
|
{% block javascript %}
|
||||||
<script type="text/javascript" >
|
<script type="text/javascript" >
|
||||||
|
|
||||||
var usrId = '{{ dashboard.usr.getId() }}' ;
|
var usrId = '{{ app['authentication'].user.get_id }}' ;
|
||||||
|
|
||||||
var language = {
|
var language = {
|
||||||
valider : '{{ "boutton::valider" | trans }}',
|
valider : '{% trans "boutton::valider" %}',
|
||||||
choix_collection : '{{ "veuillez choisir au minimum une collection" | trans }}',
|
choix_collection : '{% trans "veuillez choisir au minimum une collection" %}',
|
||||||
annuler : '{{ "boutton::annuler" | trans }}',
|
annuler : '{% trans "boutton::annuler" %}',
|
||||||
fermer : '{{ "boutton::fermer" | trans }}',
|
fermer : '{% trans "boutton::fermer" %}',
|
||||||
connexion : '{{ "report:: Connexion" | trans }}',
|
connexion : '{% trans "report:: Connexion" %}',
|
||||||
heure : '{{ "report::Heures" | trans }}'
|
heure : '{% trans "report::Heures" %}'
|
||||||
};
|
|
||||||
|
|
||||||
var date = {
|
|
||||||
dmin : '{{ dashboard.dmin }}',
|
|
||||||
dmax : '{{ dashboard.dmax }}'
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var dashboard ={
|
var dashboard ={
|
||||||
@@ -47,8 +42,7 @@
|
|||||||
{% endblock javascript%}
|
{% endblock javascript%}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% block report_layout %}
|
{% block report_layout %}{% endblock report_layout %}
|
||||||
{% endblock report_layout %}
|
<div id="DIALOG" style="color:white;"></div>
|
||||||
<div id="DIALOG" style="color:white;"></div>
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
||||||
|
@@ -5,17 +5,16 @@
|
|||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label for="dmin">{{ "report:: Du (date)" | trans }}</label>
|
<label for="dmin">{{ "report:: Du (date)" | trans }}</label>
|
||||||
<div class="controls" style="display:inline-block">
|
<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>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label for="dmax">{{ "report:: Au (date)" | trans }}</label>
|
<label for="dmax">{{ "report:: Au (date)" | trans }}</label>
|
||||||
<div class="controls" style="display:inline-block">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% set all_coll = dashboard.getAllColl() %}
|
|
||||||
<div class="form2">
|
<div class="form2">
|
||||||
<div class="form_titre">{{ "report:: 2 - Bases" | trans }}</div>
|
<div class="form_titre">{{ "report:: 2 - Bases" | trans }}</div>
|
||||||
<div id="select_one">
|
<div id="select_one">
|
||||||
@@ -28,14 +27,14 @@
|
|||||||
{% trans %}Deselect all{% endtrans %}
|
{% trans %}Deselect all{% endtrans %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% for the_base_coll in all_coll %}
|
{% for databox in granted_bases %}
|
||||||
<li><label data-group-id="{{ loop.index }}" class="multiselect-group"><b>{{ the_base_coll.name_sbas }}</b></label></li>
|
<li><label data-group-id="{{ loop.index }}" class="multiselect-group"><b>{{ databox.name }}</b></label></li>
|
||||||
{% for a_coll in the_base_coll.sbas_collections %}
|
{% for collection in databox.collections %}
|
||||||
<li>
|
<li>
|
||||||
<a href="javascript:void(0);">
|
<a href="javascript:void(0);">
|
||||||
<label class="checkbox">
|
<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 }}">
|
<input name="popbases[]" checked="checked" type="checkbox" class="coll-checkbox checkbox-{{ loop.parent.loop.index }}" value="{{ collection.base_id}}_{{ collection.id }}">
|
||||||
{{ a_coll.name }}
|
{{ collection.name }}
|
||||||
</label>
|
</label>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@@ -2,22 +2,34 @@
|
|||||||
|
|
||||||
{% block report_dashboard_layout %}
|
{% block report_dashboard_layout %}
|
||||||
<div id="dash" class="inside-container">
|
<div id="dash" class="inside-container">
|
||||||
<div class="answers">
|
<div class="answers container-fluid">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div id='dashboard'>
|
<div class="row-fluid">
|
||||||
<div id="panel" style="height:40px;width:100%;display:none;">
|
<div class="well-large well" style="background: #313131;margin-top:20px;border:none;">
|
||||||
<div style="margin-top:15px;float:left;margin-bottom:20px;">
|
<form id="dashboard-form" class="form-inline" method="GET" action="{{ path("report_dashboard") }}">
|
||||||
<div style="float:left;" >
|
<label for="dminDash" style="color:#eee">{{ "from"|trans|title }}</label>
|
||||||
<label for="dmin" class="form_titre">{{ "report:: Du (date)" | trans }}</label>
|
<div class="input-prepend">
|
||||||
<input class= "dminDash" name="dmin" type="text" value="{{ dashboard.dmin}}" size="10" />
|
<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>
|
||||||
<div style="float:left;margin-left:15px;">
|
<label for="dmaxDash" style="color:#eee">{{ "to"|trans|title }}</label>
|
||||||
<label for="dmax" class="form_titre">{{ "report:: Au (date)" | trans }}</label>
|
<div class="input-prepend">
|
||||||
<input class="dmaxDash" name="dmax" type="text" value="{{dashboard.dmax}}" size="10" />
|
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>
|
</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>
|
||||||
{# <div id="chooose" style="margin-left:15px;float:left;margin-top:15px;"> #}
|
{# <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> #}
|
{# <label for="nameDash"></label> #}
|
||||||
{# <select name="nameDash" style = "background-color:#555;color:orange;border:none;"> #}
|
{# <select name="nameDash" style = "background-color:#555;color:orange;border:none;"> #}
|
||||||
{# <option value="all">Global</option> #}
|
{# <option value="all">Global</option> #}
|
||||||
@@ -27,20 +39,22 @@
|
|||||||
{#</select> #}
|
{#</select> #}
|
||||||
{#</div> #}
|
{#</div> #}
|
||||||
</div>
|
</div>
|
||||||
<div class="slide" style="margin-top:-5px;"><a class="btn-slide arrowDown"
|
</div>
|
||||||
style="width:100px;height:20px;padding:5px;float:right; text-align:center;display:block;color:#999;
|
<div id='dashboard' class="well well-large text-center" style="background-color:#696969;border:none;">
|
||||||
">options</a></div>
|
<button class="btn btn-primary submit-dashboard" style="
|
||||||
|
padding: 18px 28px;
|
||||||
<div id="dashdash" style="float:left;width:100%;">
|
font-size: 22px; //change this to your desired size
|
||||||
{% if ajax_dash %}
|
line-height: normal;
|
||||||
{% include "report/ajax_dashboard_content_child.html.twig" %}
|
-webkit-border-radius: 8px;
|
||||||
{% endif %}
|
-moz-border-radius: 8px;
|
||||||
</div>
|
border-radius: 8px;"
|
||||||
|
>
|
||||||
|
{{ "Generate dashboard" | trans }}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock report_dashboard_layout %}
|
{% endblock report_dashboard_layout %}
|
||||||
|
|
||||||
{% block report_connexion_layout %}
|
{% block report_connexion_layout %}
|
||||||
|
@@ -28,10 +28,10 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
{
|
{
|
||||||
$this->authenticate(self::$DI['app']);
|
$this->authenticate(self::$DI['app']);
|
||||||
|
|
||||||
$this->XMLHTTPRequest('GET', '/report/dashboard', [
|
$this->XMLHTTPRequest('GET', '/report/dashboard', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmin->format('Y-m-d'),
|
||||||
]);
|
));
|
||||||
|
|
||||||
$response = self::$DI['client']->getResponse();
|
$response = self::$DI['client']->getResponse();
|
||||||
|
|
||||||
@@ -49,9 +49,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportConnexions()
|
public function testDoReportConnexions()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/connexions', [
|
self::$DI['client']->request('POST', '/report/connexions', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'order' => 'ASC',
|
'order' => 'ASC',
|
||||||
@@ -67,9 +67,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportConnexionsPrintCSV()
|
public function testDoReportConnexionsPrintCSV()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/connexions', [
|
self::$DI['client']->request('POST', '/report/connexions', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'printcsv' => 'on',
|
'printcsv' => 'on',
|
||||||
@@ -82,9 +82,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportConnexionsFilterColumns()
|
public function testDoReportConnexionsFilterColumns()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/connexions', [
|
self::$DI['client']->request('POST', '/report/connexions', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'list_column' => 'user ddate',
|
'list_column' => 'user ddate',
|
||||||
@@ -97,9 +97,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportConnexionsFilterResultOnOneColumn()
|
public function testDoReportConnexionsFilterResultOnOneColumn()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/connexions', [
|
self::$DI['client']->request('POST', '/report/connexions', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'filter_column' => 'user',
|
'filter_column' => 'user',
|
||||||
@@ -114,9 +114,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportConnexionsFilterConf()
|
public function testDoReportConnexionsFilterConf()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/connexions', [
|
self::$DI['client']->request('POST', '/report/connexions', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'conf' => 'on',
|
'conf' => 'on',
|
||||||
@@ -129,9 +129,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportConnexionsGroupBy()
|
public function testDoReportConnexionsGroupBy()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/connexions', [
|
self::$DI['client']->request('POST', '/report/connexions', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'groupby' => 'user',
|
'groupby' => 'user',
|
||||||
@@ -144,9 +144,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportQuestions()
|
public function testDoReportQuestions()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/questions', [
|
self::$DI['client']->request('POST', '/report/questions', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'order' => 'ASC',
|
'order' => 'ASC',
|
||||||
@@ -162,9 +162,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportQuestionsPrintCSV()
|
public function testDoReportQuestionsPrintCSV()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/questions', [
|
self::$DI['client']->request('POST', '/report/questions', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'printcsv' => 'on',
|
'printcsv' => 'on',
|
||||||
@@ -177,9 +177,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportQuestionsFilterColumns()
|
public function testDoReportQuestionsFilterColumns()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/questions', [
|
self::$DI['client']->request('POST', '/report/questions', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'list_column' => 'user ddate',
|
'list_column' => 'user ddate',
|
||||||
@@ -192,9 +192,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportQuestionsFilterResultOnOneColumn()
|
public function testDoReportQuestionsFilterResultOnOneColumn()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/questions', [
|
self::$DI['client']->request('POST', '/report/questions', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'filter_column' => 'user',
|
'filter_column' => 'user',
|
||||||
@@ -209,9 +209,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportQuestionsFilterConf()
|
public function testDoReportQuestionsFilterConf()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/questions', [
|
self::$DI['client']->request('POST', '/report/questions', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'conf' => 'on',
|
'conf' => 'on',
|
||||||
@@ -224,9 +224,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportQuestionsGroupBy()
|
public function testDoReportQuestionsGroupBy()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/questions', [
|
self::$DI['client']->request('POST', '/report/questions', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'groupby' => 'user',
|
'groupby' => 'user',
|
||||||
@@ -239,9 +239,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportDownloads()
|
public function testDoReportDownloads()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/downloads', [
|
self::$DI['client']->request('POST', '/report/downloads', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'order' => 'ASC',
|
'order' => 'ASC',
|
||||||
@@ -257,9 +257,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportDownloadsPrintCSV()
|
public function testDoReportDownloadsPrintCSV()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/downloads', [
|
self::$DI['client']->request('POST', '/report/downloads', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'printcsv' => 'on',
|
'printcsv' => 'on',
|
||||||
@@ -272,9 +272,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportDownloadsFilterColumns()
|
public function testDoReportDownloadsFilterColumns()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/downloads', [
|
self::$DI['client']->request('POST', '/report/downloads', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'list_column' => 'user ddate',
|
'list_column' => 'user ddate',
|
||||||
@@ -287,9 +287,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportDownloadsFilterResultOnOneColumn()
|
public function testDoReportDownloadsFilterResultOnOneColumn()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/downloads', [
|
self::$DI['client']->request('POST', '/report/downloads', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'filter_column' => 'user',
|
'filter_column' => 'user',
|
||||||
@@ -304,9 +304,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportDownloadsFilterConf()
|
public function testDoReportDownloadsFilterConf()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/downloads', [
|
self::$DI['client']->request('POST', '/report/downloads', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'conf' => 'on',
|
'conf' => 'on',
|
||||||
@@ -319,9 +319,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportDownloadsGroupBy()
|
public function testDoReportDownloadsGroupBy()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/downloads', [
|
self::$DI['client']->request('POST', '/report/downloads', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'groupby' => 'user',
|
'groupby' => 'user',
|
||||||
@@ -334,9 +334,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportDocuments()
|
public function testDoReportDocuments()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/documents', [
|
self::$DI['client']->request('POST', '/report/documents', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'order' => 'ASC',
|
'order' => 'ASC',
|
||||||
@@ -353,9 +353,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportDocumentsPrintCSV()
|
public function testDoReportDocumentsPrintCSV()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/documents', [
|
self::$DI['client']->request('POST', '/report/documents', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'printcsv' => 'on',
|
'printcsv' => 'on',
|
||||||
@@ -368,9 +368,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportDocumentsFilterColumns()
|
public function testDoReportDocumentsFilterColumns()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/documents', [
|
self::$DI['client']->request('POST', '/report/documents', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'list_column' => 'file mime',
|
'list_column' => 'file mime',
|
||||||
@@ -383,9 +383,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportDocumentsFilterResultOnOneColumn()
|
public function testDoReportDocumentsFilterResultOnOneColumn()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/documents', [
|
self::$DI['client']->request('POST', '/report/documents', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'filter_column' => 'mime',
|
'filter_column' => 'mime',
|
||||||
@@ -400,9 +400,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportDocumentsFilterConf()
|
public function testDoReportDocumentsFilterConf()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/documents', [
|
self::$DI['client']->request('POST', '/report/documents', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'conf' => 'on',
|
'conf' => 'on',
|
||||||
@@ -415,9 +415,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportDocumentsGroupBy()
|
public function testDoReportDocumentsGroupBy()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/documents', [
|
self::$DI['client']->request('POST', '/report/documents', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'groupby' => 'mime',
|
'groupby' => 'mime',
|
||||||
@@ -430,9 +430,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportClients()
|
public function testDoReportClients()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/clients', [
|
self::$DI['client']->request('POST', '/report/clients', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
]);
|
]);
|
||||||
@@ -444,9 +444,9 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
public function testDoReportClientPrintCSV()
|
public function testDoReportClientPrintCSV()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/report/clients', [
|
self::$DI['client']->request('POST', '/report/clients', array(
|
||||||
'dmin' => $this->dmin->format('Y-m-d H:i:s'),
|
'dmin' => $this->dmin->format('Y-m-d'),
|
||||||
'dmax' => $this->dmax->format('Y-m-d H:i:s'),
|
'dmax' => $this->dmax->format('Y-m-d'),
|
||||||
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
'sbasid' => self::$DI['collection']->get_sbas_id(),
|
||||||
'collection' => self::$DI['collection']->get_coll_id(),
|
'collection' => self::$DI['collection']->get_coll_id(),
|
||||||
'printcsv' => 'on',
|
'printcsv' => 'on',
|
||||||
|
BIN
www/skins/report/dash-ajax-loader.gif
Normal file
BIN
www/skins/report/dash-ajax-loader.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
@@ -218,6 +218,7 @@ iframe{
|
|||||||
}
|
}
|
||||||
#dash .answers{
|
#dash .answers{
|
||||||
background-color:#555555;
|
background-color:#555555;
|
||||||
|
min-height: 400px;
|
||||||
}
|
}
|
||||||
.spacer{
|
.spacer{
|
||||||
clear:both;
|
clear:both;
|
||||||
@@ -273,6 +274,9 @@ table.center{
|
|||||||
margin-top:10px;
|
margin-top:10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
#dashboard.loading {
|
||||||
|
background:url('dash-ajax-loader.gif') #696969 no-repeat center center;
|
||||||
|
}
|
||||||
#dashboard-table table {
|
#dashboard-table table {
|
||||||
font:normal 76%/150% "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
|
font:normal 76%/150% "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
|
||||||
border:none;
|
border:none;
|
||||||
|
@@ -30,12 +30,10 @@ $(document).ready(function () {
|
|||||||
resize();
|
resize();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
resize();
|
||||||
//datepicker
|
//datepicker
|
||||||
reportDatePicker();
|
reportDatePicker();
|
||||||
dashboardDatePicker();
|
dashboardDatePicker();
|
||||||
//drawCharts from dashboard
|
|
||||||
drawCharts();
|
|
||||||
configure_dash();
|
|
||||||
bindEvents();
|
bindEvents();
|
||||||
|
|
||||||
$("a.select-all").bind("click", function (e) {
|
$("a.select-all").bind("click", function (e) {
|
||||||
@@ -63,6 +61,17 @@ $(document).ready(function () {
|
|||||||
* Tous les binds sur le report
|
* Tous les binds sur le report
|
||||||
*/
|
*/
|
||||||
function bindEvents() {
|
function bindEvents() {
|
||||||
|
$('#dminDash, #dmaxDash').datepicker({
|
||||||
|
changeMonth: true,
|
||||||
|
changeYear: true,
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
numberOfMonths: 1,
|
||||||
|
maxDate: "-0d"
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".submit-dashboard").click(function() {
|
||||||
|
loadDash();
|
||||||
|
});
|
||||||
//load all the report
|
//load all the report
|
||||||
$('form .formsubmiter').bind('click', function () {
|
$('form .formsubmiter').bind('click', function () {
|
||||||
submiterAction($(this));
|
submiterAction($(this));
|
||||||
@@ -103,11 +112,6 @@ function bindEvents() {
|
|||||||
}).unbind("click").bind("click", function () {
|
}).unbind("click").bind("click", function () {
|
||||||
showMenu();
|
showMenu();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#liste_dash").find("em").unbind("click").bind("click", function () {
|
|
||||||
id = $(this).attr('id').substr(3);
|
|
||||||
changeDash(id);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function reportDatePicker() {
|
function reportDatePicker() {
|
||||||
@@ -129,17 +133,12 @@ function reportDatePicker() {
|
|||||||
function dashboardDatePicker() {
|
function dashboardDatePicker() {
|
||||||
$(function () {
|
$(function () {
|
||||||
$('.dminDash, .dmaxDash').datepicker({
|
$('.dminDash, .dmaxDash').datepicker({
|
||||||
defaultDate: -10,
|
defaultDate: -3,
|
||||||
changeMonth: true,
|
changeMonth: true,
|
||||||
changeYear: true,
|
changeYear: true,
|
||||||
dateFormat: 'dd-mm-yy',
|
dateFormat: 'dd-mm-yy',
|
||||||
numberOfMonths: 3,
|
numberOfMonths: 3,
|
||||||
maxDate: "-0d",
|
maxDate: "-0d"
|
||||||
onSelect: function (selectedDate, instance) {
|
|
||||||
var id = $(".selected_em").attr('id').substr(3);
|
|
||||||
changeDash(id);
|
|
||||||
$('.btn-slide').trigger('click');
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -185,7 +184,7 @@ function submiterAction(domSubmiter) {
|
|||||||
|
|
||||||
request = $.ajax({
|
request = $.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "/report/init",
|
url: "/index_dev.php/report/init",
|
||||||
data: data,
|
data: data,
|
||||||
beforeSend: function () {
|
beforeSend: function () {
|
||||||
container.find('.content').empty();
|
container.find('.content').empty();
|
||||||
@@ -379,36 +378,6 @@ function getScrollerStartPosition(selected_tab) {
|
|||||||
return right;
|
return right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function changeDash(sbasid) {
|
|
||||||
var dmin = $(".dminDash").val();
|
|
||||||
var dmax = $(".dmaxDash").val();
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
dataType: "json",
|
|
||||||
url: "/report/dashboard",
|
|
||||||
data: {
|
|
||||||
sbasid: sbasid,
|
|
||||||
dmin: dmin,
|
|
||||||
dmax: dmax
|
|
||||||
},
|
|
||||||
beforeSuccess: function () {
|
|
||||||
$("#dashdash").addClass("gifloader");
|
|
||||||
},
|
|
||||||
success: function (data) {
|
|
||||||
$("#dashdash").removeClass("gifloader").empty().append(data.html);
|
|
||||||
drawCharts();
|
|
||||||
$("#liste_dash").find("em").unbind("click").bind("click", function () {
|
|
||||||
id = $(this).attr('id').substr(3);
|
|
||||||
changeDash(id);
|
|
||||||
});
|
|
||||||
$('td a:visible').bind('click', function () {
|
|
||||||
tableLinkAction($(this));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function drawCharts() {
|
function drawCharts() {
|
||||||
if ($('#mytabledaytotal').length > 0) {
|
if ($('#mytabledaytotal').length > 0) {
|
||||||
$('#mytabledaytotal').gvChart({
|
$('#mytabledaytotal').gvChart({
|
||||||
@@ -438,9 +407,9 @@ function drawCharts() {
|
|||||||
},
|
},
|
||||||
lineWidth: 1,
|
lineWidth: 1,
|
||||||
pointSize: 2,
|
pointSize: 2,
|
||||||
backgroundColor: '#555555',
|
backgroundColor: '#696969',
|
||||||
width: 900,
|
width: 800,
|
||||||
height: 400
|
height: 350
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -477,9 +446,9 @@ function drawCharts() {
|
|||||||
},
|
},
|
||||||
lineWidth: 1,
|
lineWidth: 1,
|
||||||
pointSize: 3,
|
pointSize: 3,
|
||||||
backgroundColor: '#555555',
|
backgroundColor: '#696969',
|
||||||
width: 900,
|
width: 800,
|
||||||
height: 400
|
height: 350
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -515,9 +484,9 @@ function drawCharts() {
|
|||||||
legend: 'none',
|
legend: 'none',
|
||||||
lineWidth: 1,
|
lineWidth: 1,
|
||||||
pointSize: 3,
|
pointSize: 3,
|
||||||
backgroundColor: '#555555',
|
backgroundColor: '#696969',
|
||||||
width: 900,
|
width: 800,
|
||||||
height: 400
|
height: 350
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -553,9 +522,9 @@ function drawCharts() {
|
|||||||
legend: 'none',
|
legend: 'none',
|
||||||
lineWidth: 1,
|
lineWidth: 1,
|
||||||
pointSize: 3,
|
pointSize: 3,
|
||||||
backgroundColor: '#555555',
|
backgroundColor: '#696969',
|
||||||
width: 900,
|
width: 800,
|
||||||
height: 400
|
height: 350
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -987,6 +956,34 @@ function go(submit, form, f_val, data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadDash() {
|
||||||
|
var $form = $("#dashboard-form");
|
||||||
|
$.ajax({
|
||||||
|
url : $form.attr('action'),
|
||||||
|
type : $form.attr('method'),
|
||||||
|
dataType: 'json',
|
||||||
|
data : $form.serializeArray(),
|
||||||
|
beforeSend: function() {
|
||||||
|
resize();
|
||||||
|
$("#dashboard").empty().addClass("loading");
|
||||||
|
},
|
||||||
|
success : function( data ) {
|
||||||
|
$("#dashboard").empty().append(data.html);
|
||||||
|
drawCharts();
|
||||||
|
$('td a:visible').bind('click', function () {
|
||||||
|
tableLinkAction($(this));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
error : function( xhr, err ) {
|
||||||
|
},
|
||||||
|
timeout: function(){
|
||||||
|
},
|
||||||
|
done: function() {
|
||||||
|
$("#dashboard").removeClass("loading");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//submit is the div where we want to load the updated tab
|
//submit is the div where we want to load the updated tab
|
||||||
//form is the current form
|
//form is the current form
|
||||||
@@ -1141,13 +1138,4 @@ function sessionactive() {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function configure_dash() {
|
|
||||||
$(".btn-slide").click(function () {
|
|
||||||
$("#panel").slideToggle("slow");
|
|
||||||
$(this).toggleClass("arrowUp");
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
sessionactive();
|
sessionactive();
|
||||||
|
Reference in New Issue
Block a user