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'),
|
"label" => $session->get('labelniveau01'),
|
||||||
'placeholder' => '== Choisir '.$session->get('labelniveau01').' ==',
|
'placeholder' => '== Choisir '.$session->get('labelniveau01').' ==',
|
||||||
"choice_label" => "label",
|
"choice_label" => "label",
|
||||||
|
"query_builder"=> function (EntityRepository $er) {
|
||||||
|
return $er->createQueryBuilder('niveau01')->orderBy('niveau01.label','ASC');
|
||||||
|
},
|
||||||
"disabled" => ($options["mode"]=="delete"?true:false),
|
"disabled" => ($options["mode"]=="delete"?true:false),
|
||||||
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px","readonly" => ($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) {
|
"query_builder"=> function (EntityRepository $er) use($access,$perm,$userid) {
|
||||||
if($access=="config") {
|
if($access=="config") {
|
||||||
if($perm)
|
if($perm)
|
||||||
return $er->createQueryBuilder('niveau01');
|
return $er->createQueryBuilder('niveau01')->orderBy('niveau01.label','ASC');
|
||||||
else {
|
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->andWhere("usermodo.user = :userid");
|
||||||
$result->setParameter('userid', $userid);
|
$result->setParameter('userid', $userid);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return $er->createQueryBuilder('niveau01');
|
return $er->createQueryBuilder('niveau01')->orderBy('niveau01.label','ASC');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"disabled" => ($options["mode"]=="delete"||$options["masteridentity"]!="SQL"?true:false),
|
"disabled" => ($options["mode"]=="delete"||$options["masteridentity"]!="SQL"?true:false),
|
||||||
|
|
|
@ -671,6 +671,13 @@ a.item-heart {
|
||||||
margin-top:30px;
|
margin-top:30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.widget-mini {
|
||||||
|
display: inline-block;
|
||||||
|
height:50px;
|
||||||
|
width:50px;
|
||||||
|
margin-top:0px;
|
||||||
|
}
|
||||||
|
|
||||||
.widgetmenu {
|
.widgetmenu {
|
||||||
right: 20px;
|
right: 20px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -455,6 +455,8 @@ class PageController extends Controller
|
||||||
// usage soit portal / user / group
|
// usage soit portal / user / group
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$groupid=$request->query->get('group');
|
$groupid=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
|
@ -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
|
// Compteur de visite
|
||||||
if($this->getUser()) {
|
if($this->getUser()) {
|
||||||
if($groupid) {
|
if($groupid) {
|
||||||
|
@ -587,6 +551,19 @@ class PageController extends Controller
|
||||||
|
|
||||||
// Type Widgets
|
// Type Widgets
|
||||||
if($entity->getPageCategory()->getId()==2) {
|
if($entity->getPageCategory()->getId()==2) {
|
||||||
|
$user=$this->getUser();
|
||||||
|
if($user) {
|
||||||
|
// Sauvegarder les préférences
|
||||||
|
if($look) $this->setPreference($user,"pagelook",$id,$look);
|
||||||
|
if($selwidget) $this->setPreference($user,"pageselwidget",$id,$selwidget);
|
||||||
|
|
||||||
|
// Récupérer les préférences
|
||||||
|
$look=$this->getPreference($user,"pagelook",$id,"view");
|
||||||
|
$selwidget=$this->getPreference($user,"pageselwidget",$id,null);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($look=="list") $entity->setMaxwidth(0);
|
||||||
|
|
||||||
return $this->render($this->labelentity.':viewwidget.html.twig', [
|
return $this->render($this->labelentity.':viewwidget.html.twig', [
|
||||||
'useheader' => ($access=="config"),
|
'useheader' => ($access=="config"),
|
||||||
'usemenu' => false,
|
'usemenu' => false,
|
||||||
|
@ -595,6 +572,8 @@ class PageController extends Controller
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'canupdate' => $canupdate,
|
'canupdate' => $canupdate,
|
||||||
'mode' => "view",
|
'mode' => "view",
|
||||||
|
'look' => $look,
|
||||||
|
'selwidget' => $selwidget,
|
||||||
'widgets' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Widget")->getWidgetAccess($access,'config'),
|
'widgets' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Widget")->getWidgetAccess($access,'config'),
|
||||||
'usage' => $usage,
|
'usage' => $usage,
|
||||||
'group' => $groupid
|
'group' => $groupid
|
||||||
|
@ -643,7 +622,9 @@ class PageController extends Controller
|
||||||
'mode' => "view",
|
'mode' => "view",
|
||||||
'widgets' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Widget")->getWidgetAccess($access,'config'),
|
'widgets' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Widget")->getWidgetAccess($access,'config'),
|
||||||
'usage' => $usage,
|
'usage' => $usage,
|
||||||
'group' => $group
|
'group' => $group,
|
||||||
|
'look' => 'view',
|
||||||
|
'selwidget' => null,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -720,4 +701,42 @@ class PageController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getPreference($user,$key,$id,$default) {
|
||||||
|
$preference=$user->getPreference();
|
||||||
|
$return=$default;
|
||||||
|
|
||||||
|
if(is_array($preference)) {
|
||||||
|
if(array_key_exists($key,$preference)) {
|
||||||
|
if(array_key_exists($id,$preference[$key]))
|
||||||
|
$return=$preference[$key][$id];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
protected function setPreference($user,$key,$id,$value) {
|
||||||
|
$preference=$user->getPreference();
|
||||||
|
$toupdate=false;
|
||||||
|
if(!array_key_exists($key,$preference)) {
|
||||||
|
$toupdate=true;
|
||||||
|
$preference[$key]=[];
|
||||||
|
}
|
||||||
|
if((!array_key_exists($id,$preference[$key]))) {
|
||||||
|
$toupdate=true;
|
||||||
|
$preference[$key][$id]=$value;
|
||||||
|
}
|
||||||
|
if($value&&$preference[$key][$id]!=$value) {
|
||||||
|
$toupdate=true;
|
||||||
|
$preference[$key][$id]=$value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mise à jour des préferences
|
||||||
|
if($toupdate) {
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
$user->setPreference($preference);
|
||||||
|
$em->persist($this->getUser());
|
||||||
|
$em->flush();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -297,7 +297,9 @@ class PagetemplateController extends Controller
|
||||||
'mode' => "viewtemplate",
|
'mode' => "viewtemplate",
|
||||||
'widgets' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Widget")->getWidgetAccess($access),
|
'widgets' => $this->getDoctrine()->getRepository("CadolesPortalBundle:Widget")->getWidgetAccess($access),
|
||||||
'usage' => "config",
|
'usage' => "config",
|
||||||
'group' => ""
|
'group' => "",
|
||||||
|
'look' => "view",
|
||||||
|
'selwidget' => null,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,18 @@ class PagewidgetController extends Controller
|
||||||
private $labelentity="CadolesPortalBundle:Pagewidget";
|
private $labelentity="CadolesPortalBundle:Pagewidget";
|
||||||
private $routeprimary="cadoles_portal_config_pagewidget";
|
private $routeprimary="cadoles_portal_config_pagewidget";
|
||||||
|
|
||||||
|
private $entity;
|
||||||
|
private $page;
|
||||||
|
private $id;
|
||||||
|
private $access;
|
||||||
|
private $look;
|
||||||
|
private $mini;
|
||||||
|
private $selwidget;
|
||||||
|
|
||||||
|
private $cansee;
|
||||||
|
private $canudate;
|
||||||
|
private $canadd;
|
||||||
|
|
||||||
private function searchArray($array, $key, $value)
|
private function searchArray($array, $key, $value)
|
||||||
{
|
{
|
||||||
$results = array();
|
$results = array();
|
||||||
|
@ -386,6 +398,36 @@ class PagewidgetController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function setRequest($request,$id,$access) {
|
||||||
|
$this->em = $this->getDoctrine()->getManager();
|
||||||
|
$this->user = $this->getUser();
|
||||||
|
$this->id = $id;
|
||||||
|
$this->access = $access;
|
||||||
|
$this->look = $request->query->get('look');
|
||||||
|
$this->selwidget = $request->query->get('selwidget');
|
||||||
|
|
||||||
|
// Le widget existe-t-il ?
|
||||||
|
$this->entity = $this->em->getRepository($this->labelentity)->find($this->id);
|
||||||
|
if (!$this->entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
|
|
||||||
|
// Permissions
|
||||||
|
if($this->access=="config") {
|
||||||
|
$this->canupdate = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// On s'assure que l'utilisateur à la permission de voir
|
||||||
|
$this->page=$this->entity->getPage();
|
||||||
|
$this->em->getRepository("CadolesPortalBundle:Page")->getPermission($this->user,$this->page,$this->cansee,$this->canupdate);
|
||||||
|
if(!$this->cansee) throw $this->createNotFoundException('Permission denied');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Affichage miniature ?
|
||||||
|
$this->mini = ($this->look=="list"&&$this->entity->getId()!=$this->selwidget);
|
||||||
|
|
||||||
|
// Préference utilisateur
|
||||||
|
if(!$this->mini) $this->getPreference($this->entity);
|
||||||
|
}
|
||||||
|
|
||||||
protected function getPreference(&$entity) {
|
protected function getPreference(&$entity) {
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
if($user) {
|
if($user) {
|
||||||
|
@ -393,466 +435,508 @@ class PagewidgetController extends Controller
|
||||||
$id=$entity->getId();
|
$id=$entity->getId();
|
||||||
|
|
||||||
// Preference widgetshowhide
|
// Preference widgetshowhide
|
||||||
if(is_array($preference)) {
|
if($this->look=="list") {
|
||||||
if(array_key_exists("widgetshowhide",$preference)) {
|
$entity->setOpened(true);
|
||||||
if(array_key_exists($id,$preference["widgetshowhide"]))
|
$entity->setBorder(false);
|
||||||
$entity->setOpened(($preference["widgetshowhide"][$id]=="true"));
|
}
|
||||||
|
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") {
|
protected function getRender($view,$params) {
|
||||||
$em = $this->getDoctrine()->getManager();
|
// Paramétres toujours présent dans un rendu de widget
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$allways = [
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
'entity' => $this->entity,
|
||||||
|
'canupdate' => $this->canupdate,
|
||||||
|
'access' => $this->access,
|
||||||
|
'look' => $this->look,
|
||||||
|
'mini' => $this->mini,
|
||||||
|
];
|
||||||
|
|
||||||
// Permissions
|
// Parametres spéficiques
|
||||||
if($access=="config") {
|
$params=array_merge($allways,$params);
|
||||||
$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
|
// Rendu
|
||||||
|
return $this->render($this->labelentity.':'.$view, $params);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function viewurlAction(Request $request,$id,$access="config") {
|
||||||
|
// Récupération de la requete
|
||||||
|
$this->setRequest($request,$id,$access);
|
||||||
|
|
||||||
|
// Valeur par défaut
|
||||||
$url="";
|
$url="";
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
|
||||||
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;
|
$imagemedia=false;
|
||||||
$pathinfo = pathinfo($url);
|
|
||||||
|
|
||||||
// Type image
|
// Datas associées au widget
|
||||||
if(array_key_exists("extension",$pathinfo)) {
|
if(!$this->mini) {
|
||||||
if($pathinfo['extension']=="jpg"||$pathinfo['extension']=="gif"||$pathinfo['extension']=="png") {
|
// Récupération des paramétres du widget
|
||||||
$imagemedia=true;
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
|
if($parameter["id"]=="url")
|
||||||
|
$url=$parameter["value"];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Spécifique Deviant Art
|
// Gestion des url youtuve
|
||||||
if(strpos($url, "images-wixmp") !== false) $imagemedia=true;
|
$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);
|
||||||
|
|
||||||
return $this->render($this->labelentity.':viewurl.html.twig', [
|
// Detecter le type de lien
|
||||||
'entity' => $entity,
|
$pathinfo = pathinfo($url);
|
||||||
'canupdate' => $canupdate,
|
|
||||||
|
// 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,
|
'url' => $url,
|
||||||
'imagemedia' => $imagemedia,
|
'imagemedia' => $imagemedia,
|
||||||
'access' => $access
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewurlfixeAction($id,$access="config") {
|
public function viewurlfixeAction(Request $request,$id,$access="config") {
|
||||||
$em = $this->getDoctrine()->getManager();
|
// Récupération de la requete
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$this->setRequest($request,$id,$access);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
// Valeur par défaut
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
|
||||||
$url="";
|
$url="";
|
||||||
$widgettype= $entity->getWidget();
|
|
||||||
$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;
|
$imagemedia=false;
|
||||||
$pathinfo = pathinfo($url);
|
|
||||||
|
|
||||||
// Type image
|
// Datas associées au widget
|
||||||
if(array_key_exists("extension",$pathinfo)) {
|
if(!$this->mini) {
|
||||||
if($pathinfo['extension']=="jpg"||$pathinfo['extension']=="gif"||$pathinfo['extension']=="png") {
|
// Récupération des paramétres du widget
|
||||||
$imagemedia=true;
|
$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
|
return $this->getRender('viewurl.html.twig', [
|
||||||
if(strpos($url, "images-wixmp") !== false) $imagemedia=true;
|
|
||||||
|
|
||||||
|
|
||||||
return $this->render($this->labelentity.':viewurl.html.twig', [
|
|
||||||
'entity' => $entity,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'imagemedia' => $imagemedia,
|
'imagemedia' => $imagemedia,
|
||||||
'access' => $access
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewitemAction($id,$access="config") {
|
public function viewitemAction(Request $request,$id,$access="config") {
|
||||||
$em = $this->getDoctrine()->getManager();
|
// Récupération de la requete
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$this->setRequest($request,$id,$access);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
// Valeur par défaut
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
|
||||||
$modedesktop=0;
|
$modedesktop=0;
|
||||||
$iditemcategory=null;
|
|
||||||
$withbookmark=true;
|
|
||||||
$search=false;
|
|
||||||
$menu=false;
|
$menu=false;
|
||||||
$menuall=true;
|
$menuall=true;
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
$search=false;
|
||||||
switch($parameter["id"]) {
|
$withbookmark=true;
|
||||||
case "modedesktop":
|
$bookmarks=null;
|
||||||
$modedesktop=$parameter["value"];
|
$itemsordered=null;
|
||||||
break;
|
$itemcategorys=null;
|
||||||
|
|
||||||
case "withbookmark":
|
// Datas associées au widget
|
||||||
$withbookmark=$parameter["value"];
|
if(!$this->mini) {
|
||||||
break;
|
// 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":
|
case "withbookmark":
|
||||||
$iditemcategory=$parameter["value"];
|
$withbookmark=$parameter["value"];
|
||||||
if($iditemcategory) $itemcategoryfilter=$em->getRepository("CadolesPortalBundle:Itemcategory")->findBy(["id"=>$iditemcategory]);
|
break;
|
||||||
break;
|
|
||||||
|
|
||||||
case "search":
|
case "itemcategory":
|
||||||
$search=($parameter["value"]==1);
|
$iditemcategory=$parameter["value"];
|
||||||
break;
|
if($iditemcategory) $itemcategoryfilter=$this->em->getRepository("CadolesPortalBundle:Itemcategory")->findBy(["id"=>$iditemcategory]);
|
||||||
|
break;
|
||||||
|
|
||||||
case "menu":
|
case "search":
|
||||||
$menu=($parameter["value"]==1);
|
$search=($parameter["value"]==1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "menuall":
|
case "menu":
|
||||||
$menuall=($parameter["value"]==1);
|
$menu=($parameter["value"]==1);
|
||||||
break;
|
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
|
// Render
|
||||||
return $this->render($this->labelentity.':viewitem.html.twig', [
|
return $this->getRender('viewitem.html.twig', [
|
||||||
'entity' => $entity,
|
'canadd' => ($this->user),
|
||||||
'canadd' => ($user),
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'modedesktop' => $modedesktop,
|
'modedesktop' => $modedesktop,
|
||||||
'items' => $itemsordered,
|
|
||||||
'itemcategorys' => $itemcategorys,
|
|
||||||
'bookmarks' => $bookmarks,
|
|
||||||
'access' => $access,
|
|
||||||
'search' => $search,
|
'search' => $search,
|
||||||
'menu' => $menu,
|
'menu' => $menu,
|
||||||
'menuall' => $menuall,
|
'menuall' => $menuall,
|
||||||
'withbookmark' => $withbookmark,
|
'withbookmark' => $withbookmark,
|
||||||
|
'bookmarks' => $bookmarks,
|
||||||
|
'items' => $itemsordered,
|
||||||
|
'itemcategorys' => $itemcategorys,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewitemessentialAction($id,$access="config") {
|
public function viewitemessentialAction(Request $request,$id,$access="config") {
|
||||||
$em = $this->getDoctrine()->getManager();
|
// Récupération de la requete
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$this->setRequest($request,$id,$access);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
// Valeur par défaut
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
|
||||||
$modedesktop=0;
|
$modedesktop=0;
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
$itemsordered=null;
|
||||||
switch($parameter["id"]) {
|
$bookmarks=null;
|
||||||
case "modedesktop":
|
|
||||||
$modedesktop=$parameter["value"];
|
// Datas associées au widget
|
||||||
break;
|
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
|
// Profilage
|
||||||
$this->getPreference($entity);
|
$itemsordered = $this->em->getRepository("CadolesPortalBundle:Item")->getUserItems($this->user,$bookmarks,$items,$itemcategorys,null,true,true);
|
||||||
|
|
||||||
// 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());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialisation du calcul des items
|
|
||||||
$items=new ArrayCollection();
|
|
||||||
|
|
||||||
// Récupération des items par rôles
|
|
||||||
foreach($roles as $role) {
|
|
||||||
$qb = $em->createQueryBuilder();
|
|
||||||
$qb->select('item')
|
|
||||||
->from("CadolesPortalBundle:Item", 'item')
|
|
||||||
->where($qb->expr()->like('item.roles', $qb->expr()->literal("%$role%")))
|
|
||||||
->andWhere("item.essential=:flag")
|
|
||||||
->setParameter("flag",true);
|
|
||||||
|
|
||||||
$itemsroles=$qb->getQuery()->getResult();
|
|
||||||
foreach($itemsroles as $itemrole) {
|
|
||||||
if(!$bookmarksitems->contains($itemrole) && !$items->contains($itemrole)) $items->add($itemrole);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des items par group
|
|
||||||
foreach($groups as $group) {
|
|
||||||
$qb = $em->createQueryBuilder();
|
|
||||||
$qb->select('item')
|
|
||||||
->from("CadolesPortalBundle:Item", 'item')
|
|
||||||
->where(":group MEMBER OF item.groups")
|
|
||||||
->andWhere("item.essential=:flag")
|
|
||||||
->setParameter("flag",true)
|
|
||||||
->setParameter("group",$group->getGroup());
|
|
||||||
|
|
||||||
$itemsgroups=$qb->getQuery()->getResult();
|
|
||||||
foreach($itemsgroups as $itemgroup) {
|
|
||||||
if(!$bookmarksitems->contains($itemgroup) && !$items->contains($itemgroup)) $items->add($itemgroup);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des items par niveau01
|
|
||||||
if($niveau01) {
|
|
||||||
$qb = $em->createQueryBuilder();
|
|
||||||
$qb->select('item')
|
|
||||||
->from("CadolesPortalBundle:Item", 'item')
|
|
||||||
->where(":niveau01 MEMBER OF item.niveau01s")
|
|
||||||
->andWhere("item.essential=:flag")
|
|
||||||
->setParameter("flag",true)
|
|
||||||
->setParameter("niveau01",$niveau01);
|
|
||||||
|
|
||||||
$itemsniveau01s=$qb->getQuery()->getResult();
|
|
||||||
foreach($itemsniveau01s as $itemniveau01) {
|
|
||||||
if(!$bookmarksitems->contains($itemniveau01) && !$items->contains($itemniveau01)) $items->add($itemniveau01);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Trie des items
|
|
||||||
$itemsordered = $items->getIterator();
|
|
||||||
$itemsordered->uasort(function ($first, $second) {
|
|
||||||
if((int) $first->getRowOrder() > (int) $second->getRowOrder())
|
|
||||||
$return=1;
|
|
||||||
elseif((int) $first->getRowOrder() == (int) $second->getRowOrder()) {
|
|
||||||
if($first->getTitle() > $second->getTitle())
|
|
||||||
$return=1;
|
|
||||||
else
|
|
||||||
$return=-1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
$return=-1;
|
|
||||||
|
|
||||||
return $return;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewitemessential.html.twig', [
|
return $this->getRender('viewitemessential.html.twig', [
|
||||||
'entity' => $entity,
|
'canadd' => ($this->user),
|
||||||
'canadd' => ($user),
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'modedesktop' => $modedesktop,
|
'modedesktop' => $modedesktop,
|
||||||
'items' => $itemsordered,
|
'items' => $itemsordered,
|
||||||
'bookmarks' => $bookmarks,
|
'bookmarks' => $bookmarks,
|
||||||
'access' => $access,
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewalertAction($id,$access="config") {
|
public function viewalertAction(Request $request,$id,$access="config") {
|
||||||
$em = $this->getDoctrine()->getManager();
|
// Récupération de la requete
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$this->setRequest($request,$id,$access);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
// Valeur par défaut
|
||||||
if($access=="config") {
|
$alertsordered=null;
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
// Datas associées au widget
|
||||||
$idalertcategory=null;
|
if(!$this->mini) {
|
||||||
$alertcategoryfilter=null;
|
// Récupération des paramétres du widget
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
$idalertcategory=null;
|
||||||
switch($parameter["id"]) {
|
$alertcategoryfilter=null;
|
||||||
case "alertcategory":
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
$idalertcategory=$parameter["value"];
|
switch($parameter["id"]) {
|
||||||
if($idalertcategory) $alertcategoryfilter=$em->getRepository("CadolesPortalBundle:Alertcategory")->find($idalertcategory);
|
case "alertcategory":
|
||||||
break;
|
$idalertcategory=$parameter["value"];
|
||||||
|
if($idalertcategory) $alertcategoryfilter=$this->em->getRepository("CadolesPortalBundle:Alertcategory")->find($idalertcategory);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Préference utilisateur
|
// Profilage
|
||||||
$this->getPreference($entity);
|
$alertsordered=$this->em->getRepository("CadolesPortalBundle:Alert")->getUserAlerts($this->user,$idalertcategory,$alertcategoryfilter);
|
||||||
|
}
|
||||||
// Profilage
|
|
||||||
$user=$this->getUser();
|
|
||||||
$alertsordered=$em->getRepository("CadolesPortalBundle:Alert")->getUserAlerts($user,$idalertcategory,$alertcategoryfilter);
|
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewalert.html.twig', [
|
return $this->getRender('viewalert.html.twig', [
|
||||||
'entity' => $entity,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'alerts' => $alertsordered,
|
'alerts' => $alertsordered,
|
||||||
'access' => $access
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function viewfluxAction($id,$access="config") {
|
public function viewfluxAction(Request $request,$id,$access="config") {
|
||||||
$em = $this->getDoctrine()->getManager();
|
// Récupération de la requete
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$this->setRequest($request,$id,$access);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
// Valeur par défaut
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
|
||||||
$modelist=0;
|
$modelist=0;
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
$fluxsordered=null;
|
||||||
switch($parameter["id"]) {
|
$feeds=null;
|
||||||
case "modelist":
|
|
||||||
$modelist=$parameter["value"];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Préference utilisateur
|
// Datas associées au widget
|
||||||
$this->getPreference($entity);
|
if(!$this->mini) {
|
||||||
|
// Récupération des paramétres du widget
|
||||||
// Profilage
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
$user=$this->getUser();
|
switch($parameter["id"]) {
|
||||||
$roles=($user?$user->getRoles():["ROLE_ANONYME"]);
|
case "modelist":
|
||||||
$groups=($user?$user->getGroups():[]);
|
$modelist=$parameter["value"];
|
||||||
|
break;
|
||||||
// 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';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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)) {
|
if($filesystem->exists($filecache)) {
|
||||||
// On récupère la date de modification du fichier
|
// On récupère la date de modification du fichier
|
||||||
$timestampfile = filemtime($filecache);
|
$timestampfile = filemtime($filecache);
|
||||||
$datetimeFormat = 'Y-m-d H:i:s';
|
$datetimeFormat = 'Y-m-d H:i:s';
|
||||||
$datefile = new \DateTime();
|
$datefile = new \DateTime();
|
||||||
$datefile->setTimestamp($timestampfile);
|
$datefile->setTimestamp($timestampfile);
|
||||||
|
|
||||||
// On ajoute 30mn
|
// On ajoute 30mn
|
||||||
$datefile->add(new \DateInterval('PT30M'));
|
$datefile->add(new \DateInterval('PT30M'));
|
||||||
|
|
||||||
|
@ -860,58 +944,62 @@ class PagewidgetController extends Controller
|
||||||
$now = new \DateTime();
|
$now = new \DateTime();
|
||||||
if($datefile>=$now) {
|
if($datefile>=$now) {
|
||||||
$toregen=false;
|
$toregen=false;
|
||||||
$backup = unserialize(file_get_contents($filecache));
|
$feeds = 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
|
// Si le fichier est trop ancien on relit le flus
|
||||||
if($toregen) {
|
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');
|
$weburl=$this->getParameter('weburl');
|
||||||
|
|
||||||
if(stripos($url,"/")==0) {
|
if(stripos($url,"/")==0) {
|
||||||
$url="https://".$weburl.$url;
|
$url="https://".$weburl.$url;
|
||||||
$PROXYactivate=false;
|
$PROXYactivate=false;
|
||||||
}
|
}
|
||||||
if(stripos($url,"https://".$weburl)===0) $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) {
|
if($PROXYactivate) {
|
||||||
$PROXYserver = $em->getRepository("CadolesCoreBundle:Config")->find("PROXYserver")->getValue();
|
$PROXYserver = $this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYserver")->getValue();
|
||||||
$PROXYport = $em->getRepository("CadolesCoreBundle:Config")->find("PROXYport")->getValue();
|
$PROXYport = $this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYport")->getValue();
|
||||||
$clientguzzle = new \GuzzleHttp\Client(array('timeout' => 3,'verify'=>false,'proxy' => ['http' => 'http://'.$PROXYserver.':'.$PROXYport,'https' => 'http://'.$PROXYserver.':'.$PROXYport]));
|
$clientguzzle = new \GuzzleHttp\Client(array('timeout' => 3,'verify'=>false,'proxy' => ['http' => 'http://'.$PROXYserver.':'.$PROXYport,'https' => 'http://'.$PROXYserver.':'.$PROXYport]));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$clientguzzle = new \GuzzleHttp\Client(['timeout' => 3,'verify'=>false]);
|
$clientguzzle = new \GuzzleHttp\Client(array('timeout' => 3,'verify'=>false));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$clientguzzle->request('GET', $url);
|
$clientguzzle->request('GET', $url);
|
||||||
} catch (RequestException $e) {
|
} catch (RequestException $e) {
|
||||||
if ($e->hasResponse()) {
|
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);
|
$client = new \FeedIo\Adapter\Guzzle\Client($clientguzzle);
|
||||||
$logger = new \Psr\Log\NullLogger();
|
$logger = new \Psr\Log\NullLogger();
|
||||||
$feedIo = new \FeedIo\FeedIo($client, $logger);
|
$feedIo = new \FeedIo\FeedIo($client, $logger);
|
||||||
|
|
||||||
|
$feeds=array();
|
||||||
|
|
||||||
|
// On lit le flux rss
|
||||||
try {
|
try {
|
||||||
$result = $feedIo->read($url);
|
$result = $feedIo->read($url);
|
||||||
}
|
}
|
||||||
catch (\Exception $e) {
|
catch (\Exception $e) {
|
||||||
$result=null;
|
$result=null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($result) {
|
if($result) {
|
||||||
$feedtitle = $result->getFeed()->getTitle();
|
$feedtitle = $result->getFeed()->getTitle();
|
||||||
|
|
||||||
|
|
||||||
$backup=[];
|
|
||||||
|
|
||||||
// Pour chaque articles
|
// Pour chaque articles
|
||||||
$nbflux=0;
|
$nbflux=0;
|
||||||
foreach ($result->getFeed() as $item) {
|
foreach ($result->getFeed() as $item) {
|
||||||
|
@ -931,7 +1019,6 @@ class PagewidgetController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($item->getAllElements() as $element) {
|
foreach ($item->getAllElements() as $element) {
|
||||||
|
|
||||||
if($element->getName()=="content:encoded")
|
if($element->getName()=="content:encoded")
|
||||||
$content = $element->getValue();
|
$content = $element->getValue();
|
||||||
}
|
}
|
||||||
|
@ -947,7 +1034,7 @@ class PagewidgetController extends Controller
|
||||||
if($imgstart!== false) {
|
if($imgstart!== false) {
|
||||||
$imgend = stripos($content,">",$imgstart);
|
$imgend = stripos($content,">",$imgstart);
|
||||||
$imgcontent=substr($content,$imgstart,$imgend-$imgstart+1);
|
$imgcontent=substr($content,$imgstart,$imgend-$imgstart+1);
|
||||||
|
|
||||||
$imgstart = stripos($imgcontent,"src=");
|
$imgstart = stripos($imgcontent,"src=");
|
||||||
$imgurl=substr($imgcontent,$imgstart+5);
|
$imgurl=substr($imgcontent,$imgstart+5);
|
||||||
$imgend = stripos($imgurl,'"');
|
$imgend = stripos($imgurl,'"');
|
||||||
|
@ -956,10 +1043,9 @@ class PagewidgetController extends Controller
|
||||||
$imgurl=substr($imgurl,0,$imgend);
|
$imgurl=substr($imgurl,0,$imgend);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Garder le flux
|
|
||||||
|
|
||||||
$tmp=array(
|
// Garder le flux
|
||||||
|
array_push($feeds,array(
|
||||||
"feedtitle" => $feedtitle,
|
"feedtitle" => $feedtitle,
|
||||||
"title" => $title,
|
"title" => $title,
|
||||||
"link" => $link,
|
"link" => $link,
|
||||||
|
@ -968,260 +1054,40 @@ class PagewidgetController extends Controller
|
||||||
"dateformat" => $dateformat,
|
"dateformat" => $dateformat,
|
||||||
"content" => $content,
|
"content" => $content,
|
||||||
"image" => $imgurl,
|
"image" => $imgurl,
|
||||||
"color" => $flux->getColor(),
|
// "color" => $flux->getColor(),
|
||||||
"fluxid" => $flux->getId(),
|
"fluxid" => 0,
|
||||||
"fluxtitle" => $flux->getTitle(),
|
"fluxtitle" => $this->entity->getName(),
|
||||||
);
|
));
|
||||||
|
|
||||||
array_push($feeds,$tmp);
|
|
||||||
array_push($backup,$tmp);
|
|
||||||
|
|
||||||
$nbflux++;
|
$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
|
// 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
|
// Render
|
||||||
return $this->render($this->labelentity.':viewflux.html.twig', [
|
return $this->getRender('viewflux.html.twig', [
|
||||||
'entity' => $entity,
|
'fluxs' => $fluxs,
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'fluxs' => ["id"=>0],
|
|
||||||
'access' => $access,
|
|
||||||
'feeds' => $feeds,
|
'feeds' => $feeds,
|
||||||
'modelist' => $modelist,
|
'modelist' => $modelist,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewbookmarkAction($id,$access="config") {
|
public function viewbookmarkAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
|
@ -1266,10 +1132,15 @@ class PagewidgetController extends Controller
|
||||||
'modedesktop' => $modedesktop,
|
'modedesktop' => $modedesktop,
|
||||||
'bookmarks' => $bookmarks,
|
'bookmarks' => $bookmarks,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewlinkAction($id,$access="config") {
|
public function viewlinkAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
|
@ -1310,10 +1181,15 @@ class PagewidgetController extends Controller
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'target' => $target,
|
'target' => $target,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function vieweditorAction($id,$access="config") {
|
public function vieweditorAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
|
@ -1350,10 +1226,15 @@ class PagewidgetController extends Controller
|
||||||
'canupdate' => $canupdate,
|
'canupdate' => $canupdate,
|
||||||
'html' => $html,
|
'html' => $html,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewslideAction($id,$access="config") {
|
public function viewslideAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
|
@ -1393,10 +1274,15 @@ class PagewidgetController extends Controller
|
||||||
'slides' => $slides,
|
'slides' => $slides,
|
||||||
'interval' => $interval,
|
'interval' => $interval,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewfileAction($id,$access="config") {
|
public function viewfileAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
|
@ -1432,13 +1318,18 @@ class PagewidgetController extends Controller
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'directory' => "widget-".$id,
|
'directory' => "widget-".$id,
|
||||||
'view' => $view,
|
'view' => $view,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewgaleryAction($id,$access="config") {
|
public function viewgaleryAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
|
@ -1491,12 +1382,16 @@ class PagewidgetController extends Controller
|
||||||
'canupdate' => $canupdate,
|
'canupdate' => $canupdate,
|
||||||
'files' => $files,
|
'files' => $files,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewcalendarAction(Request $request,$id,$access="config") {
|
public function viewcalendarAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
|
@ -1541,13 +1436,17 @@ class PagewidgetController extends Controller
|
||||||
'nbday' => $nbday,
|
'nbday' => $nbday,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'firstcalendar' => $firstcalendar,
|
'firstcalendar' => $firstcalendar,
|
||||||
'usage' => $usage
|
'usage' => $usage,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewblogAction(Request $request,$id,$access="config") {
|
public function viewblogAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
|
@ -1602,13 +1501,17 @@ class PagewidgetController extends Controller
|
||||||
'nbarticle' => $nbarticle,
|
'nbarticle' => $nbarticle,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'firstblog' => $firstblog,
|
'firstblog' => $firstblog,
|
||||||
'usage' => $usage
|
'usage' => $usage,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewprojectAction(Request $request,$id,$access="config") {
|
public function viewprojectAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
|
@ -1676,11 +1579,16 @@ class PagewidgetController extends Controller
|
||||||
'nbarticle' => $nbarticle,
|
'nbarticle' => $nbarticle,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'firstproject' => $firstproject,
|
'firstproject' => $firstproject,
|
||||||
'usage' => $usage
|
'usage' => $usage,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewseparatorAction($id,$access="config") {
|
public function viewseparatorAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
|
@ -1721,10 +1629,15 @@ class PagewidgetController extends Controller
|
||||||
'seetitle' => $seetitle,
|
'seetitle' => $seetitle,
|
||||||
'seeicon' => $seeicon,
|
'seeicon' => $seeicon,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewclockAction($id,$access="config") {
|
public function viewclockAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
|
@ -1754,17 +1667,22 @@ class PagewidgetController extends Controller
|
||||||
$this->getPreference($entity);
|
$this->getPreference($entity);
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewurl.html.twig', [
|
return $this->render($this->labelentity.':viewframe.html.twig', [
|
||||||
'entity' => $entity,
|
'entity' => $entity,
|
||||||
'canadd' => $canupdate,
|
'canadd' => $canupdate,
|
||||||
'canupdate' => $canupdate,
|
'canupdate' => $canupdate,
|
||||||
'onheader' => true,
|
'onheader' => true,
|
||||||
'tool' => ($clock==0?"cadoles_portal_user_tool_clockanalogique":"cadoles_portal_user_tool_clocknumerique"),
|
'tool' => ($clock==0?"cadoles_portal_user_tool_clockanalogique":"cadoles_portal_user_tool_clocknumerique"),
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewcalculatorAction($id,$access="config") {
|
public function viewcalculatorAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
|
@ -1791,10 +1709,15 @@ class PagewidgetController extends Controller
|
||||||
'onheader' => true,
|
'onheader' => true,
|
||||||
'tool' => "cadoles_portal_user_tool_calculator",
|
'tool' => "cadoles_portal_user_tool_calculator",
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewappexternalAction($id,$access="config") {
|
public function viewappexternalAction(Request $request,$id,$access="config") {
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
|
@ -1892,12 +1815,16 @@ class PagewidgetController extends Controller
|
||||||
'items' => $items,
|
'items' => $items,
|
||||||
'itemcategorys' => $itemcategorys,
|
'itemcategorys' => $itemcategorys,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewinfoAction(Request $request,$id,$access="config") {
|
public function viewinfoAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
@ -1960,12 +1887,16 @@ class PagewidgetController extends Controller
|
||||||
'members' => $members,
|
'members' => $members,
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
'idpage' => $page->getId(),
|
'idpage' => $page->getId(),
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewchatAction(Request $request,$id,$access="config") {
|
public function viewchatAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
$entity = $em->getRepository($this->labelentity)->find($id);
|
||||||
|
@ -1999,6 +1930,8 @@ class PagewidgetController extends Controller
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'usage' => $usage,
|
'usage' => $usage,
|
||||||
'group' => $group,
|
'group' => $group,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2006,6 +1939,9 @@ class PagewidgetController extends Controller
|
||||||
public function viewgroupAction(Request $request,$id,$access="config") {
|
public function viewgroupAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
@ -2049,13 +1985,17 @@ class PagewidgetController extends Controller
|
||||||
'canupdate' => $canupdate,
|
'canupdate' => $canupdate,
|
||||||
'usage' => $usage,
|
'usage' => $usage,
|
||||||
'groups' => $mygroups,
|
'groups' => $mygroups,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewgroupmessageAction(Request $request,$id,$access="config") {
|
public function viewgroupmessageAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
@ -2135,13 +2075,17 @@ class PagewidgetController extends Controller
|
||||||
'modelist' => $modelist,
|
'modelist' => $modelist,
|
||||||
'messages' => $mymsg,
|
'messages' => $mymsg,
|
||||||
'nbarticle' => $nbarticle,
|
'nbarticle' => $nbarticle,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewOnlydocAction(Request $request,$id,$access="config") {
|
public function viewOnlydocAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
|
$look=$request->query->get('look');
|
||||||
|
$selwidget=$request->query->get('selwidget');
|
||||||
|
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
@ -2185,6 +2129,8 @@ class PagewidgetController extends Controller
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'directory' => $id,
|
'directory' => $id,
|
||||||
'view' => $view,
|
'view' => $view,
|
||||||
|
'look' => $look,
|
||||||
|
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ class SlideController extends Controller
|
||||||
// Vérifier que l'on générer un slide
|
// Vérifier que l'on générer un slide
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
if($usage=="user") {
|
if($usage=="user") {
|
||||||
$user=$data->getPagewidget()->getPage()->getUser();
|
$user=$pagewidget->getPage()->getUser();
|
||||||
if($user!=$this->getUser()) throw $this->createNotFoundException('Permission denied');
|
if($user!=$this->getUser()) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -76,7 +76,7 @@ class SlideController extends Controller
|
||||||
// Vérifier que l'on générer un slide
|
// Vérifier que l'on générer un slide
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
if($usage=="user") {
|
if($usage=="user") {
|
||||||
$user=$data->getPagewidget()->getPage()->getUser();
|
$user=$pagewidget->getPage()->getUser();
|
||||||
if($user!=$this->getUser()) throw $this->createNotFoundException('Permission denied');
|
if($user!=$this->getUser()) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -11,7 +11,8 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity
|
* @ORM\Entity
|
||||||
* @ORM\Table(name="flux")
|
* @ORM\Table(name="flux")
|
||||||
* @ORM\HasLifecycleCallbacks
|
* @ORM\HasLifecycleCallbacks.
|
||||||
|
* @ORM\Entity(repositoryClass="Cadoles\PortalBundle\Repository\FluxRepository")
|
||||||
*/
|
*/
|
||||||
class Flux
|
class Flux
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Cadoles\PortalBundle\Repository;
|
||||||
|
|
||||||
|
use Doctrine\ORM\EntityRepository;
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
|
||||||
|
class FluxRepository extends EntityRepository
|
||||||
|
{
|
||||||
|
public function getUserFluxs($user) {
|
||||||
|
// Profilage
|
||||||
|
$roles=($user?$user->getRoles():["ROLE_ANONYME"]);
|
||||||
|
$groups=($user?$user->getGroups():[]);
|
||||||
|
|
||||||
|
// Initialisation du calcul des alerts
|
||||||
|
$fluxs=new ArrayCollection();
|
||||||
|
|
||||||
|
// Récupération des fluxs par rôles
|
||||||
|
foreach($roles as $role) {
|
||||||
|
$qb = $this->createQueryBuilder('a');
|
||||||
|
$qb->select('flux')
|
||||||
|
->from("CadolesPortalBundle:Flux", 'flux')
|
||||||
|
->where($qb->expr()->like('flux.roles', $qb->expr()->literal("%$role%")));
|
||||||
|
|
||||||
|
$fluxsroles=$qb->getQuery()->getResult();
|
||||||
|
foreach($fluxsroles as $fluxrole) {
|
||||||
|
if(!$fluxs->contains($fluxrole)) $fluxs->add($fluxrole);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Récupération des fluxs par group
|
||||||
|
foreach($groups as $group) {
|
||||||
|
$qb = $this->createQueryBuilder('a');
|
||||||
|
$qb->select('flux')
|
||||||
|
->from("CadolesPortalBundle:Flux", 'flux')
|
||||||
|
->where(":group MEMBER OF flux.groups")
|
||||||
|
->setParameter("group",$group->getGroup());
|
||||||
|
|
||||||
|
$fluxsgroups=$qb->getQuery()->getResult();
|
||||||
|
foreach($fluxsgroups as $fluxgroup) {
|
||||||
|
if(!$fluxs->contains($fluxgroup)) $fluxs->add($fluxgroup);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $fluxs;
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,7 +7,7 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
|
||||||
class ItemRepository extends EntityRepository
|
class ItemRepository extends EntityRepository
|
||||||
{
|
{
|
||||||
public function getUserItems($user,&$bookmarks,&$itemsordered,&$itemcategorys,$iditemcategory=null,$withbookmark=1) {
|
public function getUserItems($user,&$bookmarks,&$itemsordered,&$itemcategorys,$iditemcategory=null,$withbookmark=1,$fgessential=false) {
|
||||||
// Profilage
|
// Profilage
|
||||||
$roles=($user?$user->getRoles():["ROLE_ANONYME"]);
|
$roles=($user?$user->getRoles():["ROLE_ANONYME"]);
|
||||||
$groups=($user?$user->getGroups():[]);
|
$groups=($user?$user->getGroups():[]);
|
||||||
|
@ -40,6 +40,12 @@ class ItemRepository extends EntityRepository
|
||||||
$qb->andWhere("item.itemcategory=:itemcategory")
|
$qb->andWhere("item.itemcategory=:itemcategory")
|
||||||
->setParameter("itemcategory",$itemcategoryfilter);
|
->setParameter("itemcategory",$itemcategoryfilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($fgessential) {
|
||||||
|
$qb->andWhere("item.essential=:flag")
|
||||||
|
->setParameter("flag",true);
|
||||||
|
}
|
||||||
|
|
||||||
$itemsroles=$qb->getQuery()->getResult();
|
$itemsroles=$qb->getQuery()->getResult();
|
||||||
foreach($itemsroles as $itemrole) {
|
foreach($itemsroles as $itemrole) {
|
||||||
if(!$bookmarksitems->contains($itemrole) && !$items->contains($itemrole)) $items->add($itemrole);
|
if(!$bookmarksitems->contains($itemrole) && !$items->contains($itemrole)) $items->add($itemrole);
|
||||||
|
@ -58,6 +64,12 @@ class ItemRepository extends EntityRepository
|
||||||
$qb->andWhere("item.itemcategory=:itemcategory")
|
$qb->andWhere("item.itemcategory=:itemcategory")
|
||||||
->setParameter("itemcategory",$itemcategoryfilter);
|
->setParameter("itemcategory",$itemcategoryfilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($fgessential) {
|
||||||
|
$qb->andWhere("item.essential=:flag")
|
||||||
|
->setParameter("flag",true);
|
||||||
|
}
|
||||||
|
|
||||||
$itemsgroups=$qb->getQuery()->getResult();
|
$itemsgroups=$qb->getQuery()->getResult();
|
||||||
|
|
||||||
foreach($itemsgroups as $itemgroup) {
|
foreach($itemsgroups as $itemgroup) {
|
||||||
|
@ -78,6 +90,12 @@ class ItemRepository extends EntityRepository
|
||||||
$qb->andWhere("item.itemcategory=:itemcategory")
|
$qb->andWhere("item.itemcategory=:itemcategory")
|
||||||
->setParameter("itemcategory",$itemcategoryfilter);
|
->setParameter("itemcategory",$itemcategoryfilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($fgessential) {
|
||||||
|
$qb->andWhere("item.essential=:flag")
|
||||||
|
->setParameter("flag",true);
|
||||||
|
}
|
||||||
|
|
||||||
$itemsniveau01s=$qb->getQuery()->getResult();
|
$itemsniveau01s=$qb->getQuery()->getResult();
|
||||||
foreach($itemsniveau01s as $itemniveau01) {
|
foreach($itemsniveau01s as $itemniveau01) {
|
||||||
if(!$bookmarksitems->contains($itemniveau01) && !$items->contains($itemniveau01)) $items->add($itemniveau01);
|
if(!$bookmarksitems->contains($itemniveau01) && !$items->contains($itemniveau01)) $items->add($itemniveau01);
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
|
|
||||||
{% extends '@CadolesCore/base.html.twig' %}
|
{% extends '@CadolesCore/base.html.twig' %}
|
||||||
|
|
||||||
|
{% block localstyle %}
|
||||||
|
{% if look=="list" %}
|
||||||
|
#R1C1:first-child {
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
{% block pagewrapper %}
|
{% block pagewrapper %}
|
||||||
{% if access=="config" %}
|
{% if access=="config" %}
|
||||||
<div class="pagemenu">
|
<div class="pagemenu">
|
||||||
|
@ -25,8 +32,8 @@
|
||||||
|
|
||||||
<div id="tolocalize" style="display:none">
|
<div id="tolocalize" style="display:none">
|
||||||
{% for pagewidget in entity.pagewidgets %}
|
{% for pagewidget in entity.pagewidgets %}
|
||||||
<a href="{{ url(pagewidget.widget.routeview|replace({'_config_':'_'~access~'_'}),{id:pagewidget.id,by:mode,usage:usage,group:group}) }}"></a>
|
<a href="{{ url(pagewidget.widget.routeview|replace({'_config_':'_'~access~'_'}),{id:pagewidget.id,by:mode,usage:usage,group:group,look:look,selwidget:selwidget}) }}"></a>
|
||||||
{{ render(url(pagewidget.widget.routeview|replace({'_config_':'_'~access~'_'}),{id:pagewidget.id,by:mode,usage:usage,group:group})) }}
|
{{ render(url(pagewidget.widget.routeview|replace({'_config_':'_'~access~'_'}),{id:pagewidget.id,by:mode,usage:usage,group:group,look:look,selwidget:selwidget})) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -98,7 +105,11 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
// Création de la grille des widgets
|
// Création de la grille des widgets
|
||||||
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
|
// Template de base
|
||||||
if(template=="") {
|
if(template=="") {
|
||||||
|
@ -157,10 +168,19 @@
|
||||||
|
|
||||||
// On déplace les widgets à leur emplacement
|
// On déplace les widgets à leur emplacement
|
||||||
$("#tolocalize").children(".widget").each(function( element ) {
|
$("#tolocalize").children(".widget").each(function( element ) {
|
||||||
if($('#'+$(this).attr("loc")).length)
|
{% if look=="list" %}
|
||||||
$(this).appendTo('#'+$(this).attr("loc"));
|
if($(this).data("id")=="{{selwidget}}") {
|
||||||
else
|
$(this).appendTo('#R1C2');
|
||||||
$(this).appendTo('#R1C1');
|
}
|
||||||
|
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
|
// On ajoute un widget vide à chaque colonne
|
||||||
|
@ -168,7 +188,7 @@
|
||||||
$("<div class='widgetempty'> </div>").appendTo($(this));
|
$("<div class='widgetempty'> </div>").appendTo($(this));
|
||||||
});
|
});
|
||||||
|
|
||||||
{% if canupdate %}
|
{% if canupdate and look!="list" %}
|
||||||
// Mettre une taille mini de colonne sinon on ne pourra pas déplacer le widget dans la colonne
|
// Mettre une taille mini de colonne sinon on ne pourra pas déplacer le widget dans la colonne
|
||||||
$(".colcontainer .col").css("min-height","80px");
|
$(".colcontainer .col").css("min-height","80px");
|
||||||
|
|
||||||
|
@ -365,6 +385,26 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Aggrandir widget
|
||||||
|
function bigWidget(idwidget) {
|
||||||
|
var url="{{ path('cadoles_portal_'~access~'_page_view',{id:entity.id,group:group,usage:usage,by:mode,look:'list',selwidget:'xx'})}}";
|
||||||
|
|
||||||
|
url=url.replace('xx',idwidget);
|
||||||
|
url=url.replace(/&/g,"&");
|
||||||
|
|
||||||
|
$(location).attr('href', url);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Réduire widget
|
||||||
|
function smallWidget(idwidget) {
|
||||||
|
var url="{{ path('cadoles_portal_'~access~'_page_view',{id:entity.id,group:group,usage:usage,by:mode,look:'view',selwidget:'xx'})}}";
|
||||||
|
|
||||||
|
url=url.replace('xx',idwidget);
|
||||||
|
url=url.replace(/&/g,"&");
|
||||||
|
|
||||||
|
$(location).attr('href', url);
|
||||||
|
}
|
||||||
|
|
||||||
// Ajout d'un bookmark
|
// Ajout d'un bookmark
|
||||||
function addBookmark(idwidget,touser) {
|
function addBookmark(idwidget,touser) {
|
||||||
var url="{{ path('cadoles_portal_'~access~'_bookmark_submit',{idpage:entity.id,idwidget:'xx',touser:'yy',group:group,usage:usage,by:mode})}}";
|
var url="{{ path('cadoles_portal_'~access~'_bookmark_submit',{idpage:entity.id,idwidget:'xx',touser:'yy',group:group,usage:usage,by:mode})}}";
|
||||||
|
|
|
@ -12,50 +12,72 @@
|
||||||
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
||||||
|
|
||||||
{% if canupdate or alerts|length>0 %}
|
{% 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 mini %}
|
||||||
{% if canupdate %}
|
<div class="widget widget-mini widget-projalertect" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
<div class="widgetmenu">
|
<div class="widgetheader">
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
{% if entity.icon %}
|
||||||
</div>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
{% endif %}
|
{% 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 look=="list" %}
|
||||||
{% if entity.icon %}
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
{% else %}
|
||||||
{% else %}
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
{% endif %}
|
||||||
{% endif %}
|
</div>
|
||||||
<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>
|
|
||||||
|
|
||||||
<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>
|
</div>
|
||||||
|
|
||||||
{% endfor %}
|
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||||
</div>
|
{% for alert in alerts %}
|
||||||
</div>
|
<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 %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,69 +26,87 @@
|
||||||
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
||||||
{% endif %}
|
{% 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 %}
|
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widget widget-mini widget-appexternal" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
{% if entity.icon %}
|
<div class="widgetheader">
|
||||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
{% else %}
|
{% if entity.icon %}
|
||||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
{% endif %}
|
{% else %}
|
||||||
<span class="title">{{ entity.name }}</span>
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
</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 %}
|
{% 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>
|
||||||
</div>
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,73 +12,87 @@
|
||||||
{% set stylewidgetbodyreverse = constants.mystylewidgetbodyreverse(entity) %}
|
{% set stylewidgetbodyreverse = constants.mystylewidgetbodyreverse(entity) %}
|
||||||
{% set color = app.session.get('color') %}
|
{% set color = app.session.get('color') %}
|
||||||
|
|
||||||
<style>
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-blog" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
</style>
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
<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">
|
{% else %}
|
||||||
<div class="widgetmenu">
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
{% if canupdate %}
|
{% endif %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
</a>
|
||||||
<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>
|
|
||||||
</div>
|
</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 = "" %}
|
{% set username = "" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-bookmark" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-bookmark" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
|
<div class="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 canadd %}
|
||||||
{% if canupdate or canadd %}
|
<i class="fa fa-plus fa-fw" title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},false)" style="{{ stylewidgetmenu }}"></i>
|
||||||
<div class="widgetmenu">
|
{% endif %}
|
||||||
{% 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 %}
|
{% if look=="list" %}
|
||||||
<i class="fa fa-plus fa-fw" title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},false)" style="{{ stylewidgetmenu }}"></i>
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endif %}
|
{% else %}
|
||||||
</div>
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
|
{% 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 bookmarks is not empty or canupdate %}
|
||||||
{% if entity.icon %}
|
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
<div class="bookmark-container">
|
||||||
{% else %}
|
<div class="grid clearfix">
|
||||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
<div class="grid-sizer {{ stylegrid }}"></div>
|
||||||
{% endif %}
|
<div class="grid-gutter-sizer"></div>
|
||||||
<span class="title">{{ entity.name }}</span>
|
{% for bookmark in bookmarks %}
|
||||||
</div>
|
<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="item-link clearfix">
|
||||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
<div class="grid-item-logo" title="{{ bookmark.subtitle|nl2br }}">
|
||||||
<div class="bookmark-container">
|
{% if bookmark.icon %}
|
||||||
<div class="grid clearfix">
|
<img class="grid-item-img" height="110" src="/{{ alias }}/{{ bookmark.icon.label }}">
|
||||||
<div class="grid-sizer {{ stylegrid }}"></div>
|
{% else %}
|
||||||
<div class="grid-gutter-sizer"></div>
|
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
||||||
{% for bookmark in bookmarks %}
|
{% endif %}
|
||||||
<div class="grid-item {{ stylegrid }}">
|
</div>
|
||||||
<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-title">
|
||||||
<div class="grid-item-logo" title="{{ bookmark.subtitle|nl2br }}">
|
<h2>{{ bookmark.title }}</h2>
|
||||||
{% if bookmark.icon %}
|
<span>{{ bookmark.subtitle|nl2br }}</<span>
|
||||||
<img class="grid-item-img" height="110" src="/{{ alias }}/{{ bookmark.icon.label }}">
|
</div>
|
||||||
{% else %}
|
|
||||||
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
<div class="grid-item-title">
|
</div>
|
||||||
<h2>{{ bookmark.title }}</h2>
|
</div>
|
||||||
<span>{{ bookmark.subtitle|nl2br }}</<span>
|
{% endfor %}
|
||||||
</div>
|
|
||||||
|
{% 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>
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endif %}
|
||||||
|
|
||||||
{% 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>
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
{% endif %}
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,81 +11,95 @@
|
||||||
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
||||||
{% set color = app.session.get('color') %}
|
{% set color = app.session.get('color') %}
|
||||||
|
|
||||||
<style>
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-calendar" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% 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">
|
{% if events|length >= 1 %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||||
{% if canupdate %}
|
{% set monthsel = "" %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
{% for i in 0..(nbday-1) %}
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
{% set dateeventstart = 'now'|date_modify("+"~i~" day midnight") %}
|
||||||
{% endif %}
|
{% set dateeventend = 'now'|date_modify("+"~(i+1)~" day midnight") %}
|
||||||
{% 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 %}
|
|
||||||
|
|
||||||
|
{% 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 %}
|
||||||
|
|
||||||
{% 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>
|
||||||
{% if url is defined %}
|
{% endif %}
|
||||||
<div style="cursor:pointer; text-align: right; margin-top:20px;"><a onClick="showFrameitem('calendar','{{url }}',true)" style="{{ stylewidgetbody }}">Voir mes Agendas</a></div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,39 +28,53 @@
|
||||||
{% if app.user %}
|
{% if app.user %}
|
||||||
<style>.msgtopic a { color: #{{colorbodyfont}}; font-weight: bold; }</style>
|
<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 mini %}
|
||||||
{% if canupdate %}
|
<div class="widget widget-mini widget-chat" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
<div class="widgetmenu">
|
<div class="widgetheader">
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
<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 entity.icon %}
|
{% if entity.icon %}
|
||||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
{% else %}
|
{% 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 %}
|
{% endif %}
|
||||||
<span class="title">{{ entity.name }}</span>
|
</a>
|
||||||
</div>
|
</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 %}
|
{% if onheader %}
|
||||||
{{ render(url('cadoles_websocket_chat',{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont,'colorbody':colorbody,'colormain':colormain})) }}
|
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
||||||
{% endif %}
|
<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>
|
||||||
<iframe src="{{ path(tool,{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont}) }}" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
{% else %}
|
||||||
-->
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
|
{% if entity.icon %}
|
||||||
</div>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||||
{% endif %}
|
{% else %}
|
||||||
</div>
|
<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%}
|
{%endif%}
|
|
@ -10,30 +10,47 @@
|
||||||
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
|
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
|
||||||
{% set stylewidgetbody = constants.mystylewidgetbody(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 mini %}
|
||||||
{% if canupdate %}
|
<div class="widget widget-mini widget-editor" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
<div class="widgetmenu">
|
<div class="widgetheader">
|
||||||
{% if canupdate %}
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
{% if entity.icon %}
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
{% endif %}
|
{% 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>
|
</div>
|
||||||
{% endif %}
|
{% 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>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,31 +28,47 @@
|
||||||
{% set colorbodyfont = color['main'] %}
|
{% set colorbodyfont = color['main'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-file" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if entity.icon %}
|
||||||
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-file" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
|
<div class="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 look=="list" %}
|
||||||
{% if canupdate or canadd %}
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<div class="widgetmenu">
|
{% else %}
|
||||||
{% if canupdate %}
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
{% endif %}
|
||||||
<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 }}">
|
||||||
|
<iframe id="frame-{{directory}}" src="{{ path("cadoles_core_"~access~"_file_list",{'directory':directory,'defaultview':view}) }}" data-color="#{{colorbodyfont}}" style="{{ stylewidgetbodyframe }}" class="{% if not entity.autoajust %}notframeajust {% endif %}"></iframe>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% 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>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,88 +36,106 @@
|
||||||
{% set stylegrid="grid-list" %}
|
{% set stylegrid="grid-list" %}
|
||||||
{% endif %}
|
{% 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 mini %}
|
||||||
{% if canupdate %}
|
<div class="widget widget-mini widget-flux" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
<div class="widgetmenu">
|
<div class="widgetheader">
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
{% if entity.icon %}
|
||||||
</div>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
{% endif %}
|
{% 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 }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
{% if entity.icon %}
|
{% if entity.icon %}
|
||||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||||
{% else %}
|
{% else %}
|
||||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span class="title">{{ entity.name }}</span>
|
<span class="title">{{ entity.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% set firstflux="" %}
|
{% set firstflux="" %}
|
||||||
|
|
||||||
<div class="widgetbody" style="{{ stylewidgetbody }} ">
|
<div class="widgetbody" style="{{ stylewidgetbody }} ">
|
||||||
{% if fluxs is defined %}
|
{% if fluxs is defined %}
|
||||||
{% if fluxs|length > 1 %}
|
{% 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="cat-list-feed" onClick="showFlux({{ entity.id}},'all')" style="color:#{{ color['fontcolorhover'] }}; background-color: #{{ color['main'] }}">Tout</div>
|
||||||
|
|
||||||
{% for flux in fluxs %}
|
{% for flux in fluxs %}
|
||||||
{% set stylefeed = "background-color: #" ~ color['main'] ~ ";" %}
|
{% set stylefeed = "background-color: #" ~ color['main'] ~ ";" %}
|
||||||
{% if flux.color is not null %}
|
{% if flux.color is not null %}
|
||||||
{% set stylefeed = "background-color: #" ~ flux.color ~ ";" %}
|
{% 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 %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="cat-list-feed" onClick="showFlux({{ entity.id}},{{ flux.id }})" style="{{ stylefeed }} color:#{{ color['fontcolorhover'] }};">{{ flux.title }}</div>
|
|
||||||
{% endfor %}
|
{% set stylecolor = "background-color: #" ~ color['main'] ~ ";" %}
|
||||||
{% endif %}
|
{% if feed.color is defined and feed.color is not null %}
|
||||||
{% endif %}
|
{% 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">
|
<div class="grid-item {{ stylegrid }} feed flux-{{ feed.fluxid }}">
|
||||||
{% for feed in feeds %}
|
<div class="grid-item-content" style="{{ stylecolor }};">
|
||||||
{% if loop.index==1 %}
|
<a class="linktosonde" data-sonde="Flux = {{ feed.fluxtitle }}" href="{{ feed.link }}" target="_blank">
|
||||||
<div class="grid-sizer {{stylegrid}}"></div>
|
<div class="item-link clearfix">
|
||||||
<div class="grid-gutter-sizer {{stylegrid}}-gutter-sizer"></div>
|
{% if feed.image is not empty %}
|
||||||
{% endif %}
|
<div class="grid-item-logo">
|
||||||
|
<img class="grid-item-img" src="{{feed.image}}" width="100%">
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="caption" style="{{ stylecolor }};">
|
||||||
{% set stylecolor = "background-color: #" ~ color['main'] ~ ";" %}
|
<div class="grid-item-title">
|
||||||
{% if feed.color is defined and feed.color is not null %}
|
<h2>{{ feed.title }}</h2>
|
||||||
{% set stylecolor = "background-color: #" ~ feed.color ~ ";" %}
|
{% if modelist==0 %}
|
||||||
{% endif %}
|
<small>le {{ feed.date|date("d/m/Y à H:i") }}</small><br>
|
||||||
{% set stylefeed = "" %}
|
{{ feed.description | nl2br }}
|
||||||
{% if feed.image is not null and feed.image != ""%}
|
{% endif %}
|
||||||
{% set stylefeed = stylefeed ~ "background: url(" ~ feed.image ~ ") no-repeat center; background-size: cover;" %}
|
</div>
|
||||||
{% endif %}
|
</div>
|
||||||
|
|
||||||
<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>
|
</div>
|
||||||
{% endif %}
|
</a>
|
||||||
|
</div>
|
||||||
<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>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,36 +23,55 @@
|
||||||
{% set colorbodyfont = color['fontcolorhover'] %}
|
{% set colorbodyfont = color['fontcolorhover'] %}
|
||||||
{% endif %}
|
{% 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 mini %}
|
||||||
{% if canupdate %}
|
<div class="widget widget-mini widget-frame" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
<div class="widgetmenu">
|
<div class="widgetheader">
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
<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 entity.icon %}
|
{% if entity.icon %}
|
||||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
{% else %}
|
{% 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 %}
|
{% endif %}
|
||||||
<span class="title">{{ entity.name }}</span>
|
</a>
|
||||||
</div>
|
</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 }}">
|
{% if look=="list" %}
|
||||||
<iframe id="frame-{{directory}}" src="{{ path(tool) }}" data-color="#{{colorbodyfont}}" style="{{ stylewidgetbodyframe }}" class="{% if not entity.autoajust %}notframeajust {% endif %}"></iframe>
|
<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>
|
||||||
{% 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'] %}
|
{% set colorbodyfont = color['fontcolorhover'] %}
|
||||||
{% endif %}
|
{% 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 mini %}
|
||||||
{% if canupdate or canadd %}
|
<div class="widget widget-mini widget-galery" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
<div class="widgetmenu">
|
<div class="widgetheader">
|
||||||
{% if canupdate %}
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
{% if entity.icon %}
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
{% endif %}
|
{% 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 %}
|
{% if canadd %}
|
||||||
<a style="{{ stylewidgetmenu }}" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Fichiers','{{ path('cadoles_core_'~access~'_file_upload',{'id': 'widget-'~entity.id,'type':'image'}) }}');" title='Ajouter des Images'><i class="fa fa-plus fa-fw"></i></a>
|
<a style="{{ stylewidgetmenu }}" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Fichiers','{{ path('cadoles_core_'~access~'_file_upload',{'id': 'widget-'~entity.id,'type':'image'}) }}');" title='Ajouter des Images'><i class="fa fa-plus fa-fw"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
{% if entity.icon %}
|
{% if entity.icon %}
|
||||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||||
{% else %}
|
{% else %}
|
||||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span class="title">{{ entity.name }}</span>
|
<span class="title">{{ entity.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if files|length>0 or canupdate %}
|
{% if files|length>0 or canupdate %}
|
||||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||||
<div class="grid clearfix">
|
<div class="grid clearfix">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<div class="grid-sizer grid-image"></div>
|
<div class="grid-sizer grid-image"></div>
|
||||||
<div class="grid-gutter-sizer"></div>
|
<div class="grid-gutter-sizer"></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for file in files|sort %}
|
{% for file in files|sort %}
|
||||||
{% if loop.index==1 and not canupdate %}
|
{% if loop.index==1 and not canupdate %}
|
||||||
<div class="grid-sizer grid-image"></div>
|
<div class="grid-sizer grid-image"></div>
|
||||||
<div class="grid-gutter-sizer grid-gutter-sizer-image"></div>
|
<div class="grid-gutter-sizer grid-gutter-sizer-image"></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="grid-item grid-image">
|
<div class="grid-item grid-image">
|
||||||
<div class="grid-item-content">
|
<div class="grid-item-content">
|
||||||
{% if canadd %}
|
{% 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>
|
<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 %}
|
{% 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="item-link clearfix">
|
||||||
<div class="grid-item-logo">
|
<div class="grid-item-logo">
|
||||||
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" />
|
<img class="grid-item-img" height="110" src="{{ file.thumb }}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-item-title">
|
|
||||||
<h2 style="{{ stylewidgetbodyreverse }}">Ajouter des Images</h2>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endfor %}
|
||||||
{% endif %}
|
|
||||||
|
{% 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>
|
||||||
</div>
|
{% endif %}
|
||||||
{% endif %}
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,83 +18,99 @@
|
||||||
{% set canadd = true %}
|
{% set canadd = true %}
|
||||||
{% endif %}
|
{% 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 mini %}
|
||||||
{% if canupdate %}
|
<div class="widget widget-mini widget-group" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
<div class="widgetmenu">
|
<div class="widgetheader">
|
||||||
{% if canupdate %}
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
{% if entity.icon %}
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
{% endif %}
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
{% if canadd %}
|
{% endif %}
|
||||||
<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>
|
</a>
|
||||||
{% endif %}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% 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">
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
{% if canupdate %}
|
||||||
{% if entity.icon %}
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% else %}
|
{% endif %}
|
||||||
<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 %}
|
{% if canadd %}
|
||||||
<div class="grid-item grid-small">
|
<a title="Ajouter un Groupe" href="{{ path('cadoles_core_user_group_submit') }}" target="_top">
|
||||||
<div class="grid-item-content" style="{{ stylewidgetbodyreverse }};">
|
<i class="fa fa-plus fa-fw" style="{{ stylewidgetmenu }}"></i>
|
||||||
<a title="Ajouter un Groupe" href="{{path('cadoles_core_user_group_submit')}}" target="_top" style="{{ stylewidgetbodyreverse }};">
|
</a>
|
||||||
<div class="item-link clearfix">
|
{% endif %}
|
||||||
|
|
||||||
<div class="grid-item-logo">
|
{% if look=="list" %}
|
||||||
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png" />
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
</div>
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
<div class="grid-item-title">
|
</div>
|
||||||
<h2>Ajouter un Groupe</h2>
|
|
||||||
</div>
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
</div>
|
{% if entity.icon %}
|
||||||
</a>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||||
</div>
|
{% else %}
|
||||||
</div>
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||||
{% endif %}
|
{% 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>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -38,63 +38,84 @@
|
||||||
{% set stylegrid="grid-list" %}
|
{% set stylegrid="grid-list" %}
|
||||||
{% endif %}
|
{% 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 mini %}
|
||||||
{% if canupdate %}
|
<div class="widget widget-mini widget-groupmessage" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
<div class="widgetmenu">
|
<div class="widgetheader">
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
{% if entity.icon %}
|
||||||
</div>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
{% endif %}
|
{% 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 }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
{% if entity.icon %}
|
{% if entity.icon %}
|
||||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||||
{% else %}
|
{% else %}
|
||||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span class="title">{{ entity.name }}</span>
|
<span class="title">{{ entity.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{% if messages is not empty %}
|
{% if messages is not empty %}
|
||||||
<div class="widgetbody" style="{{ stylewidgetbody }} ">
|
<div class="widgetbody" style="{{ stylewidgetbody }} ">
|
||||||
<div class="grid clearfix">
|
<div class="grid clearfix">
|
||||||
<div class="grid-sizer {{stylegrid}}"></div>
|
<div class="grid-sizer {{stylegrid}}"></div>
|
||||||
<div class="grid-gutter-sizer {{stylegrid}}-gutter-sizer"></div>
|
<div class="grid-gutter-sizer {{stylegrid}}-gutter-sizer"></div>
|
||||||
{% set nbaff=0 %}
|
{% set nbaff=0 %}
|
||||||
{% for message in messages %}
|
{% for message in messages %}
|
||||||
{% set nbaff=nbaff+1 %}
|
{% set nbaff=nbaff+1 %}
|
||||||
{% set class="" %}
|
{% set class="" %}
|
||||||
{% set style="" %}
|
{% set style="" %}
|
||||||
{% if nbaff > nbarticle %}
|
{% if nbaff > nbarticle %}
|
||||||
{% set class="msg-hidden" %}
|
{% set class="msg-hidden" %}
|
||||||
{% set style="display:none" %}
|
{% set style="display:none" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="grid-item {{ stylegrid }} msg-{{ message.id }} {{class}}" style="{{ stylewidgetbodyreverse }}; {{style}};">
|
<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="grid-item-content" style="background-color:{{ message.color ? "#"~message.color : '#'~colormain }}">
|
||||||
<div class="item-link clearfix">
|
<div class="item-link clearfix">
|
||||||
<div class="grid-item-logo">
|
<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%">
|
<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>
|
<a onClick="hideMessage({{message.id}})" style="cursor:pointer;" title="Ne plus afficher"><i class="fa fa-eye-slash"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
<div class="grid-item-title" style="position:inherit; width:85%">
|
<div class="grid-item-title" style="position:inherit; width:85%">
|
||||||
{{message.user.lastname}} {{message.user.firstname}}<br>
|
{{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>
|
<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 }}
|
{{ message.topic | raw }}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endfor %}
|
||||||
{% endfor %}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,89 +19,103 @@
|
||||||
{% set stylelink = "color:#" ~ color['fontcolorhover'] %}
|
{% set stylelink = "color:#" ~ color['fontcolorhover'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
|
<div class="widget widget-mini widget-info" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
|
<div class="widgetheader">
|
||||||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
|
{% if icon %}
|
||||||
|
{% if icon=="/uploads/avatar/noavatar.png" %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_profle.png" class="logo" title="{{ title }}"/>
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}{{ icon }}" class="logo" title="{{ title }}"/>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_users.png" class="logo" title="{{ title }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-info" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
|
<div class="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 look=="list" %}
|
||||||
{% if canupdate %}
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<div class="widgetmenu">
|
{% else %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ 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>
|
||||||
{% 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>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="grid-item-title">
|
|
||||||
<h2 style="{{ stylewidgetbodyreverse }};">Ajouter un membre</h2>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% for member in members %}
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
<div class="grid-item grid-verysmall" style="{{ stylewidgetbodyreverse }};">
|
{% if icon %}
|
||||||
<div class="grid-item-content">
|
<img src="/{{ alias }}{{ icon }}" class="logo" />
|
||||||
<div class="item-link clearfix">
|
{% else %}
|
||||||
<div class="grid-item-logo">
|
<img src="/{{ alias }}/uploads/icon/icon_users.png" class="logo"/>
|
||||||
<img onclick="seeUser({{member.user.id}})" src="/{{ alias }}/uploads/avatar/{{ member.user.avatar}}" class="grid-item-img avatar" height="110" style="cursor:pointer;">
|
{% endif %}
|
||||||
</div>
|
<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">
|
<div class="grid-item-title">
|
||||||
<h2 style="{{ stylewidgetbodyreverse }};">
|
<h2 style="{{ stylewidgetbodyreverse }};">Ajouter un membre</h2>
|
||||||
{{ member.user.lastname }} {{ member.user.firstname }}
|
</div>
|
||||||
{% if member.fgmanager %}
|
</div>
|
||||||
<br><i class="fa fa-star"></i>
|
</a>
|
||||||
{% endif %}
|
</div>
|
||||||
</h2>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endfor %}
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,266 +33,282 @@
|
||||||
{% set username = "" %}
|
{% set username = "" %}
|
||||||
{% endif %}
|
{% 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 mini %}
|
||||||
{% if canupdate or canadd %}
|
<div class="widget widget-mini widget-project" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
<div class="widgetmenu">
|
<div class="widgetheader">
|
||||||
{% if canupdate %}
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
{% if entity.icon %}
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
{% endif %}
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
{% if canadd and access!="config"%}
|
{% endif %}
|
||||||
<i class="fa fa-plus fa-fw" title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},true)" style="{{ stylewidgetmenu }}"></i>
|
</a>
|
||||||
{% endif %}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% 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">
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
{% if canupdate %}
|
||||||
{% if entity.icon %}
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% 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>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if bookmarks is not empty %}
|
{% if canadd and access!="config"%}
|
||||||
<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>
|
<i class="fa fa-plus fa-fw" title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},true)" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for itemcategory in mycategs %}
|
{% if look=="list" %}
|
||||||
<div class="cat-list-feed" onClick="showItemCat({{ entity.id}},{{itemcategory.id}})" style="color:#{{ color['fontcolorhover'] }}; background-color: #{{ color['main'] }}">{{itemcategory.label}}</div>
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endfor %}
|
{% else %}
|
||||||
{% endif %}
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
{% if search %}
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
<div class="input-group">
|
{% if entity.icon %}
|
||||||
<span class="input-group-addon" id="basic-addon1"><i class="fa fa-search"></i></span>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||||
<input onKeyup="searchItem({{ entity.id}},$(this).val());" type="text" id="searchitems" name="searchitems" class="form-control" placeholder="Recherche" aria-describedby="basic-addon1">
|
{% else %}
|
||||||
</div>
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||||
{% endif %}
|
{% 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="widgetbody" style="{{ stylewidgetbody }}">
|
||||||
<div class="bookmark-container">
|
{% set mycategs = [] %}
|
||||||
{% if items is not empty %}
|
{% for itemcategory in itemcategorys %}
|
||||||
<h3 class="grid-title bookmark-container" data-idcategory="bookmark" style="{{ colorbodyfont }}">Favoris</h3>
|
{% set haveitem=false %}
|
||||||
{% 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' %}
|
{% for item in items if item.itemcategory==itemcategory %}
|
||||||
<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">
|
{% if loop.index ==1 %}
|
||||||
<div class="grid-item-logo" title="{{ bookmark.item.subtitle|nl2br }}">
|
{% set mycategs = mycategs|merge({ (loop.index) : itemcategory}) %}
|
||||||
{% 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 %}
|
{% endif %}
|
||||||
</div>
|
{% endfor %}
|
||||||
</div>
|
{% endfor %}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
{% set firstcat=true %}
|
{% if menu %}
|
||||||
{% for itemcategory in mycategs %}
|
{% if menuall %}
|
||||||
{% set haveitem=false %}
|
<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 %}
|
{% for itemcategory in mycategs %}
|
||||||
{% set haveitem=true %}
|
<div class="cat-list-feed" onClick="showItemCat({{ entity.id}},{{itemcategory.id}})" style="color:#{{ color['fontcolorhover'] }}; background-color: #{{ color['main'] }}">{{itemcategory.label}}</div>
|
||||||
|
{% endfor %}
|
||||||
{% if (bookmarks is not empty or (canadd and access!="config")) and (withbookmark==0 or withbookmark==2) %}
|
{% endif %}
|
||||||
{% set toview=true %}
|
|
||||||
{% if menu and not menuall%}
|
{% if search %}
|
||||||
{% set toview=false %}
|
<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 %}
|
{% endif %}
|
||||||
{% else %}
|
</div>
|
||||||
{% if menu and not menuall%}
|
</div>
|
||||||
{% if firstcat %}
|
{% endif %}
|
||||||
{% set toview=true %}
|
|
||||||
{% else %}
|
|
||||||
|
{% 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 %}
|
{% set toview=false %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set toview=true %}
|
{% if menu and not menuall%}
|
||||||
{% endif %}
|
{% if firstcat %}
|
||||||
{% endif %}
|
{% set toview=true %}
|
||||||
{% 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 %}">
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url|replace({'#login#': username}) }}" target="{{ item.target }}">
|
{% set toview=false %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
{% set toview=true %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% set firstcat=false %}
|
||||||
|
|
||||||
<div class="item-link clearfix">
|
{% set style="" %}
|
||||||
<div class="grid-item-logo" title="{{ item.subtitle|nl2br }}">
|
{% if not toview %}
|
||||||
{% if item.icon %}
|
{% set style="display:none;" %}
|
||||||
<img class="grid-item-img" height="110" src="/{{ alias }}/{{ item.icon.label }}">
|
{% 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 %}
|
{% 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 %}
|
||||||
|
{% 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>
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
<div class="grid-item-title">
|
<div class="grid-item-body" style="display:none">
|
||||||
<h2>{{ item.title }}</h2>
|
{{ item.content|raw }}
|
||||||
<span>{{ item.subtitle|nl2br }}</<span>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<div class="grid-item-body" style="display:none">
|
|
||||||
{{ item.content|raw }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% if haveitem %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if haveitem %}
|
</div>
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,187 +33,203 @@
|
||||||
{% set username = "" %}
|
{% set username = "" %}
|
||||||
{% endif %}
|
{% 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 mini %}
|
||||||
{% if canupdate or canadd %}
|
<div class="widget widget-mini widget-itemessential" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
<div class="widgetmenu">
|
<div class="widgetheader">
|
||||||
{% if canupdate %}
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
{% if entity.icon %}
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
{% endif %}
|
{% else %}
|
||||||
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
{% if canadd and access!="config"%}
|
{% endif %}
|
||||||
<a title="Ajouter une Application" href="{{ path('cadoles_portal_user_page_application') }}">
|
|
||||||
<i class="fa fa-plus fa-fw" style="{{ stylewidgetmenu }}"></i>
|
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% 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 }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
{% if entity.icon %}
|
{% if entity.icon %}
|
||||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
||||||
{% else %}
|
{% else %}
|
||||||
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span class="title">{{ entity.name }}</span>
|
<span class="title">{{ entity.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if canadd or bookmarks is not empty or items is not empty %}
|
{% if canadd or bookmarks is not empty or items is not empty %}
|
||||||
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
||||||
<div class="grid clearfix">
|
<div class="grid clearfix">
|
||||||
<div class="grid-sizer {{ stylegrid }}"></div>
|
<div class="grid-sizer {{ stylegrid }}"></div>
|
||||||
<div class="grid-gutter-sizer"></div>
|
<div class="grid-gutter-sizer"></div>
|
||||||
|
|
||||||
{% for bookmark in bookmarks %}
|
{% for bookmark in bookmarks %}
|
||||||
{% if bookmark.item %}
|
{% if bookmark.item %}
|
||||||
<div class="grid-item {{ stylegrid }}" data-idcategory="bookmark" data-title="{{ bookmark.item.title|lower }}">
|
<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 }};">
|
<div class="grid-item-content" style="background-color: {{ bookmark.color ? "#"~bookmark.color : '#'~colormain }};">
|
||||||
{% if bookmark.item.content %}
|
{% 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>
|
<a style="cursor:pointer" class="item-preview"><i style="color: #FFF" class="fa fa-info" title="Informations sur ce service"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if canadd %}
|
{% 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 %}
|
{% endif %}
|
||||||
|
|
||||||
{% if bookmark.item.target == 'frame' %}
|
{% if item.protected and not app.user %}
|
||||||
<a class="linktosonde" data-sonde="{{ bookmark.item.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.item.id }}','{{ bookmark.item.url|replace({'#login#': username}) }}')">
|
{% if mode_auth == "SAML" %}
|
||||||
{% elseif bookmark.target == "_self" %}
|
<a href="{{ path('lightsaml_sp.login') }}" {% if access=="user" %}target="_top"{% endif %}>
|
||||||
<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 %}">
|
{% 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 %}
|
{% 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 %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="item-link clearfix">
|
<div class="item-link clearfix">
|
||||||
<div class="grid-item-logo" title="{{ bookmark.item.subtitle|nl2br }}">
|
<div class="grid-item-logo" title="{{ item.subtitle|nl2br }}">
|
||||||
{% if bookmark.item.icon %}
|
{% if item.icon %}
|
||||||
<img class="grid-item-img" src="/{{ alias }}/{{ bookmark.item.icon.label }}">
|
<img class="grid-item-img" height="110" src="/{{ alias }}/{{ 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 %}
|
{% else %}
|
||||||
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_pin.png">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-item-title">
|
<div class="grid-item-title">
|
||||||
<h2>{{ bookmark.title }}</h2>
|
<h2>{{ item.title }}</h2>
|
||||||
<span>{{ bookmark.subtitle|nl2br }}</<span>
|
<span>{{ item.subtitle|nl2br }}</<span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{%endif%}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
|
<div class="grid-item-body" style="display:none">
|
||||||
{% for item in items %}
|
{{ item.content|raw }}
|
||||||
<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>
|
</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>
|
</div>
|
||||||
</div>
|
{% endfor %}
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% if canadd %}
|
{% if canadd %}
|
||||||
<div class="grid-item {{ stylegrid }}">
|
<div class="grid-item {{ stylegrid }}">
|
||||||
<div class="grid-item-content" style="background-color: #{{colormain}};cursor:pointer;">
|
<div class="grid-item-content" style="background-color: #{{colormain}};cursor:pointer;">
|
||||||
<a title="Ajouter une Application" href="{{ path('cadoles_portal_user_page_application') }}">
|
<a title="Ajouter une Application" href="{{ path('cadoles_portal_user_page_application') }}">
|
||||||
<div class="item-link clearfix">
|
<div class="item-link clearfix">
|
||||||
<div class="grid-item-logo">
|
<div class="grid-item-logo">
|
||||||
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png">
|
<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>
|
||||||
<div class="grid-item-title">
|
</a>
|
||||||
<h2>Ajouter</h2>
|
</div>
|
||||||
<span>Ajouter une Application</<span>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,36 +24,53 @@
|
||||||
{% set username = "" %}
|
{% set username = "" %}
|
||||||
{% endif %}
|
{% 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 mini %}
|
||||||
{% if canupdate %}
|
<div class="widget widget-mini widget-link" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
<div class="widgetmenu">
|
<div class="widgetheader">
|
||||||
{% if canupdate %}
|
{% if target == 'frame' %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<a class="linktosonde" data-sonde="{{ entity.name }}" style="cursor:pointer; {{ stylelink }}" onClick="showFrameitem('link{{ entity.id }}','{{ url|replace({'#login#': username}) }}')">
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
{% elseif target == "_self" %}
|
||||||
{% endif %}
|
<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>
|
</div>
|
||||||
{% endif %}
|
{% 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>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,33 +28,49 @@
|
||||||
{% set colorbodyfont = color['main'] %}
|
{% set colorbodyfont = color['main'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if mini %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-file" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget widget-mini widget-onlydoc" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
{% if canupdate or canadd %}
|
<div class="widgetheader">
|
||||||
<div class="widgetmenu">
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
{% if canupdate %}
|
{% if entity.icon %}
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
{% else %}
|
||||||
{% endif %}
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
</div>
|
{% endif %}
|
||||||
{% endif %}
|
</a>
|
||||||
|
|
||||||
|
|
||||||
<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>
|
||||||
</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>
|
</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">
|
{%if mini %}
|
||||||
<div class="widgetmenu">
|
<div class="widget widget-mini widget-project" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
{% if canupdate %}
|
<div class="widgetheader">
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
{% if entity.icon %}
|
||||||
{% endif %}
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
|
{% else %}
|
||||||
{% if access=="config" %}
|
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||||||
<a href='{{ path('cadoles_portal_config_project') }}' style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
|
{% endif %}
|
||||||
{% else %}
|
</a>
|
||||||
{% 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>
|
|
||||||
</div>
|
</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'] %}
|
{% set colorbodyfont = color['main'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%if not mini %}
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-separator" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-separator" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
|
@ -54,6 +55,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
|
@ -23,56 +23,72 @@
|
||||||
{% set username = "" %}
|
{% set username = "" %}
|
||||||
{% endif %}
|
{% 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 mini %}
|
||||||
{% if canupdate or canadd %}
|
<div class="widget widget-mini widget-slide" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
<div class="widgetmenu">
|
<div class="widgetheader">
|
||||||
{% if canupdate %}
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
{% if entity.icon %}
|
||||||
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
{% endif %}
|
{% 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 %}
|
{% if canadd %}
|
||||||
<i title="Gérer le Carrousel" class="fa fa-th fa-fw" onClick="listSlide({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<i title="Gérer le Carrousel" class="fa fa-th fa-fw" onClick="listSlide({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
{% if look=="list" %}
|
||||||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
||||||
{% set intervalmilli = interval * 1000 %}
|
{% set intervalmilli = interval * 1000 %}
|
||||||
<div class="slick" data-slick='{"autoplaySpeed": {{ intervalmilli }} }'>
|
<div class="slick" data-slick='{"autoplaySpeed": {{ intervalmilli }} }'>
|
||||||
{% for slide in slides %}
|
{% for slide in slides %}
|
||||||
<div style="background-image:url(/{{ alias }}/{{ slide.image }}); ">
|
<div style="background-image:url(/{{ alias }}/{{ slide.image }}); ">
|
||||||
|
|
||||||
{% if slide.title is not empty %}
|
{% if slide.title is not empty %}
|
||||||
<h1 class="slicktitle" style="{{ stylelink }}">{{slide.title}}</h1>
|
<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 }}">
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<i class="fa fa-link"></i></a>
|
{% if slide.url is not empty %}
|
||||||
{% endif %}
|
{% 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 %}
|
<i class="fa fa-link"></i></a>
|
||||||
<span class="slicksubtitle" style="{{ stylelink }}">{{slide.subtitle}}</span>
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
|
{% if slide.subtitle is not empty %}
|
||||||
|
<span class="slicksubtitle" style="{{ stylelink }}">{{slide.subtitle}}</span>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,46 +17,69 @@
|
||||||
{% set username = "" %}
|
{% set username = "" %}
|
||||||
{% endif %}
|
{% 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 mini %}
|
||||||
{% if canupdate %}
|
<div class="widget widget-mini widget-project" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||||||
<div class="widgetmenu">
|
<div class="widgetheader">
|
||||||
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||||||
<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 entity.icon %}
|
{% if entity.icon %}
|
||||||
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||||||
{% else %}
|
{% 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 %}
|
{% 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>
|
<span class="title">{{ entity.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="widgetbody" style="{{ stylewidgetbodyframe }}">
|
<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>
|
</div>
|
||||||
{% else %}
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }} width:100%; background-image: url({{ url|replace({'#login#': username}) }}); background-size:cover; background-position:center;")></div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
</div>
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
{% endif %}
|
||||||
{% 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>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue