return to page groupe after add member (ref #109)
This commit is contained in:
parent
ab3d712a93
commit
8d03012ba1
|
@ -931,13 +931,17 @@ class GroupController extends Controller
|
||||||
$data=$this->getData($id);
|
$data=$this->getData($id);
|
||||||
$this->canManager($data,$access);
|
$this->canManager($data,$access);
|
||||||
|
|
||||||
|
// idreturn ?
|
||||||
|
$idreturn=$request->get("idreturn");
|
||||||
|
|
||||||
// Affichage du formulaire
|
// Affichage du formulaire
|
||||||
return $this->render($this->labelentity.':users.html.twig', [
|
return $this->render($this->labelentity.':users.html.twig', [
|
||||||
'useheader' => true,
|
'useheader' => true,
|
||||||
'usemenu' => false,
|
'usemenu' => false,
|
||||||
'usesidebar' => ($access=="config"),
|
'usesidebar' => ($access=="config"),
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
$this->labeldata => $data
|
$this->labeldata => $data,
|
||||||
|
'idreturn' => $idreturn,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,12 @@
|
||||||
{% block pagewrapper %}
|
{% block pagewrapper %}
|
||||||
<h1 class="page-header">Gestion des Utilisateurs</h1>
|
<h1 class="page-header">Gestion des Utilisateurs</h1>
|
||||||
<h2>Groupe = {{ group.label }}</h2>
|
<h2>Groupe = {{ group.label }}</h2>
|
||||||
|
{% if idreturn is empty %}
|
||||||
<a class="btn btn-default" href={{ path('cadoles_core_'~access~'_group') }}>Fermer</a>
|
<a class="btn btn-default" href={{ path('cadoles_core_'~access~'_group') }}>Fermer</a>
|
||||||
|
{% else %}
|
||||||
|
<a class="btn btn-default" href={{ path('cadoles_core_home',{'id':idreturn}) }}>Fermer</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if moderegistration!="none" and masteridentity=="SQL"%}
|
{% if moderegistration!="none" and masteridentity=="SQL"%}
|
||||||
<a class="btn btn-primary" style="cursor:pointer" onClick="showMail();">Inviter des personnes non listées ci-dessous</a>
|
<a class="btn btn-primary" style="cursor:pointer" onClick="showMail();">Inviter des personnes non listées ci-dessous</a>
|
||||||
{%endif%}
|
{%endif%}
|
||||||
|
|
|
@ -1889,6 +1889,7 @@ class PagewidgetController extends Controller
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
|
$page=$entity->getPage();
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
if($access=="config") {
|
if($access=="config") {
|
||||||
|
@ -1896,7 +1897,6 @@ class PagewidgetController extends Controller
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
// On s'assure que l'utilisateur à la permission de voir
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
@ -1942,6 +1942,7 @@ class PagewidgetController extends Controller
|
||||||
'description' => $description,
|
'description' => $description,
|
||||||
'members' => $members,
|
'members' => $members,
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
|
'idpage' => $page->getId(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
{% if canadd==true %}
|
{% if canadd==true %}
|
||||||
<div class="grid-item grid-verysmall" 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,'idreturn':idpage})}}" 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 imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" />
|
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" />
|
||||||
|
|
Loading…
Reference in New Issue