Merge branch 'master' into dist/envole/6/master
This commit is contained in:
commit
3e35acb028
@ -18,6 +18,10 @@ body {
|
||||
margin-top:100px;
|
||||
}
|
||||
|
||||
.imageshadow {
|
||||
filter: drop-shadow(1px 1px 1px #222);
|
||||
}
|
||||
|
||||
/*== HEADER =============================================================================================================================================*/
|
||||
|
||||
.header {
|
||||
@ -401,6 +405,37 @@ a.item-heart {
|
||||
.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 {
|
||||
width:100%;
|
||||
height:auto;
|
||||
|
@ -34,7 +34,6 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
|
@ -1092,15 +1092,15 @@ class InitDataCommand extends ContainerAwareCommand
|
||||
$entityWidget->setId(-1810);
|
||||
$entityWidget->setRoworder(2);
|
||||
$entityWidget->setIcon($entityicon);
|
||||
$entityWidget->setName('Documents Onlyoffice');
|
||||
$entityWidget->setName('Onlyoffice');
|
||||
$entityWidget->setDescription("Les documents associés à votre groupe");
|
||||
$entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_onlydoc");
|
||||
$entityWidget->setHeight("630");
|
||||
$entityWidget->setAutoajust(true);
|
||||
$entityWidget->setBorder(false);
|
||||
$entityWidget->setBorder(true);
|
||||
$entityWidget->setOpened(true);
|
||||
$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);
|
||||
$em->persist($entityWidget);
|
||||
}
|
||||
|
@ -2121,6 +2121,7 @@ class PagewidgetController extends Controller
|
||||
// Permissions
|
||||
if($access=="config") {
|
||||
$canupdate = true;
|
||||
$cansee = true;
|
||||
}
|
||||
else {
|
||||
// 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');
|
||||
$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
|
||||
return $this->render($this->labelentity.':viewonlydoc.html.twig', [
|
||||
@ -2141,6 +2154,7 @@ class PagewidgetController extends Controller
|
||||
'folders' => $folders,
|
||||
'tasks' => $tasks,
|
||||
'urlonly' => $this->getParameter("widonlyoffice_url")."/products/projects/projects.aspx?prjID=".$idonly,
|
||||
'apponly' => $apponly,
|
||||
'files' => $files,
|
||||
'access' => $access,
|
||||
]);
|
||||
|
@ -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") {
|
||||
$builder
|
||||
->add($field->id, ChoiceType::class, [
|
||||
|
@ -101,7 +101,7 @@
|
||||
<div onClick="addBookmark({{ entity.id }},false)" class="grid-item-content" style="background-color: #{{color['main']}};cursor:pointer;">
|
||||
<div class="item-link clearfix">
|
||||
<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 class="grid-item-title">
|
||||
<h2>Ajouter</h2>
|
||||
|
@ -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 class="item-link clearfix">
|
||||
<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 class="grid-item-title">
|
||||
<h2>Ajouter un fichier</h2>
|
||||
|
@ -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'>
|
||||
<div class="item-link clearfix">
|
||||
<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 class="grid-item-title">
|
||||
|
@ -80,7 +80,7 @@
|
||||
<div class="item-link clearfix">
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
|
@ -48,16 +48,16 @@
|
||||
|
||||
{%if usage=="group" %}
|
||||
<div class="grid clearfix">
|
||||
<div class="grid-sizer grid-small"></div>
|
||||
<div class="grid-sizer grid-verysmall"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
|
||||
{% if canadd==true %}
|
||||
<div class="grid-item grid-small" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="grid-item grid-verysmall" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="grid-item-content">
|
||||
<a href="{{path('cadoles_core_user_group_users',{'id':id})}}" target="_top" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="item-link clearfix">
|
||||
<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>
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% 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="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
@ -81,6 +81,9 @@
|
||||
<div class="grid-item-title">
|
||||
<h2 style="{{ stylewidgetbodyreverse }};">
|
||||
{{ member.user.lastname }} {{ member.user.firstname }}
|
||||
{% if member.fgmanager %}
|
||||
<br><i class="fa fa-star"></i>
|
||||
{% endif %}
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -179,7 +179,7 @@
|
||||
<div onClick="addBookmark({{ entity.id }},true)" class="grid-item-content" style="background-color: #{{color['main']}};cursor:pointer;">
|
||||
<div class="item-link clearfix">
|
||||
<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 class="grid-item-title">
|
||||
<h2>Ajouter</h2>
|
||||
|
@ -198,7 +198,7 @@
|
||||
<a href="{{ path('cadoles_portal_user_page_application') }}">
|
||||
<div class="item-link clearfix">
|
||||
<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 class="grid-item-title">
|
||||
<h2>Ajouter</h2>
|
||||
|
@ -50,63 +50,76 @@
|
||||
|
||||
{% if files|length >= 1 or canupdate %}
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
<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 %}
|
||||
{% if apponly==0 %}
|
||||
<div style='width:90%; margin:auto;'>
|
||||
<h4 style='margin-bottom:5px;border-bottom:1px solid;'>Documents</h4>
|
||||
</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 %}
|
||||
<div style='width:90%; margin:auto;'>
|
||||
{% if apponly==0 %}
|
||||
<h4 style='margin-bottom:5px;border-bottom:1px solid;'>Tâches</h4>
|
||||
{% for task in tasks %}
|
||||
<li>{{ task.title }}</li>
|
||||
{% if not task.subtasks is empty %}
|
||||
<ul>
|
||||
{% for subtask in task.subtasks %}
|
||||
<li>{{ subtask.title }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{%endif%}
|
||||
|
||||
{% if apponly==0 or apponly==2 %}
|
||||
{% for task in tasks %}
|
||||
<li>{{ task.title }}</li>
|
||||
{% if not task.subtasks is empty %}
|
||||
<ul>
|
||||
{% for subtask in task.subtasks %}
|
||||
<li>{{ subtask.title }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{%endif%}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user