Merge branch 'master' of https://github.com/alchemy-fr/Phraseanet into PHRAS-2276-port-template-escape

This commit is contained in:
aina-esokia
2019-03-29 17:09:37 +04:00
143 changed files with 3313 additions and 10651 deletions

View File

@@ -130,7 +130,6 @@
<select id="type">
<option <%= field.type == '' ? 'selected' : '' %> value=""></option>
<option <%= field.type == 'string' ? 'selected' : '' %> value="string">string</option>
<option <%= field.type == 'text' ? 'selected' : '' %> value="text">text</option>
<option <%= field.type == 'number' ? 'selected' : '' %> value="number">number</option>
<option <%= field.type == 'date' ? 'selected' : '' %> value="date">date</option>
</select>

View File

@@ -19,7 +19,7 @@
src="{{ url('alchemy_embed_view', {url: url|trim, autoplay: autoplay|default('false') }) }}"
frameborder="0" allowfullscreen></iframe>
</div>
{% elseif record_type == 'FLEXPAPER' %}
{% elseif record_type == 'FLEXPAPER' or record_type == 'PDF' %}
<div id="phraseanet-embed-frame" class="documentTips"
data-original-width="{{original_w}}"
data-original-height="{{original_h}}"

View File

@@ -136,55 +136,72 @@
<tbody>
<tr>
<td>
<div class="context-menu context-menu-theme-vista">
<div class="context-menu context-menu-theme-flat">
<div title="" class="context-menu-item">
<div class="context-menu-item-inner export-record-action"
data-kind="basket" data-id="{{basket.getId()}}">{{ 'action::exporter' | trans }}
data-kind="basket" data-id="{{basket.getId()}}">
<a href="#">
<img src="/assets/common/images/icons/export-shadow.png" style="width: 22px;" alt="{{ 'action::exporter' | trans }}">
<span>{{ 'action::exporter' | trans }}</span>
</a>
</div>
</div>
<div title="" class="context-menu-item">
<div class="context-menu-item-inner">
<a href="{{ path('lightbox_compare', { 'basket' : basket.getId() }) }}" target="_blank">Lightbox</a>
<a href="{{ path('lightbox_compare', { 'basket' : basket.getId() }) }}" target="_blank">
<img src="/assets/lightbox/images/lightbox-icon.png" style="width: 20px; box-shadow: 0 2px 2px rgba(0,0,0,.2);" alt="{{ 'Lightbox' | trans }}">
<span>{{ 'Lightbox' | trans }}</span>
</a>
</div>
</div>
<div title="" class="context-menu-item">
<div class="context-menu-item-inner">
<a class="basket-update-action" data-basket-id="{{ basket.getId() }}" title="{{ 'action::renommer' | trans }}" href="#">
{{ 'action::renommer' | trans }}
<img src="/assets/common/images/icons/rename.png" style="width: 26px; margin-left: -2px; margin-right: -2px;" alt="{{ 'action::renommer' | trans }}">
<span>{{ 'action::renommer' | trans }}</span>
</a>
</div>
</div>
{% if basket.getValidation() %}
<div title="" class="context-menu-item">
<a target="_blank" href="{{ path('lightbox_validation', { 'basket' : basket.getId() }) }}">
<div class="context-menu-item-inner">
{{ 'action::Valider' | trans }}
</div>
</a>
<div class="context-menu-item-inner">
<a target="_blank" href="{{ path('lightbox_validation', { 'basket' : basket.getId() }) }}">
<img src="/assets/common/images/icons/basket_validation.png" style="width: 22px;" alt="{{ 'action::Valider' | trans }}">
<span>{{ 'action::Valider' | trans }}</span>
</a>
</div>
</div>
{% endif %}
<div title="" class="context-menu-item">
<div class="context-menu-item-inner basket-archive-action" data-basket-id="{{ basket.getId() }}" >
{{ 'Archive' | trans }}
</div>
</div>
<div title="" class="context-menu-item">
<div class="context-menu-item-inner basket-delete-action" id="SSTTREMOVER_{{basket.getId()}}" data-context="SSTT">
{{ 'action : supprimer' | trans }}
<a href="#">
<img src="/assets/common/images/icons/archive.png" style="width: 26px; margin-left: -2px; margin-right: -2px;" alt="{{ 'Archive' | trans }}">
<span>{{ 'Archive' | trans }}</span>
</a>
</div>
</div>
<div title="" class="context-menu-item">
<div class="context-menu-item-inner">
<a class="basket-reorder-content-action" data-basket-id="{{ basket.getId() }}" title="{{ 'Re-ordonner' | trans }}" href="#">
{{ 'Re-ordonner' | trans }}
<img src="/assets/common/images/icons/set-order.png" style="width: 26px; margin-left: -2px; margin-right: -2px;" alt="{{ 'Re-ordonner' | trans }}">
<span>{{ 'Re-ordonner' | trans }}</span>
</a>
</div>
</div>
<div title="" class="context-menu-item">
<div class="context-menu-item-inner basket-delete-action" id="SSTTREMOVER_{{basket.getId()}}" data-context="SSTT">
<a href="#">
<img src="/assets/common/images/icons/delete.png" style="width: 22px;" alt="{{ 'action : supprimer' | trans }}">
<span>{{ 'action : supprimer' | trans }}</span>
</a>
</div>
</div>
</div>
</td>
</tr>
</tbody>
@@ -222,24 +239,33 @@
<tbody>
<tr>
<td>
<div class="context-menu context-menu-theme-vista">
<div class="context-menu context-menu-theme-flat">
<div title="" class="context-menu-item">
<div class="context-menu-item-inner export-record-action"
data-kind="record" data-id="{{story.getRecord(app).get_serialize_key()}}">{{ 'action::exporter' | trans }}
data-kind="record" data-id="{{story.getRecord(app).get_serialize_key()}}">
<a href="#">
<img src="/assets/common/images/icons/export-shadow.png" style="width: 22px;" alt="{{ 'action::exporter' | trans }}">
<span>{{ 'action::exporter' | trans }}</span>
</a>
</div>
</div>
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANMODIFRECORD')) %}
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANMODIFRECORD')) %}
<div title="" class="context-menu-item menu3-custom-item">
<div class="context-menu-item-inner edit-record-action"
data-kind="record" data-id="{{story.getRecord(app).get_serialize_key()}}"
>{{ 'action::editer' | trans }}
>
<a href="#">
<img src="/assets/common/images/icons/edit-pen.png" style="width: 22px;" alt="{{ 'action::editer' | trans }}">
<span>{{ 'action::editer' | trans }}</span>
</a>
</div>
</div>
{% endif %}
{% endif %}
<div title="" class="context-menu-item menu3-custom-item">
<div class="context-menu-item-inner">
<a class="story_unfix" href="{{ path('prod_workzone_detach_story', { 'sbas_id' : story.getRecord(app).get_sbas_id(), 'record_id' : story.getRecord(app).get_record_id()}) }}">
{{ 'action::detacher' | trans }}
<img src="/assets/common/images/icons/detach.png" style="width: 26px; margin-left: -2px; margin-right: 2px;" alt="{{ 'action::detacher' | trans }}">
<span style="margin-left: 4px;">{{ 'action::detacher' | trans }}</span>
</a>
</div>
</div>
@@ -249,7 +275,8 @@
data-db-id="{{ story.getRecord(app).get_sbas_id }}"
data-record-id="{{ story.getRecord(app).get_record_id() }}"
href="#">
{{ 'Re-ordonner' | trans }}
<img src="/assets/common/images/icons/set-order.png" style="width: 26px; margin-left: -2px; margin-right: -2px;" alt="{{ 'Re-ordonner' | trans }}">
<span>{{ 'Re-ordonner' | trans }}</span>
</a>
</div>
</div>

