vue pagewidget list
This commit is contained in:
parent
b6fc868652
commit
b648fecb32
|
@ -671,6 +671,13 @@ a.item-heart {
|
||||||
margin-top:30px;
|
margin-top:30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.widget-mini {
|
||||||
|
display: inline-block;
|
||||||
|
height:50px;
|
||||||
|
width:50px;
|
||||||
|
margin-top:0px;
|
||||||
|
}
|
||||||
|
|
||||||
.widgetmenu {
|
.widgetmenu {
|
||||||
right: 20px;
|
right: 20px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -455,6 +455,8 @@ class PageController extends Controller
|
||||||
// usage soit portal / user / group
|
// usage soit portal / user / group
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$groupid=$request->query->get('group');
|
$groupid=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
|
@ -482,44 +484,6 @@ class PageController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// On marque tt les messages comme lu par l'utilisateur
|
|
||||||
/* Se fait à présent sur le controleur message au moment meme où l'on affiche l'ensemble des messages
|
|
||||||
if($usage=="group") {
|
|
||||||
// On calcule le nombre de message non lu pour le groupe
|
|
||||||
$group=$em->getRepository("CadolesCoreBundle:Group")->find($groupid);
|
|
||||||
$qb = $em ->createQueryBuilder();
|
|
||||||
$tm = $qb ->select($qb->expr()->count('m.id'))
|
|
||||||
->from('CadolesWebsocketBundle:Message', 'm')
|
|
||||||
->where('m.group = :group')
|
|
||||||
->andWhere('m.user != :user')
|
|
||||||
->setParameter('group', $group)
|
|
||||||
->setParameter('user', $this->getUser())
|
|
||||||
->getQuery()->getSingleScalarResult();
|
|
||||||
|
|
||||||
$qb = $em ->createQueryBuilder();
|
|
||||||
$tr = $qb ->select($qb->expr()->count('m.id'))
|
|
||||||
->from('CadolesWebsocketBundle:Message', 'm')
|
|
||||||
->where('m.group = :group')
|
|
||||||
->andWhere('m.user != :user')
|
|
||||||
->andWhere(':user MEMBER OF m.readers')
|
|
||||||
->setParameter('group', $group)
|
|
||||||
->setParameter('user', $this->getUser())
|
|
||||||
->getQuery()->getSingleScalarResult();
|
|
||||||
|
|
||||||
if($tm-$tr>0) {
|
|
||||||
$messages=$em->getRepository("CadolesWebsocketBundle:Message")->findBy(["group"=>$group]);
|
|
||||||
foreach($messages as $message) {
|
|
||||||
$readers=$message->getReaders();
|
|
||||||
if ( !$readers->contains($this->getUser()) ) {
|
|
||||||
$message->addReader($this->getUser());
|
|
||||||
}
|
|
||||||
$em->persist($message);
|
|
||||||
$em->flush();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Compteur de visite
|
// Compteur de visite
|
||||||
if($this->getUser()) {
|
if($this->getUser()) {
|
||||||
if($groupid) {
|
if($groupid) {
|
||||||
|
@ -587,6 +551,19 @@ class PageController extends Controller
|
||||||
|
|
||||||
// Type Widgets
|
// Type Widgets
|
||||||
if($entity->getPageCategory()->getId()==2) {
|
if($entity->getPageCategory()->getId()==2) {
|
||||||
|
$user=$this->getUser();
|
||||||
|
if($user) {
|
||||||
|
// Sauvegarder les préférences
|
||||||
|
if($look) $this->setPreference($user,"pagelook",$id,$look);
|
||||||
|
if($selwidget) $this->setPreference($user,"pageselwidget",$id,$selwidget);
|
||||||
|
|
||||||
|
// Récupérer les préférences
|
||||||
|
$look=$this->getPreference($user,"pagelook",$id,"view");
|
||||||
|
$selwidget=$this->getPreference($user,"pageselwidget",$id,null);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($look=="list") $entity->setMaxwidth(0);
|
||||||
|
|
||||||
return $this->render($this->labelentity.':viewwidget.html.twig', [
|
return $this->render($this->labelentity.':viewwidget.html.twig', [
|
||||||
'useheader' => ($access=="config"),
|
'useheader' => ($access=="config"),
|
||||||
'usemenu' => false,
|
'usemenu' => false,
|
||||||
|
@ -595,6 +572,8 @@ class PageController extends Controller
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'canupdate' => $canupdate,
|
'canupdate' => $canupdate,
|
||||||
'mode' => "view",
|
'mode' => "view",
|
||||||
|
'look' => $look,
|
||||||
|
'selwidget' => $selwidget,
|
||||||
'widgets' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Widget")->getWidgetAccess($access,'config'),
|
'widgets' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Widget")->getWidgetAccess($access,'config'),
|
||||||
'usage' => $usage,
|
'usage' => $usage,
|
||||||
'group' => $groupid
|
'group' => $groupid
|
||||||
|
@ -643,7 +622,9 @@ class PageController extends Controller
|
||||||
'mode' => "view",
|
'mode' => "view",
|
||||||
'widgets' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Widget")->getWidgetAccess($access,'config'),
|
'widgets' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Widget")->getWidgetAccess($access,'config'),
|
||||||
'usage' => $usage,
|
'usage' => $usage,
|
||||||
'group' => $group
|
'group' => $group,
|
||||||
|
'look' => 'view',
|
||||||
|
'selwidget' => null,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -720,4 +701,42 @@ class PageController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getPreference($user,$key,$id,$default) {
|
||||||
|
$preference=$user->getPreference();
|
||||||
|
$return=$default;
|
||||||
|
|
||||||
|
if(is_array($preference)) {
|
||||||
|
if(array_key_exists($key,$preference)) {
|
||||||
|
if(array_key_exists($id,$preference[$key]))
|
||||||
|
$return=$preference[$key][$id];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
protected function setPreference($user,$key,$id,$value) {
|
||||||
|
$preference=$user->getPreference();
|
||||||
|
$toupdate=false;
|
||||||
|
if(!array_key_exists($key,$preference)) {
|
||||||
|
$toupdate=true;
|
||||||
|
$preference[$key]=[];
|
||||||
|
}
|
||||||
|
if((!array_key_exists($id,$preference[$key]))) {
|
||||||
|
$toupdate=true;
|
||||||
|
$preference[$key][$id]=$value;
|
||||||
|
}
|
||||||
|
if($value&&$preference[$key][$id]!=$value) {
|
||||||
|
$toupdate=true;
|
||||||
|
$preference[$key][$id]=$value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mise à jour des préferences
|
||||||
|
if($toupdate) {
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
$user->setPreference($preference);
|
||||||
|
$em->persist($this->getUser());
|
||||||
|
$em->flush();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -297,7 +297,9 @@ class PagetemplateController extends Controller
|
||||||
'mode' => "viewtemplate",
|
'mode' => "viewtemplate",
|
||||||
'widgets' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Widget")->getWidgetAccess($access),
|
'widgets' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Widget")->getWidgetAccess($access),
|
||||||
'usage' => "config",
|
'usage' => "config",
|
||||||
'group' => ""
|
'group' => "",
|
||||||
|
'look' => "view",
|
||||||
|
'selwidget' => null,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,18 @@ class PagewidgetController extends Controller
|
||||||
private $labelentity="CadolesPortalBundle:Pagewidget";
|
private $labelentity="CadolesPortalBundle:Pagewidget";
|
||||||
private $routeprimary="cadoles_portal_config_pagewidget";
|
private $routeprimary="cadoles_portal_config_pagewidget";
|
||||||
|
|
||||||
|
private $entity;
|
||||||
|
private $page;
|
||||||
|
private $id;
|
||||||
|
private $access;
|
||||||
|
private $look;
|
||||||
|
private $mini;
|
||||||
|
private $selwidget;
|
||||||
|
|
||||||
|
private $cansee;
|
||||||
|
private $canudate;
|
||||||
|
private $canadd;
|
||||||
|
|
||||||
private function searchArray($array, $key, $value)
|
private function searchArray($array, $key, $value)
|
||||||
{
|
{
|
||||||
$results = array();
|
$results = array();
|
||||||
|
@ -386,6 +398,36 @@ class PagewidgetController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function setRequest($request,$id,$access) {
|
||||||
|
$this->em = $this->getDoctrine()->getManager();
|
||||||
|
$this->user = $this->getUser();
|
||||||
|
$this->id = $id;
|
||||||
|
$this->access = $access;
|
||||||
|
$this->look = $request->query->get('look');
|
||||||
|
$this->selwidget = $request->query->get('selwidget');
|
||||||
|
|
||||||
|
// Le widget existe-t-il ?
|
||||||
|
$this->entity = $this->em->getRepository($this->labelentity)->find($this->id);
|
||||||
|
if (!$this->entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
|
|
||||||
|
// Permissions
|
||||||
|
if($this->access=="config") {
|
||||||
|
$this->canupdate = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// On s'assure que l'utilisateur à la permission de voir
|
||||||
|
$this->page=$this->entity->getPage();
|
||||||
|
$this->em->getRepository("CadolesPortalBundle:Page")->getPermission($this->user,$this->page,$this->cansee,$this->canupdate);
|
||||||
|
if(!$this->cansee) throw $this->createNotFoundException('Permission denied');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Affichage miniature ?
|
||||||
|
$this->mini = ($this->look=="list"&&$this->entity->getId()!=$this->selwidget);
|
||||||
|
|
||||||
|
// Préference utilisateur
|
||||||
|
if(!$this->mini) $this->getPreference($this->entity);
|
||||||
|
}
|
||||||
|
|
||||||
protected function getPreference(&$entity) {
|
protected function getPreference(&$entity) {
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
if($user) {
|
if($user) {
|
||||||
|
@ -393,6 +435,11 @@ class PagewidgetController extends Controller
|
||||||
$id=$entity->getId();
|
$id=$entity->getId();
|
||||||
|
|
||||||
// Preference widgetshowhide
|
// Preference widgetshowhide
|
||||||
|
if($this->look=="list") {
|
||||||
|
$entity->setOpened(true);
|
||||||
|
$entity->setBorder(false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
if(is_array($preference)) {
|
if(is_array($preference)) {
|
||||||
if(array_key_exists("widgetshowhide",$preference)) {
|
if(array_key_exists("widgetshowhide",$preference)) {
|
||||||
if(array_key_exists($id,$preference["widgetshowhide"]))
|
if(array_key_exists($id,$preference["widgetshowhide"]))
|
||||||
|
@ -401,40 +448,46 @@ class PagewidgetController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewurlAction($id,$access="config") {
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
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');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
protected function getRender($view,$params) {
|
||||||
|
// Paramétres toujours présent dans un rendu de widget
|
||||||
|
$allways = [
|
||||||
|
'entity' => $this->entity,
|
||||||
|
'canupdate' => $this->canupdate,
|
||||||
|
'access' => $this->access,
|
||||||
|
'look' => $this->look,
|
||||||
|
'mini' => $this->mini,
|
||||||
|
];
|
||||||
|
|
||||||
|
// Parametres spéficiques
|
||||||
|
$params=array_merge($allways,$params);
|
||||||
|
|
||||||
|
// Rendu
|
||||||
|
return $this->render($this->labelentity.':'.$view, $params);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function viewurlAction(Request $request,$id,$access="config") {
|
||||||
|
// Récupération de la requete
|
||||||
|
$this->setRequest($request,$id,$access);
|
||||||
|
|
||||||
|
// Valeur par défaut
|
||||||
$url="";
|
$url="";
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
$imagemedia=false;
|
||||||
|
|
||||||
|
// Datas associées au widget
|
||||||
|
if(!$this->mini) {
|
||||||
|
// Récupération des paramétres du widget
|
||||||
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
if($parameter["id"]=="url")
|
if($parameter["id"]=="url")
|
||||||
$url=$parameter["value"];
|
$url=$parameter["value"];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
|
|
||||||
// Gestion des url youtuve
|
// Gestion des url youtuve
|
||||||
$url=str_replace("http://www.youtube.com","https://www.youtube.com",$url);
|
$url=str_replace("http://www.youtube.com","https://www.youtube.com",$url);
|
||||||
$url=str_replace("https://www.youtube.com/watch?v=","https://www.youtube.com/embed/",$url);
|
$url=str_replace("https://www.youtube.com/watch?v=","https://www.youtube.com/embed/",$url);
|
||||||
|
|
||||||
// Detecter le type de lien
|
// Detecter le type de lien
|
||||||
$imagemedia=false;
|
|
||||||
$pathinfo = pathinfo($url);
|
$pathinfo = pathinfo($url);
|
||||||
|
|
||||||
// Type image
|
// Type image
|
||||||
|
@ -446,36 +499,26 @@ class PagewidgetController extends Controller
|
||||||
|
|
||||||
// Spécifique Deviant Art
|
// Spécifique Deviant Art
|
||||||
if(strpos($url, "images-wixmp") !== false) $imagemedia=true;
|
if(strpos($url, "images-wixmp") !== false) $imagemedia=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->getRender('viewurl.html.twig', [
|
||||||
return $this->render($this->labelentity.':viewurl.html.twig', [
|
|
||||||
'entity' => $entity,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'imagemedia' => $imagemedia,
|
'imagemedia' => $imagemedia,
|
||||||
'access' => $access
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewurlfixeAction($id,$access="config") {
|
public function viewurlfixeAction(Request $request,$id,$access="config") {
|
||||||
$em = $this->getDoctrine()->getManager();
|
// Récupération de la requete
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$this->setRequest($request,$id,$access);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
// Valeur par défaut
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
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');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
|
||||||
$url="";
|
$url="";
|
||||||
$widgettype= $entity->getWidget();
|
$imagemedia=false;
|
||||||
|
|
||||||
|
// Datas associées au widget
|
||||||
|
if(!$this->mini) {
|
||||||
|
// Récupération des paramétres du widget
|
||||||
|
$widgettype= $this->entity->getWidget();
|
||||||
$jsons=$widgettype->getParameter();
|
$jsons=$widgettype->getParameter();
|
||||||
$param=array();
|
$param=array();
|
||||||
$param["fields"]=array();
|
$param["fields"]=array();
|
||||||
|
@ -484,15 +527,11 @@ class PagewidgetController extends Controller
|
||||||
$url=$field->value;
|
$url=$field->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
// Gestion des url youtuve
|
// Gestion des url youtuve
|
||||||
$url=str_replace("http://www.youtube.com","https://www.youtube.com",$url);
|
$url=str_replace("http://www.youtube.com","https://www.youtube.com",$url);
|
||||||
$url=str_replace("https://www.youtube.com/watch?v=","https://www.youtube.com/embed/",$url);
|
$url=str_replace("https://www.youtube.com/watch?v=","https://www.youtube.com/embed/",$url);
|
||||||
|
|
||||||
// Detecter le type de lien
|
// Detecter le type de lien
|
||||||
$imagemedia=false;
|
|
||||||
$pathinfo = pathinfo($url);
|
$pathinfo = pathinfo($url);
|
||||||
|
|
||||||
// Type image
|
// Type image
|
||||||
|
@ -504,41 +543,33 @@ class PagewidgetController extends Controller
|
||||||
|
|
||||||
// Spécifique Deviant Art
|
// Spécifique Deviant Art
|
||||||
if(strpos($url, "images-wixmp") !== false) $imagemedia=true;
|
if(strpos($url, "images-wixmp") !== false) $imagemedia=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->getRender('viewurl.html.twig', [
|
||||||
return $this->render($this->labelentity.':viewurl.html.twig', [
|
|
||||||
'entity' => $entity,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'imagemedia' => $imagemedia,
|
'imagemedia' => $imagemedia,
|
||||||
'access' => $access
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewitemAction($id,$access="config") {
|
public function viewitemAction(Request $request,$id,$access="config") {
|
||||||
$em = $this->getDoctrine()->getManager();
|
// Récupération de la requete
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$this->setRequest($request,$id,$access);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
// Valeur par défaut
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
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');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
|
||||||
$modedesktop=0;
|
$modedesktop=0;
|
||||||
$iditemcategory=null;
|
|
||||||
$withbookmark=true;
|
|
||||||
$search=false;
|
|
||||||
$menu=false;
|
$menu=false;
|
||||||
$menuall=true;
|
$menuall=true;
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
$search=false;
|
||||||
|
$withbookmark=true;
|
||||||
|
$bookmarks=null;
|
||||||
|
$itemsordered=null;
|
||||||
|
$itemcategorys=null;
|
||||||
|
|
||||||
|
// Datas associées au widget
|
||||||
|
if(!$this->mini) {
|
||||||
|
// Récupération des paramétres du widget
|
||||||
|
$iditemcategory=null;
|
||||||
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "modedesktop":
|
case "modedesktop":
|
||||||
$modedesktop=$parameter["value"];
|
$modedesktop=$parameter["value"];
|
||||||
|
@ -550,7 +581,7 @@ class PagewidgetController extends Controller
|
||||||
|
|
||||||
case "itemcategory":
|
case "itemcategory":
|
||||||
$iditemcategory=$parameter["value"];
|
$iditemcategory=$parameter["value"];
|
||||||
if($iditemcategory) $itemcategoryfilter=$em->getRepository("CadolesPortalBundle:Itemcategory")->findBy(["id"=>$iditemcategory]);
|
if($iditemcategory) $itemcategoryfilter=$this->em->getRepository("CadolesPortalBundle:Itemcategory")->findBy(["id"=>$iditemcategory]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "search":
|
case "search":
|
||||||
|
@ -568,49 +599,37 @@ class PagewidgetController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
// Profilage
|
// Profilage
|
||||||
$user=$this->getUser();
|
$itemsordered = $this->em->getRepository("CadolesPortalBundle:Item")->getUserItems($this->user,$bookmarks,$items,$itemcategorys,$iditemcategory,$withbookmark,false);
|
||||||
$itemsordered = $em->getRepository("CadolesPortalBundle:Item")->getUserItems($user,$bookmarks,$items,$itemcategorys,$iditemcategory,$withbookmark);
|
}
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewitem.html.twig', [
|
return $this->getRender('viewitem.html.twig', [
|
||||||
'entity' => $entity,
|
'canadd' => ($this->user),
|
||||||
'canadd' => ($user),
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'modedesktop' => $modedesktop,
|
'modedesktop' => $modedesktop,
|
||||||
'items' => $itemsordered,
|
|
||||||
'itemcategorys' => $itemcategorys,
|
|
||||||
'bookmarks' => $bookmarks,
|
|
||||||
'access' => $access,
|
|
||||||
'search' => $search,
|
'search' => $search,
|
||||||
'menu' => $menu,
|
'menu' => $menu,
|
||||||
'menuall' => $menuall,
|
'menuall' => $menuall,
|
||||||
'withbookmark' => $withbookmark,
|
'withbookmark' => $withbookmark,
|
||||||
|
'bookmarks' => $bookmarks,
|
||||||
|
'items' => $itemsordered,
|
||||||
|
'itemcategorys' => $itemcategorys,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewitemessentialAction($id,$access="config") {
|
public function viewitemessentialAction(Request $request,$id,$access="config") {
|
||||||
$em = $this->getDoctrine()->getManager();
|
// Récupération de la requete
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$this->setRequest($request,$id,$access);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
// Valeur par défaut
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
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');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
|
||||||
$modedesktop=0;
|
$modedesktop=0;
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
$itemsordered=null;
|
||||||
|
$bookmarks=null;
|
||||||
|
|
||||||
|
// Datas associées au widget
|
||||||
|
if(!$this->mini) {
|
||||||
|
// Récupération des paramétres du widget
|
||||||
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "modedesktop":
|
case "modedesktop":
|
||||||
$modedesktop=$parameter["value"];
|
$modedesktop=$parameter["value"];
|
||||||
|
@ -618,169 +637,64 @@ class PagewidgetController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
// Profilage
|
// Profilage
|
||||||
$user=$this->getUser();
|
$itemsordered = $this->em->getRepository("CadolesPortalBundle:Item")->getUserItems($this->user,$bookmarks,$items,$itemcategorys,null,true,true);
|
||||||
$roles=($user?$user->getRoles():["ROLE_ANONYME"]);
|
|
||||||
$groups=($user?$user->getGroups():[]);
|
|
||||||
$niveau01=($user?$user->getNiveau01():[]);
|
|
||||||
|
|
||||||
// Bookmark de l'utilisateur
|
|
||||||
$bookmarks = array();
|
|
||||||
if($user)
|
|
||||||
$bookmarks=$em->getRepository("CadolesPortalBundle:Bookmark")->findBy(["user"=>$user]);
|
|
||||||
|
|
||||||
// Bookmark lié à un item
|
|
||||||
$bookmarksitems=new ArrayCollection();
|
|
||||||
foreach($bookmarks as $bookmark) {
|
|
||||||
if($bookmark->getItem()) $bookmarksitems->add($bookmark->getItem());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialisation du calcul des items
|
|
||||||
$items=new ArrayCollection();
|
|
||||||
|
|
||||||
// Récupération des items par rôles
|
|
||||||
foreach($roles as $role) {
|
|
||||||
$qb = $em->createQueryBuilder();
|
|
||||||
$qb->select('item')
|
|
||||||
->from("CadolesPortalBundle:Item", 'item')
|
|
||||||
->where($qb->expr()->like('item.roles', $qb->expr()->literal("%$role%")))
|
|
||||||
->andWhere("item.essential=:flag")
|
|
||||||
->setParameter("flag",true);
|
|
||||||
|
|
||||||
$itemsroles=$qb->getQuery()->getResult();
|
|
||||||
foreach($itemsroles as $itemrole) {
|
|
||||||
if(!$bookmarksitems->contains($itemrole) && !$items->contains($itemrole)) $items->add($itemrole);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des items par group
|
|
||||||
foreach($groups as $group) {
|
|
||||||
$qb = $em->createQueryBuilder();
|
|
||||||
$qb->select('item')
|
|
||||||
->from("CadolesPortalBundle:Item", 'item')
|
|
||||||
->where(":group MEMBER OF item.groups")
|
|
||||||
->andWhere("item.essential=:flag")
|
|
||||||
->setParameter("flag",true)
|
|
||||||
->setParameter("group",$group->getGroup());
|
|
||||||
|
|
||||||
$itemsgroups=$qb->getQuery()->getResult();
|
|
||||||
foreach($itemsgroups as $itemgroup) {
|
|
||||||
if(!$bookmarksitems->contains($itemgroup) && !$items->contains($itemgroup)) $items->add($itemgroup);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des items par niveau01
|
|
||||||
if($niveau01) {
|
|
||||||
$qb = $em->createQueryBuilder();
|
|
||||||
$qb->select('item')
|
|
||||||
->from("CadolesPortalBundle:Item", 'item')
|
|
||||||
->where(":niveau01 MEMBER OF item.niveau01s")
|
|
||||||
->andWhere("item.essential=:flag")
|
|
||||||
->setParameter("flag",true)
|
|
||||||
->setParameter("niveau01",$niveau01);
|
|
||||||
|
|
||||||
$itemsniveau01s=$qb->getQuery()->getResult();
|
|
||||||
foreach($itemsniveau01s as $itemniveau01) {
|
|
||||||
if(!$bookmarksitems->contains($itemniveau01) && !$items->contains($itemniveau01)) $items->add($itemniveau01);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Trie des items
|
|
||||||
$itemsordered = $items->getIterator();
|
|
||||||
$itemsordered->uasort(function ($first, $second) {
|
|
||||||
if((int) $first->getRowOrder() > (int) $second->getRowOrder())
|
|
||||||
$return=1;
|
|
||||||
elseif((int) $first->getRowOrder() == (int) $second->getRowOrder()) {
|
|
||||||
if($first->getTitle() > $second->getTitle())
|
|
||||||
$return=1;
|
|
||||||
else
|
|
||||||
$return=-1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
$return=-1;
|
|
||||||
|
|
||||||
return $return;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewitemessential.html.twig', [
|
return $this->getRender('viewitemessential.html.twig', [
|
||||||
'entity' => $entity,
|
'canadd' => ($this->user),
|
||||||
'canadd' => ($user),
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'modedesktop' => $modedesktop,
|
'modedesktop' => $modedesktop,
|
||||||
'items' => $itemsordered,
|
'items' => $itemsordered,
|
||||||
'bookmarks' => $bookmarks,
|
'bookmarks' => $bookmarks,
|
||||||
'access' => $access,
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewalertAction($id,$access="config") {
|
public function viewalertAction(Request $request,$id,$access="config") {
|
||||||
$em = $this->getDoctrine()->getManager();
|
// Récupération de la requete
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$this->setRequest($request,$id,$access);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
// Valeur par défaut
|
||||||
if($access=="config") {
|
$alertsordered=null;
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
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');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Datas associées au widget
|
||||||
|
if(!$this->mini) {
|
||||||
// Récupération des paramétres du widget
|
// Récupération des paramétres du widget
|
||||||
$idalertcategory=null;
|
$idalertcategory=null;
|
||||||
$alertcategoryfilter=null;
|
$alertcategoryfilter=null;
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "alertcategory":
|
case "alertcategory":
|
||||||
$idalertcategory=$parameter["value"];
|
$idalertcategory=$parameter["value"];
|
||||||
if($idalertcategory) $alertcategoryfilter=$em->getRepository("CadolesPortalBundle:Alertcategory")->find($idalertcategory);
|
if($idalertcategory) $alertcategoryfilter=$this->em->getRepository("CadolesPortalBundle:Alertcategory")->find($idalertcategory);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
// Profilage
|
// Profilage
|
||||||
$user=$this->getUser();
|
$alertsordered=$this->em->getRepository("CadolesPortalBundle:Alert")->getUserAlerts($this->user,$idalertcategory,$alertcategoryfilter);
|
||||||
$alertsordered=$em->getRepository("CadolesPortalBundle:Alert")->getUserAlerts($user,$idalertcategory,$alertcategoryfilter);
|
}
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewalert.html.twig', [
|
return $this->getRender('viewalert.html.twig', [
|
||||||
'entity' => $entity,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'alerts' => $alertsordered,
|
'alerts' => $alertsordered,
|
||||||
'access' => $access
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function viewfluxAction($id,$access="config") {
|
public function viewfluxAction(Request $request,$id,$access="config") {
|
||||||
$em = $this->getDoctrine()->getManager();
|
// Récupération de la requete
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$this->setRequest($request,$id,$access);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
// Valeur par défaut
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
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');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
|
||||||
$modelist=0;
|
$modelist=0;
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
$fluxsordered=null;
|
||||||
|
$feeds=null;
|
||||||
|
|
||||||
|
// Datas associées au widget
|
||||||
|
if(!$this->mini) {
|
||||||
|
// Récupération des paramétres du widget
|
||||||
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "modelist":
|
case "modelist":
|
||||||
$modelist=$parameter["value"];
|
$modelist=$parameter["value"];
|
||||||
|
@ -788,49 +702,13 @@ class PagewidgetController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
// Profilage
|
// Profilage
|
||||||
$user=$this->getUser();
|
$fluxs=$this->em->getRepository("CadolesPortalBundle:Flux")->getUserFluxs($this->user);
|
||||||
$roles=($user?$user->getRoles():["ROLE_ANONYME"]);
|
|
||||||
$groups=($user?$user->getGroups():[]);
|
|
||||||
|
|
||||||
// Initialisation du calcul des fluxs
|
|
||||||
$fluxs=new ArrayCollection();
|
|
||||||
|
|
||||||
// Récupération des fluxs par rôles
|
|
||||||
foreach($roles as $role) {
|
|
||||||
$qb = $em->createQueryBuilder();
|
|
||||||
$qb->select('flux')
|
|
||||||
->from("CadolesPortalBundle:Flux", 'flux')
|
|
||||||
->where($qb->expr()->like('flux.roles', $qb->expr()->literal("%$role%")));
|
|
||||||
|
|
||||||
$fluxsroles=$qb->getQuery()->getResult();
|
|
||||||
foreach($fluxsroles as $fluxrole) {
|
|
||||||
if(!$fluxs->contains($fluxrole)) $fluxs->add($fluxrole);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des fluxs par group
|
|
||||||
foreach($groups as $group) {
|
|
||||||
$qb = $em->createQueryBuilder();
|
|
||||||
$qb->select('flux')
|
|
||||||
->from("CadolesPortalBundle:Flux", 'flux')
|
|
||||||
->where(":group MEMBER OF flux.groups")
|
|
||||||
->setParameter("group",$group->getGroup());
|
|
||||||
|
|
||||||
$fluxsgroups=$qb->getQuery()->getResult();
|
|
||||||
foreach($fluxsgroups as $fluxgroup) {
|
|
||||||
if(!$fluxs->contains($fluxgroup)) $fluxs->add($fluxgroup);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$feeds=array();
|
$feeds=array();
|
||||||
$filesystem = new Filesystem();
|
$filesystem = new Filesystem();
|
||||||
|
|
||||||
|
// Généraltion du cache associés aux flux
|
||||||
foreach($fluxs as $keyflux => $flux) {
|
foreach($fluxs as $keyflux => $flux) {
|
||||||
// On regarde si le flux a été lu il y a peu
|
// On regarde si le flux a été lu il y a peu
|
||||||
$toregen=true;
|
$toregen=true;
|
||||||
|
@ -868,7 +746,7 @@ class PagewidgetController extends Controller
|
||||||
|
|
||||||
// Si le fichier est trop ancien on relit le flus
|
// Si le fichier est trop ancien on relit le flus
|
||||||
if($toregen) {
|
if($toregen) {
|
||||||
$PROXYactivate = $em->getRepository("CadolesCoreBundle:Config")->find("PROXYactivate")->getValue();
|
$PROXYactivate = $this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYactivate")->getValue();
|
||||||
$weburl=$this->getParameter('weburl');
|
$weburl=$this->getParameter('weburl');
|
||||||
|
|
||||||
if(stripos($url,"/")==0) {
|
if(stripos($url,"/")==0) {
|
||||||
|
@ -879,8 +757,8 @@ class PagewidgetController extends Controller
|
||||||
if(stripos($url,"http://".$weburl)===0) $PROXYactivate=false;
|
if(stripos($url,"http://".$weburl)===0) $PROXYactivate=false;
|
||||||
|
|
||||||
if($PROXYactivate) {
|
if($PROXYactivate) {
|
||||||
$PROXYserver = $em->getRepository("CadolesCoreBundle:Config")->find("PROXYserver")->getValue();
|
$PROXYserver = $this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYserver")->getValue();
|
||||||
$PROXYport = $em->getRepository("CadolesCoreBundle:Config")->find("PROXYport")->getValue();
|
$PROXYport = $this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYport")->getValue();
|
||||||
$clientguzzle = new \GuzzleHttp\Client(array('timeout' => 3,'verify'=>false,'proxy' => ['http' => 'http://'.$PROXYserver.':'.$PROXYport,'https' => 'http://'.$PROXYserver.':'.$PROXYport]));
|
$clientguzzle = new \GuzzleHttp\Client(array('timeout' => 3,'verify'=>false,'proxy' => ['http' => 'http://'.$PROXYserver.':'.$PROXYport,'https' => 'http://'.$PROXYserver.':'.$PROXYport]));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -958,7 +836,6 @@ class PagewidgetController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
// Garder le flux
|
// Garder le flux
|
||||||
|
|
||||||
$tmp=array(
|
$tmp=array(
|
||||||
"feedtitle" => $feedtitle,
|
"feedtitle" => $feedtitle,
|
||||||
"title" => $title,
|
"title" => $title,
|
||||||
|
@ -1001,41 +878,33 @@ class PagewidgetController extends Controller
|
||||||
$libelle[$key] = $valeur["date"];
|
$libelle[$key] = $valeur["date"];
|
||||||
}
|
}
|
||||||
array_multisort($libelle, SORT_DESC, $feeds);
|
array_multisort($libelle, SORT_DESC, $feeds);
|
||||||
|
}
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewflux.html.twig', [
|
return $this->getRender('viewflux.html.twig', [
|
||||||
'entity' => $entity,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'modelist' => $modelist,
|
'modelist' => $modelist,
|
||||||
'fluxs' => $fluxsordered,
|
'fluxs' => $fluxsordered,
|
||||||
'access' => $access,
|
|
||||||
'feeds' => $feeds,
|
'feeds' => $feeds,
|
||||||
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function viewrssAction($id,$access="config") {
|
public function viewrssAction(Request $request,$id,$access="config") {
|
||||||
$em = $this->getDoctrine()->getManager();
|
// Récupération de la requete
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$this->setRequest($request,$id,$access);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
// Valeur par défaut
|
||||||
if($access=="config") {
|
$modelist=0;
|
||||||
$canupdate = true;
|
$fluxs=["id"=>0];
|
||||||
}
|
$feeds=null;
|
||||||
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');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Datas associées au widget
|
||||||
|
if(!$this->mini) {
|
||||||
// Récupération des paramétres du widget
|
// Récupération des paramétres du widget
|
||||||
$url="";
|
$url="";
|
||||||
$nbarticle="_blank";
|
$nbarticle="_blank";
|
||||||
$modelist=0;
|
$modelist=0;
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "url":
|
case "url":
|
||||||
$url=$parameter["value"];
|
$url=$parameter["value"];
|
||||||
|
@ -1049,9 +918,6 @@ class PagewidgetController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
// On regarde si le flux a été lu il y a peu
|
// On regarde si le flux a été lu il y a peu
|
||||||
$toregen=true;
|
$toregen=true;
|
||||||
$filecache=$filecache='uploads/flux/widget-'.$id.'.txt';
|
$filecache=$filecache='uploads/flux/widget-'.$id.'.txt';
|
||||||
|
@ -1085,7 +951,7 @@ class PagewidgetController extends Controller
|
||||||
// Si le fichier est trop ancien on relit le flus
|
// Si le fichier est trop ancien on relit le flus
|
||||||
if($toregen) {
|
if($toregen) {
|
||||||
// Connexion au client
|
// Connexion au client
|
||||||
$PROXYactivate = $em->getRepository("CadolesCoreBundle:Config")->find("PROXYactivate")->getValue();
|
$PROXYactivate = $this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYactivate")->getValue();
|
||||||
$weburl=$this->getParameter('weburl');
|
$weburl=$this->getParameter('weburl');
|
||||||
if(stripos($url,"/")==0) {
|
if(stripos($url,"/")==0) {
|
||||||
$url="https://".$weburl.$url;
|
$url="https://".$weburl.$url;
|
||||||
|
@ -1095,8 +961,8 @@ class PagewidgetController extends Controller
|
||||||
if(stripos($url,"http://".$weburl)===0) $PROXYactivate=false;
|
if(stripos($url,"http://".$weburl)===0) $PROXYactivate=false;
|
||||||
|
|
||||||
if($PROXYactivate) {
|
if($PROXYactivate) {
|
||||||
$PROXYserver = $em->getRepository("CadolesCoreBundle:Config")->find("PROXYserver")->getValue();
|
$PROXYserver = $this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYserver")->getValue();
|
||||||
$PROXYport = $em->getRepository("CadolesCoreBundle:Config")->find("PROXYport")->getValue();
|
$PROXYport = $this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYport")->getValue();
|
||||||
$clientguzzle = new \GuzzleHttp\Client(array('timeout' => 3,'verify'=>false,'proxy' => ['http' => 'http://'.$PROXYserver.':'.$PROXYport,'https' => 'http://'.$PROXYserver.':'.$PROXYport]));
|
$clientguzzle = new \GuzzleHttp\Client(array('timeout' => 3,'verify'=>false,'proxy' => ['http' => 'http://'.$PROXYserver.':'.$PROXYport,'https' => 'http://'.$PROXYserver.':'.$PROXYport]));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1108,11 +974,10 @@ class PagewidgetController extends Controller
|
||||||
if ($e->hasResponse()) {
|
if ($e->hasResponse()) {
|
||||||
// Render
|
// Render
|
||||||
$feeds=[];
|
$feeds=[];
|
||||||
return $this->render($this->labelentity.':viewflux.html.twig', [
|
return $this->getRender('viewflux.html.twig', [
|
||||||
'entity' => $entity,
|
'fluxs' => $fluxs,
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'access' => $access,
|
|
||||||
'feeds' => $feeds,
|
'feeds' => $feeds,
|
||||||
|
'modelist' => $modelist,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1191,7 +1056,7 @@ class PagewidgetController extends Controller
|
||||||
"image" => $imgurl,
|
"image" => $imgurl,
|
||||||
// "color" => $flux->getColor(),
|
// "color" => $flux->getColor(),
|
||||||
"fluxid" => 0,
|
"fluxid" => 0,
|
||||||
"fluxtitle" => $entity->getName(),
|
"fluxtitle" => $this->entity->getName(),
|
||||||
));
|
));
|
||||||
|
|
||||||
$nbflux++;
|
$nbflux++;
|
||||||
|
@ -1209,19 +1074,20 @@ class PagewidgetController extends Controller
|
||||||
$filesystem->dumpFile($filecache, serialize($feeds));
|
$filesystem->dumpFile($filecache, serialize($feeds));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewflux.html.twig', [
|
return $this->getRender('viewflux.html.twig', [
|
||||||
'entity' => $entity,
|
'fluxs' => $fluxs,
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'fluxs' => ["id"=>0],
|
|
||||||
'access' => $access,
|
|
||||||
'feeds' => $feeds,
|
'feeds' => $feeds,
|
||||||
'modelist' => $modelist,
|
'modelist' => $modelist,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewbookmarkAction($id,$access="config") {
|
public function viewbookmarkAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$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.');
|
||||||
|
@ -1266,10 +1132,15 @@ class PagewidgetController extends Controller
|
||||||
'modedesktop' => $modedesktop,
|
'modedesktop' => $modedesktop,
|
||||||
'bookmarks' => $bookmarks,
|
'bookmarks' => $bookmarks,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewlinkAction($id,$access="config") {
|
public function viewlinkAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$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.');
|
||||||
|
@ -1310,10 +1181,15 @@ class PagewidgetController extends Controller
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'target' => $target,
|
'target' => $target,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function vieweditorAction($id,$access="config") {
|
public function vieweditorAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$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.');
|
||||||
|
@ -1350,10 +1226,15 @@ class PagewidgetController extends Controller
|
||||||
'canupdate' => $canupdate,
|
'canupdate' => $canupdate,
|
||||||
'html' => $html,
|
'html' => $html,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewslideAction($id,$access="config") {
|
public function viewslideAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$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.');
|
||||||
|
@ -1393,10 +1274,15 @@ class PagewidgetController extends Controller
|
||||||
'slides' => $slides,
|
'slides' => $slides,
|
||||||
'interval' => $interval,
|
'interval' => $interval,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewfileAction($id,$access="config") {
|
public function viewfileAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$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.');
|
||||||
|
@ -1432,13 +1318,18 @@ class PagewidgetController extends Controller
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'directory' => "widget-".$id,
|
'directory' => "widget-".$id,
|
||||||
'view' => $view,
|
'view' => $view,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewgaleryAction($id,$access="config") {
|
public function viewgaleryAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$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.');
|
||||||
|
@ -1491,12 +1382,16 @@ class PagewidgetController extends Controller
|
||||||
'canupdate' => $canupdate,
|
'canupdate' => $canupdate,
|
||||||
'files' => $files,
|
'files' => $files,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewcalendarAction(Request $request,$id,$access="config") {
|
public function viewcalendarAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
|
@ -1541,13 +1436,17 @@ class PagewidgetController extends Controller
|
||||||
'nbday' => $nbday,
|
'nbday' => $nbday,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'firstcalendar' => $firstcalendar,
|
'firstcalendar' => $firstcalendar,
|
||||||
'usage' => $usage
|
'usage' => $usage,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewblogAction(Request $request,$id,$access="config") {
|
public function viewblogAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
|
@ -1602,13 +1501,17 @@ class PagewidgetController extends Controller
|
||||||
'nbarticle' => $nbarticle,
|
'nbarticle' => $nbarticle,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'firstblog' => $firstblog,
|
'firstblog' => $firstblog,
|
||||||
'usage' => $usage
|
'usage' => $usage,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewprojectAction(Request $request,$id,$access="config") {
|
public function viewprojectAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
|
@ -1676,11 +1579,16 @@ class PagewidgetController extends Controller
|
||||||
'nbarticle' => $nbarticle,
|
'nbarticle' => $nbarticle,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'firstproject' => $firstproject,
|
'firstproject' => $firstproject,
|
||||||
'usage' => $usage
|
'usage' => $usage,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewseparatorAction($id,$access="config") {
|
public function viewseparatorAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$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.');
|
||||||
|
@ -1721,10 +1629,15 @@ class PagewidgetController extends Controller
|
||||||
'seetitle' => $seetitle,
|
'seetitle' => $seetitle,
|
||||||
'seeicon' => $seeicon,
|
'seeicon' => $seeicon,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewclockAction($id,$access="config") {
|
public function viewclockAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$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.');
|
||||||
|
@ -1754,17 +1667,22 @@ class PagewidgetController extends Controller
|
||||||
$this->getPreference($entity);
|
$this->getPreference($entity);
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewurl.html.twig', [
|
return $this->render($this->labelentity.':viewframe.html.twig', [
|
||||||
'entity' => $entity,
|
'entity' => $entity,
|
||||||
'canadd' => $canupdate,
|
'canadd' => $canupdate,
|
||||||
'canupdate' => $canupdate,
|
'canupdate' => $canupdate,
|
||||||
'onheader' => true,
|
'onheader' => true,
|
||||||
'tool' => ($clock==0?"cadoles_portal_user_tool_clockanalogique":"cadoles_portal_user_tool_clocknumerique"),
|
'tool' => ($clock==0?"cadoles_portal_user_tool_clockanalogique":"cadoles_portal_user_tool_clocknumerique"),
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewcalculatorAction($id,$access="config") {
|
public function viewcalculatorAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$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.');
|
||||||
|
@ -1791,10 +1709,15 @@ class PagewidgetController extends Controller
|
||||||
'onheader' => true,
|
'onheader' => true,
|
||||||
'tool' => "cadoles_portal_user_tool_calculator",
|
'tool' => "cadoles_portal_user_tool_calculator",
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewappexternalAction($id,$access="config") {
|
public function viewappexternalAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$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.');
|
||||||
|
@ -1892,12 +1815,16 @@ class PagewidgetController extends Controller
|
||||||
'items' => $items,
|
'items' => $items,
|
||||||
'itemcategorys' => $itemcategorys,
|
'itemcategorys' => $itemcategorys,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewinfoAction(Request $request,$id,$access="config") {
|
public function viewinfoAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
@ -1960,12 +1887,16 @@ class PagewidgetController extends Controller
|
||||||
'members' => $members,
|
'members' => $members,
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
'idpage' => $page->getId(),
|
'idpage' => $page->getId(),
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewchatAction(Request $request,$id,$access="config") {
|
public function viewchatAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
|
@ -1999,6 +1930,8 @@ class PagewidgetController extends Controller
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'usage' => $usage,
|
'usage' => $usage,
|
||||||
'group' => $group,
|
'group' => $group,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2006,6 +1939,9 @@ class PagewidgetController extends Controller
|
||||||
public function viewgroupAction(Request $request,$id,$access="config") {
|
public function viewgroupAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
@ -2049,13 +1985,17 @@ class PagewidgetController extends Controller
|
||||||
'canupdate' => $canupdate,
|
'canupdate' => $canupdate,
|
||||||
'usage' => $usage,
|
'usage' => $usage,
|
||||||
'groups' => $mygroups,
|
'groups' => $mygroups,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewgroupmessageAction(Request $request,$id,$access="config") {
|
public function viewgroupmessageAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
@ -2135,13 +2075,17 @@ class PagewidgetController extends Controller
|
||||||
'modelist' => $modelist,
|
'modelist' => $modelist,
|
||||||
'messages' => $mymsg,
|
'messages' => $mymsg,
|
||||||
'nbarticle' => $nbarticle,
|
'nbarticle' => $nbarticle,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewOnlydocAction(Request $request,$id,$access="config") {
|
public function viewOnlydocAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
@ -2185,6 +2129,8 @@ class PagewidgetController extends Controller
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'directory' => $id,
|
'directory' => $id,
|
||||||
'view' => $view,
|
'view' => $view,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ class SlideController extends Controller
|
||||||
// Vérifier que l'on générer un slide
|
// Vérifier que l'on générer un slide
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
if($usage=="user") {
|
if($usage=="user") {
|
||||||
$user=$data->getPagewidget()->getPage()->getUser();
|
$user=$pagewidget->getPage()->getUser();
|
||||||
if($user!=$this->getUser()) throw $this->createNotFoundException('Permission denied');
|
if($user!=$this->getUser()) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -76,7 +76,7 @@ class SlideController extends Controller
|
||||||
// Vérifier que l'on générer un slide
|
// Vérifier que l'on générer un slide
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
if($usage=="user") {
|
if($usage=="user") {
|
||||||
$user=$data->getPagewidget()->getPage()->getUser();
|
$user=$pagewidget->getPage()->getUser();
|
||||||
if($user!=$this->getUser()) throw $this->createNotFoundException('Permission denied');
|
if($user!=$this->getUser()) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -11,7 +11,8 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity
|
* @ORM\Entity
|
||||||
* @ORM\Table(name="flux")
|
* @ORM\Table(name="flux")
|
||||||
* @ORM\HasLifecycleCallbacks
|
* @ORM\HasLifecycleCallbacks.
|
||||||
|
* @ORM\Entity(repositoryClass="Cadoles\PortalBundle\Repository\FluxRepository")
|
||||||
*/
|
*/
|
||||||
class Flux
|
class Flux
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Cadoles\PortalBundle\Repository;
|
||||||
|
|
||||||
|
use Doctrine\ORM\EntityRepository;
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
|
||||||
|
class FluxRepository extends EntityRepository
|
||||||
|
{
|
||||||
|
public function getUserFluxs($user) {
|
||||||
|
// Profilage
|
||||||
|
$roles=($user?$user->getRoles():["ROLE_ANONYME"]);
|
||||||
|
$groups=($user?$user->getGroups():[]);
|
||||||
|
|
||||||
|
// Initialisation du calcul des alerts
|
||||||
|
$fluxs=new ArrayCollection();
|
||||||
|
|
||||||
|
// Récupération des fluxs par rôles
|
||||||
|
foreach($roles as $role) {
|
||||||
|
$qb = $this->createQueryBuilder('a');
|
||||||
|
$qb->select('flux')
|
||||||
|
->from("CadolesPortalBundle:Flux", 'flux')
|
||||||
|
->where($qb->expr()->like('flux.roles', $qb->expr()->literal("%$role%")));
|
||||||
|
|
||||||
|
$fluxsroles=$qb->getQuery()->getResult();
|
||||||
|
foreach($fluxsroles as $fluxrole) {
|
||||||
|
if(!$fluxs->contains($fluxrole)) $fluxs->add($fluxrole);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Récupération des fluxs par group
|
||||||
|
foreach($groups as $group) {
|
||||||
|
$qb = $this->createQueryBuilder('a');
|
||||||
|
$qb->select('flux')
|
||||||
|
->from("CadolesPortalBundle:Flux", 'flux')
|
||||||
|
->where(":group MEMBER OF flux.groups")
|
||||||
|
->setParameter("group",$group->getGroup());
|
||||||
|
|
||||||
|
$fluxsgroups=$qb->getQuery()->getResult();
|
||||||
|
foreach($fluxsgroups as $fluxgroup) {
|
||||||
|
if(!$fluxs->contains($fluxgroup)) $fluxs->add($fluxgroup);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $fluxs;
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,7 +7,7 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
|
||||||
class ItemRepository extends EntityRepository
|
class ItemRepository extends EntityRepository
|
||||||
{
|
{
|
||||||
public function getUserItems($user,&$bookmarks,&$itemsordered,&$itemcategorys,$iditemcategory=null,$withbookmark=1) {
|
public function getUserItems($user,&$bookmarks,&$itemsordered,&$itemcategorys,$iditemcategory=null,$withbookmark=1,$fgessential=false) {
|
||||||
// Profilage
|
// Profilage
|
||||||
$roles=($user?$user->getRoles():["ROLE_ANONYME"]);
|
$roles=($user?$user->getRoles():["ROLE_ANONYME"]);
|
||||||
$groups=($user?$user->getGroups():[]);
|
$groups=($user?$user->getGroups():[]);
|
||||||
|
@ -40,6 +40,12 @@ class ItemRepository extends EntityRepository
|
||||||
$qb->andWhere("item.itemcategory=:itemcategory")
|
$qb->andWhere("item.itemcategory=:itemcategory")
|
||||||
->setParameter("itemcategory",$itemcategoryfilter);
|
->setParameter("itemcategory",$itemcategoryfilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($fgessential) {
|
||||||
|
$qb->andWhere("item.essential=:flag")
|
||||||
|
->setParameter("flag",true);
|
||||||
|
}
|
||||||
|
|
||||||
$itemsroles=$qb->getQuery()->getResult();
|
$itemsroles=$qb->getQuery()->getResult();
|
||||||
foreach($itemsroles as $itemrole) {
|
foreach($itemsroles as $itemrole) {
|
||||||
if(!$bookmarksitems->contains($itemrole) && !$items->contains($itemrole)) $items->add($itemrole);
|
if(!$bookmarksitems->contains($itemrole) && !$items->contains($itemrole)) $items->add($itemrole);
|
||||||
|
@ -58,6 +64,12 @@ class ItemRepository extends EntityRepository
|
||||||
$qb->andWhere("item.itemcategory=:itemcategory")
|
$qb->andWhere("item.itemcategory=:itemcategory")
|
||||||
->setParameter("itemcategory",$itemcategoryfilter);
|
->setParameter("itemcategory",$itemcategoryfilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($fgessential) {
|
||||||
|
$qb->andWhere("item.essential=:flag")
|
||||||
|
->setParameter("flag",true);
|
||||||
|
}
|
||||||
|
|
||||||
$itemsgroups=$qb->getQuery()->getResult();
|
$itemsgroups=$qb->getQuery()->getResult();
|
||||||
|
|
||||||
foreach($itemsgroups as $itemgroup) {
|
foreach($itemsgroups as $itemgroup) {
|
||||||
|
@ -78,6 +90,12 @@ class ItemRepository extends EntityRepository
|
||||||
$qb->andWhere("item.itemcategory=:itemcategory")
|
$qb->andWhere("item.itemcategory=:itemcategory")
|
||||||
->setParameter("itemcategory",$itemcategoryfilter);
|
->setParameter("itemcategory",$itemcategoryfilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($fgessential) {
|
||||||
|
$qb->andWhere("item.essential=:flag")
|
||||||
|
->setParameter("flag",true);
|
||||||
|
}
|
||||||
|
|
||||||
$itemsniveau01s=$qb->getQuery()->getResult();
|
$itemsniveau01s=$qb->getQuery()->getResult();
|
||||||
foreach($itemsniveau01s as $itemniveau01) {
|
foreach($itemsniveau01s as $itemniveau01) {
|
||||||
if(!$bookmarksitems->contains($itemniveau01) && !$items->contains($itemniveau01)) $items->add($itemniveau01);
|
if(!$bookmarksitems->contains($itemniveau01) && !$items->contains($itemniveau01)) $items->add($itemniveau01);
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
|
|
||||||
{% extends '@CadolesCore/base.html.twig' %}
|
{% extends '@CadolesCore/base.html.twig' %}
|
||||||
|
|
||||||
|
{% block localstyle %}
|
||||||
|
{% if look=="list" %}
|
||||||
|
#R1C1:first-child {
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
{% block pagewrapper %}
|
{% block pagewrapper %}
|
||||||
{% if access=="config" %}
|
{% if access=="config" %}
|
||||||
<div class="pagemenu">
|
<div class="pagemenu">
|
||||||
|
@ -25,8 +32,8 @@
|
||||||
|
|
||||||
<div id="tolocalize" style="display:none">
|
<div id="tolocalize" style="display:none">
|
||||||
{% for pagewidget in entity.pagewidgets %}
|
{% for pagewidget in entity.pagewidgets %}
|
||||||
<a href="{{ url(pagewidget.widget.routeview|replace({'_config_':'_'~access~'_'}),{id:pagewidget.id,by:mode,usage:usage,group:group}) }}"></a>
|
<a href="{{ url(pagewidget.widget.routeview|replace({'_config_':'_'~access~'_'}),{id:pagewidget.id,by:mode,usage:usage,group:group,look:look,selwidget:selwidget}) }}"></a>
|
||||||
{{ render(url(pagewidget.widget.routeview|replace({'_config_':'_'~access~'_'}),{id:pagewidget.id,by:mode,usage:usage,group:group})) }}
|
{{ render(url(pagewidget.widget.routeview|replace({'_config_':'_'~access~'_'}),{id:pagewidget.id,by:mode,usage:usage,group:group,look:look,selwidget:selwidget})) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -98,7 +105,11 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
// Création de la grille des widgets
|
// Création de la grille des widgets
|
||||||
|
{% if look == "list" %}
|
||||||
|
var template = '{"rows":[{"id":0,"cols":[{"id":0,"size": 1,"rows":[]},{"id":1,"size": 11,"rows":[]}]}]}';
|
||||||
|
{% else %}
|
||||||
var template = '{{ entity.template | raw }}';
|
var template = '{{ entity.template | raw }}';
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
// Template de base
|
// Template de base
|
||||||
if(template=="") {
|
if(template=="") {
|
||||||
|
@ -157,10 +168,19 @@
|
||||||
|
|
||||||
// On déplace les widgets à leur emplacement
|
// On déplace les widgets à leur emplacement
|
||||||
$("#tolocalize").children(".widget").each(function( element ) {
|
$("#tolocalize").children(".widget").each(function( element ) {
|
||||||
|
{% if look=="list" %}
|
||||||
|
if($(this).data("id")=="{{selwidget}}") {
|
||||||
|
$(this).appendTo('#R1C2');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$(this).appendTo('#R1C1');
|
||||||
|
|
||||||
|
{% else %}
|
||||||
if($('#'+$(this).attr("loc")).length)
|
if($('#'+$(this).attr("loc")).length)
|
||||||
$(this).appendTo('#'+$(this).attr("loc"));
|
$(this).appendTo('#'+$(this).attr("loc"));
|
||||||
else
|
else
|
||||||
$(this).appendTo('#R1C1');
|
$(this).appendTo('#R1C1');
|
||||||
|
{% endif %}
|
||||||
});
|
});
|
||||||
|
|
||||||
// On ajoute un widget vide à chaque colonne
|
// On ajoute un widget vide à chaque colonne
|
||||||
|
@ -168,7 +188,7 @@
|
||||||
$("<div class='widgetempty'> </div>").appendTo($(this));
|
$("<div class='widgetempty'> </div>").appendTo($(this));
|
||||||
});
|
});
|
||||||
|
|
||||||
{% if canupdate %}
|
{% if canupdate and look!="list" %}
|
||||||
// Mettre une taille mini de colonne sinon on ne pourra pas déplacer le widget dans la colonne
|
// Mettre une taille mini de colonne sinon on ne pourra pas déplacer le widget dans la colonne
|
||||||
$(".colcontainer .col").css("min-height","80px");
|
$(".colcontainer .col").css("min-height","80px");
|
||||||
|
|
||||||
|
@ -365,6 +385,26 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Aggrandir widget
|
||||||
|
function bigWidget(idwidget) {
|
||||||
|
var url="{{ path('cadoles_portal_'~access~'_page_view',{id:entity.id,group:group,usage:usage,by:mode,look:'list',selwidget:'xx'})}}";
|
||||||
|
|
||||||
|
url=url.replace('xx',idwidget);
|
||||||
|
url=url.replace(/&/g,"&");
|
||||||
|
|
||||||
|
$(location).attr('href', url);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Réduire widget
|
||||||
|
function smallWidget(idwidget) {
|
||||||
|
var url="{{ path('cadoles_portal_'~access~'_page_view',{id:entity.id,group:group,usage:usage,by:mode,look:'view',selwidget:'xx'})}}";
|
||||||
|
|
||||||
|
url=url.replace('xx',idwidget);
|
||||||
|
url=url.replace(/&/g,"&");
|
||||||
|
|
||||||
|
$(location).attr('href', url);
|
||||||
|
}
|
||||||
|
|
||||||
// Ajout d'un bookmark
|
// Ajout d'un bookmark
|
||||||
function addBookmark(idwidget,touser) {
|
function addBookmark(idwidget,touser) {
|
||||||
var url="{{ path('cadoles_portal_'~access~'_bookmark_submit',{idpage:entity.id,idwidget:'xx',touser:'yy',group:group,usage:usage,by:mode})}}";
|
var url="{{ path('cadoles_portal_'~access~'_bookmark_submit',{idpage:entity.id,idwidget:'xx',touser:'yy',group:group,usage:usage,by:mode})}}";
|
||||||
|
|
|
@ -12,14 +12,35 @@
|
||||||
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
||||||
|
|
||||||
{% if canupdate or alerts|length>0 %}
|
{% if canupdate or alerts|length>0 %}
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-projalertect" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-alert" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-alert" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
{% if entity.icon %}
|
{% if entity.icon %}
|
||||||
|
@ -57,5 +78,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,15 +26,32 @@
|
||||||
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-appexternal" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-appexternal" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-appexternal" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
|
@ -89,6 +106,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,12 +12,19 @@
|
||||||
{% set stylewidgetbodyreverse = constants.mystylewidgetbodyreverse(entity) %}
|
{% set stylewidgetbodyreverse = constants.mystylewidgetbodyreverse(entity) %}
|
||||||
{% set color = app.session.get('color') %}
|
{% set color = app.session.get('color') %}
|
||||||
|
|
||||||
<style>
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-blog" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
</style>
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-blog" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-blog" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
|
@ -36,6 +43,13 @@
|
||||||
|
|
||||||
<a title="Créer un Article" onClick="showFrameitem('blog','{{ url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
|
<a title="Créer un Article" onClick="showFrameitem('blog','{{ url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
|
@ -79,6 +93,6 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,9 +33,20 @@
|
||||||
{% set username = "" %}
|
{% set username = "" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-bookmark" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-bookmark" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-bookmark" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
@ -45,9 +56,13 @@
|
||||||
{% if canadd %}
|
{% if canadd %}
|
||||||
<i class="fa fa-plus fa-fw" title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},false)" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-plus fa-fw" title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},false)" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
{% if entity.icon %}
|
{% if entity.icon %}
|
||||||
|
@ -117,6 +132,7 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,19 @@
|
||||||
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
||||||
{% set color = app.session.get('color') %}
|
{% set color = app.session.get('color') %}
|
||||||
|
|
||||||
<style>
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-calendar" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
</style>
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-calendar" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-calendar" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
|
@ -32,6 +39,12 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a title="Gérer mes Calendriers" onClick="showFrameitem('calendar','{{ url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-calendar fa-fw"></i></a>
|
<a title="Gérer mes Calendriers" onClick="showFrameitem('calendar','{{ url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-calendar fa-fw"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
|
@ -86,6 +99,7 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,19 @@
|
||||||
{% if app.user %}
|
{% if app.user %}
|
||||||
<style>.msgtopic a { color: #{{colorbodyfont}}; font-weight: bold; }</style>
|
<style>.msgtopic a { color: #{{colorbodyfont}}; font-weight: bold; }</style>
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-chat" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-chat" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-chat" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
|
@ -62,5 +75,6 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{%endif%}
|
{%endif%}
|
|
@ -10,15 +10,32 @@
|
||||||
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
|
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
|
||||||
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-editor" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-editor" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-editor" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
|
@ -34,6 +51,6 @@
|
||||||
{{ html | raw }}
|
{{ html | raw }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,17 +28,32 @@
|
||||||
{% set colorbodyfont = color['main'] %}
|
{% set colorbodyfont = color['main'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-file" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-file" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-file" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
{% if entity.icon %}
|
{% if entity.icon %}
|
||||||
|
@ -53,6 +68,7 @@
|
||||||
<iframe id="frame-{{directory}}" src="{{ path("cadoles_core_"~access~"_file_list",{'directory':directory,'defaultview':view}) }}" data-color="#{{colorbodyfont}}" style="{{ stylewidgetbodyframe }}" class="{% if not entity.autoajust %}notframeajust {% endif %}"></iframe>
|
<iframe id="frame-{{directory}}" src="{{ path("cadoles_core_"~access~"_file_list",{'directory':directory,'defaultview':view}) }}" data-color="#{{colorbodyfont}}" style="{{ stylewidgetbodyframe }}" class="{% if not entity.autoajust %}notframeajust {% endif %}"></iframe>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,14 +36,32 @@
|
||||||
{% set stylegrid="grid-list" %}
|
{% set stylegrid="grid-list" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-flux" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-flux" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-flux" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
{% if entity.icon %}
|
{% if entity.icon %}
|
||||||
|
@ -116,8 +134,8 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,14 +23,35 @@
|
||||||
{% set colorbodyfont = color['fontcolorhover'] %}
|
{% set colorbodyfont = color['fontcolorhover'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-frame" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-frame" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-frame" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% if onheader %}
|
{% if onheader %}
|
||||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
||||||
|
@ -51,8 +72,6 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,20 @@
|
||||||
{% set colorbodyfont = color['fontcolorhover'] %}
|
{% set colorbodyfont = color['fontcolorhover'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-galery" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-galery" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-galery" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
@ -35,9 +47,13 @@
|
||||||
{% if canadd %}
|
{% if canadd %}
|
||||||
<a style="{{ stylewidgetmenu }}" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Fichiers','{{ path('cadoles_core_'~access~'_file_upload',{'id': 'widget-'~entity.id,'type':'image'}) }}');" title='Ajouter des Images'><i class="fa fa-plus fa-fw"></i></a>
|
<a style="{{ stylewidgetmenu }}" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Fichiers','{{ path('cadoles_core_'~access~'_file_upload',{'id': 'widget-'~entity.id,'type':'image'}) }}');" title='Ajouter des Images'><i class="fa fa-plus fa-fw"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
{% if entity.icon %}
|
{% if entity.icon %}
|
||||||
|
@ -101,6 +117,7 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,20 @@
|
||||||
{% set canadd = true %}
|
{% set canadd = true %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if mini %}
|
||||||
|
<div class="widget widget-mini widget-group" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-group" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-group" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
@ -31,9 +43,13 @@
|
||||||
<i class="fa fa-plus fa-fw" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-plus fa-fw" style="{{ stylewidgetmenu }}"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
{% if entity.icon %}
|
{% if entity.icon %}
|
||||||
|
@ -95,6 +111,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -38,14 +38,35 @@
|
||||||
{% set stylegrid="grid-list" %}
|
{% set stylegrid="grid-list" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-groupmessage" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-groupmessage" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-groupmessage" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
{% if entity.icon %}
|
{% if entity.icon %}
|
||||||
|
@ -95,6 +116,6 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,15 +19,38 @@
|
||||||
{% set stylelink = "color:#" ~ color['fontcolorhover'] %}
|
{% set stylelink = "color:#" ~ color['fontcolorhover'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-info" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if icon %}
|
||||||
|
{% if icon=="/uploads/avatar/noavatar.png" %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_profle.png" class="logo" title="{{ title }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}{{ icon }}" class="logo" title="{{ title }}"/>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_users.png" class="logo" title="{{ title }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-info" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-info" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
{% if icon %}
|
{% if icon %}
|
||||||
<img src="/{{ alias }}{{ icon }}" class="logo" />
|
<img src="/{{ alias }}{{ icon }}" class="logo" />
|
||||||
|
@ -92,6 +115,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,20 @@
|
||||||
{% set username = "" %}
|
{% set username = "" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-project" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-item" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-item" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
@ -44,9 +56,13 @@
|
||||||
{% if canadd and access!="config"%}
|
{% if canadd and access!="config"%}
|
||||||
<i class="fa fa-plus fa-fw" title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},true)" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-plus fa-fw" title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},true)" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
{% if entity.icon %}
|
{% if entity.icon %}
|
||||||
|
@ -293,6 +309,6 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,20 @@
|
||||||
{% set username = "" %}
|
{% set username = "" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-itemessential" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-itemessential" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-itemessential" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
@ -46,8 +58,13 @@
|
||||||
<i class="fa fa-plus fa-fw" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-plus fa-fw" style="{{ stylewidgetmenu }}"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
|
@ -212,8 +229,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,15 +24,32 @@
|
||||||
{% set username = "" %}
|
{% set username = "" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-link" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
{% if target == 'frame' %}
|
||||||
|
<a class="linktosonde" data-sonde="{{ entity.name }}" style="cursor:pointer; {{ stylelink }}" onClick="showFrameitem('link{{ entity.id }}','{{ url|replace({'#login#': username}) }}')">
|
||||||
|
{% elseif target == "_self" %}
|
||||||
|
<a class="linktosonde" data-sonde="{{ entity.name }}" style="{{ stylelink }}"href="{{ url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ target }}{% endif %}">
|
||||||
|
{% else %}
|
||||||
|
<a class="linktosonde" data-sonde="{{ entity.name }}" style="{{ stylelink }}" href="{{ url|replace({'#login#': username}) }}" target="{{ target }}">
|
||||||
|
{% endif %}
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{entity.name}}" />
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}" />
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-link" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-link" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }}; height:100%;">
|
<div class="widgetheader" style="{{ stylewidgetbodyimage }}; height:100%;">
|
||||||
|
@ -54,6 +71,6 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,16 +28,31 @@
|
||||||
{% set colorbodyfont = color['main'] %}
|
{% set colorbodyfont = color['main'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-file" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget widget-mini widget-onlydoc" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
{% if canupdate or canadd %}
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-onlydoc" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
|
@ -55,6 +70,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,19 @@
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-project" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-project" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-project" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
|
@ -35,6 +48,12 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a onClick="showFrameitem('project','{{ url }}',true)" style="{{ stylewidgetmenu }}" title="Ajouter une Tâche"><i class="fa fa-plus fa-fw"></i></a>
|
<a onClick="showFrameitem('project','{{ url }}',true)" style="{{ stylewidgetmenu }}" title="Ajouter une Tâche"><i class="fa fa-plus fa-fw"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
|
@ -111,6 +130,7 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
{% set colorbodyfont = color['main'] %}
|
{% set colorbodyfont = color['main'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if not mini %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-separator" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-separator" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
|
@ -54,6 +55,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,20 @@
|
||||||
{% set username = "" %}
|
{% set username = "" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-slide" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-slide" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-slide" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
@ -34,9 +46,13 @@
|
||||||
{% if canadd %}
|
{% if canadd %}
|
||||||
<i title="Gérer le Carrousel" class="fa fa-th fa-fw" onClick="listSlide({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i title="Gérer le Carrousel" class="fa fa-th fa-fw" onClick="listSlide({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
||||||
{% set intervalmilli = interval * 1000 %}
|
{% set intervalmilli = interval * 1000 %}
|
||||||
|
@ -72,7 +88,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,13 +17,32 @@
|
||||||
{% set username = "" %}
|
{% set username = "" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-project" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-url" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-url" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
|
{% if canupdate %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{% if imagemedia %}
|
{% if imagemedia %}
|
||||||
{% if entity.autoajust %}
|
{% if entity.autoajust %}
|
||||||
|
@ -52,11 +71,15 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="widgetbody" style="{{ stylewidgetbodyframe }}">
|
<div class="widgetbody" style="{{ stylewidgetbodyframe }}">
|
||||||
<iframe src="{{ url|replace({'#login#': username}) }}" class="{% if entity.autoajust %}frameajust {% endif %}" style="{{ stylewidgetbodyframe }}"></iframe>
|
{% set minheight="" %}
|
||||||
|
{%if look=="list" %}
|
||||||
|
{% set minheight="min-height:1300px;" %}
|
||||||
|
{% endif %}
|
||||||
|
<iframe src="{{ url|replace({'#login#': username}) }}" class="{% if entity.autoajust %}frameajust {% endif %}" style="{{ stylewidgetbodyframe }} {{minheight}}"></iframe>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue