Compare commits

..

No commits in common. "aef67571f668aa9e8de5c483d75a288d9a4b360b" and "2ec1ae6824016164e440913278fb775ca9d7c12c" have entirely different histories.

3 changed files with 5 additions and 10 deletions

View File

@ -59,18 +59,17 @@ class CoreController extends Controller
// Chargement des chartes à signer // Chargement des chartes à signer
if($user) { if($user) {
$notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeToRead($user); $notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeToRead($user);
if(! $notices->isEmpty()) { if(! $notices->isEmpty()) {
$notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeUser($user,false); $notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeUser($user,false);
return $this->render('CadolesPortalBundle:Notice:mustread.html.twig',[ return $this->render('CadolesPortalBundle:Notice:mustread.html.twig',[
'useheader' => true, 'useheader' => true,
'usemenu' => false, 'usemenu' => false,
'usesidebar' => false, 'usesidebar' => false,
'maxwidth' => true, 'maxwidth' => true,
'mustread' => true, 'mustread' => true,
'notices' => $notices, 'notices' => $notices
'id' => $id,
]); ]);
} }

View File

@ -210,10 +210,6 @@ class NoticeController extends Controller
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$user=$this->getUser(); $user=$this->getUser();
$notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeToRead($user); $notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeToRead($user);
// Récupération redirection potentielle
$id = $request->get('id');
foreach($notices as $notice) { foreach($notices as $notice) {
$users=$notice->getUsers(); $users=$notice->getUsers();
@ -227,7 +223,7 @@ class NoticeController extends Controller
} }
} }
return $this->redirectToRoute("cadoles_core_home",["id"=>$id]); return $this->redirectToRoute("cadoles_core_home");
} }
public function viewAction(Request $request) { public function viewAction(Request $request) {

View File

@ -18,7 +18,7 @@
{% endfor %} {% endfor %}
<form name="toread" method="post"> <form name="toread" method="post">
<input style="float:left; zoom:1.7;margin:5px 0px 0px 0px;" type="checkbox" id="readcharte" name="readcharte" value="0"> <input style="float:left; zoom:1.7;margin:5px 0px 0px 0px;" type="checkbox" id="readcharte" name="readcharte" value="0">
<span style="float:left; zoom: 1.7;margin-top: 3px;">Accepter la charte d'utilisation</span> <span style="float:left; zoom: 1.7;margin-top: 3px;">Accepter la charte d'utilisation</span>
</form> </form>
@ -37,7 +37,7 @@
function haveRead() { function haveRead() {
if($("#readcharte").val()=="1") { if($("#readcharte").val()=="1") {
document.location.href ="{{ path("cadoles_portal_user_notice_haveread",{id:id}) }}"; document.location.href ="{{ path("cadoles_portal_user_notice_haveread") }}";
} }
} }
{% endblock %} {% endblock %}