View File

@@ -17,7 +17,7 @@
<div class="PNB10 LeftColumn">
<div class="PNB" style="text-align:center;">
{% if context == 'Push' %}
<img style="width: 36px; height: 36px" src="/assets/common/images/icons/push64.png"/>
<img style="width: 36px; height: 36px" src="/assets/common/images/icons/push-icon.png"/>
{% else %}
<img style="width: 36px; height: 36px" src="/assets/common/images/icons/validation.png"/>
{% endif %}

View File

@@ -197,39 +197,43 @@
{% endif %}
</div>
</div>
<div id="basket_menu" class="context-menu context-menu-theme-vista" style="display:none;">
<div id="basket_menu" class="context-menu context-menu-theme-flat" style="display:none;">
<ul style="list-style-type:none;margin:0;padding:0">
<li class="context-menu-item">
<div class="context-menu-item-inner">
<a title="{{ 'action:: nouveau panier' | trans }}" class="basket-create-action" href="#">
<img style="cursor:pointer;" src="/assets/common/images/icons/new_basket.png"
<img style="cursor:pointer;" src="/assets/common/images/icons/Basket-New.png"
title="{{ 'action:: nouveau panier' | trans }}"/>
<span>{{ 'action:: nouveau panier' | trans }}</span>
</a>
</div>
</li>
<li class="context-menu-item">
<div class="context-menu-item-inner">
<a title="{{ 'Browse Baskets' | trans }}" class="basket-browse-action" href="#">
<img style="cursor:pointer;" src="/assets/common/images/icons/browse_basket.png"
<img style="cursor:pointer;" src="/assets/common/images/icons/Basket-Browse.png"
title="{{ 'Browse Baskets' | trans }}"/>
<span>{{ 'Browse Baskets' | trans }}</span>
</a>
</div>
</li>
<li class="context-menu-item divider"></li>
<li class="context-menu-item">
{% if app['conf'].get(['registry', 'modules', 'stories']) and app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANADDRECORD')) %}
<div class="context-menu-item-inner" style="line-height: 34px;">
<div class="divider"></div>
<div class="context-menu-item-inner">
<a title="{{ 'action:: nouveau reportage' | trans }}" class="story-create-action" href="#">
<img style="cursor:pointer;" src="/assets/common/images/icons/new_report.png"
<img style="cursor:pointer;" src="/assets/common/images/icons/Basket-New-Story.png"
title="{{ 'action:: nouveau reportage' | trans }}"/>
<span>{{ 'action:: nouveau reportage' | trans }}</span>
</a>
<div class="divider"></div>
</div>
{% endif %}
</li>
<li class="context-menu-item divider"></li>
<li class="context-menu-item">
<div class="context-menu-item-inner basket-filter-action" data-sort="date">
<a title="{{ 'phraseanet:: tri par date' | trans }} " href="#">
<img style="cursor:pointer;" src="/assets/common/images/icons/sort_date.png"
<img style="cursor:pointer;" src="/assets/common/images/icons/Sort-Date.png"
title="{{ 'phraseanet:: tri par date' | trans }}"/>
<span>{{ 'phraseanet:: tri par date' | trans }}</span>
</a>
@@ -238,7 +242,7 @@
<li class="context-menu-item">
<div class="context-menu-item-inner basket-filter-action" data-sort="name">
<a title="{{ 'phraseanet:: tri par nom' | trans }} " href="#">
<img style="cursor:pointer;" src="/assets/common/images/icons/sort_alpha.png"
<img style="cursor:pointer;" src="/assets/common/images/icons/Alphabetique.png"
title="{{ 'phraseanet:: tri par nom' | trans }}"/>
<span>{{ 'phraseanet:: tri par nom' | trans }}</span>
</a>
@@ -247,6 +251,8 @@
<li class="context-menu-item">
<div class="context-menu-item-inner basket-preferences-action">
<a title="{{ 'Preferences' | trans }} " href="#">
<img style="cursor:pointer;" src="/assets/common/images/icons/Basket-Settings.png"
title="{{ 'phraseanet:: Preferences' | trans }}"/>
<span>{{ 'Preferences' | trans }}</span>
</a>
</div>

View File

@@ -12,10 +12,11 @@
</div>
dans index {{ results.getIndexes() }}
{% if not(esquery is null) %}
<div>
<a href="#" id="esqueryCopy">{{ 'copyClipboardLabel' | trans }}</a>
</div>
<div class="esqueryDataDiv">
<textarea id="esqueryDataPaths" placeholder="{{ 'No thesaurus concept query' | trans }}"></textarea>
<div style="overflow: hidden;">
<a href="#" id="esqueryCopy">{{ 'copyClipboardLabel' | trans }}</a>
</div>
<textarea id="esqueryData">{{ esquery }}</textarea>
</div>
{% endif %}
@@ -23,6 +24,27 @@
<script language="javascript">
$(document).ready(function () {
var esQuery = JSON.parse($('#esqueryData').text());
var pathField = $('#esqueryDataPaths');
// Loop the top level
$.each(esQuery, testQuery);
function testQuery(key, value) {
if (value !== null && typeof value === "object") {
if(key === 'multi_match') {
var testValue = value.fields[0];
if(testValue.startsWith('concept_path')) {
pathField.append(value.query + '\n');
}
}
else {
// Recurse into children
$.each(value, testQuery);
}
}
}
var copyElContentClipboard = function (elId) {
var copyEl = document.getElementById(elId);
copyEl.select();

View File

@@ -111,25 +111,34 @@
<tbody>
<tr>
<td>
<div class="context-menu context-menu-theme-vista">
<div class="context-menu context-menu-theme-flat">
{% if granted_on_collection(record.baseId, [constant('\\ACL::CANPUTINALBUM')]) and not record.story %}
<div title="" class="context-menu-item">
<div class="context-menu-item-inner record-add-to-basket-action" data-db-id="{{record.databoxId}}" data-record-id="{{record.recordId}}">
{{ 'action : ajouter au panier' | trans }}
<a title="{{ 'action : ajouter au panier' | trans }}" href="#">
<img style="cursor:pointer;" src="/assets/common/images/icons/basket-1.png" alt="{{ 'action : ajouter au panier' | trans }}">
<span>{{ 'action : ajouter au panier' | trans }}</span>
</a>
</div>
</div>
{% endif %}
{% if granted_on_collection(record.baseId, [constant('\\ACL::CANDWNLDPREVIEW')]) or granted_on_collection(record.baseId, [constant('\\ACL::CANDWNLDHD')]) %}
<div title="" class="context-menu-item">
<div class="context-menu-item-inner record-export-action" data-kind="record" data-id="{{record.id}}">
{{ 'action : exporter' | trans }}
<a title="{{ 'action : exporter' | trans }}" href="#">
<img style="cursor:pointer;" src="/assets/common/images/icons/export-shadow.png" alt="{{ 'action : exporter' | trans }}">
<span>{{ 'action : exporter' | trans }}</span>
</a>
</div>
</div>
{% endif %}
<div title="" class="context-menu-item">
<div class="context-menu-item-inner record-print-action"
data-kind="record" data-id="{{record.id}}">
{{ 'action : print' | trans }}
<a title="{{ 'action : print' | trans }}" href="#">
<img style="cursor:pointer;" src="/assets/common/images/icons/print-shadow.png" alt="{{ 'action : print' | trans }}">
<span>{{ 'action : print' | trans }}</span>
</a>
</div>
</div>
{% if app['conf'].get(['registry', 'actions', 'social-tools']) == 'all'
@@ -138,7 +147,10 @@
{% if record.story is empty %}
<div title="" class="context-menu-item">
<div class="context-menu-item-inner share-record-action" data-db="{{record.baseId}}" data-record-id="{{record.recordId}}">
{{ 'reponses:: partager' | trans }}
<a title="{{ 'reponses:: partager' | trans }}" href="#">
<img style="cursor:pointer;" src="/assets/common/images/icons/Share.png" alt="{{ 'reponses:: partager' | trans }}">
<span>{{ 'reponses:: partager' | trans }}</span>
</a>
</div>
</div>
{% endif %}

View File

@@ -1,25 +0,0 @@
{%block dashboard_content %}
<div id="title_dash" class="center" style="clear:left;">{{ "report:: Dashboard" | trans }}</div>
<div id="periode_dash" class="center" >{{ dashboard.getTitleDate('dmin') }} - {{ dashboard.getTitleDate('dmax') }}</div>
<div id="liste_dash" class="center">
<em id="em_all" class="selected_em" >Toutes les bases</em>
{% for key in dashboard.authorizedCollection|keys %}
<em id="em_{{ key }}" >{{ key|sbas_labels(app) }}</em>
{% endfor %}
</div>
<div id="dashboard-table" >
<div class ="center" style="width:820px;">
<div id='currentDashboard'>
{% block currentDashboard %}
{% endblock currentDashboard %}
</div>
</div>
</div>
<script type="text/javascript">
$("#liste_dash").find("em").removeClass("selected_em");
$("#em_{{dashboard.sbasid}}").addClass("selected_em");
</script>
{% endblock %}

View File

@@ -1,84 +0,0 @@
{% 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 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~"("~ title3~")", 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~"("~ title3~")", 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~"("~ title3~")", 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~"("~ title3~")", 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 %}

View File

@@ -1,124 +0,0 @@
{% block ajax_data_content %}
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
$("input[type=button]").button();
$('a.jqprint').unbind('click').bind('click', function(){
$(this).closest('.report-table').jqprint();
return( false );
});
/*$(document).ready(function(){
//set slider position
if(!jQuery.support.boxModel)
{
$(".horizontal-scroller:visible").css("position", "absolute");
}
else
{
$(".horizontal-scroller:visible").css("position", "fixed");
}
});*/
</script>
{% if is_infouser %}
<script type="text/javascript">
$('#dialog .bound').each( function () {
var riid = $(this).html();
var new_a = $(this).html('<img style="float:right;margin-right:5px;" src="/assets/report/images/loupe2.png" />');
$(this).before(riid);
$(this).attr('rel', '{{ path('report_infomations_document') }}').cluetip({
width: 600,
ajaxCache: true,
arrows: true,
ajaxSettings : {
type : 'POST',
dataType: 'json',
data : ({
rid : riid,
sbasid : '{{ app['request'].get('sbasid') }}',
collection : '{{ app['request'].get('collection') }}',
dmin : '{{ app['request'].get('dmin') }}',
dmax : '{{ app['request'].get('dmax') }}',
from : 'TOOL'
})
},
ajaxProcess : function (data) {
return data.rs;
}
});
});
</script>
{% endif %}
{% if is_plot %}
<script type="text/javascript">
$("table:visible:first thead tr").prepend("<th>{{ 'report::Heures' | trans }}</th>");
$("table:visible:first tbody tr:first").prepend("<th>{{ 'report:: Connexion' | trans }}</th>");
$colspan = $("table:visible:first tfoot tr:first td").attr("colspan");
$colspan++;
$("table:visible:first tfoot tr:first td").attr("colspan", $colspan);
</script>
{% endif %}
{% if is_nav %}
{% for key, result in result %}
{% set index = key %}
<div class="graph">
{% include "report/generate_tab.html.twig" %}
<table class="navi">
<caption></caption>
<thead>
<th></th>
{% if result.legend|length > 1 %}
{% for key, value in result.legend %}
<th>{{ value }}</th>
{% endfor %}
{% endif %}
</thead>
<tbody>
<tr>
<th></th>
{% if result.value|length > 1 %}
{% for key, value in result.value %}
<td>{{ value }}</td>
{% endfor %}
{% endif %}
</tr>
</tbody>
</table>
</div>
{% endfor %}
{% elseif is_plot %}
{% include "report/generate_tab.html.twig" %}
<table class="tblsite" style="visibility:hidden;">
<caption></caption>
<thead>
<th></th>
{% if result.legend|length > 1 %}
{% for key, value in result.legend %}
<th>{{ value }}</th>
{% endfor %}
{% endif %}
</thead>
<tbody>
<tr>
<th>{{ "report:: Connexion" | trans }}</th>
{% if result.result.0|length > 1 %}
{% for key, value in result.result.0 %}
<td>{{ value }}</td>
{% endfor %}
{% endif %}
</tr>
</tbody>
</table>
<script type="text/javascript">
</script>
{% else %}
{% include "report/generate_tab.html.twig" %}
{% endif %}
{% endblock %}

View File

@@ -1,66 +0,0 @@
{% block ajax_loaded_content %}
<div class="tabs">
<div class="horizontal-scroller">
<ul class="tabb">
{% for key in selection|keys %}
<li class ="number_{{ key }}"><a href="#tab-{{ key }}-{{ app['request'].get('tbl') }}">{{ key|sbas_labels(app)}}</a></li>
{% endfor %}
</ul>
</div>
{% for key, value in selection %}
<div id="tab-{{ key }}-{{ app['request'].get('tbl') }}">
<div class="load">
{% block ajax_data_content %}{% endblock %}
</div>
<form style="display:none;" onsubmit="return false;" class="report_form">
<fieldset style="float:left; border:none;">
<label for="page" style="font-size:10px;float:left;margin-left:35px;"><i></i></label>
<div style="clear:left;">
<input type="button" name="prev" value ="&lt;" class="prev ui-state-hover"/>
<input type="text" name="page" value="1" size ="2" class="enterformsubmiter"/>
<input type="button" name="next" value ="&gt;" class="next ui-state-hover"/>
</div>
</fieldset>
<fieldset style="float:right;border:none;text-align:right;">
<div style="clear:right;">
<label for="limit" style="font-size:10px"><i>nombre de ligne(s) par page</i></label>
<input type="text" name="limit" value="30" size="2" class="enterformsubmiter"/>
<input type="button" name="go" value ="ok" class="submiter" />
</div>
</fieldset>
<input type="hidden" name="tbl" value ="{{ app['request'].get('tbl') }}"/>
<input type="hidden" name="action" value ="{{ app['request'].get('action') }}"/>
<input type="hidden" name="dmin" value ="{{ dmin }}"/>
<input type="hidden" name="dmax" value ="{{ dmax }}"/>
<input type="hidden" name="sbasid" value ="{{ key }}"/>
<input type="hidden" name="collection" value ="{{ value.liste }}"/>
<input type="hidden" name="user" value =""/>
<input type="hidden" name="word" value ="{{ app['request'].get('tbl') == 'DOC' ? app['request'].get('preciseWord') : '' }}"/>
<input type="hidden" name="precise" value ="{{ app['request'].get('tbl') == 'DOC' ? app['request'].get('precise') : '' }}"/>
<input type="hidden" name="order" value =""/>
<input type="hidden" name="champ" value =""/>
<input type="hidden" name="rid" value =""/>
<input type="hidden" name="filter_column" value =""/>
<input type="hidden" name="filter_value" value =""/>
<input type="hidden" name="liste" value ="off"/>
<input type="hidden" name="liste_filter" value =""/>
<input type="hidden" name="conf" value ="off"/>
<input type="hidden" name="list_column" value =""/>
<input type="hidden" name="groupby" value =""/>
<input type="hidden" name="societe" value =""/>
<input type="hidden" name="pays" value =""/>
<input type="hidden" name="fonction" value =""/>
<input type="hidden" name="activite" value =""/>
{% if anonymous %}
<input type="hidden" name="on" value ="{{ app['request'].get('on') }}"/>
{% else %}
<input type="hidden" name="on" value =""/>
{% endif %}
<input type="hidden" name="docwhat" value ="{{ app['request'].get('tbl') == 'WDOC' ? app['request'].get('docwhat') : '' }}"/>
<input type="hidden" name="from" value =""/>
<input type="hidden" name="printcsv" value ="off"/>
</form>
</div>
{% endfor %}
</div>
{% endblock %}

View File

@@ -1,28 +0,0 @@
{% block alldash %}
<div style="margin-top:15px;">
<div style="float:left;">
<label for="dmin">{{ "report:: Du (date)" | trans }}</label>
<input class= "dminDash" name="dmin" type="text" value="{{ dashboard_array.date.date.dmin}}" size="10" />
</div>
<div style="float:left;">
<label for="dmax">{{ "report:: Au (date)" | trans }}</label>
<input class="dmaxDash" name="dmax" type="text" value="{{dashboard_array.date.date.dmax}}" size="10" />
</div>
</div>
<div id="chooose" style="float:left;">
<select name="nameDash">
<option value="all" checked = 'checked'>Global</option>
{% for it in dashboard_array.authorizedCollection %}
<option value="{{it.sbas_id}}" >{{ it.name }}</option>
{% endfor %}
</select>
</div>
<div id="title_dash" class="center" style="clear:left;">{{ "report:: Dashboard" | trans }}</div>
<div id="periode_dash" class="center" >{{ dashboard_array.date.title.dmin }} - {{ dashboard_array.date.title.dmax }}</div>
<div id="liste_dash" class="center">{{ dashboard_array.listeStringBase }}</div>
<div id="dashboard-table" >
{%block dashboard_content %}{% endblock %}
</div>
{% endblock %}

View File

@@ -2,7 +2,6 @@
{% block stylesheet %}
<link type="text/css" rel="stylesheet" href="/assets/report/css/report{% if not app.debug %}.min{% endif %}.css" media="screen">
<link type="text/css" rel="stylesheet" href="/assets/report/css/print{% if not app.debug %}.min{% endif %}.css" media="print">
{% endblock stylesheet %}
{% block icon %}
@@ -39,9 +38,6 @@
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="/assets/common/js/common{% if not app.debug %}.min{% endif %}.js"></script>
<script type="text/javascript" src="/assets/report/js/report{% if not app.debug %}.min{% endif %}.js"></script>
<script type="text/javascript">
gvChartInit();
</script>
{% endblock javascript%}

View File

@@ -1,30 +0,0 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="{{ app['locale'] }}"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="{{ app['locale'] }}"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="{{ app['locale'] }}"> <![endif]-->
<!--[if gt IE 8]>
<!-->
<html lang="{{ app['locale'] }}">
<!--<![endif]-->
<head>
{% block head %}
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="user-scalable=no, width=980px" />
<title>{% block title %}{% endblock %} - Reports </title>
{% block stylesheet %}{% endblock %}
{% block icon %}{% endblock %}
{% block javascript %}{% endblock %}
{% endblock %}
</head>
<body style="overflow:hidden;">
<div id="mainContainer" style="position:absolute;top:0;bottom:0;left:0;right:0;">
{% block menubar %}<div id="mainMenu" class="PNB"></div>{% endblock %}
<div id="form-container" >
<div id="mainTabs">
{% block all_content %}{% endblock %}
</div>
</div>
{% block javascript_google %}{% endblock %}
</div>
</body>
</html>

View File

@@ -1,57 +0,0 @@
{% block draw_activity_day %}
{% if ajax_chart %}
{% if rs|length > 0 %}
<div class="aroundTable">
<table class="center imgdash" id="mytableday">
<caption>{{ "report:: activite par jour" | trans }}</caption>
<thead>
<tr>
<th></th>
{% for key, value in legendDay %}
<th>{{ value }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
<tr>
<th>{{ "report:: Connexion" | trans }} {{ sbas_id|sbas_labels(app) }}</th>
{% for key, value in rs %}
<td>{{ value }}</td>
{% endfor %}
</tr>
</tbody>
</table>
</div>
{% endif %}
{% else %}
{% if dashboard_array.dashboard.activity_day|length > 0 %}
<div class="aroundTable">
<table class="center imgdash" id="mytableday">
<caption>{{ "report:: activite par jour" | trans }}</caption>
<thead>
<tr>
<th></th>
{% for key, value in dashboard_array.legendDay %}
<th>{{ value }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for key, value in dashboard_array.dashboard.activity_day %}
{% if loop.index == 1 %}
<tr>
<th>{{ "report:: Connexion" | trans }} {{ key|sbas_labels(app)}}</th>
{% if value|length > 0 %}
{% for k, v in value %}
<td>{{ v }}</td>
{% endfor %}
{% endif %}
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endif %}
{% endblock %}

View File

@@ -1,20 +0,0 @@
{% block colFilter %}
<form>
<fieldset>
<select name='filtre'>
<option value="{{ field }}">{{ "report:: Enlever le filtre" | trans }}</option>
{% for value in result %}
<option value="{{ value.value }}">
{% if value.val == "" %}
{{ "report:: non-renseigne" | trans }}
{% else %}
{{ value.val }}
{% endif %}
</option>
{% else %}
<option value="">{{ "report:: non-renseigne" | trans }}</option>
{%endfor %}
</select>
</fieldset>
</form>
{% endblock %}

View File

@@ -1,114 +0,0 @@
{% macro table(title, titleLeft, titleRight, object, dmin, dmax, unite, sbasid) %}
{% if object|length > 0 %}
<table style="margin:0 auto; margin-bottom:30px;">
<caption>{{ title }}</caption>
<thead>
<tr>
<th>{{ titleLeft }}</th>
<th>{{ titleRight }}</th>
</tr>
</thead>
<tbody>
{% for key, value in object %}
<tr>
{% if value.id == "false" %}
<td>{{ value.lib|e }}</td>
{% else %}
{% if sbasid == "true" %}
<td><a href="#" id= "id_{{ value.id }}_{{ value.sbasid }}" class ="hasSbas">{{ value.lib|e }}</a></td>
{% else %}
<td><a href="#" id= "id_{{ value.id }}" >{{ value.lib|e }}</a></td>
{% endif %}
{% endif %}
<td>{{ unite == "true" ? value.nb | formatOctets : value.nb }}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<td colspan='2'>{{ dmin }} - {{ dmax }}</td>
</tr>
</tfoot>
</table>
{% endif %}
{% endmacro %}
{% macro top_ten_question(home_title, title_left, title_right, item, dmin, dmax)%}
{% if item|length > 0 %}
<table style="margin:0 auto; margin-bottom:30px;">
<caption>{% trans with {'%home_title%' : home_title} %}report:: Volumetrie des questions posees sur %home_title%{% endtrans %}</caption>
<thead>
<tr>
<th>{{ title_left }}</th>
<th>{{ title_right }}</th>
</tr>
</thead>
<tbody>
{% for key, value in item %}
<tr>
<td>{{ value.lib|e }}</td>
<td>{{ value.nb }}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<td colspan='2'>{{ dmin }} - {{ dmax }}</td>
</tr>
</tfoot>
</table>
{%endif%}
{% endmacro %}
{% macro connexion_download(title, title_left, title_right, itemco, itemdl, dmin, dmax ) %}
<table style="margin:0 auto; margin-bottom:30px;">
<caption>{{ title }}</caption>
<thead>
<tr>
<th>{{ title_left }}</th>
<th>{{ title_right }}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ itemco }}</td>
<td>{{ itemdl }}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan='2'>{{ dmin }} - {{ dmax }}</td>
</tr>
</tfoot>
</table>
{% endmacro %}
{% macro table_activity( id, title, title_abscisse, item) %}
{% if item|length > 0 %}
<table border='1' class="center imgdash" id = "{{id}}">
<caption>{{ title }}</caption>
<thead>
<tr>
<th></th>
{% for key in item|keys %}
<th>{{ key }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
<tr>
<th>
{% if title_abscisse|length > 0 %}
{{ title_abscisse }}
{% endif %}
</th>
{% for value in item %}
<td>{{ value }}</td>
{% endfor %}
</tr>
</tbody>
</table>
{% endif %}
{% endmacro %}

View File

@@ -1,49 +1,67 @@
{% block form_date_and_base %}
<div class="form1 span3">
<div class="form1 form_content">
<div class="form_titre">{{ "report:: 1 - Periode" | trans }}</div>
<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="{{ "-1 month"|date("Y-m-d") }}" size="10" style='width:100px'/>
<div class="input-prepend">
<span class="add-on"></span>
<input class="dmin" name="dmin" type="text"
value="{{ "-1 month"|date("Y-m-d") }}" size="10"
placeholder="{{ "YYYY-MM-DD" | trans }}"
/>
</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="{{ "now"|date("Y-m-d") }}" size="10" style='width:100px'/>
<label for="dmax">{{ "report:: Au (date)" | trans }}</label>
<div class="input-prepend">
<span class="add-on"></span>
<input class="dmax" name="dmax" type="text"
value="{{ "now"|date("Y-m-d") }}" size="10"
placeholder="{{ "YYYY-MM-DD" | trans }}"
/>
</div>
</div>
</div>
<div class="form2 span5">
<div class="form_titre">{{ "report:: 2 - Bases" | trans }}</div>
<div id="select_one">
<ul class="multiselect" style="max-height: 150px; overflow-y: auto; overflow-x: hidden;">
<li>
<a href="javascript:void(0);" class="select-all btn btn-mini">
{% trans %}Select all{% endtrans %}
</a>
<a href="javascript:void(0);" class="deselect-all btn btn-mini">
{% trans %}Deselect all{% endtrans %}
</a>
</li>
{% for sbas_id,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="{{ sbas_id }}_{{ collection.id }}">
{{ collection.name }}
</label>
</a>
<div class="form2 form_content">
<div class="form_titre">{{ "report:: 2 - Base" | trans }}</div>
<select class="select_one sbas_select" name="sbas">
{% for sbas_id,databox in granted_bases %}
<option
value="{{ sbas_id }}"
data-action="{{ path(route, {'sbasId': sbas_id}) }}"
>{{ databox.name }}</option>
{% endfor %}
</select>
</div>
<div class="form2 form_content form_content_checkboxes">
{% if displayCollections == true %}
<div class="form_titre">
{{ "report:: 3 - Collections" | trans }}
</div>
{% for sbas_id,databox in granted_bases %}
<div class="collist collist-{{ sbas_id }}">
<div class="collist_buttons">
<button class="select-all btn btn-mini" data-target_selector="#chkcol-{{ tab }}-{{ sbas_id }} input:checkbox">
{% trans %}Select all{% endtrans %}
</button>
<button class="unselect-all btn btn-mini" data-target_selector="#chkcol-{{ tab }}-{{ sbas_id }} input:checkbox">
{% trans %}Deselect all{% endtrans %}
</button>
</div>
<ul id="chkcol-{{ tab }}-{{ sbas_id }}" style="max-height: 150px; overflow-y: auto; overflow-x: hidden;">
{% for collection in databox.collections %}
<li>
<label class="checkbox custom_checkbox_label">
<input name="base[]" checked="checked" type="checkbox" value="{{ collection.base_id }}">
<span class="custom_checkbox"></span>
{{ collection.name }}
</label>
</li>
{% endfor %}
{% endfor %}
</ul>
</div>
{% endfor %}
</ul>
</div>
{% endfor %}
{% endif %}
</div>
{% endblock form_date_and_base %}

View File

@@ -1,117 +0,0 @@
{% if result.result|length > 0 %}
<div class="report-table curfilter" style="color:#555555;">
{% if result.posting_filter|length > 0 %}
{% for filter in result.posting_filter %}
- <b>{{ filter.f }}</b> = <i>{{ filter.v }}</i> -
{% endfor %}
{% endif %}
</div>
<div class="report-table result-table" >
<table {% if is_plot %} class="plot" {% endif %} {% if is_nav %} class="{{index}}" {% endif %}>
<caption>
<div class="left titleleft">
<div class="title left">{{ result.title }}</div>
{% if result.config %}
<a href="#" class="config left"><img title="{{ 'report :: configurer le tableau' | trans }}" src="/assets/report/images/config.png"/></a>
{% endif %}
{% if result.print %}
<a href="#" class="jqprint left"><img title="{{ 'report :: imprimer le tableau' | trans }}" src="/assets/report/images/print.png"/></a>
{% endif %}
{% if result.csv %}
<a id="export_csv" class="left" href="#" style="display:inline-block; width: 20px;height:20px;margin-left: 10px;">
<img title="{{ 'CSV export' | trans }}" src="/assets/report/images/csv.gif">
</a>
{% endif %}
</div>
<div class="right">{{ result.periode }}</div>
<div style="clear:both;height:2px;"></div>
<div class="right" style="font-weight:lighter;font-size:10px;">
{% set total_count = result.total %}
{% if total_count > 0 and total_count != 0 %}
<i>
{% if total_count == 1 %}
{% trans %}1 result{% endtrans %}
{% else %}
{% trans with {'%total_count%' : total_count} %}%total_count% results{% endtrans %}
{% endif %}
</i>
{% endif %}
</div>
<div class="spacer"></div>
</caption>
<thead>
{% set colspan = "" %}
{% for key, value in result.display %}
<th class="{{ key }}" scope="col" >
{% if value.sort == 1 %}
<div class="orderby">
<img title="{{ "Trier" | trans }}" style="float:left;top:0;left:0;" class="asc" src="/assets/report/images/arrow_up.png" />
<img title="{{ "Trier" | trans }}" style="float:left;top:0;left:0;" class="desc" src="/assets/report/images/arrow_down.png" />
{% endif %}
<div class="title_th" style="clear:both;color:black;">{{ value.title }}</div>
{% if value.sort == 1 %}
</div>
{% endif %}
<div style="height:8px;">
{% if value.filter == 1 %}
<a href="#" title="{{ "Filtrer" | trans }}" style="float:left;bottom:0;left:0;font-size:8px;" class="{{ key }} filter ">{{ "report :: filtrer" | trans }}</a>
{% endif %}
{% if value.groupby == 1 %}
<a href="#" title="{{ "Grouper" | trans }}" style="float:right;bottom:0;right:0;font-size:8px;" class="{{ key }} groupby ">{{ "report :: grouper" | trans }}</a>
{% endif %}
</div>
</th>
{% set colspan = loop.length %}
{% endfor %}
</thead>
<tbody>
{% for tr, value in result.result %}
{% if loop.index is even %}
<tr class="even">
{% else %}
<tr class="odd">
{% endif %}
{% for class, config in result.display %}
<td class="{{ class }}">
{% for key , res in value %}
{% if key|lower == class %}
{% if config.bound == 1 and "</i>" not in res %}
{% if key == "user" and value.user == "<b>TOTAL</b>" %}
{{ res|raw }}
{% elseif is_nav or is_doc %}
<a href="#" rel ="" class="{{res}} bound">{{ res|raw }}</a>
{% else %}
<a href="#" rel ="" class="{{value.usrid}} bound">{{ res|raw }}</a>
{% endif %}
{% else %}
{{ res|raw }}
{% endif %}
{% endif %}
{% endfor %}
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<td colspan="{{colspan}}"></td>
</tr>
</tfoot>
</table>
</div>
{% else %}
<div class="report-table center" style="margin-top:50px;" >
<b>{{ result.title }}</b>
<br />
<img src="/assets/report/images/noresults.png" />
<br />
<i>{{ "report :: aucun resultat trouve" | trans }}</i><br />
</div>
{% endif %}

View File

@@ -1,43 +0,0 @@
{% block listColumn %}
<div class='modalwrapper' style="height:400px; overflow-y: auto">
<div class="columnjson_title">{{ "Cochez les cases correspondantes aux colonnes que vous desirez voire apparaitre dans le report" | trans }} </div> <br />
<div>
<div class="columnjson_link_box">
<a class="columnjson_link" href='#' id='on'><img src ='/assets/report/images/checkbox_checked.png' />{{ "cocher tout" | trans }}</a>
</div>
&nbsp;&nbsp;
<div class="columnjson_link_box">
<a class="columnjson_link" href='#' id='off'><img src ='/assets/report/images/checkbox_unchecked.png' />{{ "tout decocher" | trans }}</a>
</div>
</div>
<br />
<form>
{% for key, value in conf %}
{% set k="true" %}
{% for key2, value2 in value %}
{% if value2 == 1 %}
{% set k = "false" %}
{% endif %}
{% endfor %}
{% set val = key %}
{% if key == "date" %}
{% set val = "ddate" %}
{% endif %}
{% if k == "true" %}
<input type='checkbox' value='{{ val }}' name='{{ key }}' checked='checked' /><label style='color:yellow;'>{{ value.0 }}</label><br />
{% else %}
<input type='checkbox' value='{{ val }}' name='{{ key }}' checked='checked'/><label>{{ value.0 }}</label><br />
{% endif %}
{% endfor %}
</form>
</div>
<script type="text/javascript">
$('a#on').click(function(){
$(this).closest('#dialog').find(':checkbox').prop('checked', true);
});
$('a#off').click(function(){
$(this).closest('#dialog').find(':checkbox').prop('checked', false);
});
</script>
{% endblock %}

View File

@@ -1,8 +0,0 @@
<div class="row-fluid">
<div class="span12">
<button class="hided" style="margin-left:3px;float:left;"></button>
<button class="showed" style="display:none;margin-left:3px;float:left;"></button>
<button class="hided" style="margin-right:10px;float:right;"></button>
<button class="showed" style="display:none;margin-right:10px;float:right;"></button>
</div>
</div>

View File

@@ -1,34 +1,29 @@
{% extends "report/all_content.html.twig" %}
{% block report_layout %}
<div id="form-container" style="margin-top:50px;" >
<div id="mainTabs">
<ul id="navigation">
<li><a href="#dash">{{ "report:: Dashboard" | trans }}</a></li>
<li><a href="#report-connexions">{{ "report:: Connexion" | trans }}</a></li>
<li><a href="#report-telechargement">{{ "report:: telechargements" | trans }}</a></li>
<li><a href="#report-activite">{{ "report:: activite du site" | trans }}</a></li>
</ul>
<div class="report_wrapper">
<div id="form-container">
<h2 class="report_heading">{{"report:: Phraseanet report" | trans}}</h2>
<div id="mainTabs">
<ul id="navigation">
<li class="navigation_tab"><a href="#report-connections">{{ "report:: Connexion" | trans }}</a></li>
<li class="navigation_tab"><a href="#report-downloads">{{ "report:: telechargements" | trans }}</a></li>
<li class="navigation_tab"><a href="#report-records">{{ "report:: Databox content" | trans }}</a></li>
</ul>
{% block report_dashboard_layout %}
{% endblock report_dashboard_layout %}
{% block report_connections_layout %}
{% endblock report_connections_layout %}
{% block report_downloads_layout %}
{% endblock report_downloads_layout %}
{% block report_connexion_layout %}
{% endblock report_connexion_layout %}
{% block report_records_layout %}
{% endblock report_records_layout %}
{% block report_telechargement_layout %}
{% endblock report_telechargement_layout %}
{% block report_activite_layout %}
{% endblock report_activite_layout %}
{# END MAINTABS #}
{# END MAINTABS #}
</div>
{# END FORM CONTAINER #}
</div>
{# END FORM CONTAINER #}
</div>
<iframe name="iframe" style="display:none;"></iframe>
{% endblock report_layout %}

View File

@@ -1,214 +1,97 @@
{% extends "report/report_layout.html.twig" %}
{% block report_dashboard_layout %}
<div id="dash" class="inside-container">
<div class="answers container-fluid">
<div class="content">
<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 fa fa-calendar" aria-hidden="true"></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>
<label for="dmaxDash" style="color:#eee">{{ "to"|trans|title }}</label>
<div class="input-prepend">
to
<span class="add-on"><i class="icon fa fa-calendar" aria-hidden="true"></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 fa fa-exclamation-triangle" aria-hidden="true"></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">{% 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> #}
{# {% for it in dashboard.authorizedCollection %} #}
{# <option value="{{it.sbas_id}}">{{ it.name }}</option> #}
{# {% endfor %} #}
{#</select> #}
{#</div> #}
</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_connections_layout %}
<div id="report-connections" class="inside-container">
<form class="form row-fluid" id="report-connections-form" method="POST">
{% block report_connexion_layout %}
<div id="report-connexions" class="inside-container">
{% include "report/form_date_and_base.html.twig" with {'tab': "connections", 'route': "report2_connections", 'displayCollections':false } %}
<form class="form row-fluid" >
{% include "report/form_date_and_base.html.twig" %}
{% block form_connexion %}
<div class="form3 span4">
<div class="form_titre">{{ "report:: 3 - Type de report" | trans }} </div>
{% if not anonymous %}
<div>
<input name="tbl" type="radio" value="CNXU" data-action="{{ path('report_activity_users_connexions') }}" id="CNXU-input" class="formsubmiter" />
<label for="CNXU-input">{{ "report:: (connexions) Par utilisateurs" | trans }}</label>
</div>
{% else %}
<div>
<input name="tbl" type="radio" value="CNXU" data-action="{{ path('report_activity_users_connexions') }}" id="CNXU-input" class="formsubmiter" />
<label for="CNXU-input">{{ "report:: Grouper par" | trans }}</label>
<select class="options" style="display:inline;display:none;" id="list-select" name="on" >
<option selected ="selected" value="fonction" class="formsubmiter">{{ "report:: fonction" | trans }}</option>
<option value="societe" class="formsubmiter">{{ "report:: societe" | trans }}</option>
<option value="activite" class="formsubmiter">{{ "report:: activite" | trans }}</option>
<option value="pays" class="formsubmiter">{{ "report:: pays" | trans }}</option>
</select>
</div>
{% endif %}
<div>
<input name="tbl" type="radio" value="CNX" data-action="{{ path('report_connexions') }}" id="CNX-input" class="formsubmiter" />
<label for="CNX-input">{{ "report:: (connexions) Globales" | trans }}</label>
</div>
<div>
<input name="tbl" type="radio" value="CNXB" data-action="{{ path('report_clients') }}" id="CNXB-input" class="formsubmiter" />
<label for="CNXB-input">{{ "report:: (connexions) OS et navigateurs" | trans }}</label>
</div>
</div>
<div class="form3 form_content">
<div class="form_titre">{{ "report:: 3 - Type de report" | trans }} </div>
<select class="select_one" name="group">
{% for x in ['','user','nav','nav,version','os','os,nav','os,nav,version','res'] %}
{% set l="report:: (connexions) #{x}" %}
<option value="{{ x }}" id="connections_{{ x }}">{{ l | trans }}</option>
{% endfor %}
</select>
</div>
{% endblock form_connexion %}
</form>
{% include "report/panel_hide_button.html.twig" %}
<div class="answers">
<div class="content">
{% if ajax %}
{% include "report/ajax_report_content.html.twig" %}
{%endif%}
</div>
<div class="form_submit">
<button class="formsubmiter" data-form_selector="#report-connections-form">Download</button>
</div>
</div>
{% endblock report_connexion_layout %}
{% endblock report_connections_layout %}
{% block report_telechargement_layout %}
<div id="report-telechargement" class="inside-container">
<form class="form row-fluid" >
{% include "report/form_date_and_base.html.twig" %}
{% block form_telechargement %}
<div class="form3 span4">
<div class="form_titre">{% trans %}report:: 3 - Type de report{% endtrans %}</div>
{% if anonymous %}
<div>
<input name="tbl" type="radio" value="USR" data-action="{{ path('report_activity_users_downloads') }}" id="USR-dl" class="formsubmiter" />
<label for="USR-dl">{{ "report:: Grouper par" | trans }}</label>
<select class="options" style="display:inline;display:none;" id="list-select2" name="on" >
<option selected ="selected" value="fonction" class="formsubmiter">{{ "report:: fonction" | trans }}</option>
<option value="societe" class="formsubmiter">{{ "report:: societe" | trans }}</option>
<option value="activite" class="formsubmiter">{{ "report:: activite" | trans }}</option>
<option value="pays" class="formsubmiter">{{ "report:: pays" | trans }}</option>
</select>
</div>
{% else %}
<div>
<input name="tbl" type="radio" value="USR" data-action="{{ path('report_activity_users_downloads') }}" id="USR-input" class="formsubmiter" />
<label for="USR-input">{{ "report:: par utilisateurs" | trans }}</label>
</div>
{% endif %}
<div>
<input name="tbl" type="radio" value="GEN" data-action="{{ path('report_downloads') }}" id="GEN-input" class="formsubmiter" />
<label for="GEN-input">{{ "report:: (telechargement) Global" | trans }}</label>
</div>
<div>
<input name="tbl" type="radio" value="DAY" data-action="{{ path('report_activity_instance_days') }}" id="DAY-input" class="formsubmiter" />
<label for="DAY-input">{{ "report:: (telechargement) Par jours base par base" | trans }}</label>
</div>
<div>
<input name="tbl" type="radio" value="DOC" data-action="{{ path('report_documents') }}" id="DOC-input" class="formsubmiter" />
<label for="DOC-input">{{ "report:: (telechargement) Par documents sur la base" | trans }}</label>
<select class="options" id="precise" name="precise" style="display:none;">
<option value="0">{{ "report::aucune precision" | trans }}</option>
<option value="1">{{ "report::la description contient" | trans }}</option>
<option value="2">{{ "report:: recordid" | trans }}</option>
</select>
<input name="preciseWord" type="text" value="" class="options entersubmiter" />
</div>
</div>
{% endblock form_telechargement %}
{% block report_downloads_layout %}
<div id="report-downloads" class="inside-container">
<form class="form row-fluid" id="report-downloads-form" method="POST">
{% include "report/form_date_and_base.html.twig" with {'tab': "downloads", 'route': "report2_downloads", 'displayCollections': true } %}
<div class="form3 form_content">
<div class="form_titre">{% trans %}report:: 3 - Type de report{% endtrans %}</div>
<select class="select_one" name="group">
{% for x in ['','user','record'] %}
{% set l="report:: (downloads) #{x}" %}
<option value="{{ x }}" id="downloads_{{ x }}">{{ l | trans }}</option>
{% endfor %}
</select>
</div>
</form>
{% include "report/panel_hide_button.html.twig" %}
<div class="answers">
<div class="content">
{% if ajax %}
{% include "report/ajax_report_content.html.twig" %}
{%endif%}
</div>
</div>
</div>
{% endblock report_telechargement_layout %}
{% block report_activite_layout %}
<div id="report-activite" class="inside-container">
<form class="form row-fluid" >
{% include "report/form_date_and_base.html.twig" %}
{% block form_activite %}
<div class="form3 span4">
<div class="form_titre">{{ "report:: 3 - Type de report" | trans }} </div>
{% if anonymous %}
<input name="on" type="hidden" value="" checked="checked"/>
{% endif %}
<div>
<input name="tbl" type="radio" value="ASK" data-action="{{ path('report_questions') }}" id="ASK-input" class="formsubmiter" />
<label for="ASK-input">{{ "report:: toutes les questions" | trans }}</label>
</div>
<div>
<input name="tbl" type="radio" value="BESTOF" data-action="{{ path('report_activity_questions_bestof') }}" id="BESTOF-input" class="formsubmiter" />
<label for="BESTOF-input">{{ "report:: Les questions les plus posees" | trans }}</label>
</div>
<div>
<input name="tbl" type="radio" value="NOBESTOF" data-action="{{ path('report_activity_questions_nobestof') }}" id="NOBESTOF-input" class="formsubmiter" />
<label for="NOBESTOF-input">{{ "report:: questions sans reponses" | trans }}</label>
</div>
<div>
<input name="tbl" type="radio" value="SITEACTIVITY" data-action="{{ path('report_activity_instance_hours') }}" id="SITEACTIVITY-input" class="formsubmiter" />
<label for="SITEACTIVITY-input">{{ "report:: activite du site" | trans }}</label>
</div>
<div>
<input name="tbl" type="radio" value="WDOC" data-action="{{ path('report_activity_documents_pushed') }}" id="WDOC" class="formsubmiter" />
<label for="WDOC">{{ "report:: document" | trans }}</label>
<select class="options formsubmiter" style="display:inline;display:none;" id="list-select3" name="docwhat" >
<option selected ="selected" value="PUSHDOC" data-action="{{ path('report_activity_documents_pushed') }}" class="formsubmiter">{{ "report:: pushe" | trans }}</option>
<option value="ADDDOC" data-action="{{ path('report_activity_documents_added') }}" class="formsubmiter">{{ "report:: ajoute" | trans }}</option>
<option value="EDIDOC" data-action="{{ path('report_activity_documents_edited') }}" class="formsubmiter">{{ "report:: edite" | trans }}</option>
<option value="VALIDOC" data-action="{{ path('report_activity_documents_validated') }}" class="formsubmiter">{{ "report:: valide" | trans }}</option>
<option value="SENTDOC" data-action="{{ path('report_activity_documents_sent') }}" class="formsubmiter">{{ "Sent" | trans }}</option>
</select>
</div>
</div>
{% endblock form_activite %}
</form>
{% include "report/panel_hide_button.html.twig" %}
<div class="answers">
<div class="content">
{% if ajax %}
{% include "report/ajax_report_content.html.twig" %}
{%endif%}
</div>
<div class="form_submit">
<button class="formsubmiter" data-form_selector="#report-downloads-form">Download</button>
</div>
</div>
{% endblock report_activite_layout %}
{% endblock report_downloads_layout %}
{% block report_records_layout %}
<div id="report-records" class="inside-container">
<form class="form row-fluid" id="report-records-form" method="POST">
{% include "report/form_date_and_base.html.twig" with {'tab': "records", 'route': "report2_records", 'displayCollections': true } %}
{% block form_records %}
<div class="form3 form_content form_content_checkboxes">
<div class="form_titre">{{ "report:: 4 - Fields" | trans }}</div>
{% for sbas_id,databox in granted_bases %}
<div class="collist collist-{{ sbas_id }}">
<div class="collist_buttons">
<button class="select-all btn btn-mini" data-target_selector="#chkfld-records-{{ sbas_id }} input:checkbox">
{% trans %}Select all{% endtrans %}
</button>
<button class="unselect-all btn btn-mini" data-target_selector="#chkfld-records-{{ sbas_id }} input:checkbox">
{% trans %}Deselect all{% endtrans %}
</button>
</div>
<ul id="chkfld-records-{{ sbas_id }}" style="max-height: 150px; overflow-y: auto; overflow-x: hidden;">
{% for meta in databox.metas %}
<li>
<label class="checkbox custom_checkbox_label">
<input name="meta[]" checked="checked" type="checkbox" value="{{ meta }}">
<span class="custom_checkbox"></span>
{{ meta }}
</label>
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
{% endblock form_records %}
</form>
<div class="form_submit">
<button class="formsubmiter" data-form_selector="#report-records-form">Download</button>
</div>
</div>
{% endblock report_records_layout %}