Merge branch 'master' into dist/envole/6/master
This commit is contained in:
commit
cc71a435f7
@ -78,6 +78,9 @@ class RegistrationType extends AbstractType
|
||||
"label" => $session->get('labelniveau01'),
|
||||
'placeholder' => '== Choisir '.$session->get('labelniveau01').' ==',
|
||||
"choice_label" => "label",
|
||||
"query_builder"=> function (EntityRepository $er) {
|
||||
return $er->createQueryBuilder('niveau01')->orderBy('niveau01.label','ASC');
|
||||
},
|
||||
"disabled" => ($options["mode"]=="delete"?true:false),
|
||||
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px","readonly" => ($options["mode"]=="delete"?true:false))));
|
||||
|
||||
|
@ -89,16 +89,16 @@ class UserType extends AbstractType
|
||||
"query_builder"=> function (EntityRepository $er) use($access,$perm,$userid) {
|
||||
if($access=="config") {
|
||||
if($perm)
|
||||
return $er->createQueryBuilder('niveau01');
|
||||
return $er->createQueryBuilder('niveau01')->orderBy('niveau01.label','ASC');
|
||||
else {
|
||||
$result=$er->createQueryBuilder("table")->innerJoin("CadolesCoreBundle:UserModo", "usermodo", Join::WITH, "table.id = usermodo.niveau01");
|
||||
$result=$er->createQueryBuilder("table")->innerJoin("CadolesCoreBundle:UserModo", "usermodo", Join::WITH, "table.id = usermodo.niveau01")->orderBy('table.label','ASC');
|
||||
$result->andWhere("usermodo.user = :userid");
|
||||
$result->setParameter('userid', $userid);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return $er->createQueryBuilder('niveau01');
|
||||
return $er->createQueryBuilder('niveau01')->orderBy('niveau01.label','ASC');
|
||||
}
|
||||
},
|
||||
"disabled" => ($options["mode"]=="delete"||$options["masteridentity"]!="SQL"?true:false),
|
||||
|
@ -671,6 +671,13 @@ a.item-heart {
|
||||
margin-top:30px;
|
||||
}
|
||||
|
||||
.widget-mini {
|
||||
display: inline-block;
|
||||
height:50px;
|
||||
width:50px;
|
||||
margin-top:0px;
|
||||
}
|
||||
|
||||
.widgetmenu {
|
||||
right: 20px;
|
||||
position: absolute;
|
||||
|
@ -455,6 +455,8 @@ class PageController extends Controller
|
||||
// usage soit portal / user / group
|
||||
$usage=$request->query->get('usage');
|
||||
$groupid=$request->query->get('group');
|
||||
$look=$request->query->get('look');
|
||||
$selwidget=$request->query->get('selwidget');
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
@ -481,45 +483,7 @@ 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
|
||||
if($this->getUser()) {
|
||||
if($groupid) {
|
||||
@ -587,6 +551,19 @@ class PageController extends Controller
|
||||
|
||||
// Type Widgets
|
||||
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', [
|
||||
'useheader' => ($access=="config"),
|
||||
'usemenu' => false,
|
||||
@ -595,6 +572,8 @@ class PageController extends Controller
|
||||
'access' => $access,
|
||||
'canupdate' => $canupdate,
|
||||
'mode' => "view",
|
||||
'look' => $look,
|
||||
'selwidget' => $selwidget,
|
||||
'widgets' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Widget")->getWidgetAccess($access,'config'),
|
||||
'usage' => $usage,
|
||||
'group' => $groupid
|
||||
@ -643,7 +622,9 @@ class PageController extends Controller
|
||||
'mode' => "view",
|
||||
'widgets' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Widget")->getWidgetAccess($access,'config'),
|
||||
'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",
|
||||
'widgets' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Widget")->getWidgetAccess($access),
|
||||
'usage' => "config",
|
||||
'group' => ""
|
||||
'group' => "",
|
||||
'look' => "view",
|
||||
'selwidget' => null,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,18 @@ class PagewidgetController extends Controller
|
||||
private $labelentity="CadolesPortalBundle: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)
|
||||
{
|
||||
$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) {
|
||||
$user=$this->getUser();
|
||||
if($user) {
|
||||
@ -393,466 +435,508 @@ class PagewidgetController extends Controller
|
||||
$id=$entity->getId();
|
||||
|
||||
// Preference widgetshowhide
|
||||
if(is_array($preference)) {
|
||||
if(array_key_exists("widgetshowhide",$preference)) {
|
||||
if(array_key_exists($id,$preference["widgetshowhide"]))
|
||||
$entity->setOpened(($preference["widgetshowhide"][$id]=="true"));
|
||||
if($this->look=="list") {
|
||||
$entity->setOpened(true);
|
||||
$entity->setBorder(false);
|
||||
}
|
||||
else {
|
||||
if(is_array($preference)) {
|
||||
if(array_key_exists("widgetshowhide",$preference)) {
|
||||
if(array_key_exists($id,$preference["widgetshowhide"]))
|
||||
$entity->setOpened(($preference["widgetshowhide"][$id]=="true"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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.');
|
||||
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,
|
||||
];
|
||||
|
||||
// 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');
|
||||
}
|
||||
// Parametres spéficiques
|
||||
$params=array_merge($allways,$params);
|
||||
|
||||
// Récupération des paramétres du widget
|
||||
// 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="";
|
||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
||||
if($parameter["id"]=="url")
|
||||
$url=$parameter["value"];
|
||||
}
|
||||
|
||||
// Préference utilisateur
|
||||
$this->getPreference($entity);
|
||||
|
||||
|
||||
// Gestion des url youtuve
|
||||
$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);
|
||||
|
||||
// Detecter le type de lien
|
||||
$imagemedia=false;
|
||||
$pathinfo = pathinfo($url);
|
||||
|
||||
// Type image
|
||||
if(array_key_exists("extension",$pathinfo)) {
|
||||
if($pathinfo['extension']=="jpg"||$pathinfo['extension']=="gif"||$pathinfo['extension']=="png") {
|
||||
$imagemedia=true;
|
||||
// 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")
|
||||
$url=$parameter["value"];
|
||||
}
|
||||
}
|
||||
|
||||
// Spécifique Deviant Art
|
||||
if(strpos($url, "images-wixmp") !== false) $imagemedia=true;
|
||||
|
||||
|
||||
return $this->render($this->labelentity.':viewurl.html.twig', [
|
||||
'entity' => $entity,
|
||||
'canupdate' => $canupdate,
|
||||
// Gestion des url youtuve
|
||||
$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);
|
||||
|
||||
// Detecter le type de lien
|
||||
$pathinfo = pathinfo($url);
|
||||
|
||||
// Type image
|
||||
if(array_key_exists("extension",$pathinfo)) {
|
||||
if($pathinfo['extension']=="jpg"||$pathinfo['extension']=="gif"||$pathinfo['extension']=="png") {
|
||||
$imagemedia=true;
|
||||
}
|
||||
}
|
||||
|
||||
// Spécifique Deviant Art
|
||||
if(strpos($url, "images-wixmp") !== false) $imagemedia=true;
|
||||
}
|
||||
|
||||
return $this->getRender('viewurl.html.twig', [
|
||||
'url' => $url,
|
||||
'imagemedia' => $imagemedia,
|
||||
'access' => $access
|
||||
]);
|
||||
}
|
||||
|
||||
public function viewurlfixeAction($id,$access="config") {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||
public function viewurlfixeAction(Request $request,$id,$access="config") {
|
||||
// Récupération de la requete
|
||||
$this->setRequest($request,$id,$access);
|
||||
|
||||
// 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
|
||||
// Valeur par défaut
|
||||
$url="";
|
||||
$widgettype= $entity->getWidget();
|
||||
$jsons=$widgettype->getParameter();
|
||||
$param=array();
|
||||
$param["fields"]=array();
|
||||
foreach($jsons->fields as $field) {
|
||||
if($field->id=="url")
|
||||
$url=$field->value;
|
||||
}
|
||||
|
||||
// Préference utilisateur
|
||||
$this->getPreference($entity);
|
||||
|
||||
// Gestion des url youtuve
|
||||
$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);
|
||||
|
||||
// Detecter le type de lien
|
||||
$imagemedia=false;
|
||||
$pathinfo = pathinfo($url);
|
||||
|
||||
// Type image
|
||||
if(array_key_exists("extension",$pathinfo)) {
|
||||
if($pathinfo['extension']=="jpg"||$pathinfo['extension']=="gif"||$pathinfo['extension']=="png") {
|
||||
$imagemedia=true;
|
||||
// Datas associées au widget
|
||||
if(!$this->mini) {
|
||||
// Récupération des paramétres du widget
|
||||
$widgettype= $this->entity->getWidget();
|
||||
$jsons=$widgettype->getParameter();
|
||||
$param=array();
|
||||
$param["fields"]=array();
|
||||
foreach($jsons->fields as $field) {
|
||||
if($field->id=="url")
|
||||
$url=$field->value;
|
||||
}
|
||||
|
||||
// Gestion des url youtuve
|
||||
$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);
|
||||
|
||||
// Detecter le type de lien
|
||||
$pathinfo = pathinfo($url);
|
||||
|
||||
// Type image
|
||||
if(array_key_exists("extension",$pathinfo)) {
|
||||
if($pathinfo['extension']=="jpg"||$pathinfo['extension']=="gif"||$pathinfo['extension']=="png") {
|
||||
$imagemedia=true;
|
||||
}
|
||||
}
|
||||
|
||||
// Spécifique Deviant Art
|
||||
if(strpos($url, "images-wixmp") !== false) $imagemedia=true;
|
||||
}
|
||||
|
||||
// Spécifique Deviant Art
|
||||
if(strpos($url, "images-wixmp") !== false) $imagemedia=true;
|
||||
|
||||
|
||||
return $this->render($this->labelentity.':viewurl.html.twig', [
|
||||
'entity' => $entity,
|
||||
'canupdate' => $canupdate,
|
||||
return $this->getRender('viewurl.html.twig', [
|
||||
'url' => $url,
|
||||
'imagemedia' => $imagemedia,
|
||||
'access' => $access
|
||||
'imagemedia' => $imagemedia,
|
||||
]);
|
||||
}
|
||||
|
||||
public function viewitemAction($id,$access="config") {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||
public function viewitemAction(Request $request,$id,$access="config") {
|
||||
// Récupération de la requete
|
||||
$this->setRequest($request,$id,$access);
|
||||
|
||||
// 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
|
||||
// Valeur par défaut
|
||||
$modedesktop=0;
|
||||
$iditemcategory=null;
|
||||
$withbookmark=true;
|
||||
$search=false;
|
||||
$menu=false;
|
||||
$menuall=true;
|
||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
||||
switch($parameter["id"]) {
|
||||
case "modedesktop":
|
||||
$modedesktop=$parameter["value"];
|
||||
break;
|
||||
$search=false;
|
||||
$withbookmark=true;
|
||||
$bookmarks=null;
|
||||
$itemsordered=null;
|
||||
$itemcategorys=null;
|
||||
|
||||
case "withbookmark":
|
||||
$withbookmark=$parameter["value"];
|
||||
break;
|
||||
// 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"]) {
|
||||
case "modedesktop":
|
||||
$modedesktop=$parameter["value"];
|
||||
break;
|
||||
|
||||
case "itemcategory":
|
||||
$iditemcategory=$parameter["value"];
|
||||
if($iditemcategory) $itemcategoryfilter=$em->getRepository("CadolesPortalBundle:Itemcategory")->findBy(["id"=>$iditemcategory]);
|
||||
break;
|
||||
case "withbookmark":
|
||||
$withbookmark=$parameter["value"];
|
||||
break;
|
||||
|
||||
case "search":
|
||||
$search=($parameter["value"]==1);
|
||||
break;
|
||||
case "itemcategory":
|
||||
$iditemcategory=$parameter["value"];
|
||||
if($iditemcategory) $itemcategoryfilter=$this->em->getRepository("CadolesPortalBundle:Itemcategory")->findBy(["id"=>$iditemcategory]);
|
||||
break;
|
||||
|
||||
case "menu":
|
||||
$menu=($parameter["value"]==1);
|
||||
break;
|
||||
case "search":
|
||||
$search=($parameter["value"]==1);
|
||||
break;
|
||||
|
||||
case "menuall":
|
||||
$menuall=($parameter["value"]==1);
|
||||
break;
|
||||
case "menu":
|
||||
$menu=($parameter["value"]==1);
|
||||
break;
|
||||
|
||||
case "menuall":
|
||||
$menuall=($parameter["value"]==1);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Profilage
|
||||
$itemsordered = $this->em->getRepository("CadolesPortalBundle:Item")->getUserItems($this->user,$bookmarks,$items,$itemcategorys,$iditemcategory,$withbookmark,false);
|
||||
}
|
||||
|
||||
// Préference utilisateur
|
||||
$this->getPreference($entity);
|
||||
|
||||
// Profilage
|
||||
$user=$this->getUser();
|
||||
$itemsordered = $em->getRepository("CadolesPortalBundle:Item")->getUserItems($user,$bookmarks,$items,$itemcategorys,$iditemcategory,$withbookmark);
|
||||
|
||||
// Render
|
||||
return $this->render($this->labelentity.':viewitem.html.twig', [
|
||||
'entity' => $entity,
|
||||
'canadd' => ($user),
|
||||
'canupdate' => $canupdate,
|
||||
return $this->getRender('viewitem.html.twig', [
|
||||
'canadd' => ($this->user),
|
||||
'modedesktop' => $modedesktop,
|
||||
'items' => $itemsordered,
|
||||
'itemcategorys' => $itemcategorys,
|
||||
'bookmarks' => $bookmarks,
|
||||
'access' => $access,
|
||||
'search' => $search,
|
||||
'menu' => $menu,
|
||||
'menuall' => $menuall,
|
||||
'withbookmark' => $withbookmark,
|
||||
'bookmarks' => $bookmarks,
|
||||
'items' => $itemsordered,
|
||||
'itemcategorys' => $itemcategorys,
|
||||
]);
|
||||
}
|
||||
|
||||
public function viewitemessentialAction($id,$access="config") {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||
public function viewitemessentialAction(Request $request,$id,$access="config") {
|
||||
// Récupération de la requete
|
||||
$this->setRequest($request,$id,$access);
|
||||
|
||||
// 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
|
||||
// Valeur par défaut
|
||||
$modedesktop=0;
|
||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
||||
switch($parameter["id"]) {
|
||||
case "modedesktop":
|
||||
$modedesktop=$parameter["value"];
|
||||
break;
|
||||
$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"]) {
|
||||
case "modedesktop":
|
||||
$modedesktop=$parameter["value"];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Préference utilisateur
|
||||
$this->getPreference($entity);
|
||||
|
||||
// Profilage
|
||||
$user=$this->getUser();
|
||||
$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());
|
||||
// Profilage
|
||||
$itemsordered = $this->em->getRepository("CadolesPortalBundle:Item")->getUserItems($this->user,$bookmarks,$items,$itemcategorys,null,true,true);
|
||||
}
|
||||
|
||||
// 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
|
||||
return $this->render($this->labelentity.':viewitemessential.html.twig', [
|
||||
'entity' => $entity,
|
||||
'canadd' => ($user),
|
||||
'canupdate' => $canupdate,
|
||||
return $this->getRender('viewitemessential.html.twig', [
|
||||
'canadd' => ($this->user),
|
||||
'modedesktop' => $modedesktop,
|
||||
'items' => $itemsordered,
|
||||
'bookmarks' => $bookmarks,
|
||||
'access' => $access,
|
||||
'bookmarks' => $bookmarks,
|
||||
]);
|
||||
}
|
||||
|
||||
public function viewalertAction($id,$access="config") {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||
public function viewalertAction(Request $request,$id,$access="config") {
|
||||
// Récupération de la requete
|
||||
$this->setRequest($request,$id,$access);
|
||||
|
||||
// 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');
|
||||
}
|
||||
// Valeur par défaut
|
||||
$alertsordered=null;
|
||||
|
||||
// Récupération des paramétres du widget
|
||||
$idalertcategory=null;
|
||||
$alertcategoryfilter=null;
|
||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
||||
switch($parameter["id"]) {
|
||||
case "alertcategory":
|
||||
$idalertcategory=$parameter["value"];
|
||||
if($idalertcategory) $alertcategoryfilter=$em->getRepository("CadolesPortalBundle:Alertcategory")->find($idalertcategory);
|
||||
break;
|
||||
// Datas associées au widget
|
||||
if(!$this->mini) {
|
||||
// Récupération des paramétres du widget
|
||||
$idalertcategory=null;
|
||||
$alertcategoryfilter=null;
|
||||
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||
switch($parameter["id"]) {
|
||||
case "alertcategory":
|
||||
$idalertcategory=$parameter["value"];
|
||||
if($idalertcategory) $alertcategoryfilter=$this->em->getRepository("CadolesPortalBundle:Alertcategory")->find($idalertcategory);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Préference utilisateur
|
||||
$this->getPreference($entity);
|
||||
|
||||
// Profilage
|
||||
$user=$this->getUser();
|
||||
$alertsordered=$em->getRepository("CadolesPortalBundle:Alert")->getUserAlerts($user,$idalertcategory,$alertcategoryfilter);
|
||||
// Profilage
|
||||
$alertsordered=$this->em->getRepository("CadolesPortalBundle:Alert")->getUserAlerts($this->user,$idalertcategory,$alertcategoryfilter);
|
||||
}
|
||||
|
||||
// Render
|
||||
return $this->render($this->labelentity.':viewalert.html.twig', [
|
||||
'entity' => $entity,
|
||||
'canupdate' => $canupdate,
|
||||
return $this->getRender('viewalert.html.twig', [
|
||||
'alerts' => $alertsordered,
|
||||
'access' => $access
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
public function viewfluxAction($id,$access="config") {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||
public function viewfluxAction(Request $request,$id,$access="config") {
|
||||
// Récupération de la requete
|
||||
$this->setRequest($request,$id,$access);
|
||||
|
||||
// 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
|
||||
// Valeur par défaut
|
||||
$modelist=0;
|
||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
||||
switch($parameter["id"]) {
|
||||
case "modelist":
|
||||
$modelist=$parameter["value"];
|
||||
break;
|
||||
}
|
||||
}
|
||||
$fluxsordered=null;
|
||||
$feeds=null;
|
||||
|
||||
// Préference utilisateur
|
||||
$this->getPreference($entity);
|
||||
|
||||
// Profilage
|
||||
$user=$this->getUser();
|
||||
$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();
|
||||
$filesystem = new Filesystem();
|
||||
|
||||
foreach($fluxs as $keyflux => $flux) {
|
||||
// On regarde si le flux a été lu il y a peu
|
||||
$toregen=true;
|
||||
$url=$flux->getUrl();
|
||||
|
||||
// Feed lié à un user interne
|
||||
$filecache='uploads/flux/flux-'.$flux->getId().'.txt';
|
||||
if(stripos($url,"##userid##")!==false) {
|
||||
if($user) {
|
||||
$url=str_replace("##userid##",$user->getId(),$url);
|
||||
$filecache=$filecache='uploads/flux/flux-'.$user->getId()."-".$flux->getId().'.txt';
|
||||
// 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"]) {
|
||||
case "modelist":
|
||||
$modelist=$parameter["value"];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Si le fichie cache existe
|
||||
// Profilage
|
||||
$fluxs=$this->em->getRepository("CadolesPortalBundle:Flux")->getUserFluxs($this->user);
|
||||
|
||||
$feeds=array();
|
||||
$filesystem = new Filesystem();
|
||||
|
||||
// Généraltion du cache associés aux flux
|
||||
foreach($fluxs as $keyflux => $flux) {
|
||||
// On regarde si le flux a été lu il y a peu
|
||||
$toregen=true;
|
||||
$url=$flux->getUrl();
|
||||
|
||||
// Feed lié à un user interne
|
||||
$filecache='uploads/flux/flux-'.$flux->getId().'.txt';
|
||||
if(stripos($url,"##userid##")!==false) {
|
||||
if($user) {
|
||||
$url=str_replace("##userid##",$user->getId(),$url);
|
||||
$filecache=$filecache='uploads/flux/flux-'.$user->getId()."-".$flux->getId().'.txt';
|
||||
}
|
||||
}
|
||||
|
||||
// Si le fichie cache existe
|
||||
if($filesystem->exists($filecache)) {
|
||||
// On récupère la date de modification du fichier
|
||||
$timestampfile = filemtime($filecache);
|
||||
$datetimeFormat = 'Y-m-d H:i:s';
|
||||
$datefile = new \DateTime();
|
||||
$datefile->setTimestamp($timestampfile);
|
||||
|
||||
// On ajoute 30mn
|
||||
$datefile->add(new \DateInterval('PT30M'));
|
||||
|
||||
// Si la date est inférieur à maintenant on regénère le flux
|
||||
$now = new \DateTime();
|
||||
if($datefile>=$now) {
|
||||
$toregen=false;
|
||||
$backup = unserialize(file_get_contents($filecache));
|
||||
$feeds=array_merge($feeds,$backup);
|
||||
if(empty($backup)) unset($fluxs[$keyflux]);
|
||||
}
|
||||
}
|
||||
|
||||
// Si le fichier est trop ancien on relit le flus
|
||||
if($toregen) {
|
||||
$PROXYactivate = $this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYactivate")->getValue();
|
||||
$weburl=$this->getParameter('weburl');
|
||||
|
||||
if(stripos($url,"/")==0) {
|
||||
$url="https://".$weburl.$url;
|
||||
$PROXYactivate=false;
|
||||
}
|
||||
if(stripos($url,"https://".$weburl)===0) $PROXYactivate=false;
|
||||
if(stripos($url,"http://".$weburl)===0) $PROXYactivate=false;
|
||||
|
||||
if($PROXYactivate) {
|
||||
$PROXYserver = $this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYserver")->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]));
|
||||
}
|
||||
else
|
||||
$clientguzzle = new \GuzzleHttp\Client(['timeout' => 3,'verify'=>false]);
|
||||
|
||||
try {
|
||||
$clientguzzle->request('GET', $url);
|
||||
} catch (RequestException $e) {
|
||||
if ($e->hasResponse()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// On lit le flux rss
|
||||
$client = new \FeedIo\Adapter\Guzzle\Client($clientguzzle);
|
||||
$logger = new \Psr\Log\NullLogger();
|
||||
$feedIo = new \FeedIo\FeedIo($client, $logger);
|
||||
|
||||
try {
|
||||
$result = $feedIo->read($url);
|
||||
}
|
||||
catch (\Exception $e) {
|
||||
$result=null;
|
||||
}
|
||||
|
||||
if($result) {
|
||||
$feedtitle = $result->getFeed()->getTitle();
|
||||
|
||||
|
||||
$backup=[];
|
||||
|
||||
// Pour chaque articles
|
||||
$nbflux=0;
|
||||
foreach ($result->getFeed() as $item) {
|
||||
$title = $item->getTitle();
|
||||
$link = $item->getLink();
|
||||
$description = substr(strip_tags($item->getDescription()),0,250);
|
||||
$description = str_replace("¶","",$description);
|
||||
$date = $item->getLastModified();
|
||||
$dateformat = ($date?$item->getLastModified()->format('d/m/Y H:i:s'):"");
|
||||
$content = $item->getDescription();
|
||||
$media = $item->getMedias();
|
||||
$mediaurl = "";
|
||||
|
||||
foreach ($item->getMedias() as $itemMedia) {
|
||||
if($itemMedia->getType()=="image/jpeg")
|
||||
$mediaurl=$itemMedia->getUrl();
|
||||
}
|
||||
|
||||
foreach ($item->getAllElements() as $element) {
|
||||
|
||||
if($element->getName()=="content:encoded")
|
||||
$content = $element->getValue();
|
||||
}
|
||||
|
||||
if($mediaurl!="") {
|
||||
$imgurl=$mediaurl;
|
||||
}
|
||||
else {
|
||||
// Récupérer la première image du contenu
|
||||
$imgcontent="";
|
||||
$imgurl="";
|
||||
$imgstart = stripos($content,"<img");
|
||||
if($imgstart!== false) {
|
||||
$imgend = stripos($content,">",$imgstart);
|
||||
$imgcontent=substr($content,$imgstart,$imgend-$imgstart+1);
|
||||
|
||||
$imgstart = stripos($imgcontent,"src=");
|
||||
$imgurl=substr($imgcontent,$imgstart+5);
|
||||
$imgend = stripos($imgurl,'"');
|
||||
|
||||
if($imgend===false) $imgend = stripos($imgurl,"'");
|
||||
$imgurl=substr($imgurl,0,$imgend);
|
||||
}
|
||||
}
|
||||
|
||||
// Garder le flux
|
||||
$tmp=array(
|
||||
"feedtitle" => $feedtitle,
|
||||
"title" => $title,
|
||||
"link" => $link,
|
||||
"description" => $description,
|
||||
"date" => $date,
|
||||
"dateformat" => $dateformat,
|
||||
"content" => $content,
|
||||
"image" => $imgurl,
|
||||
"color" => $flux->getColor(),
|
||||
"fluxid" => $flux->getId(),
|
||||
"fluxtitle" => $flux->getTitle(),
|
||||
);
|
||||
|
||||
array_push($feeds,$tmp);
|
||||
array_push($backup,$tmp);
|
||||
|
||||
$nbflux++;
|
||||
if($nbflux>=$flux->getMaxread()&&$flux->getMaxread()>0) break;
|
||||
}
|
||||
|
||||
|
||||
if($nbflux==0) unset($fluxs[$keyflux]);
|
||||
|
||||
// On sauvegarde le résultat en fichier on rechargera son contenu que s'il n'a pas été lu depuis 30mn
|
||||
$filesystem->dumpFile($filecache, serialize($backup));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Trie des fluxs
|
||||
$fluxsordered = $fluxs->getIterator();
|
||||
$fluxsordered->uasort(function ($first, $second) {
|
||||
return (int) $first->getRowOrder() > (int) $second->getRowOrder() ? 1 : -1;
|
||||
});
|
||||
|
||||
// Trie des feeds
|
||||
$libelle=array();
|
||||
foreach ($feeds as $key => $valeur) {
|
||||
$libelle[$key] = $valeur["date"];
|
||||
}
|
||||
array_multisort($libelle, SORT_DESC, $feeds);
|
||||
}
|
||||
|
||||
// Render
|
||||
return $this->getRender('viewflux.html.twig', [
|
||||
'modelist' => $modelist,
|
||||
'fluxs' => $fluxsordered,
|
||||
'feeds' => $feeds,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
public function viewrssAction(Request $request,$id,$access="config") {
|
||||
// Récupération de la requete
|
||||
$this->setRequest($request,$id,$access);
|
||||
|
||||
// Valeur par défaut
|
||||
$modelist=0;
|
||||
$fluxs=["id"=>0];
|
||||
$feeds=null;
|
||||
|
||||
// Datas associées au widget
|
||||
if(!$this->mini) {
|
||||
// Récupération des paramétres du widget
|
||||
$url="";
|
||||
$nbarticle="_blank";
|
||||
$modelist=0;
|
||||
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||
switch($parameter["id"]) {
|
||||
case "url":
|
||||
$url=$parameter["value"];
|
||||
break;
|
||||
case "nbarticle":
|
||||
$nbarticle=$parameter["value"];
|
||||
break;
|
||||
case "modelist":
|
||||
$modelist=$parameter["value"];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// On regarde si le flux a été lu il y a peu
|
||||
$toregen=true;
|
||||
$filecache=$filecache='uploads/flux/widget-'.$id.'.txt';
|
||||
$user=$this->getUser();
|
||||
if(stripos($url,"##userid##")!==false) {
|
||||
if($user) {
|
||||
$url=str_replace("##userid##",$user->getId(),$url);
|
||||
$filecache=$filecache='uploads/flux/widget-'.$user->getId()."-".$id.'.txt';
|
||||
}
|
||||
}
|
||||
|
||||
$filesystem = new Filesystem();
|
||||
if($filesystem->exists($filecache)) {
|
||||
// On récupère la date de modification du fichier
|
||||
$timestampfile = filemtime($filecache);
|
||||
$datetimeFormat = 'Y-m-d H:i:s';
|
||||
$datefile = new \DateTime();
|
||||
$datefile->setTimestamp($timestampfile);
|
||||
|
||||
|
||||
// On ajoute 30mn
|
||||
$datefile->add(new \DateInterval('PT30M'));
|
||||
|
||||
@ -860,58 +944,62 @@ class PagewidgetController extends Controller
|
||||
$now = new \DateTime();
|
||||
if($datefile>=$now) {
|
||||
$toregen=false;
|
||||
$backup = unserialize(file_get_contents($filecache));
|
||||
$feeds=array_merge($feeds,$backup);
|
||||
if(empty($backup)) unset($fluxs[$keyflux]);
|
||||
$feeds = unserialize(file_get_contents($filecache));
|
||||
}
|
||||
}
|
||||
|
||||
// Si le fichier est trop ancien on relit le flus
|
||||
if($toregen) {
|
||||
$PROXYactivate = $em->getRepository("CadolesCoreBundle:Config")->find("PROXYactivate")->getValue();
|
||||
// Connexion au client
|
||||
$PROXYactivate = $this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYactivate")->getValue();
|
||||
$weburl=$this->getParameter('weburl');
|
||||
|
||||
if(stripos($url,"/")==0) {
|
||||
$url="https://".$weburl.$url;
|
||||
$PROXYactivate=false;
|
||||
}
|
||||
if(stripos($url,"https://".$weburl)===0) $PROXYactivate=false;
|
||||
if(stripos($url,"http://".$weburl)===0) $PROXYactivate=false;
|
||||
|
||||
if(stripos($url,"http://".$weburl)===0) $PROXYactivate=false;
|
||||
|
||||
if($PROXYactivate) {
|
||||
$PROXYserver = $em->getRepository("CadolesCoreBundle:Config")->find("PROXYserver")->getValue();
|
||||
$PROXYport = $em->getRepository("CadolesCoreBundle:Config")->find("PROXYport")->getValue();
|
||||
$PROXYserver = $this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYserver")->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]));
|
||||
}
|
||||
else
|
||||
$clientguzzle = new \GuzzleHttp\Client(['timeout' => 3,'verify'=>false]);
|
||||
|
||||
$clientguzzle = new \GuzzleHttp\Client(array('timeout' => 3,'verify'=>false));
|
||||
|
||||
try {
|
||||
$clientguzzle->request('GET', $url);
|
||||
} catch (RequestException $e) {
|
||||
if ($e->hasResponse()) {
|
||||
continue;
|
||||
// Render
|
||||
$feeds=[];
|
||||
return $this->getRender('viewflux.html.twig', [
|
||||
'fluxs' => $fluxs,
|
||||
'feeds' => $feeds,
|
||||
'modelist' => $modelist,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// On lit le flux rss
|
||||
|
||||
$client = new \FeedIo\Adapter\Guzzle\Client($clientguzzle);
|
||||
$logger = new \Psr\Log\NullLogger();
|
||||
$feedIo = new \FeedIo\FeedIo($client, $logger);
|
||||
|
||||
$feeds=array();
|
||||
|
||||
// On lit le flux rss
|
||||
try {
|
||||
$result = $feedIo->read($url);
|
||||
}
|
||||
catch (\Exception $e) {
|
||||
$result=null;
|
||||
}
|
||||
|
||||
|
||||
if($result) {
|
||||
$feedtitle = $result->getFeed()->getTitle();
|
||||
|
||||
|
||||
$backup=[];
|
||||
|
||||
// Pour chaque articles
|
||||
$nbflux=0;
|
||||
foreach ($result->getFeed() as $item) {
|
||||
@ -931,7 +1019,6 @@ class PagewidgetController extends Controller
|
||||
}
|
||||
|
||||
foreach ($item->getAllElements() as $element) {
|
||||
|
||||
if($element->getName()=="content:encoded")
|
||||
$content = $element->getValue();
|
||||
}
|
||||
@ -947,7 +1034,7 @@ class PagewidgetController extends Controller
|
||||
if($imgstart!== false) {
|
||||
$imgend = stripos($content,">",$imgstart);
|
||||
$imgcontent=substr($content,$imgstart,$imgend-$imgstart+1);
|
||||
|
||||
|
||||
$imgstart = stripos($imgcontent,"src=");
|
||||
$imgurl=substr($imgcontent,$imgstart+5);
|
||||
$imgend = stripos($imgurl,'"');
|
||||
@ -956,10 +1043,9 @@ class PagewidgetController extends Controller
|
||||
$imgurl=substr($imgurl,0,$imgend);
|
||||
}
|
||||
}
|
||||
|
||||
// Garder le flux
|
||||
|
||||
$tmp=array(
|
||||
// Garder le flux
|
||||
array_push($feeds,array(
|
||||
"feedtitle" => $feedtitle,
|
||||
"title" => $title,
|
||||
"link" => $link,
|
||||
@ -968,260 +1054,40 @@ class PagewidgetController extends Controller
|
||||
"dateformat" => $dateformat,
|
||||
"content" => $content,
|
||||
"image" => $imgurl,
|
||||
"color" => $flux->getColor(),
|
||||
"fluxid" => $flux->getId(),
|
||||
"fluxtitle" => $flux->getTitle(),
|
||||
);
|
||||
|
||||
array_push($feeds,$tmp);
|
||||
array_push($backup,$tmp);
|
||||
// "color" => $flux->getColor(),
|
||||
"fluxid" => 0,
|
||||
"fluxtitle" => $this->entity->getName(),
|
||||
));
|
||||
|
||||
$nbflux++;
|
||||
if($nbflux>=$flux->getMaxread()&&$flux->getMaxread()>0) break;
|
||||
if($nbflux>=$nbarticle&&$nbarticle>0) break;
|
||||
}
|
||||
|
||||
|
||||
if($nbflux==0) unset($fluxs[$keyflux]);
|
||||
|
||||
$libelle=array();
|
||||
foreach ($feeds as $key => $valeur) {
|
||||
$libelle[$key] = $valeur["date"];
|
||||
}
|
||||
array_multisort($libelle, SORT_DESC, $feeds);
|
||||
|
||||
// On sauvegarde le résultat en fichier on rechargera son contenu que s'il n'a pas été lu depuis 30mn
|
||||
$filesystem->dumpFile($filecache, serialize($backup));
|
||||
$filesystem->dumpFile($filecache, serialize($feeds));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Trie des fluxs
|
||||
$fluxsordered = $fluxs->getIterator();
|
||||
$fluxsordered->uasort(function ($first, $second) {
|
||||
return (int) $first->getRowOrder() > (int) $second->getRowOrder() ? 1 : -1;
|
||||
});
|
||||
|
||||
// Trie des feeds
|
||||
$libelle=array();
|
||||
foreach ($feeds as $key => $valeur) {
|
||||
$libelle[$key] = $valeur["date"];
|
||||
}
|
||||
array_multisort($libelle, SORT_DESC, $feeds);
|
||||
|
||||
// Render
|
||||
return $this->render($this->labelentity.':viewflux.html.twig', [
|
||||
'entity' => $entity,
|
||||
'canupdate' => $canupdate,
|
||||
'modelist' => $modelist,
|
||||
'fluxs' => $fluxsordered,
|
||||
'access' => $access,
|
||||
'feeds' => $feeds,
|
||||
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
public function viewrssAction($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
|
||||
$url="";
|
||||
$nbarticle="_blank";
|
||||
$modelist=0;
|
||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
||||
switch($parameter["id"]) {
|
||||
case "url":
|
||||
$url=$parameter["value"];
|
||||
break;
|
||||
case "nbarticle":
|
||||
$nbarticle=$parameter["value"];
|
||||
break;
|
||||
case "modelist":
|
||||
$modelist=$parameter["value"];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Préference utilisateur
|
||||
$this->getPreference($entity);
|
||||
|
||||
// On regarde si le flux a été lu il y a peu
|
||||
$toregen=true;
|
||||
$filecache=$filecache='uploads/flux/widget-'.$id.'.txt';
|
||||
$user=$this->getUser();
|
||||
if(stripos($url,"##userid##")!==false) {
|
||||
if($user) {
|
||||
$url=str_replace("##userid##",$user->getId(),$url);
|
||||
$filecache=$filecache='uploads/flux/widget-'.$user->getId()."-".$id.'.txt';
|
||||
}
|
||||
}
|
||||
|
||||
$filesystem = new Filesystem();
|
||||
if($filesystem->exists($filecache)) {
|
||||
// On récupère la date de modification du fichier
|
||||
$timestampfile = filemtime($filecache);
|
||||
$datetimeFormat = 'Y-m-d H:i:s';
|
||||
$datefile = new \DateTime();
|
||||
$datefile->setTimestamp($timestampfile);
|
||||
|
||||
// On ajoute 30mn
|
||||
$datefile->add(new \DateInterval('PT30M'));
|
||||
|
||||
// Si la date est inférieur à maintenant on regénère le flux
|
||||
$now = new \DateTime();
|
||||
if($datefile>=$now) {
|
||||
$toregen=false;
|
||||
$feeds = unserialize(file_get_contents($filecache));
|
||||
}
|
||||
}
|
||||
|
||||
// Si le fichier est trop ancien on relit le flus
|
||||
if($toregen) {
|
||||
// Connexion au client
|
||||
$PROXYactivate = $em->getRepository("CadolesCoreBundle:Config")->find("PROXYactivate")->getValue();
|
||||
$weburl=$this->getParameter('weburl');
|
||||
if(stripos($url,"/")==0) {
|
||||
$url="https://".$weburl.$url;
|
||||
$PROXYactivate=false;
|
||||
}
|
||||
if(stripos($url,"https://".$weburl)===0) $PROXYactivate=false;
|
||||
if(stripos($url,"http://".$weburl)===0) $PROXYactivate=false;
|
||||
|
||||
if($PROXYactivate) {
|
||||
$PROXYserver = $em->getRepository("CadolesCoreBundle:Config")->find("PROXYserver")->getValue();
|
||||
$PROXYport = $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]));
|
||||
}
|
||||
else
|
||||
$clientguzzle = new \GuzzleHttp\Client(array('timeout' => 3,'verify'=>false));
|
||||
|
||||
try {
|
||||
$clientguzzle->request('GET', $url);
|
||||
} catch (RequestException $e) {
|
||||
if ($e->hasResponse()) {
|
||||
// Render
|
||||
$feeds=[];
|
||||
return $this->render($this->labelentity.':viewflux.html.twig', [
|
||||
'entity' => $entity,
|
||||
'canupdate' => $canupdate,
|
||||
'access' => $access,
|
||||
'feeds' => $feeds,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
$client = new \FeedIo\Adapter\Guzzle\Client($clientguzzle);
|
||||
$logger = new \Psr\Log\NullLogger();
|
||||
$feedIo = new \FeedIo\FeedIo($client, $logger);
|
||||
|
||||
$feeds=array();
|
||||
|
||||
// On lit le flux rss
|
||||
try {
|
||||
$result = $feedIo->read($url);
|
||||
}
|
||||
catch (\Exception $e) {
|
||||
$result=null;
|
||||
}
|
||||
|
||||
if($result) {
|
||||
$feedtitle = $result->getFeed()->getTitle();
|
||||
|
||||
|
||||
// Pour chaque articles
|
||||
$nbflux=0;
|
||||
foreach ($result->getFeed() as $item) {
|
||||
$title = $item->getTitle();
|
||||
$link = $item->getLink();
|
||||
$description = substr(strip_tags($item->getDescription()),0,250);
|
||||
$description = str_replace("¶","",$description);
|
||||
$date = $item->getLastModified();
|
||||
$dateformat = ($date?$item->getLastModified()->format('d/m/Y H:i:s'):"");
|
||||
$content = $item->getDescription();
|
||||
$media = $item->getMedias();
|
||||
$mediaurl = "";
|
||||
|
||||
foreach ($item->getMedias() as $itemMedia) {
|
||||
if($itemMedia->getType()=="image/jpeg")
|
||||
$mediaurl=$itemMedia->getUrl();
|
||||
}
|
||||
|
||||
foreach ($item->getAllElements() as $element) {
|
||||
if($element->getName()=="content:encoded")
|
||||
$content = $element->getValue();
|
||||
}
|
||||
|
||||
if($mediaurl!="") {
|
||||
$imgurl=$mediaurl;
|
||||
}
|
||||
else {
|
||||
// Récupérer la première image du contenu
|
||||
$imgcontent="";
|
||||
$imgurl="";
|
||||
$imgstart = stripos($content,"<img");
|
||||
if($imgstart!== false) {
|
||||
$imgend = stripos($content,">",$imgstart);
|
||||
$imgcontent=substr($content,$imgstart,$imgend-$imgstart+1);
|
||||
|
||||
$imgstart = stripos($imgcontent,"src=");
|
||||
$imgurl=substr($imgcontent,$imgstart+5);
|
||||
$imgend = stripos($imgurl,'"');
|
||||
|
||||
if($imgend===false) $imgend = stripos($imgurl,"'");
|
||||
$imgurl=substr($imgurl,0,$imgend);
|
||||
}
|
||||
}
|
||||
|
||||
// Garder le flux
|
||||
array_push($feeds,array(
|
||||
"feedtitle" => $feedtitle,
|
||||
"title" => $title,
|
||||
"link" => $link,
|
||||
"description" => $description,
|
||||
"date" => $date,
|
||||
"dateformat" => $dateformat,
|
||||
"content" => $content,
|
||||
"image" => $imgurl,
|
||||
// "color" => $flux->getColor(),
|
||||
"fluxid" => 0,
|
||||
"fluxtitle" => $entity->getName(),
|
||||
));
|
||||
|
||||
$nbflux++;
|
||||
if($nbflux>=$nbarticle&&$nbarticle>0) break;
|
||||
}
|
||||
|
||||
|
||||
$libelle=array();
|
||||
foreach ($feeds as $key => $valeur) {
|
||||
$libelle[$key] = $valeur["date"];
|
||||
}
|
||||
array_multisort($libelle, SORT_DESC, $feeds);
|
||||
|
||||
// On sauvegarde le résultat en fichier on rechargera son contenu que s'il n'a pas été lu depuis 30mn
|
||||
$filesystem->dumpFile($filecache, serialize($feeds));
|
||||
}
|
||||
}
|
||||
|
||||
// Render
|
||||
return $this->render($this->labelentity.':viewflux.html.twig', [
|
||||
'entity' => $entity,
|
||||
'canupdate' => $canupdate,
|
||||
'fluxs' => ["id"=>0],
|
||||
'access' => $access,
|
||||
return $this->getRender('viewflux.html.twig', [
|
||||
'fluxs' => $fluxs,
|
||||
'feeds' => $feeds,
|
||||
'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();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||
@ -1266,10 +1132,15 @@ class PagewidgetController extends Controller
|
||||
'modedesktop' => $modedesktop,
|
||||
'bookmarks' => $bookmarks,
|
||||
'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();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||
@ -1310,10 +1181,15 @@ class PagewidgetController extends Controller
|
||||
'url' => $url,
|
||||
'target' => $target,
|
||||
'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();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||
@ -1350,10 +1226,15 @@ class PagewidgetController extends Controller
|
||||
'canupdate' => $canupdate,
|
||||
'html' => $html,
|
||||
'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();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||
@ -1393,10 +1274,15 @@ class PagewidgetController extends Controller
|
||||
'slides' => $slides,
|
||||
'interval' => $interval,
|
||||
'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();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||
@ -1432,13 +1318,18 @@ class PagewidgetController extends Controller
|
||||
'access' => $access,
|
||||
'directory' => "widget-".$id,
|
||||
'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();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||
@ -1491,12 +1382,16 @@ class PagewidgetController extends Controller
|
||||
'canupdate' => $canupdate,
|
||||
'files' => $files,
|
||||
'access' => $access,
|
||||
'look' => $look,
|
||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||
]);
|
||||
}
|
||||
|
||||
public function viewcalendarAction(Request $request,$id,$access="config") {
|
||||
$usage=$request->query->get('usage');
|
||||
$group=$request->query->get('group');
|
||||
$look=$request->query->get('look');
|
||||
$selwidget=$request->query->get('selwidget');
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
@ -1541,13 +1436,17 @@ class PagewidgetController extends Controller
|
||||
'nbday' => $nbday,
|
||||
'access' => $access,
|
||||
'firstcalendar' => $firstcalendar,
|
||||
'usage' => $usage
|
||||
'usage' => $usage,
|
||||
'look' => $look,
|
||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||
]);
|
||||
}
|
||||
|
||||
public function viewblogAction(Request $request,$id,$access="config") {
|
||||
$usage=$request->query->get('usage');
|
||||
$group=$request->query->get('group');
|
||||
$look=$request->query->get('look');
|
||||
$selwidget=$request->query->get('selwidget');
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
@ -1602,13 +1501,17 @@ class PagewidgetController extends Controller
|
||||
'nbarticle' => $nbarticle,
|
||||
'access' => $access,
|
||||
'firstblog' => $firstblog,
|
||||
'usage' => $usage
|
||||
'usage' => $usage,
|
||||
'look' => $look,
|
||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||
]);
|
||||
}
|
||||
|
||||
public function viewprojectAction(Request $request,$id,$access="config") {
|
||||
$usage=$request->query->get('usage');
|
||||
$group=$request->query->get('group');
|
||||
$look=$request->query->get('look');
|
||||
$selwidget=$request->query->get('selwidget');
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
@ -1676,11 +1579,16 @@ class PagewidgetController extends Controller
|
||||
'nbarticle' => $nbarticle,
|
||||
'access' => $access,
|
||||
'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();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||
@ -1721,10 +1629,15 @@ class PagewidgetController extends Controller
|
||||
'seetitle' => $seetitle,
|
||||
'seeicon' => $seeicon,
|
||||
'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();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||
@ -1754,17 +1667,22 @@ class PagewidgetController extends Controller
|
||||
$this->getPreference($entity);
|
||||
|
||||
// Render
|
||||
return $this->render($this->labelentity.':viewurl.html.twig', [
|
||||
return $this->render($this->labelentity.':viewframe.html.twig', [
|
||||
'entity' => $entity,
|
||||
'canadd' => $canupdate,
|
||||
'canupdate' => $canupdate,
|
||||
'onheader' => true,
|
||||
'tool' => ($clock==0?"cadoles_portal_user_tool_clockanalogique":"cadoles_portal_user_tool_clocknumerique"),
|
||||
'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();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||
@ -1791,10 +1709,15 @@ class PagewidgetController extends Controller
|
||||
'onheader' => true,
|
||||
'tool' => "cadoles_portal_user_tool_calculator",
|
||||
'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();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||
@ -1892,12 +1815,16 @@ class PagewidgetController extends Controller
|
||||
'items' => $items,
|
||||
'itemcategorys' => $itemcategorys,
|
||||
'access' => $access,
|
||||
'look' => $look,
|
||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||
]);
|
||||
}
|
||||
|
||||
public function viewinfoAction(Request $request,$id,$access="config") {
|
||||
$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();
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
@ -1960,12 +1887,16 @@ class PagewidgetController extends Controller
|
||||
'members' => $members,
|
||||
'id' => $id,
|
||||
'idpage' => $page->getId(),
|
||||
'look' => $look,
|
||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||
]);
|
||||
}
|
||||
|
||||
public function viewchatAction(Request $request,$id,$access="config") {
|
||||
$usage=$request->query->get('usage');
|
||||
$group=$request->query->get('group');
|
||||
$look=$request->query->get('look');
|
||||
$selwidget=$request->query->get('selwidget');
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||
@ -1999,6 +1930,8 @@ class PagewidgetController extends Controller
|
||||
'access' => $access,
|
||||
'usage' => $usage,
|
||||
'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") {
|
||||
$usage=$request->query->get('usage');
|
||||
$group=$request->query->get('group');
|
||||
$look=$request->query->get('look');
|
||||
$selwidget=$request->query->get('selwidget');
|
||||
|
||||
$user=$this->getUser();
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
@ -2049,13 +1985,17 @@ class PagewidgetController extends Controller
|
||||
'canupdate' => $canupdate,
|
||||
'usage' => $usage,
|
||||
'groups' => $mygroups,
|
||||
|
||||
'look' => $look,
|
||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||
]);
|
||||
}
|
||||
|
||||
public function viewgroupmessageAction(Request $request,$id,$access="config") {
|
||||
$usage=$request->query->get('usage');
|
||||
$group=$request->query->get('group');
|
||||
$look=$request->query->get('look');
|
||||
$selwidget=$request->query->get('selwidget');
|
||||
|
||||
$user=$this->getUser();
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
@ -2135,13 +2075,17 @@ class PagewidgetController extends Controller
|
||||
'modelist' => $modelist,
|
||||
'messages' => $mymsg,
|
||||
'nbarticle' => $nbarticle,
|
||||
|
||||
'look' => $look,
|
||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||
]);
|
||||
}
|
||||
|
||||
public function viewOnlydocAction(Request $request,$id,$access="config") {
|
||||
$usage=$request->query->get('usage');
|
||||
$group=$request->query->get('group');
|
||||
$look=$request->query->get('look');
|
||||
$selwidget=$request->query->get('selwidget');
|
||||
|
||||
$user=$this->getUser();
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
@ -2185,6 +2129,8 @@ class PagewidgetController extends Controller
|
||||
'access' => $access,
|
||||
'directory' => $id,
|
||||
'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
|
||||
if($access=="user") {
|
||||
if($usage=="user") {
|
||||
$user=$data->getPagewidget()->getPage()->getUser();
|
||||
$user=$pagewidget->getPage()->getUser();
|
||||
if($user!=$this->getUser()) throw $this->createNotFoundException('Permission denied');
|
||||
}
|
||||
else {
|
||||
@ -76,7 +76,7 @@ class SlideController extends Controller
|
||||
// Vérifier que l'on générer un slide
|
||||
if($access=="user") {
|
||||
if($usage=="user") {
|
||||
$user=$data->getPagewidget()->getPage()->getUser();
|
||||
$user=$pagewidget->getPage()->getUser();
|
||||
if($user!=$this->getUser()) throw $this->createNotFoundException('Permission denied');
|
||||
}
|
||||
else {
|
||||
|
@ -11,7 +11,8 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="flux")
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
* @ORM\HasLifecycleCallbacks.
|
||||
* @ORM\Entity(repositoryClass="Cadoles\PortalBundle\Repository\FluxRepository")
|
||||
*/
|
||||
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
|
||||
{
|
||||
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
|
||||
$roles=($user?$user->getRoles():["ROLE_ANONYME"]);
|
||||
$groups=($user?$user->getGroups():[]);
|
||||
@ -40,6 +40,12 @@ class ItemRepository extends EntityRepository
|
||||
$qb->andWhere("item.itemcategory=:itemcategory")
|
||||
->setParameter("itemcategory",$itemcategoryfilter);
|
||||
}
|
||||
|
||||
if($fgessential) {
|
||||
$qb->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);
|
||||
@ -58,6 +64,12 @@ class ItemRepository extends EntityRepository
|
||||
$qb->andWhere("item.itemcategory=:itemcategory")
|
||||
->setParameter("itemcategory",$itemcategoryfilter);
|
||||
}
|
||||
|
||||
if($fgessential) {
|
||||
$qb->andWhere("item.essential=:flag")
|
||||
->setParameter("flag",true);
|
||||
}
|
||||
|
||||
$itemsgroups=$qb->getQuery()->getResult();
|
||||
|
||||
foreach($itemsgroups as $itemgroup) {
|
||||
@ -78,6 +90,12 @@ class ItemRepository extends EntityRepository
|
||||
$qb->andWhere("item.itemcategory=:itemcategory")
|
||||
->setParameter("itemcategory",$itemcategoryfilter);
|
||||
}
|
||||
|
||||
if($fgessential) {
|
||||
$qb->andWhere("item.essential=:flag")
|
||||
->setParameter("flag",true);
|
||||
}
|
||||
|
||||
$itemsniveau01s=$qb->getQuery()->getResult();
|
||||
foreach($itemsniveau01s as $itemniveau01) {
|
||||
if(!$bookmarksitems->contains($itemniveau01) && !$items->contains($itemniveau01)) $items->add($itemniveau01);
|
||||
|
@ -1,6 +1,13 @@
|
||||
|
||||
{% extends '@CadolesCore/base.html.twig' %}
|
||||
|
||||
{% block localstyle %}
|
||||
{% if look=="list" %}
|
||||
#R1C1:first-child {
|
||||
margin-top: 30px;
|
||||
}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block pagewrapper %}
|
||||
{% if access=="config" %}
|
||||
<div class="pagemenu">
|
||||
@ -25,8 +32,8 @@
|
||||
|
||||
<div id="tolocalize" style="display:none">
|
||||
{% for pagewidget in entity.pagewidgets %}
|
||||
<a href="{{ url(pagewidget.widget.routeview|replace({'_config_':'_'~access~'_'}),{id:pagewidget.id,by:mode,usage:usage,group:group}) }}"></a>
|
||||
{{ render(url(pagewidget.widget.routeview|replace({'_config_':'_'~access~'_'}),{id:pagewidget.id,by:mode,usage:usage,group:group})) }}
|
||||
<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,look:look,selwidget:selwidget})) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@ -98,7 +105,11 @@
|
||||
});
|
||||
|
||||
// Création de la grille des widgets
|
||||
var template = '{{ entity.template | raw }}';
|
||||
{% 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 }}';
|
||||
{% endif %}
|
||||
|
||||
// Template de base
|
||||
if(template=="") {
|
||||
@ -157,10 +168,19 @@
|
||||
|
||||
// On déplace les widgets à leur emplacement
|
||||
$("#tolocalize").children(".widget").each(function( element ) {
|
||||
if($('#'+$(this).attr("loc")).length)
|
||||
$(this).appendTo('#'+$(this).attr("loc"));
|
||||
else
|
||||
$(this).appendTo('#R1C1');
|
||||
{% if look=="list" %}
|
||||
if($(this).data("id")=="{{selwidget}}") {
|
||||
$(this).appendTo('#R1C2');
|
||||
}
|
||||
else
|
||||
$(this).appendTo('#R1C1');
|
||||
|
||||
{% else %}
|
||||
if($('#'+$(this).attr("loc")).length)
|
||||
$(this).appendTo('#'+$(this).attr("loc"));
|
||||
else
|
||||
$(this).appendTo('#R1C1');
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
// On ajoute un widget vide à chaque colonne
|
||||
@ -168,7 +188,7 @@
|
||||
$("<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
|
||||
$(".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
|
||||
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})}}";
|
||||
|
@ -12,50 +12,72 @@
|
||||
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
||||
|
||||
{% if canupdate or alerts|length>0 %}
|
||||
<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">
|
||||
<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>
|
||||
</div>
|
||||
{% endif %}
|
||||
{%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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
{% for alert in alerts %}
|
||||
<div id="alert-{{ alert.id }}" class="panel list-item" style="background: {{ alert.alertcategory.color ? '#'~alert.alertcategory.color : '#'~colormain }};">
|
||||
<div class="panel-heading" role="tab">
|
||||
{% if alert.alertcategory.icon %}
|
||||
<img height="25" src="/{{ alias }}/{{ alert.alertcategory.icon.label }}">
|
||||
{% else %}
|
||||
<img height="25" src="/{{ alias }}/uploads/icon/icon_megaphone.png">
|
||||
{% endif %}
|
||||
|
||||
{{ alert.title }}
|
||||
{% if alert.fghideable and app.user %}
|
||||
<a onClick="hideAlert({{alert.id}})" style="cursor:pointer;" title="Ne plus afficher"><i class="fa fa-eye-slash"></i></a>
|
||||
{%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 %}
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
{{ alert.content|raw }}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
{% for alert in alerts %}
|
||||
<div id="alert-{{ alert.id }}" class="panel list-item" style="background: {{ alert.alertcategory.color ? '#'~alert.alertcategory.color : '#'~colormain }};">
|
||||
<div class="panel-heading" role="tab">
|
||||
{% if alert.alertcategory.icon %}
|
||||
<img height="25" src="/{{ alias }}/{{ alert.alertcategory.icon.label }}">
|
||||
{% else %}
|
||||
<img height="25" src="/{{ alias }}/uploads/icon/icon_megaphone.png">
|
||||
{% endif %}
|
||||
|
||||
{{ alert.title }}
|
||||
{% if alert.fghideable and app.user %}
|
||||
<a onClick="hideAlert({{alert.id}})" style="cursor:pointer;" title="Ne plus afficher"><i class="fa fa-eye-slash"></i></a>
|
||||
{%endif%}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
{{ alert.content|raw }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
@ -26,69 +26,87 @@
|
||||
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
||||
{% endif %}
|
||||
|
||||
<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">
|
||||
{% if canupdate %}
|
||||
<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>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
{% for itemcategory in itemcategorys %}
|
||||
{% set haveitem=false %}
|
||||
|
||||
{% for item in items if item.itemcategory==itemcategory %}
|
||||
|
||||
{% if loop.index ==1 %}
|
||||
{% set haveitem=true %}
|
||||
|
||||
{% if itemcategorys|length > 1 %}
|
||||
<h3 class="grid-title" style="{{ colorbodyfont }}" data-idcategory="{{ itemcategory.id }}">{{ itemcategory.label }}</h3>
|
||||
{% endif %}
|
||||
|
||||
<div class="grid clearfix">
|
||||
<div class="grid-sizer {{ stylegrid }}"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
{% endif %}
|
||||
|
||||
<div class="grid-item {{ stylegrid }}" data-idcategory="{{ item.itemcategory.id }}" data-iditem="{{ item.id }}">
|
||||
<div class="grid-item-content" style="background-color: {{ item.color ? "#"~item.color : '#'~colormain }};">
|
||||
<a class="linktosonde" data-sonde="{{ item.itemcategory.label }}" href="{{ item.url }}" target="_blank">
|
||||
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/{{ item.icon }}">
|
||||
</div>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ item.title }}</h2>
|
||||
<span>{{ item.subtitle|nl2br }}</<span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if haveitem %}
|
||||
</div>
|
||||
{%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 %}
|
||||
{% endfor %}
|
||||
</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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% 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 }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
{% for itemcategory in itemcategorys %}
|
||||
{% set haveitem=false %}
|
||||
|
||||
{% for item in items if item.itemcategory==itemcategory %}
|
||||
|
||||
{% if loop.index ==1 %}
|
||||
{% set haveitem=true %}
|
||||
|
||||
{% if itemcategorys|length > 1 %}
|
||||
<h3 class="grid-title" style="{{ colorbodyfont }}" data-idcategory="{{ itemcategory.id }}">{{ itemcategory.label }}</h3>
|
||||
{% endif %}
|
||||
|
||||
<div class="grid clearfix">
|
||||
<div class="grid-sizer {{ stylegrid }}"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
{% endif %}
|
||||
|
||||
<div class="grid-item {{ stylegrid }}" data-idcategory="{{ item.itemcategory.id }}" data-iditem="{{ item.id }}">
|
||||
<div class="grid-item-content" style="background-color: {{ item.color ? "#"~item.color : '#'~colormain }};">
|
||||
<a class="linktosonde" data-sonde="{{ item.itemcategory.label }}" href="{{ item.url }}" target="_blank">
|
||||
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/{{ item.icon }}">
|
||||
</div>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ item.title }}</h2>
|
||||
<span>{{ item.subtitle|nl2br }}</<span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if haveitem %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
@ -12,73 +12,87 @@
|
||||
{% set stylewidgetbodyreverse = constants.mystylewidgetbodyreverse(entity) %}
|
||||
{% set color = app.session.get('color') %}
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<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">
|
||||
{% if canupdate %}
|
||||
<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>
|
||||
{% endif %}
|
||||
|
||||
{% if access=="config" %}
|
||||
<a title="Gérer mes Blogs" href='{{ path('cadoles_portal_config_blog') }}' style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
|
||||
{% else %}
|
||||
{% set idblog = "" %}
|
||||
{% set url= path('cadoles_portal_user_blogarticle_submit') %}
|
||||
{% if usage=="group" and firstblog is defined %}
|
||||
{% set url= path('cadoles_portal_user_blogarticle_submit',{idblog:firstblog,page:entity.page.id}) %}
|
||||
{% endif %}
|
||||
|
||||
<a title="Créer un Article" onClick="showFrameitem('blog','{{ url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
{% if blogarticles|length >= 1 %}
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
<div class="grid clearfix">
|
||||
{% for blogarticle in blogarticles %}
|
||||
{% if loop.index==1 %}
|
||||
<div class="grid-sizer grid-preview"></div>
|
||||
<div class="grid-gutter-sizer grid-preview-gutter-sizer"></div>
|
||||
{% endif %}
|
||||
|
||||
<div class="grid-item grid-preview" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="grid-item-content">
|
||||
<a href onClick="showFrameitem('blog','{{ path('cadoles_portal_'~access~'_blogarticle_view',{'id':blogarticle.id}) }}',true)">
|
||||
{% if blogarticle.image is not empty %}
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-vignette" src="/{{alias}}/{{blogarticle.image|replace({"/blogarticle/":"/blogarticle/thumb-"})}}" width="100%">
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
<div class="caption" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="grid-item-title" style="{{ stylewidgetbodyreverse }};">
|
||||
<h2>{{blogarticle.name }}</h2>
|
||||
<small>publié par {{ blogarticle.user.username }} le {{ blogarticle.submit|date("d/m/Y à H:i") }}<br>dans le blog {{blogarticle.blog.name }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{%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}})">
|
||||
{% 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>
|
||||
{% endif %}
|
||||
</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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
|
||||
{% if access=="config" %}
|
||||
<a title="Gérer mes Blogs" href='{{ path('cadoles_portal_config_blog') }}' style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
|
||||
{% else %}
|
||||
{% set idblog = "" %}
|
||||
{% set url= path('cadoles_portal_user_blogarticle_submit') %}
|
||||
{% if usage=="group" and firstblog is defined %}
|
||||
{% set url= path('cadoles_portal_user_blogarticle_submit',{idblog:firstblog,page:entity.page.id}) %}
|
||||
{% endif %}
|
||||
|
||||
<a title="Créer un Article" onClick="showFrameitem('blog','{{ url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
|
||||
{% 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 }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
{% if blogarticles|length >= 1 %}
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
<div class="grid clearfix">
|
||||
{% for blogarticle in blogarticles %}
|
||||
{% if loop.index==1 %}
|
||||
<div class="grid-sizer grid-preview"></div>
|
||||
<div class="grid-gutter-sizer grid-preview-gutter-sizer"></div>
|
||||
{% endif %}
|
||||
|
||||
<div class="grid-item grid-preview" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="grid-item-content">
|
||||
<a href onClick="showFrameitem('blog','{{ path('cadoles_portal_'~access~'_blogarticle_view',{'id':blogarticle.id}) }}',true)">
|
||||
{% if blogarticle.image is not empty %}
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-vignette" src="/{{alias}}/{{blogarticle.image|replace({"/blogarticle/":"/blogarticle/thumb-"})}}" width="100%">
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
<div class="caption" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="grid-item-title" style="{{ stylewidgetbodyreverse }};">
|
||||
<h2>{{blogarticle.name }}</h2>
|
||||
<small>publié par {{ blogarticle.user.username }} le {{ blogarticle.submit|date("d/m/Y à H:i") }}<br>dans le blog {{blogarticle.blog.name }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
@ -33,90 +33,106 @@
|
||||
{% set username = "" %}
|
||||
{% 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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
|
||||
<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">
|
||||
{% if canupdate %}
|
||||
<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>
|
||||
{% endif %}
|
||||
{% if canadd %}
|
||||
<i class="fa fa-plus fa-fw" title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},false)" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
|
||||
{% if canadd %}
|
||||
<i class="fa fa-plus fa-fw" title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},false)" style="{{ stylewidgetmenu }}"></i>
|
||||
{% 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 }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
{% if bookmarks is not empty or canupdate %}
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
<div class="bookmark-container">
|
||||
<div class="grid clearfix">
|
||||
<div class="grid-sizer {{ stylegrid }}"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
{% for bookmark in bookmarks %}
|
||||
<div class="grid-item {{ stylegrid }}">
|
||||
<div class="grid-item-content" style="background-color: {{ bookmark.color ? "#"~bookmark.color : "#"~color['main'] }};">
|
||||
{% if canupdate %}
|
||||
<a style="cursor:pointer" onClick="modBookmark({{ bookmark.id }})" class="item-update"><i style="color: #FFF" class="fa fa-file" title="Modifier le favori"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if bookmark.target == 'frame' %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url|replace({'#login#': username}) }}')">
|
||||
{% elseif bookmark.target == "_self" %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
|
||||
{% else %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{{ bookmark.target }}">
|
||||
{% endif %}
|
||||
|
||||
{% if bookmarks is not empty or canupdate %}
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
<div class="bookmark-container">
|
||||
<div class="grid clearfix">
|
||||
<div class="grid-sizer {{ stylegrid }}"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
{% for bookmark in bookmarks %}
|
||||
<div class="grid-item {{ stylegrid }}">
|
||||
<div class="grid-item-content" style="background-color: {{ bookmark.color ? "#"~bookmark.color : "#"~color['main'] }};">
|
||||
{% if canupdate %}
|
||||
<a style="cursor:pointer" onClick="modBookmark({{ bookmark.id }})" class="item-update"><i style="color: #FFF" class="fa fa-file" title="Modifier le favori"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if bookmark.target == 'frame' %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url|replace({'#login#': username}) }}')">
|
||||
{% elseif bookmark.target == "_self" %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
|
||||
{% else %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{{ bookmark.target }}">
|
||||
{% endif %}
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo" title="{{ bookmark.subtitle|nl2br }}">
|
||||
{% if bookmark.icon %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/{{ bookmark.icon.label }}">
|
||||
{% else %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo" title="{{ bookmark.subtitle|nl2br }}">
|
||||
{% if bookmark.icon %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/{{ bookmark.icon.label }}">
|
||||
{% else %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
||||
{% endif %}
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ bookmark.title }}</h2>
|
||||
<span>{{ bookmark.subtitle|nl2br }}</<span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ bookmark.title }}</h2>
|
||||
<span>{{ bookmark.subtitle|nl2br }}</<span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if canadd %}
|
||||
<div class="grid-item {{ stylegrid }}">
|
||||
<div title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},false)" class="grid-item-content" style="background-color: #{{color['main']}};cursor:pointer;">
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png">
|
||||
</div>
|
||||
<div class="grid-item-title">
|
||||
<h2>Ajouter</h2>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if canadd %}
|
||||
<div class="grid-item {{ stylegrid }}">
|
||||
<div title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},false)" class="grid-item-content" style="background-color: #{{color['main']}};cursor:pointer;">
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png">
|
||||
</div>
|
||||
<div class="grid-item-title">
|
||||
<h2>Ajouter</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
@ -11,81 +11,95 @@
|
||||
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
||||
{% 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}})">
|
||||
{% 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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
{% if access=="config" %}
|
||||
<a title="Gérer mes Calendriers" href='{{ path('cadoles_portal_config_calendar') }}' style="{{ stylewidgetmenu }}"><i class="fa fa-paper-plane fa-fw"></i></a>
|
||||
{% else %}
|
||||
{% set url= path('cadoles_portal_'~access~'_calendar_view') %}
|
||||
{% if usage=="group" and firstcalendar is defined %}
|
||||
{% set url= path('cadoles_portal_'~access~'_calendar_view',{id:firstcalendar}) %}
|
||||
{% endif %}
|
||||
<a title="Gérer mes Calendriers" onClick="showFrameitem('calendar','{{ url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-calendar fa-fw"></i></a>
|
||||
{% 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 }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
</style>
|
||||
{% set firstflux="" %}
|
||||
|
||||
<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">
|
||||
{% if canupdate %}
|
||||
<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>
|
||||
{% endif %}
|
||||
{% if access=="config" %}
|
||||
<a title="Gérer mes Calendriers" href='{{ path('cadoles_portal_config_calendar') }}' style="{{ stylewidgetmenu }}"><i class="fa fa-paper-plane fa-fw"></i></a>
|
||||
{% else %}
|
||||
{% set url= path('cadoles_portal_'~access~'_calendar_view') %}
|
||||
{% if usage=="group" and firstcalendar is defined %}
|
||||
{% set url= path('cadoles_portal_'~access~'_calendar_view',{id:firstcalendar}) %}
|
||||
{% endif %}
|
||||
<a title="Gérer mes Calendriers" onClick="showFrameitem('calendar','{{ url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-calendar fa-fw"></i></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
{% set firstflux="" %}
|
||||
|
||||
{% if events|length >= 1 %}
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
{% set monthsel = "" %}
|
||||
{% for i in 0..(nbday-1) %}
|
||||
{% set dateeventstart = 'now'|date_modify("+"~i~" day midnight") %}
|
||||
{% set dateeventend = 'now'|date_modify("+"~(i+1)~" day midnight") %}
|
||||
|
||||
{% set fgaffday=false %}
|
||||
{% for event in events %}
|
||||
{% if event.start< dateeventend and event.end>=dateeventstart %}
|
||||
|
||||
{% if monthsel == "" or dateeventstart|date("Y-m")!=monthsel %}
|
||||
{% set monthsel = dateeventstart|date("Y-m") %}
|
||||
{% set libmonth = constants.libmonth(dateeventstart|date("m")) %}
|
||||
<h3>{{ libmonth ~ " " ~ dateeventstart|date("Y") }}</h3>
|
||||
{% endif %}
|
||||
|
||||
{% if not fgaffday %}
|
||||
{% set fgaffday=true %}
|
||||
{% set libday = constants.libday(dateeventstart|date("N")) %}
|
||||
<div style="margin-top:15px; font-weight:bold; font-size:18px;">{{ libday ~ " " ~ dateeventstart|date("d/m/Y") }}</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="widget-event" style="background-color:{{ event.color }}; color: #FFF; padding:2px;" title="{{ event.description }}">
|
||||
{% if not event.allDay %}
|
||||
{{ event.start | date("H:i") }} -
|
||||
{%endif%}
|
||||
{{ event.title }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if events|length >= 1 %}
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
{% set monthsel = "" %}
|
||||
{% for i in 0..(nbday-1) %}
|
||||
{% set dateeventstart = 'now'|date_modify("+"~i~" day midnight") %}
|
||||
{% set dateeventend = 'now'|date_modify("+"~(i+1)~" day midnight") %}
|
||||
|
||||
{% set fgaffday=false %}
|
||||
{% for event in events %}
|
||||
{% if event.start< dateeventend and event.end>=dateeventstart %}
|
||||
|
||||
{% if monthsel == "" or dateeventstart|date("Y-m")!=monthsel %}
|
||||
{% set monthsel = dateeventstart|date("Y-m") %}
|
||||
{% set libmonth = constants.libmonth(dateeventstart|date("m")) %}
|
||||
<h3>{{ libmonth ~ " " ~ dateeventstart|date("Y") }}</h3>
|
||||
{% endif %}
|
||||
|
||||
{% if not fgaffday %}
|
||||
{% set fgaffday=true %}
|
||||
{% set libday = constants.libday(dateeventstart|date("N")) %}
|
||||
<div style="margin-top:15px; font-weight:bold; font-size:18px;">{{ libday ~ " " ~ dateeventstart|date("d/m/Y") }}</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="widget-event" style="background-color:{{ event.color }}; color: #FFF; padding:2px;" title="{{ event.description }}">
|
||||
{% if not event.allDay %}
|
||||
{{ event.start | date("H:i") }} -
|
||||
{%endif%}
|
||||
{{ event.title }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if url is defined %}
|
||||
<div style="cursor:pointer; text-align: right; margin-top:20px;"><a onClick="showFrameitem('calendar','{{url }}',true)" style="{{ stylewidgetbody }}">Voir mes Agendas</a></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if url is defined %}
|
||||
<div style="cursor:pointer; text-align: right; margin-top:20px;"><a onClick="showFrameitem('calendar','{{url }}',true)" style="{{ stylewidgetbody }}">Voir mes Agendas</a></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
@ -28,39 +28,53 @@
|
||||
{% if app.user %}
|
||||
<style>.msgtopic a { color: #{{colorbodyfont}}; font-weight: bold; }</style>
|
||||
|
||||
<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 %}
|
||||
<div class="widgetmenu">
|
||||
<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>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if onheader %}
|
||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
||||
<iframe src="{{ path(tool,{'id':group,'framed':true,'border':entity.border,'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont,'colorbody':colorbody,'colormain':colormain}) }}" style="margin-top:30px" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{%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"/>
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</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">
|
||||
{% if canupdate %}
|
||||
<div class="widgetmenu">
|
||||
<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>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}; overflow-y:auto; {%if entity.border %} padding-left: 10px; {%endif%}">
|
||||
{% if group is not null %}
|
||||
{{ render(url('cadoles_websocket_chat',{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont,'colorbody':colorbody,'colormain':colormain})) }}
|
||||
{% endif %}
|
||||
<!--
|
||||
<iframe src="{{ path(tool,{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont}) }}" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
||||
-->
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if onheader %}
|
||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
||||
<iframe src="{{ path(tool,{'id':group,'framed':true,'border':entity.border,'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont,'colorbody':colorbody,'colormain':colormain}) }}" style="margin-top:30px" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}; overflow-y:auto; {%if entity.border %} padding-left: 10px; {%endif%}">
|
||||
{% if group is not null %}
|
||||
{{ render(url('cadoles_websocket_chat',{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont,'colorbody':colorbody,'colormain':colormain})) }}
|
||||
{% endif %}
|
||||
<!--
|
||||
<iframe src="{{ path(tool,{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont}) }}" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
||||
-->
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{%endif%}
|
@ -10,30 +10,47 @@
|
||||
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
|
||||
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
||||
|
||||
<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">
|
||||
{% if canupdate %}
|
||||
<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>
|
||||
{% endif %}
|
||||
{%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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% 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 }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}; overflow-x:hidden; ">
|
||||
{{ html | raw }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}; overflow-x:hidden; ">
|
||||
{{ html | raw }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
@ -28,31 +28,47 @@
|
||||
{% set colorbodyfont = color['main'] %}
|
||||
{% 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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
|
||||
<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">
|
||||
{% if canupdate %}
|
||||
<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>
|
||||
{% 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 }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
<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>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
<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>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
@ -36,88 +36,106 @@
|
||||
{% set stylegrid="grid-list" %}
|
||||
{% endif %}
|
||||
|
||||
<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">
|
||||
<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>
|
||||
</div>
|
||||
{% 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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% 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 }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
{% set firstflux="" %}
|
||||
{% set firstflux="" %}
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }} ">
|
||||
{% if fluxs is defined %}
|
||||
{% if fluxs|length > 1 %}
|
||||
<div class="cat-list-feed" onClick="showFlux({{ entity.id}},'all')" style="color:#{{ color['fontcolorhover'] }}; background-color: #{{ color['main'] }}">Tout</div>
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }} ">
|
||||
{% if fluxs is defined %}
|
||||
{% if fluxs|length > 1 %}
|
||||
<div class="cat-list-feed" onClick="showFlux({{ entity.id}},'all')" style="color:#{{ color['fontcolorhover'] }}; background-color: #{{ color['main'] }}">Tout</div>
|
||||
|
||||
{% for flux in fluxs %}
|
||||
{% set stylefeed = "background-color: #" ~ color['main'] ~ ";" %}
|
||||
{% if flux.color is not null %}
|
||||
{% set stylefeed = "background-color: #" ~ flux.color ~ ";" %}
|
||||
{% for flux in fluxs %}
|
||||
{% set stylefeed = "background-color: #" ~ color['main'] ~ ";" %}
|
||||
{% if flux.color is not null %}
|
||||
{% set stylefeed = "background-color: #" ~ flux.color ~ ";" %}
|
||||
{% endif %}
|
||||
|
||||
<div class="cat-list-feed" onClick="showFlux({{ entity.id}},{{ flux.id }})" style="{{ stylefeed }} color:#{{ color['fontcolorhover'] }};">{{ flux.title }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="grid clearfix">
|
||||
{% for feed in feeds %}
|
||||
{% if loop.index==1 %}
|
||||
<div class="grid-sizer {{stylegrid}}"></div>
|
||||
<div class="grid-gutter-sizer {{stylegrid}}-gutter-sizer"></div>
|
||||
{% endif %}
|
||||
|
||||
<div class="cat-list-feed" onClick="showFlux({{ entity.id}},{{ flux.id }})" style="{{ stylefeed }} color:#{{ color['fontcolorhover'] }};">{{ flux.title }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% set stylecolor = "background-color: #" ~ color['main'] ~ ";" %}
|
||||
{% if feed.color is defined and feed.color is not null %}
|
||||
{% set stylecolor = "background-color: #" ~ feed.color ~ ";" %}
|
||||
{% endif %}
|
||||
{% set stylefeed = "" %}
|
||||
{% if feed.image is not null and feed.image != ""%}
|
||||
{% set stylefeed = stylefeed ~ "background: url(" ~ feed.image ~ ") no-repeat center; background-size: cover;" %}
|
||||
{% endif %}
|
||||
|
||||
<div class="grid clearfix">
|
||||
{% for feed in feeds %}
|
||||
{% if loop.index==1 %}
|
||||
<div class="grid-sizer {{stylegrid}}"></div>
|
||||
<div class="grid-gutter-sizer {{stylegrid}}-gutter-sizer"></div>
|
||||
{% endif %}
|
||||
<div class="grid-item {{ stylegrid }} feed flux-{{ feed.fluxid }}">
|
||||
<div class="grid-item-content" style="{{ stylecolor }};">
|
||||
<a class="linktosonde" data-sonde="Flux = {{ feed.fluxtitle }}" href="{{ feed.link }}" target="_blank">
|
||||
<div class="item-link clearfix">
|
||||
{% if feed.image is not empty %}
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img" src="{{feed.image}}" width="100%">
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% set stylecolor = "background-color: #" ~ color['main'] ~ ";" %}
|
||||
{% if feed.color is defined and feed.color is not null %}
|
||||
{% set stylecolor = "background-color: #" ~ feed.color ~ ";" %}
|
||||
{% endif %}
|
||||
{% set stylefeed = "" %}
|
||||
{% if feed.image is not null and feed.image != ""%}
|
||||
{% set stylefeed = stylefeed ~ "background: url(" ~ feed.image ~ ") no-repeat center; background-size: cover;" %}
|
||||
{% endif %}
|
||||
|
||||
<div class="grid-item {{ stylegrid }} feed flux-{{ feed.fluxid }}">
|
||||
<div class="grid-item-content" style="{{ stylecolor }};">
|
||||
<a class="linktosonde" data-sonde="Flux = {{ feed.fluxtitle }}" href="{{ feed.link }}" target="_blank">
|
||||
<div class="item-link clearfix">
|
||||
{% if feed.image is not empty %}
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img" src="{{feed.image}}" width="100%">
|
||||
<div class="caption" style="{{ stylecolor }};">
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ feed.title }}</h2>
|
||||
{% if modelist==0 %}
|
||||
<small>le {{ feed.date|date("d/m/Y à H:i") }}</small><br>
|
||||
{{ feed.description | nl2br }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="caption" style="{{ stylecolor }};">
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ feed.title }}</h2>
|
||||
{% if modelist==0 %}
|
||||
<small>le {{ feed.date|date("d/m/Y à H:i") }}</small><br>
|
||||
{{ feed.description | nl2br }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
@ -23,36 +23,55 @@
|
||||
{% set colorbodyfont = color['fontcolorhover'] %}
|
||||
{% endif %}
|
||||
|
||||
<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">
|
||||
<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>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if onheader %}
|
||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
||||
<iframe src="{{ path(tool,{'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont}) }}" style="margin-top:30px; {{ stylewidgetbodyframe }}" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{%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"/>
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
<iframe id="frame-{{directory}}" src="{{ path(tool) }}" data-color="#{{colorbodyfont}}" style="{{ stylewidgetbodyframe }}" class="{% if not entity.autoajust %}notframeajust {% endif %}"></iframe>
|
||||
{% 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>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
{% if onheader %}
|
||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
||||
<iframe src="{{ path(tool,{'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont}) }}" style="margin-top:30px; {{ stylewidgetbodyframe }}" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
<iframe id="frame-{{directory}}" src="{{ path(tool) }}" data-color="#{{colorbodyfont}}" style="{{ stylewidgetbodyframe }}" class="{% if not entity.autoajust %}notframeajust {% endif %}"></iframe>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
@ -24,83 +24,100 @@
|
||||
{% set colorbodyfont = color['fontcolorhover'] %}
|
||||
{% endif %}
|
||||
|
||||
<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">
|
||||
{% if canupdate %}
|
||||
<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>
|
||||
{% 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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
|
||||
{% 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>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% 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>
|
||||
{% 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 }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
{% if files|length>0 or canupdate %}
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
<div class="grid clearfix">
|
||||
{% if canupdate %}
|
||||
<div class="grid-sizer grid-image"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
{% endif %}
|
||||
{% if files|length>0 or canupdate %}
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
<div class="grid clearfix">
|
||||
{% if canupdate %}
|
||||
<div class="grid-sizer grid-image"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
{% endif %}
|
||||
|
||||
{% for file in files|sort %}
|
||||
{% if loop.index==1 and not canupdate %}
|
||||
<div class="grid-sizer grid-image"></div>
|
||||
<div class="grid-gutter-sizer grid-gutter-sizer-image"></div>
|
||||
{% endif %}
|
||||
|
||||
<div class="grid-item grid-image">
|
||||
<div class="grid-item-content">
|
||||
{% if canadd %}
|
||||
<a style="cursor:pointer" onClick="delFile('widget-{{ entity.id}}','{{file.name|e('js')|raw}}')" class="item-delete"><i style="color: #FFF" class="fa fa-trash" title="Supprimer le fichier"></i></a>
|
||||
{% endif %}
|
||||
{% for file in files|sort %}
|
||||
{% if loop.index==1 and not canupdate %}
|
||||
<div class="grid-sizer grid-image"></div>
|
||||
<div class="grid-gutter-sizer grid-gutter-sizer-image"></div>
|
||||
{% endif %}
|
||||
|
||||
<div class="grid-item grid-image">
|
||||
<div class="grid-item-content">
|
||||
{% if canadd %}
|
||||
<a style="cursor:pointer" onClick="delFile('widget-{{ entity.id}}','{{file.name|e('js')|raw}}')" class="item-delete"><i style="color: #FFF" class="fa fa-trash" title="Supprimer le fichier"></i></a>
|
||||
{% endif %}
|
||||
|
||||
<a style="cursor:pointer" onClick="showFrameitem('file-{{entity.id}}-{{loop.index}}','{{ path('cadoles_core_'~access~'_file_view',{'directory':'widget-'~entity.id,'filename':file.name,'navigation':true }) }}',true)">
|
||||
<a style="cursor:pointer" onClick="showFrameitem('file-{{entity.id}}-{{loop.index}}','{{ path('cadoles_core_'~access~'_file_view',{'directory':'widget-'~entity.id,'filename':file.name,'navigation':true }) }}',true)">
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img" height="110" src="{{ file.thumb }}">
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if canadd %}
|
||||
<div class="grid-item grid-list" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="grid-item-content">
|
||||
<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'>
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" />
|
||||
</div>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2 style="{{ stylewidgetbodyreverse }}">Ajouter des Images</h2>
|
||||
</div>
|
||||
<img class="grid-item-img" height="110" src="{{ file.thumb }}">
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if canadd %}
|
||||
<div class="grid-item grid-list" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="grid-item-content">
|
||||
<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'>
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" />
|
||||
</div>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2 style="{{ stylewidgetbodyreverse }}">Ajouter des Images</h2>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
@ -18,83 +18,99 @@
|
||||
{% set canadd = true %}
|
||||
{% endif %}
|
||||
|
||||
<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">
|
||||
{% if canupdate %}
|
||||
<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>
|
||||
{% endif %}
|
||||
|
||||
{% if canadd %}
|
||||
<a title="Ajouter un Groupe" href="{{ path('cadoles_core_user_group_submit') }}" target="_top">
|
||||
<i class="fa fa-plus fa-fw" style="{{ stylewidgetmenu }}"></i>
|
||||
{% 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>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}; overflow-x:hidden; ">
|
||||
<div class="grid clearfix">
|
||||
<div class="grid-sizer grid-small"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
{% for group in groups %}
|
||||
<div class="grid-item grid-small" >
|
||||
<div class="grid-item-content" style="background-color:{{ group.color ? "#"~group.color : '#'~colormain }}">
|
||||
<a href="{{path('cadoles_core_home',{id:group.id})}}" target="_top" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
{% if group.icon %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}{{ group.icon }}" />
|
||||
{% else %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_users.png" />
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ group.title }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
|
||||
{% if canadd %}
|
||||
<div class="grid-item grid-small">
|
||||
<div class="grid-item-content" style="{{ stylewidgetbodyreverse }};">
|
||||
<a title="Ajouter un Groupe" href="{{path('cadoles_core_user_group_submit')}}" target="_top" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="item-link clearfix">
|
||||
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>Ajouter un Groupe</h2>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<a title="Ajouter un Groupe" href="{{ path('cadoles_core_user_group_submit') }}" target="_top">
|
||||
<i class="fa fa-plus fa-fw" style="{{ stylewidgetmenu }}"></i>
|
||||
</a>
|
||||
{% 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 }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}; overflow-x:hidden; ">
|
||||
<div class="grid clearfix">
|
||||
<div class="grid-sizer grid-small"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
{% for group in groups %}
|
||||
<div class="grid-item grid-small" >
|
||||
<div class="grid-item-content" style="background-color:{{ group.color ? "#"~group.color : '#'~colormain }}">
|
||||
<a href="{{path('cadoles_core_home',{id:group.id})}}" target="_top" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
{% if group.icon %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}{{ group.icon }}" />
|
||||
{% else %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_users.png" />
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ group.title }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if canadd %}
|
||||
<div class="grid-item grid-small">
|
||||
<div class="grid-item-content" style="{{ stylewidgetbodyreverse }};">
|
||||
<a title="Ajouter un Groupe" href="{{path('cadoles_core_user_group_submit')}}" target="_top" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="item-link clearfix">
|
||||
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>Ajouter un Groupe</h2>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
@ -38,63 +38,84 @@
|
||||
{% set stylegrid="grid-list" %}
|
||||
{% endif %}
|
||||
|
||||
<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">
|
||||
<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>
|
||||
</div>
|
||||
{% 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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% 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 }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
|
||||
{% if messages is not empty %}
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }} ">
|
||||
<div class="grid clearfix">
|
||||
<div class="grid-sizer {{stylegrid}}"></div>
|
||||
<div class="grid-gutter-sizer {{stylegrid}}-gutter-sizer"></div>
|
||||
{% set nbaff=0 %}
|
||||
{% for message in messages %}
|
||||
{% set nbaff=nbaff+1 %}
|
||||
{% set class="" %}
|
||||
{% set style="" %}
|
||||
{% if nbaff > nbarticle %}
|
||||
{% set class="msg-hidden" %}
|
||||
{% set style="display:none" %}
|
||||
{% endif %}
|
||||
|
||||
{% if messages is not empty %}
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }} ">
|
||||
<div class="grid clearfix">
|
||||
<div class="grid-sizer {{stylegrid}}"></div>
|
||||
<div class="grid-gutter-sizer {{stylegrid}}-gutter-sizer"></div>
|
||||
{% set nbaff=0 %}
|
||||
{% for message in messages %}
|
||||
{% set nbaff=nbaff+1 %}
|
||||
{% set class="" %}
|
||||
{% set style="" %}
|
||||
{% if nbaff > nbarticle %}
|
||||
{% set class="msg-hidden" %}
|
||||
{% set style="display:none" %}
|
||||
{% endif %}
|
||||
|
||||
<div class="grid-item {{ stylegrid }} msg-{{ message.id }} {{class}}" style="{{ stylewidgetbodyreverse }}; {{style}};">
|
||||
<div class="grid-item-content" style="background-color:{{ message.color ? "#"~message.color : '#'~colormain }}">
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img style='cursor:pointer' onClick="seeUser({{message.user.id}})" class="grid-item-img avatar" src="/{{alias}}/uploads/avatar/{{message.user.avatar}}" width="100%">
|
||||
<a onClick="hideMessage({{message.id}})" style="cursor:pointer;" title="Ne plus afficher"><i class="fa fa-eye-slash"></i></a>
|
||||
</div>
|
||||
<div class="grid-item {{ stylegrid }} msg-{{ message.id }} {{class}}" style="{{ stylewidgetbodyreverse }}; {{style}};">
|
||||
<div class="grid-item-content" style="background-color:{{ message.color ? "#"~message.color : '#'~colormain }}">
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img style='cursor:pointer' onClick="seeUser({{message.user.id}})" class="grid-item-img avatar" src="/{{alias}}/uploads/avatar/{{message.user.avatar}}" width="100%">
|
||||
<a onClick="hideMessage({{message.id}})" style="cursor:pointer;" title="Ne plus afficher"><i class="fa fa-eye-slash"></i></a>
|
||||
</div>
|
||||
|
||||
<div class="caption">
|
||||
<div class="grid-item-title" style="position:inherit; width:85%">
|
||||
{{message.user.lastname}} {{message.user.firstname}}<br>
|
||||
<small>{{message.date|date('d/m/Y H:i')}} dans le groupe <u><a href="{{path('cadoles_core_home',{id:message.pageid})}}" target="_top">{{ message.pagetitle }}</a></u></small><br><br>
|
||||
{{ message.topic | raw }}
|
||||
</div>
|
||||
<div class="caption">
|
||||
<div class="grid-item-title" style="position:inherit; width:85%">
|
||||
{{message.user.lastname}} {{message.user.firstname}}<br>
|
||||
<small>{{message.date|date('d/m/Y H:i')}} dans le groupe <u><a href="{{path('cadoles_core_home',{id:message.pageid})}}" target="_top">{{ message.pagetitle }}</a></u></small><br><br>
|
||||
{{ message.topic | raw }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
@ -19,89 +19,103 @@
|
||||
{% set stylelink = "color:#" ~ color['fontcolorhover'] %}
|
||||
{% 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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
|
||||
<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">
|
||||
<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>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
|
||||
{% set style = "margin: auto; display: inherit;background-color:transparent;" %}
|
||||
{% if icon %}
|
||||
<img src="/{{ alias }}{{ icon }}" class="avatar big" style="{{ style }}" />
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_users.png" class="avatar big" style="{{ style }}" />
|
||||
{% endif %}
|
||||
|
||||
<div style="text-align: center;">
|
||||
{%if usage=="group" %}<small>Groupe<br></small>{% endif %}
|
||||
<span style="font-size:120%">{{ title }}</span><br>
|
||||
{{ description | raw }}
|
||||
|
||||
{%if usage=="group" %}
|
||||
<div class="grid clearfix">
|
||||
<div class="grid-sizer grid-verysmall"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
|
||||
{% if canadd==true %}
|
||||
<div class="grid-item grid-verysmall" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="grid-item-content">
|
||||
<a href="{{path('cadoles_core_user_group_users',{'id':id,'idreturn':idpage})}}" target="_top" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" />
|
||||
</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 %}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2 style="{{ stylewidgetbodyreverse }};">Ajouter un membre</h2>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% for member in members %}
|
||||
<div class="grid-item grid-verysmall" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="grid-item-content">
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img onclick="seeUser({{member.user.id}})" src="/{{ alias }}/uploads/avatar/{{ member.user.avatar}}" class="grid-item-img avatar" height="110" style="cursor:pointer;">
|
||||
</div>
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if icon %}
|
||||
<img src="/{{ alias }}{{ icon }}" class="logo" />
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_users.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ title }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
<div style="text-align: center;">
|
||||
{{ description | raw }}
|
||||
|
||||
{%if usage=="group" %}
|
||||
<div class="grid clearfix">
|
||||
<div class="grid-sizer grid-verysmall"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
|
||||
{% if canadd==true %}
|
||||
<div class="grid-item grid-verysmall" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="grid-item-content">
|
||||
<a href="{{path('cadoles_core_user_group_users',{'id':id,'idreturn':idpage})}}" target="_top" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2 style="{{ stylewidgetbodyreverse }};">
|
||||
{{ member.user.lastname }} {{ member.user.firstname }}
|
||||
{% if member.fgmanager %}
|
||||
<br><i class="fa fa-star"></i>
|
||||
{% endif %}
|
||||
</h2>
|
||||
<div class="grid-item-title">
|
||||
<h2 style="{{ stylewidgetbodyreverse }};">Ajouter un membre</h2>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% for member in members %}
|
||||
<div class="grid-item grid-verysmall" style="{{ stylewidgetbodyreverse }};">
|
||||
<div class="grid-item-content">
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img onclick="seeUser({{member.user.id}})" src="/{{ alias }}/uploads/avatar/{{ member.user.avatar}}" class="grid-item-img avatar" height="110" style="cursor:pointer;">
|
||||
</div>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2 style="{{ stylewidgetbodyreverse }};">
|
||||
{{ member.user.lastname }} {{ member.user.firstname }}
|
||||
{% if member.fgmanager %}
|
||||
<br><i class="fa fa-star"></i>
|
||||
{% endif %}
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
@ -33,266 +33,282 @@
|
||||
{% set username = "" %}
|
||||
{% endif %}
|
||||
|
||||
<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">
|
||||
{% if canupdate %}
|
||||
<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>
|
||||
{% endif %}
|
||||
|
||||
{% if canadd and access!="config"%}
|
||||
<i class="fa fa-plus fa-fw" title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},true)" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
{% set mycategs = [] %}
|
||||
{% for itemcategory in itemcategorys %}
|
||||
{% set haveitem=false %}
|
||||
|
||||
{% for item in items if item.itemcategory==itemcategory %}
|
||||
|
||||
{% if loop.index ==1 %}
|
||||
{% set mycategs = mycategs|merge({ (loop.index) : itemcategory}) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% if menu %}
|
||||
{% if menuall %}
|
||||
<div class="cat-list-feed" onClick="showItemCat({{ entity.id}},'all')" style="color:#{{ color['fontcolorhover'] }}; background-color: #{{ color['main'] }}">Tout</div>
|
||||
{%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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
|
||||
{% if bookmarks is not empty %}
|
||||
<div class="cat-list-feed" onClick="showItemCat({{ entity.id}},'fav')" style="color:#{{ color['fontcolorhover'] }}; background-color: #{{ color['main'] }}"><i class="fa fa-heart"></i></div>
|
||||
{% if canadd and access!="config"%}
|
||||
<i class="fa fa-plus fa-fw" title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},true)" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
|
||||
{% for itemcategory in mycategs %}
|
||||
<div class="cat-list-feed" onClick="showItemCat({{ entity.id}},{{itemcategory.id}})" style="color:#{{ color['fontcolorhover'] }}; background-color: #{{ color['main'] }}">{{itemcategory.label}}</div>
|
||||
{% endfor %}
|
||||
{% 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 search %}
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon1"><i class="fa fa-search"></i></span>
|
||||
<input onKeyup="searchItem({{ entity.id}},$(this).val());" type="text" id="searchitems" name="searchitems" class="form-control" placeholder="Recherche" aria-describedby="basic-addon1">
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
{% if (bookmarks is not empty or (canadd and access!="config")) and (withbookmark==0 or withbookmark==2) %}
|
||||
<div class="bookmark-container">
|
||||
{% if items is not empty %}
|
||||
<h3 class="grid-title bookmark-container" data-idcategory="bookmark" style="{{ colorbodyfont }}">Favoris</h3>
|
||||
{% endif %}
|
||||
<div class="grid clearfix">
|
||||
<div class="grid-sizer {{ stylegrid }}" data-idcategory="bookmark"></div>
|
||||
<div class="grid-gutter-sizer {{ stylegrid }}-gutter-sizer"></div>
|
||||
{% for bookmark in bookmarks %}
|
||||
{% if bookmark.item %}
|
||||
<div class="grid-item {{ stylegrid }}" data-idcategory="bookmark" data-title="{{ bookmark.item.title|lower }}">
|
||||
<div class="grid-item-content" style="background-color: {{ bookmark.color ? "#"~bookmark.color : '#'~colormain }};">
|
||||
{% if bookmark.item.content %}
|
||||
<a style="cursor:pointer" class="item-preview"><i style="color: #FFF" class="fa fa-info" title="Informations sur ce service"></i></a>
|
||||
{% endif %}
|
||||
{% if canadd %}
|
||||
<a style="cursor:pointer" onClick="delBookmark({{ bookmark.id }})" class="item-heart"><i style="color: #FFF" class="fa fa-trash" title="Supprimer des favoris"></i></a>
|
||||
{% endif %}
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
{% set mycategs = [] %}
|
||||
{% for itemcategory in itemcategorys %}
|
||||
{% set haveitem=false %}
|
||||
|
||||
{% if bookmark.item.target == 'frame' %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.item.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.item.id }}','{{ bookmark.item.url|replace({'#login#': username}) }}')">
|
||||
{% elseif bookmark.target == "_self" %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.item.title }}" href="{{ bookmark.item.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.item.target }}{% endif %}">
|
||||
{% else %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.item.title }}" href="{{ bookmark.item.url|replace({'#login#': username}) }}" target="{{ bookmark.item.target }}">
|
||||
{% endif %}
|
||||
{% for item in items if item.itemcategory==itemcategory %}
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo" title="{{ bookmark.item.subtitle|nl2br }}">
|
||||
{% if bookmark.item.icon %}
|
||||
<img class="grid-item-img" src="/{{ alias }}/{{ bookmark.item.icon.label }}">
|
||||
{% else %}
|
||||
<img class="grid-item-img" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ bookmark.item.title }}</h2>
|
||||
<span>{{ bookmark.item.subtitle|nl2br }}</<span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<div class="grid-item-body" style="display:none">
|
||||
{{ bookmark.item.content|raw }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{%else%}
|
||||
<div class="grid-item {{ stylegrid }}" data-idcategory="bookmark" data-title="{{ bookmark.title|lower }}">
|
||||
<div class="grid-item-content" style="background-color: {{ bookmark.color ? "#"~bookmark.color : '#'~colormain }};">
|
||||
<a style="cursor:pointer" onClick="modBookmark({{ bookmark.id }})" class="item-update"><i style="color: #FFF" class="fa fa-file" title="Modifier le favori"></i></a>
|
||||
<a style="cursor:pointer" onClick="delBookmark({{ bookmark.id }})" class="item-heart"><i style="color: #FFF" class="fa fa-trash" title="Supprimer le favori"></i></a>
|
||||
|
||||
{% if bookmark.target == 'frame' %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url|replace({'#login#': username}) }}')">
|
||||
{% elseif bookmark.target == "_self" %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
|
||||
{% else %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{{ bookmark.target }}">
|
||||
{% endif %}
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo" title="{{ bookmark.subtitle|nl2br }}">
|
||||
{% if bookmark.icon %}
|
||||
<img class="grid-item-img" src="/{{ alias }}/{{ bookmark.icon.label }}">
|
||||
{% else %}
|
||||
<img class="grid-item-img" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ bookmark.title }}</h2>
|
||||
<span>{{ bookmark.subtitle|nl2br }}</<span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if (canadd and access!="config") %}
|
||||
<div class="grid-item {{ stylegrid }}">
|
||||
<div title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},true)" class="grid-item-content" style="background-color: #{{color['main']}};cursor:pointer;">
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png">
|
||||
</div>
|
||||
<div class="grid-item-title">
|
||||
<h2>Ajouter</h2>
|
||||
<span>Ajouter un Favori</<span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if loop.index ==1 %}
|
||||
{% set mycategs = mycategs|merge({ (loop.index) : itemcategory}) %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% set firstcat=true %}
|
||||
{% for itemcategory in mycategs %}
|
||||
{% set haveitem=false %}
|
||||
{% if menu %}
|
||||
{% if menuall %}
|
||||
<div class="cat-list-feed" onClick="showItemCat({{ entity.id}},'all')" style="color:#{{ color['fontcolorhover'] }}; background-color: #{{ color['main'] }}">Tout</div>
|
||||
{% endif %}
|
||||
|
||||
{% for item in items if item.itemcategory==itemcategory %}
|
||||
{% if bookmarks is not empty %}
|
||||
<div class="cat-list-feed" onClick="showItemCat({{ entity.id}},'fav')" style="color:#{{ color['fontcolorhover'] }}; background-color: #{{ color['main'] }}"><i class="fa fa-heart"></i></div>
|
||||
{% endif %}
|
||||
|
||||
{% if loop.index ==1 %}
|
||||
{% set haveitem=true %}
|
||||
|
||||
{% if (bookmarks is not empty or (canadd and access!="config")) and (withbookmark==0 or withbookmark==2) %}
|
||||
{% set toview=true %}
|
||||
{% if menu and not menuall%}
|
||||
{% set toview=false %}
|
||||
{% for itemcategory in mycategs %}
|
||||
<div class="cat-list-feed" onClick="showItemCat({{ entity.id}},{{itemcategory.id}})" style="color:#{{ color['fontcolorhover'] }}; background-color: #{{ color['main'] }}">{{itemcategory.label}}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if search %}
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon1"><i class="fa fa-search"></i></span>
|
||||
<input onKeyup="searchItem({{ entity.id}},$(this).val());" type="text" id="searchitems" name="searchitems" class="form-control" placeholder="Recherche" aria-describedby="basic-addon1">
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if (bookmarks is not empty or (canadd and access!="config")) and (withbookmark==0 or withbookmark==2) %}
|
||||
<div class="bookmark-container">
|
||||
{% if items is not empty %}
|
||||
<h3 class="grid-title bookmark-container" data-idcategory="bookmark" style="{{ colorbodyfont }}">Favoris</h3>
|
||||
{% endif %}
|
||||
<div class="grid clearfix">
|
||||
<div class="grid-sizer {{ stylegrid }}" data-idcategory="bookmark"></div>
|
||||
<div class="grid-gutter-sizer {{ stylegrid }}-gutter-sizer"></div>
|
||||
{% for bookmark in bookmarks %}
|
||||
{% if bookmark.item %}
|
||||
<div class="grid-item {{ stylegrid }}" data-idcategory="bookmark" data-title="{{ bookmark.item.title|lower }}">
|
||||
<div class="grid-item-content" style="background-color: {{ bookmark.color ? "#"~bookmark.color : '#'~colormain }};">
|
||||
{% if bookmark.item.content %}
|
||||
<a style="cursor:pointer" class="item-preview"><i style="color: #FFF" class="fa fa-info" title="Informations sur ce service"></i></a>
|
||||
{% endif %}
|
||||
{% if canadd %}
|
||||
<a style="cursor:pointer" onClick="delBookmark({{ bookmark.id }})" class="item-heart"><i style="color: #FFF" class="fa fa-trash" title="Supprimer des favoris"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if bookmark.item.target == 'frame' %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.item.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.item.id }}','{{ bookmark.item.url|replace({'#login#': username}) }}')">
|
||||
{% elseif bookmark.target == "_self" %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.item.title }}" href="{{ bookmark.item.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.item.target }}{% endif %}">
|
||||
{% else %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.item.title }}" href="{{ bookmark.item.url|replace({'#login#': username}) }}" target="{{ bookmark.item.target }}">
|
||||
{% endif %}
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo" title="{{ bookmark.item.subtitle|nl2br }}">
|
||||
{% if bookmark.item.icon %}
|
||||
<img class="grid-item-img" src="/{{ alias }}/{{ bookmark.item.icon.label }}">
|
||||
{% else %}
|
||||
<img class="grid-item-img" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ bookmark.item.title }}</h2>
|
||||
<span>{{ bookmark.item.subtitle|nl2br }}</<span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<div class="grid-item-body" style="display:none">
|
||||
{{ bookmark.item.content|raw }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{%else%}
|
||||
<div class="grid-item {{ stylegrid }}" data-idcategory="bookmark" data-title="{{ bookmark.title|lower }}">
|
||||
<div class="grid-item-content" style="background-color: {{ bookmark.color ? "#"~bookmark.color : '#'~colormain }};">
|
||||
<a style="cursor:pointer" onClick="modBookmark({{ bookmark.id }})" class="item-update"><i style="color: #FFF" class="fa fa-file" title="Modifier le favori"></i></a>
|
||||
<a style="cursor:pointer" onClick="delBookmark({{ bookmark.id }})" class="item-heart"><i style="color: #FFF" class="fa fa-trash" title="Supprimer le favori"></i></a>
|
||||
|
||||
{% if bookmark.target == 'frame' %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url|replace({'#login#': username}) }}')">
|
||||
{% elseif bookmark.target == "_self" %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
|
||||
{% else %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{{ bookmark.target }}">
|
||||
{% endif %}
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo" title="{{ bookmark.subtitle|nl2br }}">
|
||||
{% if bookmark.icon %}
|
||||
<img class="grid-item-img" src="/{{ alias }}/{{ bookmark.icon.label }}">
|
||||
{% else %}
|
||||
<img class="grid-item-img" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ bookmark.title }}</h2>
|
||||
<span>{{ bookmark.subtitle|nl2br }}</<span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if (canadd and access!="config") %}
|
||||
<div class="grid-item {{ stylegrid }}">
|
||||
<div title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},true)" class="grid-item-content" style="background-color: #{{color['main']}};cursor:pointer;">
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png">
|
||||
</div>
|
||||
<div class="grid-item-title">
|
||||
<h2>Ajouter</h2>
|
||||
<span>Ajouter un Favori</<span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if menu and not menuall%}
|
||||
{% if firstcat %}
|
||||
{% set toview=true %}
|
||||
{% else %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% set firstcat=true %}
|
||||
{% for itemcategory in mycategs %}
|
||||
{% set haveitem=false %}
|
||||
|
||||
{% for item in items if item.itemcategory==itemcategory %}
|
||||
|
||||
{% if loop.index ==1 %}
|
||||
{% set haveitem=true %}
|
||||
|
||||
{% if (bookmarks is not empty or (canadd and access!="config")) and (withbookmark==0 or withbookmark==2) %}
|
||||
{% set toview=true %}
|
||||
{% if menu and not menuall%}
|
||||
{% set toview=false %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set toview=true %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% set firstcat=false %}
|
||||
|
||||
{% set style="" %}
|
||||
{% if not toview %}
|
||||
{% set style="display:none;" %}
|
||||
{% endif %}
|
||||
|
||||
{% if mycategs|length > 1 or ((bookmarks is not empty or (canadd and access!="config")) and (withbookmark==0 or withbookmark==2)) %}
|
||||
<h3 class="grid-title itemcategory-container" style="{{ colorbodyfont }} {{ style }}" data-idcategory="{{ itemcategory.id }}">{{ itemcategory.label }}</h3>
|
||||
{% else %}
|
||||
<p></p>
|
||||
{% endif %}
|
||||
|
||||
<div class="grid clearfix itemcategory-container" data-idcategory="{{ item.itemcategory.id }}" style="{{ style }}">
|
||||
<div class="grid-sizer {{ stylegrid }}" data-idcategory="{{ item.itemcategory.id }}"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
{% endif %}
|
||||
|
||||
<div class="grid-item {{ stylegrid }}" data-idcategory="{{ item.itemcategory.id }}" data-iditem="{{ item.id }}" data-title="{{ item.title|lower }}">
|
||||
<div class="grid-item-content" style="background-color: {{ item.color ? "#"~item.color : '#'~colormain }};">
|
||||
{% if item.content %}
|
||||
<a style="cursor:pointer" class="item-preview"><i style="color: #FFF" class="fa fa-info" title="Informations sur ce service"></i></a>
|
||||
{% endif %}
|
||||
{% if canadd %}
|
||||
<a style="cursor:pointer" onClick="heartBookmark({{ item.id }})" class="item-heart"><i style="color: #FFF" class="fa fa-heart" title="Ajouter aux Favoris"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if item.protected and not app.user %}
|
||||
{% if mode_auth == "SAML" %}
|
||||
<a href="{{ path('lightsaml_sp.login') }}" {% if access=="user" %}target="_top"{% endif %}>
|
||||
{% elseif mode_auth == "CAS" %}
|
||||
<a href="{{ path('cas_sp.login') }}" {% if access=="user" %}target="_top"{% endif %}>
|
||||
{% elseif mode_auth == "MYSQL" %}
|
||||
<a href="{{ path('cnous_portal_user_login') }}" {% if access=="user" %}target="_top"{% endif %}>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
{% if item.target == 'frame' %}
|
||||
<a class="linktosonde" data-sonde="{{ item.title }}" style="cursor:pointer" onClick="showFrameitem({{ item.id }},'{{ item.url|replace({'#login#': username}) }}')">
|
||||
{% elseif item.target == "_self" %}
|
||||
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ item.target }}{% endif %}">
|
||||
{% if menu and not menuall%}
|
||||
{% if firstcat %}
|
||||
{% set toview=true %}
|
||||
{% else %}
|
||||
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url|replace({'#login#': username}) }}" target="{{ item.target }}">
|
||||
{% set toview=false %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set toview=true %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% set firstcat=false %}
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo" title="{{ item.subtitle|nl2br }}">
|
||||
{% if item.icon %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/{{ item.icon.label }}">
|
||||
{% set style="" %}
|
||||
{% if not toview %}
|
||||
{% set style="display:none;" %}
|
||||
{% endif %}
|
||||
|
||||
{% if mycategs|length > 1 or ((bookmarks is not empty or (canadd and access!="config")) and (withbookmark==0 or withbookmark==2)) %}
|
||||
<h3 class="grid-title itemcategory-container" style="{{ colorbodyfont }} {{ style }}" data-idcategory="{{ itemcategory.id }}">{{ itemcategory.label }}</h3>
|
||||
{% else %}
|
||||
<p></p>
|
||||
{% endif %}
|
||||
|
||||
<div class="grid clearfix itemcategory-container" data-idcategory="{{ item.itemcategory.id }}" style="{{ style }}">
|
||||
<div class="grid-sizer {{ stylegrid }}" data-idcategory="{{ item.itemcategory.id }}"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
{% endif %}
|
||||
|
||||
<div class="grid-item {{ stylegrid }}" data-idcategory="{{ item.itemcategory.id }}" data-iditem="{{ item.id }}" data-title="{{ item.title|lower }}">
|
||||
<div class="grid-item-content" style="background-color: {{ item.color ? "#"~item.color : '#'~colormain }};">
|
||||
{% if item.content %}
|
||||
<a style="cursor:pointer" class="item-preview"><i style="color: #FFF" class="fa fa-info" title="Informations sur ce service"></i></a>
|
||||
{% endif %}
|
||||
{% if canadd %}
|
||||
<a style="cursor:pointer" onClick="heartBookmark({{ item.id }})" class="item-heart"><i style="color: #FFF" class="fa fa-heart" title="Ajouter aux Favoris"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if item.protected and not app.user %}
|
||||
{% if mode_auth == "SAML" %}
|
||||
<a href="{{ path('lightsaml_sp.login') }}" {% if access=="user" %}target="_top"{% endif %}>
|
||||
{% elseif mode_auth == "CAS" %}
|
||||
<a href="{{ path('cas_sp.login') }}" {% if access=="user" %}target="_top"{% endif %}>
|
||||
{% elseif mode_auth == "MYSQL" %}
|
||||
<a href="{{ path('cnous_portal_user_login') }}" {% if access=="user" %}target="_top"{% endif %}>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
{% if item.target == 'frame' %}
|
||||
<a class="linktosonde" data-sonde="{{ item.title }}" style="cursor:pointer" onClick="showFrameitem({{ item.id }},'{{ item.url|replace({'#login#': username}) }}')">
|
||||
{% elseif item.target == "_self" %}
|
||||
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ item.target }}{% endif %}">
|
||||
{% else %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
||||
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url|replace({'#login#': username}) }}" target="{{ item.target }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo" title="{{ item.subtitle|nl2br }}">
|
||||
{% if item.icon %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/{{ item.icon.label }}">
|
||||
{% else %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ item.title }}</h2>
|
||||
<span>{{ item.subtitle|nl2br }}</<span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ item.title }}</h2>
|
||||
<span>{{ item.subtitle|nl2br }}</<span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<div class="grid-item-body" style="display:none">
|
||||
{{ item.content|raw }}
|
||||
<div class="grid-item-body" style="display:none">
|
||||
{{ item.content|raw }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if haveitem %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if haveitem %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
@ -33,187 +33,203 @@
|
||||
{% set username = "" %}
|
||||
{% endif %}
|
||||
|
||||
<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">
|
||||
{% if canupdate %}
|
||||
<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>
|
||||
{% endif %}
|
||||
|
||||
{% if canadd and access!="config"%}
|
||||
<a title="Ajouter une Application" href="{{ path('cadoles_portal_user_page_application') }}">
|
||||
<i class="fa fa-plus fa-fw" style="{{ stylewidgetmenu }}"></i>
|
||||
{%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>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
|
||||
{% if canadd and access!="config"%}
|
||||
<a title="Ajouter une Application" href="{{ path('cadoles_portal_user_page_application') }}">
|
||||
<i class="fa fa-plus fa-fw" style="{{ stylewidgetmenu }}"></i>
|
||||
</a>
|
||||
{% 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 }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
{% if canadd or bookmarks is not empty or items is not empty %}
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
<div class="grid clearfix">
|
||||
<div class="grid-sizer {{ stylegrid }}"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
{% if canadd or bookmarks is not empty or items is not empty %}
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
<div class="grid clearfix">
|
||||
<div class="grid-sizer {{ stylegrid }}"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
|
||||
{% for bookmark in bookmarks %}
|
||||
{% if bookmark.item %}
|
||||
<div class="grid-item {{ stylegrid }}" data-idcategory="bookmark" data-title="{{ bookmark.item.title|lower }}">
|
||||
<div class="grid-item-content" style="background-color: {{ bookmark.color ? "#"~bookmark.color : '#'~colormain }};">
|
||||
{% if bookmark.item.content %}
|
||||
{% for bookmark in bookmarks %}
|
||||
{% if bookmark.item %}
|
||||
<div class="grid-item {{ stylegrid }}" data-idcategory="bookmark" data-title="{{ bookmark.item.title|lower }}">
|
||||
<div class="grid-item-content" style="background-color: {{ bookmark.color ? "#"~bookmark.color : '#'~colormain }};">
|
||||
{% if bookmark.item.content %}
|
||||
<a style="cursor:pointer" class="item-preview"><i style="color: #FFF" class="fa fa-info" title="Informations sur ce service"></i></a>
|
||||
{% endif %}
|
||||
{% if canadd %}
|
||||
<a style="cursor:pointer" onClick="delBookmark({{ bookmark.id }})" class="item-heart"><i style="color: #FFF" class="fa fa-trash" title="Supprimer des favoris"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if bookmark.item.target == 'frame' %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.item.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.item.id }}','{{ bookmark.item.url|replace({'#login#': username}) }}')">
|
||||
{% elseif bookmark.target == "_self" %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.item.title }}" href="{{ bookmark.item.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.item.target }}{% endif %}">
|
||||
{% else %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.item.title }}" href="{{ bookmark.item.url|replace({'#login#': username}) }}" target="{{ bookmark.item.target }}">
|
||||
{% endif %}
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo" title="{{ bookmark.item.subtitle|nl2br }}">
|
||||
{% if bookmark.item.icon %}
|
||||
<img class="grid-item-img" src="/{{ alias }}/{{ bookmark.item.icon.label }}">
|
||||
{% else %}
|
||||
<img class="grid-item-img" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ bookmark.item.title }}</h2>
|
||||
<span>{{ bookmark.item.subtitle|nl2br }}</<span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<div class="grid-item-body" style="display:none">
|
||||
{{ bookmark.item.content|raw }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{%else%}
|
||||
<div class="grid-item {{ stylegrid }}">
|
||||
<div class="grid-item-content" style="background-color: {{ bookmark.color ? "#"~bookmark.color : '#'~colormain }};">
|
||||
<a style="cursor:pointer" onClick="modBookmark({{ bookmark.id }})" class="item-update"><i style="color: #FFF" class="fa fa-file" title="Modifier le favori"></i></a>
|
||||
<a style="cursor:pointer" onClick="delBookmark({{ bookmark.id }})" class="item-heart"><i style="color: #FFF" class="fa fa-trash" title="Supprimer le favori"></i></a>
|
||||
|
||||
{% if bookmark.target == 'frame' %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url|replace({'#login#': username}) }}')">
|
||||
{% elseif bookmark.target == "_self" %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
|
||||
{% else %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{{ bookmark.target }}">
|
||||
{% endif %}
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo" title="{{ bookmark.subtitle|nl2br }}">
|
||||
{% if bookmark.icon %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/{{ bookmark.icon.label }}">
|
||||
{% else %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ bookmark.title }}</h2>
|
||||
<span>{{ bookmark.subtitle|nl2br }}</<span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{%endif%}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% for item in items %}
|
||||
<div class="grid-item {{ stylegrid }}" data-idcategory="{{ item.itemcategory.id }}" data-iditem="{{ item.id }}">
|
||||
<div class="grid-item-content" style="background-color: {{ item.color ? "#"~item.color : '#'~colormain }};">
|
||||
{% if item.content %}
|
||||
<a style="cursor:pointer" class="item-preview"><i style="color: #FFF" class="fa fa-info" title="Informations sur ce service"></i></a>
|
||||
{% endif %}
|
||||
{% if canadd %}
|
||||
<a style="cursor:pointer" onClick="delBookmark({{ bookmark.id }})" class="item-heart"><i style="color: #FFF" class="fa fa-trash" title="Supprimer des favoris"></i></a>
|
||||
<a style="cursor:pointer" onClick="heartBookmark({{ item.id }})" class="item-heart"><i style="color: #FFF" class="fa fa-heart" title="Ajouter aux favoris"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if bookmark.item.target == 'frame' %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.item.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.item.id }}','{{ bookmark.item.url|replace({'#login#': username}) }}')">
|
||||
{% elseif bookmark.target == "_self" %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.item.title }}" href="{{ bookmark.item.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.item.target }}{% endif %}">
|
||||
|
||||
{% if item.protected and not app.user %}
|
||||
{% if mode_auth == "SAML" %}
|
||||
<a href="{{ path('lightsaml_sp.login') }}" {% if access=="user" %}target="_top"{% endif %}>
|
||||
{% elseif mode_auth == "CAS" %}
|
||||
<a href="{{ path('cas_sp.login') }}" {% if access=="user" %}target="_top"{% endif %}>
|
||||
{% elseif mode_auth == "MYSQL" %}
|
||||
<a href="{{ path('cnous_portal_user_login') }}" {% if access=="user" %}target="_top"{% endif %}>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.item.title }}" href="{{ bookmark.item.url|replace({'#login#': username}) }}" target="{{ bookmark.item.target }}">
|
||||
{% if item.target == 'frame' %}
|
||||
<a class="linktosonde" data-sonde="{{ item.title }}" style="cursor:pointer" onClick="showFrameitem({{ item.id }},'{{ item.url|replace({'#login#': username}) }}')">
|
||||
{% elseif item.target == "_self" %}
|
||||
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ item.target }}{% endif %}">
|
||||
{% else %}
|
||||
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url|replace({'#login#': username}) }}" target="{{ item.target }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo" title="{{ bookmark.item.subtitle|nl2br }}">
|
||||
{% if bookmark.item.icon %}
|
||||
<img class="grid-item-img" src="/{{ alias }}/{{ bookmark.item.icon.label }}">
|
||||
{% else %}
|
||||
<img class="grid-item-img" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ bookmark.item.title }}</h2>
|
||||
<span>{{ bookmark.item.subtitle|nl2br }}</<span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<div class="grid-item-body" style="display:none">
|
||||
{{ bookmark.item.content|raw }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{%else%}
|
||||
<div class="grid-item {{ stylegrid }}">
|
||||
<div class="grid-item-content" style="background-color: {{ bookmark.color ? "#"~bookmark.color : '#'~colormain }};">
|
||||
<a style="cursor:pointer" onClick="modBookmark({{ bookmark.id }})" class="item-update"><i style="color: #FFF" class="fa fa-file" title="Modifier le favori"></i></a>
|
||||
<a style="cursor:pointer" onClick="delBookmark({{ bookmark.id }})" class="item-heart"><i style="color: #FFF" class="fa fa-trash" title="Supprimer le favori"></i></a>
|
||||
|
||||
{% if bookmark.target == 'frame' %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url|replace({'#login#': username}) }}')">
|
||||
{% elseif bookmark.target == "_self" %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
|
||||
{% else %}
|
||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{{ bookmark.target }}">
|
||||
{% endif %}
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo" title="{{ bookmark.subtitle|nl2br }}">
|
||||
{% if bookmark.icon %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/{{ bookmark.icon.label }}">
|
||||
<div class="grid-item-logo" title="{{ item.subtitle|nl2br }}">
|
||||
{% if item.icon %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/{{ item.icon.label }}">
|
||||
{% else %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ bookmark.title }}</h2>
|
||||
<span>{{ bookmark.subtitle|nl2br }}</<span>
|
||||
<h2>{{ item.title }}</h2>
|
||||
<span>{{ item.subtitle|nl2br }}</<span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{%endif%}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% for item in items %}
|
||||
<div class="grid-item {{ stylegrid }}" data-idcategory="{{ item.itemcategory.id }}" data-iditem="{{ item.id }}">
|
||||
<div class="grid-item-content" style="background-color: {{ item.color ? "#"~item.color : '#'~colormain }};">
|
||||
{% if item.content %}
|
||||
<a style="cursor:pointer" class="item-preview"><i style="color: #FFF" class="fa fa-info" title="Informations sur ce service"></i></a>
|
||||
{% endif %}
|
||||
{% if canadd %}
|
||||
<a style="cursor:pointer" onClick="heartBookmark({{ item.id }})" class="item-heart"><i style="color: #FFF" class="fa fa-heart" title="Ajouter aux favoris"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if item.protected and not app.user %}
|
||||
{% if mode_auth == "SAML" %}
|
||||
<a href="{{ path('lightsaml_sp.login') }}" {% if access=="user" %}target="_top"{% endif %}>
|
||||
{% elseif mode_auth == "CAS" %}
|
||||
<a href="{{ path('cas_sp.login') }}" {% if access=="user" %}target="_top"{% endif %}>
|
||||
{% elseif mode_auth == "MYSQL" %}
|
||||
<a href="{{ path('cnous_portal_user_login') }}" {% if access=="user" %}target="_top"{% endif %}>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
{% if item.target == 'frame' %}
|
||||
<a class="linktosonde" data-sonde="{{ item.title }}" style="cursor:pointer" onClick="showFrameitem({{ item.id }},'{{ item.url|replace({'#login#': username}) }}')">
|
||||
{% elseif item.target == "_self" %}
|
||||
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ item.target }}{% endif %}">
|
||||
{% else %}
|
||||
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url|replace({'#login#': username}) }}" target="{{ item.target }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo" title="{{ item.subtitle|nl2br }}">
|
||||
{% if item.icon %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/{{ item.icon.label }}">
|
||||
{% else %}
|
||||
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
||||
{% endif %}
|
||||
<div class="grid-item-body" style="display:none">
|
||||
{{ item.content|raw }}
|
||||
</div>
|
||||
|
||||
<div class="grid-item-title">
|
||||
<h2>{{ item.title }}</h2>
|
||||
<span>{{ item.subtitle|nl2br }}</<span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<div class="grid-item-body" style="display:none">
|
||||
{{ item.content|raw }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% if canadd %}
|
||||
<div class="grid-item {{ stylegrid }}">
|
||||
<div class="grid-item-content" style="background-color: #{{colormain}};cursor:pointer;">
|
||||
<a title="Ajouter une Application" href="{{ path('cadoles_portal_user_page_application') }}">
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png">
|
||||
{% if canadd %}
|
||||
<div class="grid-item {{ stylegrid }}">
|
||||
<div class="grid-item-content" style="background-color: #{{colormain}};cursor:pointer;">
|
||||
<a title="Ajouter une Application" href="{{ path('cadoles_portal_user_page_application') }}">
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo">
|
||||
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png">
|
||||
</div>
|
||||
<div class="grid-item-title">
|
||||
<h2>Ajouter</h2>
|
||||
<span>Ajouter une Application</<span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-item-title">
|
||||
<h2>Ajouter</h2>
|
||||
<span>Ajouter une Application</<span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
@ -24,36 +24,53 @@
|
||||
{% set username = "" %}
|
||||
{% endif %}
|
||||
|
||||
<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">
|
||||
{% if canupdate %}
|
||||
<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>
|
||||
{% 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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }}; height:100%;">
|
||||
{% 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 }}" style="max-height: 100%; width: auto; display: block; margin: auto; padding-top: 10px;" />
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" style="max-height: 100%; width: auto; display: block; margin: auto; padding-top: 10px;" />
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div style="text-align: center;">{{ entity.name }}</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }}; height:100%;">
|
||||
{% 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 }}" style="max-height: 100%; width: auto; display: block; margin: auto; padding-top: 10px;" />
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" style="max-height: 100%; width: auto; display: block; margin: auto; padding-top: 10px;" />
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div style="text-align: center;">{{ entity.name }}</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
@ -28,33 +28,49 @@
|
||||
{% set colorbodyfont = color['main'] %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
<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">
|
||||
{% if canupdate %}
|
||||
<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>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
|
||||
<iframe id="frame-{{directory}}" src="{{ path("cadoles_portal_"~access~"_frame_only",{'directory':directory,'defaultview':view}) }}" data-color="#{{colorbodyfont}}" style="{{ stylewidgetbodyframe }}" class="{% if not entity.autoajust %}notframeajust {% endif %}"></iframe>
|
||||
|
||||
{%if mini %}
|
||||
<div class="widget widget-mini widget-onlydoc" 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>
|
||||
</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">
|
||||
{% if canupdate %}
|
||||
<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>
|
||||
{% 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 }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
|
||||
<iframe id="frame-{{directory}}" src="{{ path("cadoles_portal_"~access~"_frame_only",{'directory':directory,'defaultview':view}) }}" data-color="#{{colorbodyfont}}" style="{{ stylewidgetbodyframe }}" class="{% if not entity.autoajust %}notframeajust {% endif %}"></iframe>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
@ -18,99 +18,119 @@
|
||||
|
||||
</style>
|
||||
|
||||
<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">
|
||||
{% if canupdate %}
|
||||
<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>
|
||||
{% endif %}
|
||||
|
||||
{% if access=="config" %}
|
||||
<a href='{{ path('cadoles_portal_config_project') }}' style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
|
||||
{% else %}
|
||||
{% set idproject = "" %}
|
||||
{% set url= path('cadoles_portal_user_projecttask_submit') %}
|
||||
{% if usage=="group" and firstproject is defined %}
|
||||
{% set url= path('cadoles_portal_user_projecttask_submit',{idproject:firstproject,page:entity.page.id}) %}
|
||||
{% endif %}
|
||||
<a onClick="showFrameitem('project','{{ url }}',true)" style="{{ stylewidgetmenu }}" title="Ajouter une Tâche"><i class="fa fa-plus fa-fw"></i></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
{% if projecttasks|length >= 1 %}
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
<div class="grid clearfix">
|
||||
{% for projecttask in projecttasks %}
|
||||
{% if loop.index==1 %}
|
||||
<div class="grid-sizer grid-list"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
{% endif %}
|
||||
|
||||
<div class="grid-item grid-list">
|
||||
{% set colortask = color['main'] %}
|
||||
{% if projecttask.projecttasktag %}
|
||||
{% set colortask = projecttask.projecttasktag.color %}
|
||||
{% endif %}
|
||||
<div class="grid-item-content" style="background-color:#{{ colortask }}; {%if not entity.border%}padding:5px;{%endif%}">
|
||||
<a title="Voir la Tâche" href="{{ path('cadoles_portal_'~access~'_projecttask_view',{'id':projecttask.id,page:entity.page.id}) }}">
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo" style="width:10%; margin:0px; text-align: center;">
|
||||
{% if projecttask.user is empty %}
|
||||
<img class='grid-item-img avatar' src="/{{ alias }}/uploads/avatar/{{ projecttask.owner.avatar }}" style="width:55px; height:auto">
|
||||
{% else %}
|
||||
<img class='grid-item-img avatar' src="/{{ alias }}/uploads/avatar/{{ projecttask.user.avatar }}" style="width:55px; height:auto">
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid-item-title" style="width:90%; position:initial; display: inline-block; padding:0px">
|
||||
<h2 style="line-height:18px;height:auto;padding-left:5px;">{{projecttask.name}}</h2>
|
||||
|
||||
<div style="font-size:9px; display:inline-block; width:40%;padding-left:5px;">Affectée à
|
||||
{% if projecttask.user is empty %}
|
||||
{{ projecttask.owner.username }}
|
||||
{% else %}
|
||||
{{ projecttask.user.username }}
|
||||
{% endif %}
|
||||
<br>Crée le {{ projecttask.submit|date("d/m/Y à H:i") }}
|
||||
<br>Dans le projet {{projecttask.project.name }}
|
||||
</div>
|
||||
|
||||
<div style="text-align: right; font-size:9px; display:inline-block; width:35%;">
|
||||
Priorité = {{ projecttask.priority }}</br>
|
||||
Avant le = {{ projecttask.end|date("d/m/Y") }}</br>
|
||||
{% if projecttask.projecttasktag %}
|
||||
Type = {{ projecttask.projecttasktag.name }}<br>
|
||||
{% endif %}
|
||||
{% if projecttask.projecttaskstatus %}
|
||||
Statut = {{ projecttask.projecttaskstatus.name }}<br>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div style="margin-top:-5px; text-align: right; display:inline-block; width:20%;">
|
||||
<div style="font-size:35px; line-height:30px">
|
||||
{{ projecttask.percentage }}<i style="font-size:12px">%</i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{%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>
|
||||
{% endif %}
|
||||
</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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
|
||||
{% if access=="config" %}
|
||||
<a href='{{ path('cadoles_portal_config_project') }}' style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
|
||||
{% else %}
|
||||
{% set idproject = "" %}
|
||||
{% set url= path('cadoles_portal_user_projecttask_submit') %}
|
||||
{% if usage=="group" and firstproject is defined %}
|
||||
{% set url= path('cadoles_portal_user_projecttask_submit',{idproject:firstproject,page:entity.page.id}) %}
|
||||
{% endif %}
|
||||
<a onClick="showFrameitem('project','{{ url }}',true)" style="{{ stylewidgetmenu }}" title="Ajouter une Tâche"><i class="fa fa-plus fa-fw"></i></a>
|
||||
{% 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 }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
{% if projecttasks|length >= 1 %}
|
||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||
<div class="grid clearfix">
|
||||
{% for projecttask in projecttasks %}
|
||||
{% if loop.index==1 %}
|
||||
<div class="grid-sizer grid-list"></div>
|
||||
<div class="grid-gutter-sizer"></div>
|
||||
{% endif %}
|
||||
|
||||
<div class="grid-item grid-list">
|
||||
{% set colortask = color['main'] %}
|
||||
{% if projecttask.projecttasktag %}
|
||||
{% set colortask = projecttask.projecttasktag.color %}
|
||||
{% endif %}
|
||||
<div class="grid-item-content" style="background-color:#{{ colortask }}; {%if not entity.border%}padding:5px;{%endif%}">
|
||||
<a title="Voir la Tâche" href="{{ path('cadoles_portal_'~access~'_projecttask_view',{'id':projecttask.id,page:entity.page.id}) }}">
|
||||
|
||||
<div class="item-link clearfix">
|
||||
<div class="grid-item-logo" style="width:10%; margin:0px; text-align: center;">
|
||||
{% if projecttask.user is empty %}
|
||||
<img class='grid-item-img avatar' src="/{{ alias }}/uploads/avatar/{{ projecttask.owner.avatar }}" style="width:55px; height:auto">
|
||||
{% else %}
|
||||
<img class='grid-item-img avatar' src="/{{ alias }}/uploads/avatar/{{ projecttask.user.avatar }}" style="width:55px; height:auto">
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid-item-title" style="width:90%; position:initial; display: inline-block; padding:0px">
|
||||
<h2 style="line-height:18px;height:auto;padding-left:5px;">{{projecttask.name}}</h2>
|
||||
|
||||
<div style="font-size:9px; display:inline-block; width:40%;padding-left:5px;">Affectée à
|
||||
{% if projecttask.user is empty %}
|
||||
{{ projecttask.owner.username }}
|
||||
{% else %}
|
||||
{{ projecttask.user.username }}
|
||||
{% endif %}
|
||||
<br>Crée le {{ projecttask.submit|date("d/m/Y à H:i") }}
|
||||
<br>Dans le projet {{projecttask.project.name }}
|
||||
</div>
|
||||
|
||||
<div style="text-align: right; font-size:9px; display:inline-block; width:35%;">
|
||||
Priorité = {{ projecttask.priority }}</br>
|
||||
Avant le = {{ projecttask.end|date("d/m/Y") }}</br>
|
||||
{% if projecttask.projecttasktag %}
|
||||
Type = {{ projecttask.projecttasktag.name }}<br>
|
||||
{% endif %}
|
||||
{% if projecttask.projecttaskstatus %}
|
||||
Statut = {{ projecttask.projecttaskstatus.name }}<br>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div style="margin-top:-5px; text-align: right; display:inline-block; width:20%;">
|
||||
<div style="font-size:35px; line-height:30px">
|
||||
{{ projecttask.percentage }}<i style="font-size:12px">%</i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
{% set colorbodyfont = color['main'] %}
|
||||
{% 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">
|
||||
{% if canupdate %}
|
||||
<div class="widgetmenu">
|
||||
@ -54,6 +55,7 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<script>
|
||||
|
||||
|
@ -23,56 +23,72 @@
|
||||
{% set username = "" %}
|
||||
{% endif %}
|
||||
|
||||
<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">
|
||||
{% if canupdate %}
|
||||
<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>
|
||||
{% 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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
|
||||
{% if canadd %}
|
||||
<i title="Gérer le Carrousel" class="fa fa-th fa-fw" onClick="listSlide({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if canadd %}
|
||||
<i title="Gérer le Carrousel" class="fa fa-th fa-fw" onClick="listSlide({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% 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 }}">
|
||||
{% set intervalmilli = interval * 1000 %}
|
||||
<div class="slick" data-slick='{"autoplaySpeed": {{ intervalmilli }} }'>
|
||||
{% for slide in slides %}
|
||||
<div style="background-image:url(/{{ alias }}/{{ slide.image }}); ">
|
||||
|
||||
{% if slide.title is not empty %}
|
||||
<h1 class="slicktitle" style="{{ stylelink }}">{{slide.title}}</h1>
|
||||
{% endif %}
|
||||
|
||||
{% if slide.url is not empty %}
|
||||
{% if slide.target == 'frame' %}
|
||||
<a class="slicklink" style="{{ stylelink }} cursor:pointer" onClick="showFrameitem('slide{{ slide.id }}','{{ slide.url|replace({'#login#': username}) }}')">
|
||||
{% elseif slide.target == "_self" %}
|
||||
<a class="slicklink" style="{{ stylelink }}" href="{{ slide.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ slide.target }}{% endif %}">
|
||||
{% else %}
|
||||
<a class="slicklink" style="{{ stylelink }}" href="{{ slide.url|replace({'#login#': username}) }}" target="{{ slide.target }}">
|
||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
||||
{% set intervalmilli = interval * 1000 %}
|
||||
<div class="slick" data-slick='{"autoplaySpeed": {{ intervalmilli }} }'>
|
||||
{% for slide in slides %}
|
||||
<div style="background-image:url(/{{ alias }}/{{ slide.image }}); ">
|
||||
|
||||
{% if slide.title is not empty %}
|
||||
<h1 class="slicktitle" style="{{ stylelink }}">{{slide.title}}</h1>
|
||||
{% endif %}
|
||||
|
||||
<i class="fa fa-link"></i></a>
|
||||
{% endif %}
|
||||
{% if slide.url is not empty %}
|
||||
{% if slide.target == 'frame' %}
|
||||
<a class="slicklink" style="{{ stylelink }} cursor:pointer" onClick="showFrameitem('slide{{ slide.id }}','{{ slide.url|replace({'#login#': username}) }}')">
|
||||
{% elseif slide.target == "_self" %}
|
||||
<a class="slicklink" style="{{ stylelink }}" href="{{ slide.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ slide.target }}{% endif %}">
|
||||
{% else %}
|
||||
<a class="slicklink" style="{{ stylelink }}" href="{{ slide.url|replace({'#login#': username}) }}" target="{{ slide.target }}">
|
||||
{% endif %}
|
||||
|
||||
{% if slide.subtitle is not empty %}
|
||||
<span class="slicksubtitle" style="{{ stylelink }}">{{slide.subtitle}}</span>
|
||||
{% endif %}
|
||||
<i class="fa fa-link"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if slide.subtitle is not empty %}
|
||||
<span class="slicksubtitle" style="{{ stylelink }}">{{slide.subtitle}}</span>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
@ -17,46 +17,69 @@
|
||||
{% set username = "" %}
|
||||
{% endif %}
|
||||
|
||||
<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">
|
||||
<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>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if imagemedia %}
|
||||
{% if entity.autoajust %}
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{%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"/>
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
<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="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-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||
{% 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 entity.autoajust %}
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
<div class="widgetbody" style="{{ stylewidgetbodyframe }}">
|
||||
<img src="{{ url|replace({'#login#': username}) }}" width="100%" >
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }} width:100%; background-image: url({{ url|replace({'#login#': username}) }}); background-size:cover; background-position:center;")></div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbodyframe }}">
|
||||
<img src="{{ url|replace({'#login#': username}) }}" width="100%" >
|
||||
{% 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>
|
||||
{% else %}
|
||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }} width:100%; background-image: url({{ url|replace({'#login#': username}) }}); background-size:cover; background-position:center;")></div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||
{% if entity.icon %}
|
||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||
{% else %}
|
||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||
{% endif %}
|
||||
<span class="title">{{ entity.name }}</span>
|
||||
</div>
|
||||
|
||||
<div class="widgetbody" style="{{ stylewidgetbodyframe }}">
|
||||
<iframe src="{{ url|replace({'#login#': username}) }}" class="{% if entity.autoajust %}frameajust {% endif %}" style="{{ stylewidgetbodyframe }}"></iframe>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
<script>
|
||||
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user