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