svg
This commit is contained in:
parent
fefc4036fa
commit
86c4296061
|
@ -158,20 +158,24 @@ app_group_info:
|
||||||
defaults: { _controller: App\Controller\GroupController:info }
|
defaults: { _controller: App\Controller\GroupController:info }
|
||||||
|
|
||||||
#== Category ======================================================================================================
|
#== Category ======================================================================================================
|
||||||
app_category:
|
app_admin_category:
|
||||||
path: /admin/category
|
path: /admin/category/{by}/{userid}
|
||||||
defaults: { _controller: App\Controller\CategoryController:list }
|
defaults: { _controller: App\Controller\CategoryController:list }
|
||||||
|
|
||||||
|
app_user_category:
|
||||||
|
path: /user/category
|
||||||
|
defaults: { _controller: App\Controller\CategoryController:listuser }
|
||||||
|
|
||||||
app_category_submit:
|
app_category_submit:
|
||||||
path: /admin/category/submit
|
path: /admin/category/submit/{by}/{userid}
|
||||||
defaults: { _controller: App\Controller\CategoryController:submit }
|
defaults: { _controller: App\Controller\CategoryController:submit }
|
||||||
|
|
||||||
app_category_update:
|
app_category_update:
|
||||||
path: /admin/category/update/{id}
|
path: /admin/category/update/{id}/{by}
|
||||||
defaults: { _controller: App\Controller\CategoryController:update }
|
defaults: { _controller: App\Controller\CategoryController:update }
|
||||||
|
|
||||||
app_category_delete:
|
app_category_delete:
|
||||||
path: /admin/category/delete/{id}
|
path: /admin/category/delete/{id}/{by}
|
||||||
defaults: { _controller: App\Controller\CategoryController:delete }
|
defaults: { _controller: App\Controller\CategoryController:delete }
|
||||||
|
|
||||||
#== Illustration ==================================================================================================
|
#== Illustration ==================================================================================================
|
||||||
|
|
|
@ -399,7 +399,7 @@ th.dt-center, td.dt-center { text-align: center; }
|
||||||
}
|
}
|
||||||
|
|
||||||
.foliomenu .logo { float:left; height:40px; margin-top:7px; border-radius: 100%; }
|
.foliomenu .logo { float:left; height:40px; margin-top:7px; border-radius: 100%; }
|
||||||
.foliomenu .avatar { height: 20px; margin: 3px 3px 0px 0px; width: 20px; }
|
.foliomenu .avatar { height: 20px; margin: 0px 3px 0px 0px; width: 20px; }
|
||||||
.foliomenu div { padding: 10px; line-height:35px; float:left;}
|
.foliomenu div { padding: 10px; line-height:35px; float:left;}
|
||||||
.foliomenu a {
|
.foliomenu a {
|
||||||
color: var(--colorftbodydark);
|
color: var(--colorftbodydark);
|
||||||
|
@ -434,7 +434,7 @@ th.dt-center, td.dt-center { text-align: center; }
|
||||||
|
|
||||||
.herofloatmenu {
|
.herofloatmenu {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
background: #cdcdcd;
|
background: var(--colorbgbodydarkdarker);
|
||||||
border-radius: 0px 0px 6px 6px
|
border-radius: 0px 0px 6px 6px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,7 +458,7 @@ th.dt-center, td.dt-center { text-align: center; }
|
||||||
.foliomenu .float-right img {
|
.foliomenu .float-right img {
|
||||||
height:35px;
|
height:35px;
|
||||||
width:35px;
|
width:35px;
|
||||||
margin-top:0px;
|
margin-top:-10px;
|
||||||
}
|
}
|
||||||
.foliomenu .float-right .fa, .foliomenu .float-right .fas {
|
.foliomenu .float-right .fa, .foliomenu .float-right .fas {
|
||||||
font-size:30px!important;
|
font-size:30px!important;
|
||||||
|
|
|
@ -13,23 +13,47 @@ use App\Form\CategoryType as Form;
|
||||||
class CategoryController extends AbstractController
|
class CategoryController extends AbstractController
|
||||||
{
|
{
|
||||||
private $data = "category";
|
private $data = "category";
|
||||||
private $route = "app_category";
|
private $route = "app_admin_category";
|
||||||
private $render = "Category/";
|
private $render = "Category/";
|
||||||
private $entity = "App:Category";
|
private $entity = "App:Category";
|
||||||
|
|
||||||
public function list(Request $request)
|
public function list($by,$userid)
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$datas = $em->getRepository($this->entity)->findAll();
|
if($by=="admin") {
|
||||||
|
$datas = $em->getRepository($this->entity)->findAll();
|
||||||
|
|
||||||
return $this->render($this->render.'list.html.twig',[
|
return $this->render($this->render.'list.html.twig',[
|
||||||
|
$this->data."s" => $datas,
|
||||||
|
"useheader" => true,
|
||||||
|
"usesidebar" => true,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$datas = $em->getRepository($this->entity)->findBy(["user"=>$em->getRepository("App:User")->find($userid)]);
|
||||||
|
|
||||||
|
return $this->render($this->render.'listrender.html.twig',[
|
||||||
|
$this->data."s" => $datas,
|
||||||
|
"by" => $by,
|
||||||
|
"userid" => $userid,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function listuser()
|
||||||
|
{
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
|
$datas = $em->getRepository($this->entity)->findByUser($this->getUser());
|
||||||
|
|
||||||
|
return $this->render($this->render.'listrender.html.twig',[
|
||||||
$this->data."s" => $datas,
|
$this->data."s" => $datas,
|
||||||
"useheader" => true,
|
"by" => "profil",
|
||||||
"usesidebar" => true,
|
"userid" => $this->getUser()->getId(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function submit(Request $request)
|
public function submit($by, $userid, Request $request)
|
||||||
{
|
{
|
||||||
// Initialisation de l'enregistrement
|
// Initialisation de l'enregistrement
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
@ -43,9 +67,17 @@ class CategoryController extends AbstractController
|
||||||
$data->setAppthumbfilteropacity(100);
|
$data->setAppthumbfilteropacity(100);
|
||||||
$data->setAppthumbfiltersepia(0);
|
$data->setAppthumbfiltersepia(0);
|
||||||
|
|
||||||
|
if(!$this->getUser()->hasRole("ROLE_ADMIN")&&($by=="admin"||$by=="update")) {
|
||||||
|
return $this->redirectToRoute("app_home");
|
||||||
|
}
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
$form = $this->createForm(Form::class,$data,array("mode"=>"submit"));
|
if($by=="admin"||$by=="update") {
|
||||||
|
$form = $this->createForm(Form::class,$data,array("mode"=>"submit","by"=>$by,"user"=>$em->getRepository("App:User")->find($userid)));
|
||||||
|
} else {
|
||||||
|
$userid=$this->getUser()->getId();
|
||||||
|
$form = $this->createForm(Form::class,$data,array("mode"=>"submit","by"=>$by,"user"=>$this->getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
// Récupération des data du formulaire
|
// Récupération des data du formulaire
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
@ -60,7 +92,13 @@ class CategoryController extends AbstractController
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
// Retour à la liste
|
// Retour à la liste
|
||||||
return $this->redirectToRoute($this->route);
|
if($by=="admin")
|
||||||
|
return $this->redirectToRoute($this->route,["by"=>$by,"userid"=>-1]);
|
||||||
|
elseif($by=="update")
|
||||||
|
return $this->redirectToRoute("app_user_update",["id"=>$data->getUser()->getId()]);
|
||||||
|
elseif($by=="profil")
|
||||||
|
return $this->redirectToRoute("app_user_profil");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Affichage du formulaire
|
// Affichage du formulaire
|
||||||
|
@ -69,18 +107,30 @@ class CategoryController extends AbstractController
|
||||||
'usesidebar' => true,
|
'usesidebar' => true,
|
||||||
$this->data => $data,
|
$this->data => $data,
|
||||||
'mode' => 'submit',
|
'mode' => 'submit',
|
||||||
'form' => $form->createView()
|
'form' => $form->createView(),
|
||||||
|
'by' => $by,
|
||||||
|
'userid' => $userid,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update($id,Request $request)
|
public function update($id,$by,Request $request)
|
||||||
{
|
{
|
||||||
// Initialisation de l'enregistrement
|
// Initialisation de l'enregistrement
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$data=$em->getRepository($this->entity)->find($id);
|
$data=$em->getRepository($this->entity)->find($id);
|
||||||
|
if(!$data) return $this->redirectToRoute("app_home");
|
||||||
|
|
||||||
|
// Permission
|
||||||
|
if(!$this->getUser()->hasRole("ROLE_ADMIN")&&($by=="admin"||$by=="update")) {
|
||||||
|
return $this->redirectToRoute("app_home");
|
||||||
|
}
|
||||||
|
if($by!="admin"&&$by!="update") {
|
||||||
|
if($this->getUser()!=$data->getUser()&&!$this->getUser()->hasRole("ROLE_ADMIN"))
|
||||||
|
return $this->redirectToRoute("app_home");
|
||||||
|
}
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
$form = $this->createForm(Form::class,$data,array("mode"=>"update"));
|
$form = $this->createForm(Form::class,$data,array("mode"=>"update","by"=>$by,"user"=>$this->getUser()));
|
||||||
|
|
||||||
// Récupération des data du formulaire
|
// Récupération des data du formulaire
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
@ -95,7 +145,13 @@ class CategoryController extends AbstractController
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
// Retour à la liste
|
// Retour à la liste
|
||||||
return $this->redirectToRoute($this->route);
|
if($by=="admin")
|
||||||
|
return $this->redirectToRoute($this->route,["by"=>$by,"userid"=>-1]);
|
||||||
|
elseif($by=="update")
|
||||||
|
return $this->redirectToRoute("app_user_update",["id"=>$data->getUser()->getId()]);
|
||||||
|
elseif($by=="profil")
|
||||||
|
return $this->redirectToRoute("app_user_profil");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Affichage du formulaire
|
// Affichage du formulaire
|
||||||
|
@ -104,15 +160,27 @@ class CategoryController extends AbstractController
|
||||||
'usesidebar' => true,
|
'usesidebar' => true,
|
||||||
$this->data => $data,
|
$this->data => $data,
|
||||||
'mode' => 'update',
|
'mode' => 'update',
|
||||||
'form' => $form->createView()
|
'form' => $form->createView(),
|
||||||
|
'by' => $by,
|
||||||
|
'userid' => $data->getUser()->getId(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delete($id,Request $request)
|
public function delete($id,$by,Request $request)
|
||||||
{
|
{
|
||||||
// Initialisation de l'enregistrement
|
// Initialisation de l'enregistrement
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$data=$em->getRepository($this->entity)->find($id);
|
$data=$em->getRepository($this->entity)->find($id);
|
||||||
|
if(!$data) return $this->redirectToRoute("app_home");
|
||||||
|
|
||||||
|
// Permission
|
||||||
|
if(!$this->getUser()->hasRole("ROLE_ADMIN")&&($by=="admin"||$by=="update")) {
|
||||||
|
return $this->redirectToRoute("app_home");
|
||||||
|
}
|
||||||
|
if($by!="admin"&&$by!="update") {
|
||||||
|
if($this->getUser()!=$data->getCategory()->getUser()&&!$this->getUser()->hasRole("ROLE_ADMIN"))
|
||||||
|
return $this->redirectToRoute("app_home");
|
||||||
|
}
|
||||||
|
|
||||||
// Controle avant suppression
|
// Controle avant suppression
|
||||||
$error=false;
|
$error=false;
|
||||||
|
@ -125,7 +193,12 @@ class CategoryController extends AbstractController
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
// Retour à la liste
|
// Retour à la liste
|
||||||
return $this->redirectToRoute($this->route);
|
if($by=="admin")
|
||||||
|
return $this->redirectToRoute($this->route,["by"=>$by,"userid"=>-1]);
|
||||||
|
elseif($by=="update")
|
||||||
|
return $this->redirectToRoute("app_user_update",["id"=>$data->getUser()->getId()]);
|
||||||
|
elseif($by=="profil")
|
||||||
|
return $this->redirectToRoute("app_user_profil");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,11 @@ class IllustrationController extends AbstractController
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$data = new Entity();
|
$data = new Entity();
|
||||||
|
|
||||||
|
// Permission
|
||||||
|
if(!$this->getUser()->hasRole("ROLE_ADMIN")&&($by=="admin"||$by=="update")) {
|
||||||
|
return $this->redirectToRoute("app_home");
|
||||||
|
}
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
if($by=="admin"||$by=="update") {
|
if($by=="admin"||$by=="update") {
|
||||||
$form = $this->createForm(Form::class,$data,array("mode"=>"submit","by"=>$by,"user"=>$em->getRepository("App:User")->find($userid)));
|
$form = $this->createForm(Form::class,$data,array("mode"=>"submit","by"=>$by,"user"=>$em->getRepository("App:User")->find($userid)));
|
||||||
|
@ -107,7 +112,12 @@ class IllustrationController extends AbstractController
|
||||||
// Initialisation de l'enregistrement
|
// Initialisation de l'enregistrement
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$data=$em->getRepository($this->entity)->find($id);
|
$data=$em->getRepository($this->entity)->find($id);
|
||||||
|
if(!$data) return $this->redirectToRoute("app_home");
|
||||||
|
|
||||||
|
// Permission
|
||||||
|
if(!$this->getUser()->hasRole("ROLE_ADMIN")&&($by=="admin"||$by=="update")) {
|
||||||
|
return $this->redirectToRoute("app_home");
|
||||||
|
}
|
||||||
if($by!="admin"&&$by!="update") {
|
if($by!="admin"&&$by!="update") {
|
||||||
if($this->getUser()!=$data->getCategory()->getUser()&&!$this->getUser()->hasRole("ROLE_ADMIN"))
|
if($this->getUser()!=$data->getCategory()->getUser()&&!$this->getUser()->hasRole("ROLE_ADMIN"))
|
||||||
return $this->redirectToRoute("app_home");
|
return $this->redirectToRoute("app_home");
|
||||||
|
@ -128,7 +138,6 @@ class IllustrationController extends AbstractController
|
||||||
$em->persist($data);
|
$em->persist($data);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
// Retour à l'illustration
|
|
||||||
// Retour à la liste
|
// Retour à la liste
|
||||||
if($by=="admin")
|
if($by=="admin")
|
||||||
return $this->redirectToRoute($this->route,["by"=>$by,"userid"=>-1]);
|
return $this->redirectToRoute($this->route,["by"=>$by,"userid"=>-1]);
|
||||||
|
@ -157,13 +166,17 @@ class IllustrationController extends AbstractController
|
||||||
// Initialisation de l'enregistrement
|
// Initialisation de l'enregistrement
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$data=$em->getRepository($this->entity)->find($id);
|
$data=$em->getRepository($this->entity)->find($id);
|
||||||
|
if(!$data) return $this->redirectToRoute("app_home");
|
||||||
|
|
||||||
|
// Permission
|
||||||
|
if(!$this->getUser()->hasRole("ROLE_ADMIN")&&($by=="admin"||$by=="update")) {
|
||||||
|
return $this->redirectToRoute("app_home");
|
||||||
|
}
|
||||||
if($by!="admin"&&$by!="update") {
|
if($by!="admin"&&$by!="update") {
|
||||||
if($this->getUser()!=$data->getCategory()->getUser()&&!$this->getUser()->hasRole("ROLE_ADMIN"))
|
if($this->getUser()!=$data->getCategory()->getUser()&&!$this->getUser()->hasRole("ROLE_ADMIN"))
|
||||||
return $this->redirectToRoute("app_home");
|
return $this->redirectToRoute("app_home");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Controle avant suppression
|
// Controle avant suppression
|
||||||
$error=false;
|
$error=false;
|
||||||
if($id<0) $error=true;
|
if($id<0) $error=true;
|
||||||
|
@ -196,8 +209,8 @@ class IllustrationController extends AbstractController
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$data=$em->getRepository($this->entity)->find($id);
|
$data=$em->getRepository($this->entity)->find($id);
|
||||||
|
|
||||||
$datanext=$this->getDataAllNext($idcat,$id);
|
$datanext=$this->getDataAllNext($idcat,$data->getSubmittime(),$by);
|
||||||
$dataprev=$this->getDataAllPrev($idcat,$id);
|
$dataprev=$this->getDataAllPrev($idcat,$data->getSubmittime(),$by);
|
||||||
|
|
||||||
$pathinfo=pathinfo($data->getIllustration());
|
$pathinfo=pathinfo($data->getIllustration());
|
||||||
|
|
||||||
|
@ -214,61 +227,55 @@ class IllustrationController extends AbstractController
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected function getDataAllNext($idcat,$id)
|
protected function getDataAllNext($idcat,$submittime,$by)
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$data = $em->createQueryBuilder()
|
$qb = $em->createQueryBuilder()
|
||||||
->select('e')
|
->select('e')
|
||||||
->from($this->entity, 'e')
|
->from($this->entity, 'e')
|
||||||
->where('e.id>:id')
|
->where('e.submittime>:submittime')
|
||||||
->andWhere('e.category=:idcat')
|
->setParameter("submittime", $submittime);
|
||||||
->getQuery()
|
if($by!="home") {
|
||||||
->setParameter("id", $id)
|
$qb=$qb->andWhere('e.category=:idcat')->setParameter("idcat", $idcat);
|
||||||
->setParameter("idcat", $idcat)
|
}
|
||||||
->setMaxResults(1)
|
$data = $qb->orderBy('e.submittime', 'ASC')->getQuery()->setMaxResults(1)->getResult();
|
||||||
->getResult();
|
|
||||||
|
|
||||||
// Si pas de suivant on recherche le premier
|
// Si pas de suivant on recherche le premier
|
||||||
if(!$data) {
|
if(!$data) {
|
||||||
$data = $em->createQueryBuilder()
|
$qb = $em->createQueryBuilder()
|
||||||
->select('e')
|
->select('e')
|
||||||
->from($this->entity, 'e')
|
->from($this->entity, 'e');
|
||||||
->Where('e.category=:idcat')
|
if($by!="home") {
|
||||||
->getQuery()
|
$qb=$qb->andWhere('e.category=:idcat')->setParameter("idcat", $idcat);
|
||||||
->setParameter("idcat", $idcat)
|
}
|
||||||
->setMaxResults(1)
|
$data = $qb->orderBy('e.submittime', 'ASC')->getQuery()->setMaxResults(1)->getResult();
|
||||||
->getResult();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDataAllPrev($idcat,$id)
|
protected function getDataAllPrev($idcat,$submittime,$by)
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$data = $em->createQueryBuilder()
|
$qb = $em->createQueryBuilder()
|
||||||
->select('e')
|
->select('e')
|
||||||
->from($this->entity, 'e')
|
->from($this->entity, 'e')
|
||||||
->where('e.id<:id')
|
->where('e.submittime<:submittime')
|
||||||
->andWhere('e.category=:idcat')
|
->setParameter("submittime", $submittime);
|
||||||
->orderBy('e.id','DESC')
|
if($by!="home") {
|
||||||
->getQuery()
|
$qb=$qb->andWhere('e.category=:idcat')->setParameter("idcat", $idcat);
|
||||||
->setParameter("id", $id)
|
}
|
||||||
->setParameter("idcat", $idcat)
|
$data = $qb->orderBy('e.submittime', 'DESC')->getQuery()->setMaxResults(1)->getResult();
|
||||||
->setMaxResults(1)
|
|
||||||
->getResult();
|
|
||||||
|
|
||||||
// Si pas de précedent on recherche le dernier
|
// Si pas de précedent on recherche le dernier
|
||||||
if(!$data) {
|
if(!$data) {
|
||||||
$data = $em->createQueryBuilder()
|
$qb = $em->createQueryBuilder()
|
||||||
->select('e')
|
->select('e')
|
||||||
->from($this->entity, 'e')
|
->from($this->entity, 'e');
|
||||||
->Where('e.category=:idcat')
|
if($by!="home") {
|
||||||
->orderBy('e.id','DESC')
|
$qb=$qb->Where('e.category=:idcat')->setParameter("idcat", $idcat);
|
||||||
->getQuery()
|
}
|
||||||
->setParameter("idcat", $idcat)
|
$data = $qb->orderBy('e.submittime', 'DESC')->getQuery()->setMaxResults(1)->getResult();
|
||||||
->setMaxResults(1)
|
|
||||||
->getResult();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
|
|
@ -9,6 +9,10 @@ use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
|
|
||||||
|
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||||
|
use Doctrine\ORM\EntityRepository;
|
||||||
|
use Doctrine\ORM\QueryBuilder;
|
||||||
|
|
||||||
class CategoryType extends AbstractType
|
class CategoryType extends AbstractType
|
||||||
{
|
{
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
@ -36,6 +40,28 @@ class CategoryType extends AbstractType
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if($options["by"]=="admin") {
|
||||||
|
$builder->add('user',
|
||||||
|
EntityType::class, [
|
||||||
|
"class" => "App:User",
|
||||||
|
"label" => "Utilisateur",
|
||||||
|
"choice_label"=> "username",
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$builder->add('user',
|
||||||
|
EntityType::class, [
|
||||||
|
"class" => "App:User",
|
||||||
|
"label" => "Utilisateur",
|
||||||
|
"choice_label"=> "username",
|
||||||
|
'query_builder' => function (EntityRepository $er) use ($options): QueryBuilder {
|
||||||
|
return $er->createQueryBuilder('u')->where('u.id=:user')->setParameter('user',$options['user']->getId());
|
||||||
|
},
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$builder->add('usecategoryconfig',
|
$builder->add('usecategoryconfig',
|
||||||
ChoiceType::class, [
|
ChoiceType::class, [
|
||||||
"label" =>"Utiliser une configuration de style spécifique",
|
"label" =>"Utiliser une configuration de style spécifique",
|
||||||
|
@ -91,6 +117,8 @@ class CategoryType extends AbstractType
|
||||||
$resolver->setDefaults(array(
|
$resolver->setDefaults(array(
|
||||||
'data_class' => 'App\Entity\Category',
|
'data_class' => 'App\Entity\Category',
|
||||||
'mode' => 'string',
|
'mode' => 'string',
|
||||||
|
'by' => 'string',
|
||||||
|
'user' => 'App\Entity\User'
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,9 +7,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
|
||||||
use FOS\CKEditorBundle\Form\Type\CKEditorType;
|
use FOS\CKEditorBundle\Form\Type\CKEditorType;
|
||||||
|
|
||||||
|
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||||
use Doctrine\ORM\EntityRepository;
|
use Doctrine\ORM\EntityRepository;
|
||||||
use Doctrine\ORM\QueryBuilder;
|
use Doctrine\ORM\QueryBuilder;
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,16 @@
|
||||||
|
|
||||||
{{ form_widget(form.submit) }}
|
{{ form_widget(form.submit) }}
|
||||||
|
|
||||||
<a class="btn btn-secondary" href={{ path('app_category') }}>Annuler</a>
|
{% if by=="admin" %}
|
||||||
|
<a class="btn btn-secondary" href={{ path('app_admin_category',{'by':by,'userid':-1}) }}>Annuler</a>
|
||||||
|
{% elseif by=="update" %}
|
||||||
|
<a class="btn btn-secondary" href={{ path('app_user_update',{id:userid}) }}>Annuler</a>
|
||||||
|
{% elseif by=="profil" %}
|
||||||
|
<a class="btn btn-secondary" href={{ path('app_user_profil') }}>Annuler</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if mode=="update" and category.id >= 0 %}
|
{% if mode=="update" and category.id >= 0 %}
|
||||||
<a href="{{ path('app_category_delete',{'id':category.id}) }}"
|
<a href="{{ path('app_category_delete',{'id':category.id,'by':by}) }}"
|
||||||
class="btn btn-danger float-right"
|
class="btn btn-danger float-right"
|
||||||
data-method="delete"
|
data-method="delete"
|
||||||
data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?">
|
data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?">
|
||||||
|
@ -49,6 +55,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
{{ form_row(form.user) }}
|
||||||
{{ form_row(form.order) }}
|
{{ form_row(form.order) }}
|
||||||
{{ form_row(form.name) }}
|
{{ form_row(form.name) }}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
CATEGORIES
|
CATEGORIES
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<p><a class="btn btn-success" href={{ path('app_category_submit') }}>Ajouter</a></p>
|
<p><a class="btn btn-success" href={{ path('app_category_submit',{by:"admin",userid:-1}) }}>Ajouter</a></p>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
|
@ -18,6 +18,7 @@ CATEGORIES
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="70px" class="no-sort">Action</th>
|
<th width="70px" class="no-sort">Action</th>
|
||||||
|
<th width="70px">Utilisateur</th>
|
||||||
<th width="70px">Ordre</th>
|
<th width="70px">Ordre</th>
|
||||||
<th>Nom</th>
|
<th>Nom</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -26,11 +27,12 @@ CATEGORIES
|
||||||
{% for category in categorys %}
|
{% for category in categorys %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{path("app_category_update",{id:category.id})}}"><i class="fa fa-file"></i></a>
|
<a href="{{path("app_category_update",{id:category.id,by:'admin'})}}"><i class="fa fa-file"></i></a>
|
||||||
{% if category.id >=0 %}
|
{% if category.id >=0 %}
|
||||||
<a href="{{path("app_category_delete",{id:category.id})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash"></i></a>
|
<a href="{{path("app_category_delete",{id:category.id,by:'admin'})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
<td>{{category.user.username}}</td>
|
||||||
<td>{{category.order}}</td>
|
<td>{{category.order}}</td>
|
||||||
<td>{{category.name}}</td>
|
<td>{{category.name}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
<p><a class="btn btn-success" href={{ path('app_category_submit',{by:by,userid:userid}) }}>Ajouter</a></p>
|
||||||
|
|
||||||
|
<div class="dataTable_wrapper" style="zoom:80%" >
|
||||||
|
<table class="table table-striped table-bordered table-hover" id="categorys" style="width:100%">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="70px" class="no-sort">Action</th>
|
||||||
|
<th width="70px">Ordre</th>
|
||||||
|
<th>Nom</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for category in categorys %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="{{path("app_category_update",{id:category.id,by:by})}}"><i class="fa fa-file"></i></a>
|
||||||
|
{% if category.id >=0 %}
|
||||||
|
<a href="{{path("app_category_delete",{id:category.id,by:by})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>{{category.order}}</td>
|
||||||
|
<td>{{category.name}}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#categorys').DataTable({
|
||||||
|
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||||
|
responsive: true,
|
||||||
|
iDisplayLength: 10,
|
||||||
|
order: [[ 1, "asc" ]]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -60,13 +60,15 @@
|
||||||
<a href={{ path("app_admin") }} class="btn btn-link" title="Configuration">
|
<a href={{ path("app_admin") }} class="btn btn-link" title="Configuration">
|
||||||
<i class="fa fa-cog fa-fw"></i>
|
<i class="fa fa-cog fa-fw"></i>
|
||||||
</a>
|
</a>
|
||||||
<a href={{ path("app_illustration_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" title="Créer une Illustration">
|
|
||||||
<i class="fa fa-paint-brush fa-fw"></i>
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href={{ path("app_logout") }} class="btn btn-link" title="Déconnexion">
|
|
||||||
<i class="fa fa-sign-out-alt fa-fw"></i>
|
<a href="" data-toggle="modal" data-target="#addmodal">
|
||||||
</a>
|
<i class="fa fa-plus fa-fw"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href={{ path("app_logout") }} class="btn btn-link" title="Déconnexion">
|
||||||
|
<i class="fa fa-sign-out-alt fa-fw"></i>
|
||||||
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
|
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
|
||||||
<i class="fa fa-sign-in-alt fa-fw"></i>
|
<i class="fa fa-sign-in-alt fa-fw"></i>
|
||||||
|
@ -112,13 +114,16 @@
|
||||||
<a href={{ path("app_admin") }} class="btn btn-link" title="Configuration">
|
<a href={{ path("app_admin") }} class="btn btn-link" title="Configuration">
|
||||||
<i class="fa fa-cog fa-fw"></i>
|
<i class="fa fa-cog fa-fw"></i>
|
||||||
</a>
|
</a>
|
||||||
<a href={{ path("app_illustration_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" title="Créer une Illustration">
|
|
||||||
<i class="fa fa-paint-brush fa-fw"></i>
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href={{ path("app_logout") }} class="btn btn-link" title="Déconnexion">
|
|
||||||
<i class="fa fa-sign-out-alt fa-fw"></i>
|
<a href="" data-toggle="modal" class="btn btn-link" data-target="#addmodal">
|
||||||
</a>
|
<i class="fa fa-plus fa-fw"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<a href={{ path("app_logout") }} class="btn btn-link" title="Déconnexion">
|
||||||
|
<i class="fa fa-sign-out-alt fa-fw"></i>
|
||||||
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
|
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
|
||||||
<i class="fa fa-sign-in-alt fa-fw"></i>
|
<i class="fa fa-sign-in-alt fa-fw"></i>
|
||||||
|
@ -353,6 +358,25 @@
|
||||||
<div id="bottom" class="grid-item grid-item-full" style="height:300px">
|
<div id="bottom" class="grid-item grid-item-full" style="height:300px">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- ADDMODAL ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||||
|
<div id="addmodal" class="modal" tabindex="-1" role="dialog" style="z-index:100000">
|
||||||
|
<div class="modal-dialog modal-md" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title">Ajouter</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<a href={{ path("app_illustration_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" title="Créer une Illustration">
|
||||||
|
Ajouter une illustration
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -77,13 +77,15 @@
|
||||||
<a href={{ path("app_admin") }} class="btn btn-link" title="Configuration">
|
<a href={{ path("app_admin") }} class="btn btn-link" title="Configuration">
|
||||||
<i class="fa fa-cog fa-fw"></i>
|
<i class="fa fa-cog fa-fw"></i>
|
||||||
</a>
|
</a>
|
||||||
<a href={{ path("app_illustration_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" title="Créer une Illustration">
|
|
||||||
<i class="fa fa-paint-brush fa-fw"></i>
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href={{ path("app_logout") }} class="btn btn-link" title="Déconnexion">
|
|
||||||
<i class="fa fa-sign-out-alt fa-fw"></i>
|
<a href="" data-toggle="modal" class="btn btn-link" title="Ajouter" data-target="#addmodal">
|
||||||
</a>
|
<i class="fa fa-plus fa-fw"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href={{ path("app_logout") }} class="btn btn-link" title="Déconnexion">
|
||||||
|
<i class="fa fa-sign-out-alt fa-fw"></i>
|
||||||
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
|
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
|
||||||
<i class="fa fa-sign-in-alt fa-fw"></i>
|
<i class="fa fa-sign-in-alt fa-fw"></i>
|
||||||
|
@ -129,13 +131,15 @@
|
||||||
<a href={{ path("app_admin") }} class="btn btn-link" title="Configuration">
|
<a href={{ path("app_admin") }} class="btn btn-link" title="Configuration">
|
||||||
<i class="fa fa-cog fa-fw"></i>
|
<i class="fa fa-cog fa-fw"></i>
|
||||||
</a>
|
</a>
|
||||||
<a href={{ path("app_illustration_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" title="Créer une Illustration">
|
|
||||||
<i class="fa fa-paint-brush fa-fw"></i>
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href={{ path("app_logout") }} class="btn btn-link" title="Déconnexion">
|
|
||||||
<i class="fa fa-sign-out-alt fa-fw"></i>
|
<a href="" data-toggle="modal" class="btn btn-link" title="Ajouter" data-target="#addmodal">
|
||||||
</a>
|
<i class="fa fa-plus fa-fw"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href={{ path("app_logout") }} class="btn btn-link" title="Déconnexion">
|
||||||
|
<i class="fa fa-sign-out-alt fa-fw"></i>
|
||||||
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
|
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
|
||||||
<i class="fa fa-sign-in-alt fa-fw"></i>
|
<i class="fa fa-sign-in-alt fa-fw"></i>
|
||||||
|
@ -350,7 +354,25 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- ADDMODAL ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||||
|
<div id="addmodal" class="modal" tabindex="-1" role="dialog" style="z-index:100000">
|
||||||
|
<div class="modal-dialog modal-md" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title">Ajouter</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<a href={{ path("app_illustration_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" title="Créer une Illustration">
|
||||||
|
Ajouter une illustration
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<p><a class="btn btn-success" href={{ path('app_illustration_submit',{by:by,userid:userid}) }}>Ajouter</a></p>
|
<p><a class="btn btn-success" href={{ path('app_illustration_submit',{by:by,userid:userid}) }}>Ajouter</a></p>
|
||||||
|
|
||||||
<div class="dataTable_wrapper">
|
<div class="dataTable_wrapper" style="zoom:80%">
|
||||||
<table class="table table-striped table-bordered table-hover" id="illustrations" style="width:100%; zoom:80%;">
|
<table class="table table-striped table-bordered table-hover" id="illustrations" style="width:100%;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="70px" class="no-sort">Action</th>
|
<th width="70px" class="no-sort">Action</th>
|
||||||
|
|
|
@ -62,10 +62,15 @@
|
||||||
|
|
||||||
<div class="container mb-5">
|
<div class="container mb-5">
|
||||||
<div class="text-center menuview" style="font-size:25px">
|
<div class="text-center menuview" style="font-size:25px">
|
||||||
<a id="up" href="{{ path("app_home")}}#illustration{{illustration.id}}"><i class="fa fa-home" aria-hidden="true"></i></a>
|
{% if by=="home" %}
|
||||||
|
<a id="up" href="{{ path("app_home")}}#illustration{{illustration.id}}"><i class="fa fa-home" aria-hidden="true"></i></a>
|
||||||
|
{% else %}
|
||||||
|
<a id="up" href="{{ path("app_home_user",{userpseudo:illustration.category.user.slug})}}#illustration{{illustration.id}}"><i class="fa fa-home" aria-hidden="true"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<a download="{{ illustration.name }}.{{ pathinfo.extension }}" href="/{{ appAlias }}/uploads/illustration/{{illustration.illustration}}"><i class="fa fa-download" aria-hidden="true"></i></a>
|
<a download="{{ illustration.name }}.{{ pathinfo.extension }}" href="/{{ appAlias }}/uploads/illustration/{{illustration.illustration}}"><i class="fa fa-download" aria-hidden="true"></i></a>
|
||||||
|
|
||||||
{% if is_granted("ROLE_ADMIN") %}
|
{% if is_granted("ROLE_ADMIN") or (is_granted("ROLE_USER") and illustration.category.user.id==app.user.id) %}
|
||||||
<a id="update" href="{{ path("app_illustration_update",{"by":"illustration","id":illustration.id})}}"><i class="fa fa-file" aria-hidden="true"></i></a>
|
<a id="update" href="{{ path("app_illustration_update",{"by":"illustration","id":illustration.id})}}"><i class="fa fa-file" aria-hidden="true"></i></a>
|
||||||
<a id="delete" href="{{ path("app_illustration_delete",{"by":"illustration","id":illustration.id})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet entregistrement ?"><i class="fa fa-trash" aria-hidden="true"></i></a>
|
<a id="delete" href="{{ path("app_illustration_delete",{"by":"illustration","id":illustration.id})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet entregistrement ?"><i class="fa fa-trash" aria-hidden="true"></i></a>
|
||||||
<a id="recadre" style="cursor:pointer" onClick="ModalLoad('extraLargeModal','Illustration','{{ path('app_illustration_crop',{"type":"illustration","reportinput":"none"}) }}?file={{illustration.illustration}}');"><i class="fa fa-arrows-alt" aria-hidden="true"></i></a>
|
<a id="recadre" style="cursor:pointer" onClick="ModalLoad('extraLargeModal','Illustration','{{ path('app_illustration_crop',{"type":"illustration","reportinput":"none"}) }}?file={{illustration.illustration}}');"><i class="fa fa-arrows-alt" aria-hidden="true"></i></a>
|
||||||
|
|
|
@ -23,14 +23,14 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="{{path("app_admin_illustration",{"by":"admin","userid":-1})}}">
|
<a href="{{path("app_admin_category",{"by":"admin","userid":-1})}}">
|
||||||
<i class="fas fa-image fa-fw"></i> Illustrations
|
<i class="fa fa-folder fa-fw"></i> Catégories Illustrations
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="{{path("app_category")}}">
|
<a href="{{path("app_admin_illustration",{"by":"admin","userid":-1})}}">
|
||||||
<i class="fa fa-folder fa-fw"></i> Catégories Illustrations
|
<i class="fas fa-image fa-fw"></i> Illustrations
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,10 @@ body .nav a{
|
||||||
color: var(--colorfttitledark);
|
color: var(--colorfttitledark);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body .page-item.active .page-link {
|
||||||
|
background-color: var(--colorbgbodydark);
|
||||||
|
border-color: var(--colorbgbodydark);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* COLOR BODY HOME */
|
/* COLOR BODY HOME */
|
||||||
|
@ -82,6 +86,13 @@ body.monocolor .nav a{
|
||||||
color: var(--colorfttitledark);
|
color: var(--colorfttitledark);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.monocolor .modal-content {
|
||||||
|
background-color: var(--colorbgbodydark);
|
||||||
|
}
|
||||||
|
body.monocolor .modal-header .close {
|
||||||
|
color: var(--colorftbodydark);
|
||||||
|
}
|
||||||
|
|
||||||
a.btn {
|
a.btn {
|
||||||
color: white !important;
|
color: white !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
|
|
||||||
<div class="row justify-content-md-center">
|
<div class="row justify-content-md-center">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="card mb-3">
|
<div class="card mb-3" style="zoom:80%">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||||
</div>
|
</div>
|
||||||
|
@ -77,16 +77,14 @@
|
||||||
{{ form_row(form.email) }}
|
{{ form_row(form.email) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-4">
|
|
||||||
{% if form.roles is defined %}
|
{% if form.roles is defined %}
|
||||||
<div class="card mb-2">
|
<div class="card mb-2">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<i class="fa fa-pencil-alt fa-fw"></i> Organisation
|
<i class="fa fa-pencil-alt fa-fw"></i> Organisation
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body" style="zoom:80%">
|
||||||
{{ form_row(form.groups) }}
|
{{ form_row(form.groups) }}
|
||||||
{{ form_row(form.roles) }}
|
{{ form_row(form.roles) }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -98,7 +96,7 @@
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<i class="fa fa-pencil-alt fa-fw"></i> Ma Page
|
<i class="fa fa-pencil-alt fa-fw"></i> Ma Page
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body" style="zoom:80%">
|
||||||
{% if mode=="profil" %}
|
{% if mode=="profil" %}
|
||||||
{{ render(path("app_user_config_render",{by:mode,category:"site"})) }}
|
{{ render(path("app_user_config_render",{by:mode,category:"site"})) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -111,7 +109,7 @@
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<i class="fa fa-pencil-alt fa-fw"></i> Social
|
<i class="fa fa-pencil-alt fa-fw"></i> Social
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body" style="zoom:80%">
|
||||||
{% if mode=="profil" %}
|
{% if mode=="profil" %}
|
||||||
{{ render(path("app_user_config_render",{by:mode,category:"social"})) }}
|
{{ render(path("app_user_config_render",{by:mode,category:"social"})) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -119,57 +117,64 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="card mb-3">
|
||||||
|
<div class="card-header">
|
||||||
|
<i class="fa fa-pencil-alt fa-fw"></i> Hero
|
||||||
|
</div>
|
||||||
|
<div class="card-body" style="zoom:80%">
|
||||||
|
{% if mode=="profil" %}
|
||||||
|
{{ render(path("app_user_config_render",{by:mode,category:"hero"})) }}
|
||||||
|
{% else %}
|
||||||
|
{{ render(path("app_admin_config_render",{by:mode,category:"hero",userid:user.id})) }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card mb-3">
|
||||||
|
<div class="card-header">
|
||||||
|
<i class="fa fa-pencil-alt fa-fw"></i> Images
|
||||||
|
</div>
|
||||||
|
<div class="card-body" style="zoom:80%">
|
||||||
|
{% if mode=="profil" %}
|
||||||
|
{{ render(path("app_user_config_render",{by:mode,category:"image"})) }}
|
||||||
|
{% else %}
|
||||||
|
{{ render(path("app_admin_config_render",{by:mode,category:"image",userid:user.id})) }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4">
|
{%if mode!="submit" %}
|
||||||
<div class="card mb-3">
|
<div class="col-md-8">
|
||||||
<div class="card-header">
|
<div class="card mb-3">
|
||||||
<i class="fa fa-pencil-alt fa-fw"></i> Hero
|
<div class="card-header">
|
||||||
|
<i class="fa fa-pencil-alt fa-fw"></i> Catégories d'Illustrations
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
{% if mode=="profil" %}
|
||||||
|
{{ render(path("app_user_category")) }}
|
||||||
|
{% else %}
|
||||||
|
{{ render(path("app_admin_category",{by:mode,userid:user.id})) }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
|
||||||
{% if mode=="profil" %}
|
<div class="card mb-3">
|
||||||
{{ render(path("app_user_config_render",{by:mode,category:"hero"})) }}
|
<div class="card-header">
|
||||||
{% else %}
|
<i class="fa fa-pencil-alt fa-fw"></i> Illustrations
|
||||||
{{ render(path("app_admin_config_render",{by:mode,category:"hero",userid:user.id})) }}
|
</div>
|
||||||
{% endif %}
|
<div class="card-body">
|
||||||
|
{% if mode=="profil" %}
|
||||||
|
{{ render(path("app_user_illustration")) }}
|
||||||
|
{% else %}
|
||||||
|
{{ render(path("app_admin_illustration",{by:mode,userid:user.id})) }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
<div class="card mb-3">
|
|
||||||
<div class="card-header">
|
|
||||||
<i class="fa fa-pencil-alt fa-fw"></i> Images
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
{% if mode=="profil" %}
|
|
||||||
{{ render(path("app_user_config_render",{by:mode,category:"image"})) }}
|
|
||||||
{% else %}
|
|
||||||
{{ render(path("app_admin_config_render",{by:mode,category:"image",userid:user.id})) }}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row justify-content-md-center">
|
|
||||||
<div class="col-md-4">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="card mb-3">
|
|
||||||
<div class="card-header">
|
|
||||||
<i class="fa fa-pencil-alt fa-fw"></i> Illustrations
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
{% if mode=="profil" %}
|
|
||||||
{{ render(path("app_user_illustration")) }}
|
|
||||||
{% else %}
|
|
||||||
{{ render(path("app_admin_illustration",{by:mode,userid:user.id})) }}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{ form_end(form) }}
|
{{ form_end(form) }}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue