notification ajout suppression widget (ref #131)
This commit is contained in:
parent
354d8df055
commit
28f84e2460
|
@ -135,6 +135,20 @@ class PagewidgetController extends Controller
|
||||||
$em->persist($entity);
|
$em->persist($entity);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
|
||||||
|
// Notification création widget
|
||||||
|
$groups=$page->getGroups();
|
||||||
|
if($groups) {
|
||||||
|
if($groups[0]->getFgcanshare()) {
|
||||||
|
$message="Création Widget ".$entity->getName();
|
||||||
|
$usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$groups[0],"user"=>$this->getUser()]);
|
||||||
|
if($usergroup) {
|
||||||
|
$key=$usergroup->getKeyvalue();
|
||||||
|
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($key,$this->getUser()->getId(),$groups[0]->getId(),$message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if($access=="config") {
|
if($access=="config") {
|
||||||
if($by=="view")
|
if($by=="view")
|
||||||
return $this->redirect($this->generateUrl('cadoles_portal_config_page_view',["id"=>$idpage]));
|
return $this->redirect($this->generateUrl('cadoles_portal_config_page_view',["id"=>$idpage]));
|
||||||
|
@ -267,6 +281,19 @@ class PagewidgetController extends Controller
|
||||||
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Notification création widget
|
||||||
|
$groups=$entity->getPage()->getGroups();
|
||||||
|
if($groups) {
|
||||||
|
if($groups[0]->getFgcanshare()) {
|
||||||
|
$message="Suppression Widget ".$entity->getName();
|
||||||
|
$usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$groups[0],"user"=>$this->getUser()]);
|
||||||
|
if($usergroup) {
|
||||||
|
$key=$usergroup->getKeyvalue();
|
||||||
|
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($key,$this->getUser()->getId(),$groups[0]->getId(),$message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Supression du pagewidget
|
// Supression du pagewidget
|
||||||
$em->remove($entity);
|
$em->remove($entity);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
|
@ -328,7 +328,7 @@
|
||||||
// Suppression d'un widget
|
// Suppression d'un widget
|
||||||
function delWidget(idwidget) {
|
function delWidget(idwidget) {
|
||||||
var txt;
|
var txt;
|
||||||
var r = confirm("Confirmez-vous la suppression de ce widget ?");
|
var r = confirm("ATTENTION\nConfirmez-vous la suppression de ce widget ?\n\nL'ensemble du contenu sera définitivement perdu !!");
|
||||||
if (r == true) {
|
if (r == true) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|
|
@ -64,17 +64,17 @@
|
||||||
<a title="Voir la Tâche" href="{{ path('cadoles_portal_'~access~'_projecttask_view',{'id':projecttask.id,page:entity.page.id}) }}">
|
<a title="Voir la Tâche" href="{{ path('cadoles_portal_'~access~'_projecttask_view',{'id':projecttask.id,page:entity.page.id}) }}">
|
||||||
|
|
||||||
<div class="item-link clearfix">
|
<div class="item-link clearfix">
|
||||||
<div class="grid-item-logo" style="height:55px;width:10%; text-align: center;">
|
<div class="grid-item-logo" style="width:10%; margin:0px; text-align: center;">
|
||||||
{% if projecttask.user is empty %}
|
{% if projecttask.user is empty %}
|
||||||
<img class='grid-item-img avatar' src="/{{ alias }}/uploads/avatar/{{ projecttask.owner.avatar }}" style="width:55px; height:auto">
|
<img class='grid-item-img avatar' src="/{{ alias }}/uploads/avatar/{{ projecttask.owner.avatar }}" style="width:55px; height:auto">
|
||||||
{% else %}
|
{% else %}
|
||||||
<img class='grid-item-img avatar' src="/{{ alias }}/uploads/avatar/{{ projecttask.user.avatar }}" style="width:55px; height:auto">
|
<img class='grid-item-img avatar' src="/{{ alias }}/uploads/avatar/{{ projecttask.user.avatar }}" style="width:55px; height:auto">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="grid-item-title" style="width:90%">
|
<div class="grid-item-title" style="width:90%; position:initial; display: inline-block; padding:0px">
|
||||||
|
<h2 style="line-height:18px;height:auto;padding-left:5px;">{{projecttask.name}}</h2>
|
||||||
|
|
||||||
<h2 style="max-height: 40px; overflow-y: hidden;line-height:18px;">{{projecttask.name}}</h2>
|
<div style="font-size:9px; display:inline-block; width:40%;padding-left:5px;">Affectée à
|
||||||
<div class="pull-left" style="font-size:9px;">Affectée à
|
|
||||||
{% if projecttask.user is empty %}
|
{% if projecttask.user is empty %}
|
||||||
{{ projecttask.owner.username }}
|
{{ projecttask.owner.username }}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -84,13 +84,7 @@
|
||||||
<br>Dans le projet {{projecttask.project.name }}
|
<br>Dans le projet {{projecttask.project.name }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pull-right" style="margin-top:-5px; width:80px; text-align: center;">
|
<div style="text-align: right; font-size:9px; display:inline-block; width:35%;">
|
||||||
<div style="font-size:35px; line-height:30px">
|
|
||||||
{{ projecttask.percentage }}<i style="font-size:12px">%</i>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pull-right" style="text-align: right; font-size:9px;">
|
|
||||||
Priorité = {{ projecttask.priority }}</br>
|
Priorité = {{ projecttask.priority }}</br>
|
||||||
Avant le = {{ projecttask.end|date("d/m/Y") }}</br>
|
Avant le = {{ projecttask.end|date("d/m/Y") }}</br>
|
||||||
{% if projecttask.projecttasktag %}
|
{% if projecttask.projecttasktag %}
|
||||||
|
@ -100,6 +94,11 @@
|
||||||
Statut = {{ projecttask.projecttaskstatus.name }}<br>
|
Statut = {{ projecttask.projecttaskstatus.name }}<br>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
<div style="margin-top:-5px; text-align: right; display:inline-block; width:20%;">
|
||||||
|
<div style="font-size:35px; line-height:30px">
|
||||||
|
{{ projecttask.percentage }}<i style="font-size:12px">%</i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue