Merge branch 'master' into dist/envole/6/master

This commit is contained in:
Arnaud Fornerot 2019-12-19 14:13:03 +01:00
commit 3e35acb028
13 changed files with 143 additions and 67 deletions

View File

@ -18,6 +18,10 @@ body {
margin-top:100px; margin-top:100px;
} }
.imageshadow {
filter: drop-shadow(1px 1px 1px #222);
}
/*== HEADER =============================================================================================================================================*/ /*== HEADER =============================================================================================================================================*/
.header { .header {
@ -401,6 +405,37 @@ a.item-heart {
.grid .grid-small .grid-item-title span { display: none } .grid .grid-small .grid-item-title span { display: none }
.grid .grid-verysmall {
width:80px;
height:105px;
}
.grid .grid-verysmall .item-link {
height:105px;
}
.grid .grid-verysmall .grid-item-logo {
display: block;
height:40px;
width:auto;
}
.grid .grid-verysmall .grid-item-logo img {
height: 40px;
width: auto;
margin: 10px auto;
}
.grid .grid-verysmall .grid-item-title {
display: block;
vertical-align: top;
font-size: 12px;
line-height: 1;
text-align:center;
width: 100%;
}
.grid .grid-verysmall .grid-item-title h2 { font-size:10px; border-bottom: none; }
.grid .grid-verysmall .grid-item-title span { display: none }
.grid .grid-list { .grid .grid-list {
width:100%; width:100%;
height:auto; height:auto;

View File

@ -34,7 +34,6 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>
{% endblock %} {% endblock %}
{% block localjavascript %} {% block localjavascript %}

View File

@ -1092,15 +1092,15 @@ class InitDataCommand extends ContainerAwareCommand
$entityWidget->setId(-1810); $entityWidget->setId(-1810);
$entityWidget->setRoworder(2); $entityWidget->setRoworder(2);
$entityWidget->setIcon($entityicon); $entityWidget->setIcon($entityicon);
$entityWidget->setName('Documents Onlyoffice'); $entityWidget->setName('Onlyoffice');
$entityWidget->setDescription("Les documents associés à votre groupe"); $entityWidget->setDescription("Les documents associés à votre groupe");
$entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_onlydoc"); $entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_onlydoc");
$entityWidget->setHeight("630"); $entityWidget->setHeight("630");
$entityWidget->setAutoajust(true); $entityWidget->setAutoajust(true);
$entityWidget->setBorder(false); $entityWidget->setBorder(true);
$entityWidget->setOpened(true); $entityWidget->setOpened(true);
$entityWidget->setAccess(["config","group"]); $entityWidget->setAccess(["config","group"]);
$parameter = json_decode('{"fields": []}'); $parameter = json_decode('{"fields": [{"id": "apponly", "loc": "col1", "type": "apponly", "label": "Afficher", "value": "0", "mandatory": "true"}]}');
$entityWidget->setParameter($parameter); $entityWidget->setParameter($parameter);
$em->persist($entityWidget); $em->persist($entityWidget);
} }

View File

@ -2121,6 +2121,7 @@ class PagewidgetController extends Controller
// Permissions // Permissions
if($access=="config") { if($access=="config") {
$canupdate = true; $canupdate = true;
$cansee = true;
} }
else { else {
// On s'assure que l'utilisateur à la permission de voir // On s'assure que l'utilisateur à la permission de voir
@ -2130,7 +2131,19 @@ class PagewidgetController extends Controller
} }
$onlyservice = $this->container->get('cadoles.portal.service.only'); $onlyservice = $this->container->get('cadoles.portal.service.only');
$files=$onlyservice->getDocument($group, $folders, $firstfolder, $tasks); $files=$onlyservice->getDocument($group, $folders, $firstfolder, $tasks);
$idonly=$em->getRepository("CadolesCoreBundle:Group")->find($group)->getIdOnlyoffice(); $grp=$em->getRepository("CadolesCoreBundle:Group")->find($group);
if($grp) $idonly= $grp->getIdOnlyoffice();
else $idonly=0;
// Récupération des paramétres du widget
$apponly=0;
foreach($entity->getParameter()["fields"] as $parameter) {
switch($parameter["id"]) {
case "apponly":
$apponly=$parameter["value"];
break;
}
}
// Render // Render
return $this->render($this->labelentity.':viewonlydoc.html.twig', [ return $this->render($this->labelentity.':viewonlydoc.html.twig', [
@ -2141,6 +2154,7 @@ class PagewidgetController extends Controller
'folders' => $folders, 'folders' => $folders,
'tasks' => $tasks, 'tasks' => $tasks,
'urlonly' => $this->getParameter("widonlyoffice_url")."/products/projects/projects.aspx?prjID=".$idonly, 'urlonly' => $this->getParameter("widonlyoffice_url")."/products/projects/projects.aspx?prjID=".$idonly,
'apponly' => $apponly,
'files' => $files, 'files' => $files,
'access' => $access, 'access' => $access,
]); ]);

View File

@ -207,6 +207,18 @@ class PagewidgetType extends AbstractType
]) ; ]) ;
} }
elseif($field->type=="apponly") {
$builder
->add($field->id, ChoiceType::class, [
'label' => $field->label,
'mapped'=> false,
'label_attr' => ['loc' => $field->loc],
'data' => $field->value,
'required' => ($field->mandatory=="true"),
'choices' => array("Documents + Tâches" => "0","Documents uniquement" => "1", "Tâches uniquement" => "2")
]) ;
}
elseif($field->type=="target") { elseif($field->type=="target") {
$builder $builder
->add($field->id, ChoiceType::class, [ ->add($field->id, ChoiceType::class, [

View File

@ -101,7 +101,7 @@
<div onClick="addBookmark({{ entity.id }},false)" class="grid-item-content" style="background-color: #{{color['main']}};cursor:pointer;"> <div onClick="addBookmark({{ entity.id }},false)" class="grid-item-content" style="background-color: #{{color['main']}};cursor:pointer;">
<div class="item-link clearfix"> <div class="item-link clearfix">
<div class="grid-item-logo"> <div class="grid-item-logo">
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_add.png"> <img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png">
</div> </div>
<div class="grid-item-title"> <div class="grid-item-title">
<h2>Ajouter</h2> <h2>Ajouter</h2>

View File

@ -99,7 +99,7 @@
<div data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Fichiers','{{ path('cadoles_core_'~access~'_file_upload',{'id': 'widget-'~entity.id,'type':'all'}) }}');" title='Ajouter des fichiers' class="grid-item-content" style="background-color: #{{color['main']}};cursor:pointer;"> <div data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Fichiers','{{ path('cadoles_core_'~access~'_file_upload',{'id': 'widget-'~entity.id,'type':'all'}) }}');" title='Ajouter des fichiers' class="grid-item-content" style="background-color: #{{color['main']}};cursor:pointer;">
<div class="item-link clearfix"> <div class="item-link clearfix">
<div class="grid-item-logo"> <div class="grid-item-logo">
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_add.png"> <img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png">
</div> </div>
<div class="grid-item-title"> <div class="grid-item-title">
<h2>Ajouter un fichier</h2> <h2>Ajouter un fichier</h2>

View File

@ -86,7 +86,7 @@
<a style="{{ stylewidgetmenu }}" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Fichiers','{{ path('cadoles_core_'~access~'_file_upload',{'id': 'widget-'~entity.id,'type':'image'}) }}');" title='Ajouter des fichiers'> <a style="{{ stylewidgetmenu }}" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Fichiers','{{ path('cadoles_core_'~access~'_file_upload',{'id': 'widget-'~entity.id,'type':'image'}) }}');" title='Ajouter des fichiers'>
<div class="item-link clearfix"> <div class="item-link clearfix">
<div class="grid-item-logo"> <div class="grid-item-logo">
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" /> <img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" />
</div> </div>
<div class="grid-item-title"> <div class="grid-item-title">

View File

@ -80,7 +80,7 @@
<div class="item-link clearfix"> <div class="item-link clearfix">
<div class="grid-item-logo"> <div class="grid-item-logo">
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" /> <img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" />
</div> </div>

View File

@ -48,16 +48,16 @@
{%if usage=="group" %} {%if usage=="group" %}
<div class="grid clearfix"> <div class="grid clearfix">
<div class="grid-sizer grid-small"></div> <div class="grid-sizer grid-verysmall"></div>
<div class="grid-gutter-sizer"></div> <div class="grid-gutter-sizer"></div>
{% if canadd==true %} {% if canadd==true %}
<div class="grid-item grid-small" style="{{ stylewidgetbodyreverse }};"> <div class="grid-item grid-verysmall" style="{{ stylewidgetbodyreverse }};">
<div class="grid-item-content"> <div class="grid-item-content">
<a href="{{path('cadoles_core_user_group_users',{'id':id})}}" target="_top" style="{{ stylewidgetbodyreverse }};"> <a href="{{path('cadoles_core_user_group_users',{'id':id})}}" target="_top" style="{{ stylewidgetbodyreverse }};">
<div class="item-link clearfix"> <div class="item-link clearfix">
<div class="grid-item-logo"> <div class="grid-item-logo">
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" /> <img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" />
</div> </div>
@ -71,7 +71,7 @@
{% endif %} {% endif %}
{% for member in members %} {% for member in members %}
<div class="grid-item grid-small" style="{{ stylewidgetbodyreverse }};"> <div class="grid-item grid-verysmall" style="{{ stylewidgetbodyreverse }};">
<div class="grid-item-content"> <div class="grid-item-content">
<div class="item-link clearfix"> <div class="item-link clearfix">
<div class="grid-item-logo"> <div class="grid-item-logo">
@ -81,6 +81,9 @@
<div class="grid-item-title"> <div class="grid-item-title">
<h2 style="{{ stylewidgetbodyreverse }};"> <h2 style="{{ stylewidgetbodyreverse }};">
{{ member.user.lastname }} {{ member.user.firstname }} {{ member.user.lastname }} {{ member.user.firstname }}
{% if member.fgmanager %}
<br><i class="fa fa-star"></i>
{% endif %}
</h2> </h2>
</div> </div>
</div> </div>

View File

@ -179,7 +179,7 @@
<div onClick="addBookmark({{ entity.id }},true)" class="grid-item-content" style="background-color: #{{color['main']}};cursor:pointer;"> <div onClick="addBookmark({{ entity.id }},true)" class="grid-item-content" style="background-color: #{{color['main']}};cursor:pointer;">
<div class="item-link clearfix"> <div class="item-link clearfix">
<div class="grid-item-logo"> <div class="grid-item-logo">
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_add.png"> <img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png">
</div> </div>
<div class="grid-item-title"> <div class="grid-item-title">
<h2>Ajouter</h2> <h2>Ajouter</h2>

View File

@ -198,7 +198,7 @@
<a href="{{ path('cadoles_portal_user_page_application') }}"> <a href="{{ path('cadoles_portal_user_page_application') }}">
<div class="item-link clearfix"> <div class="item-link clearfix">
<div class="grid-item-logo"> <div class="grid-item-logo">
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_add.png"> <img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png">
</div> </div>
<div class="grid-item-title"> <div class="grid-item-title">
<h2>Ajouter</h2> <h2>Ajouter</h2>

View File

@ -50,63 +50,76 @@
{% if files|length >= 1 or canupdate %} {% if files|length >= 1 or canupdate %}
<div class="widgetbody" style="{{ stylewidgetbody }}"> <div class="widgetbody" style="{{ stylewidgetbody }}">
<div class="grid clearfix"> {% if apponly==0 %}
<div class="grid-sizer grid-small"></div> <div style='width:90%; margin:auto;'>
<div class="grid-gutter-sizer"></div> <h4 style='margin-bottom:5px;border-bottom:1px solid;'>Documents</h4>
{% for file in files %}
<div class="grid-item grid-small">
<div class="grid-item-content">
<a href="{{ file.webUrl }}" target="_blank">
<div class="item-link clearfix">
<div class="grid-item-logo">
{% if file.fileExst ==".png" or file.fileExst ==".jpg" or file.fileExst ==".jpeg" or file.fileExst ==".svg" or file.fileExst ==".gif"%}
<img class="grid-item-img" height="110" src="{{file.viewUrl}}">
{% else %}
<img class="grid-item-img" height="110" src="/{{ alias }}/bundles/cadolescore/images/files/{{ file.fileExst | replace({".":""})}}.png">
{% endif %}
</div>
<div class="grid-item-title">
<h2 style="color:#{{colorbodyfont}}">{{ file.title }}</h2>
</div>
</div>
</a>
</div>
</div>
{% endfor %}
{% if canadd %}
<div class="grid-item grid-small">
<div class="grid-item-content">
<a href="{{urlonly}}" target="_blank" title='Plus de fonctionnalités'>
<div class="item-link clearfix">
<div class="grid-item-logo">
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_add.png">
</div>
<div class="grid-item-title">
<h2>Plus</h2>
</div>
</div>
</a>
</div>
</div>
{% endif %}
</div> </div>
{% endif %}
{% if apponly==0 or apponly==1 %}
<div class="grid clearfix">
<div class="grid-sizer grid-small"></div>
<div class="grid-gutter-sizer"></div>
{% for file in files %}
<div class="grid-item grid-small">
<div class="grid-item-content">
<a href="{{ file.webUrl }}" target="_blank">
<div class="item-link clearfix">
<div class="grid-item-logo">
{% if file.fileExst ==".png" or file.fileExst ==".jpg" or file.fileExst ==".jpeg" or file.fileExst ==".svg" or file.fileExst ==".gif"%}
<img class="grid-item-img" height="110" src="{{file.viewUrl}}">
{% else %}
<img class="grid-item-img" height="110" src="/{{ alias }}/bundles/cadolescore/images/files/{{ file.fileExst | replace({".":""})}}.png">
{% endif %}
</div>
<div class="grid-item-title">
<h2 style="color:#{{colorbodyfont}}">{{ file.title }}</h2>
</div>
</div>
</a>
</div>
</div>
{% endfor %}
{% if canadd %}
<div class="grid-item grid-small">
<div class="grid-item-content">
<a href="{{urlonly}}" target="_blank" title='Plus de fonctionnalités'>
<div class="item-link clearfix">
<div class="grid-item-logo">
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_add.png">
</div>
<div class="grid-item-title">
<h2>Plus</h2>
</div>
</div>
</a>
</div>
</div>
{% endif %}
</div>
{%endif%}
{% if not tasks is empty %} {% if not tasks is empty %}
<div style='width:90%; margin:auto;'> <div style='width:90%; margin:auto;'>
{% if apponly==0 %}
<h4 style='margin-bottom:5px;border-bottom:1px solid;'>Tâches</h4> <h4 style='margin-bottom:5px;border-bottom:1px solid;'>Tâches</h4>
{% for task in tasks %} {%endif%}
<li>{{ task.title }}</li>
{% if not task.subtasks is empty %} {% if apponly==0 or apponly==2 %}
<ul> {% for task in tasks %}
{% for subtask in task.subtasks %} <li>{{ task.title }}</li>
<li>{{ subtask.title }}</li> {% if not task.subtasks is empty %}
{% endfor %} <ul>
</ul> {% for subtask in task.subtasks %}
{% endif %} <li>{{ subtask.title }}</li>
{% endfor %} {% endfor %}
</ul>
{% endif %}
{% endfor %}
{%endif%}
</div> </div>
{% endif %} {% endif %}
</div> </div>