resolution merge

This commit is contained in:
Arnaud Fornerot 2020-07-17 16:08:06 +02:00
commit 87ef7fb6c7
18 changed files with 322 additions and 169 deletions

View File

@ -347,6 +347,12 @@ class User implements UserInterface, \Serializable
*/
protected $messagesees;
/**
* @ORM\ManyToMany(targetEntity="Cadoles\PortalBundle\Entity\Alert", mappedBy="readers")
*/
protected $alertreaders;
//== CODE A NE PAS REGENERER
/**
* @ORM\PostLoad
@ -1883,4 +1889,38 @@ class User implements UserInterface, \Serializable
{
return $this->niveau01other;
}
/**
* Add alertreader
*
* @param \Cadoles\PortalBundle\Entity\Alert $alertreader
*
* @return User
*/
public function addAlertreader(\Cadoles\PortalBundle\Entity\Alert $alertreader)
{
$this->alertreaders[] = $alertreader;
return $this;
}
/**
* Remove alertreader
*
* @param \Cadoles\PortalBundle\Entity\Alert $alertreader
*/
public function removeAlertreader(\Cadoles\PortalBundle\Entity\Alert $alertreader)
{
$this->alertreaders->removeElement($alertreader);
}
/**
* Get alertreaders
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getAlertreaders()
{
return $this->alertreaders;
}
}

View File

@ -126,6 +126,14 @@ class AlertController extends Controller
$em = $this->getDoctrine()->getManager();
$data = $form->getData();
// Si non masquable on s'assure qu'il n'y a pas de reader
if(!$data->getFghideable()) {
$readers=$data->getReaders();
foreach($readers as $reader) {
$data->removeReader($reader);
}
}
// Sauvegarde
$em->persist($data);
$em->flush();
@ -187,6 +195,27 @@ class AlertController extends Controller
return $response;
}
public function readAction(Request $request) {
$output=array();
$id=$request->request->get('id');
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository($this->labelentity)->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find entity.');
}
if(!$entity->getReaders()->contains($this->getUser())) {
$entity->addReader($this->getUser());
$em->persist($entity);
$em->flush();
}
$response = new Response(json_encode($output));
$response->headers->set('Content-Type', 'application/json');
return $response;
}
protected function getDatas()
{
$em = $this->getDoctrine()->getManager();

View File

@ -32,7 +32,7 @@ class IconController extends Controller
return $this->render($this->labelentity.':list.html.twig',[
'useheader' => !($inframe),
'usemenu' => false,
'usesidebar' => ($access=="config"),
'usesidebar' => ($access=="config"&&!$inframe),
'access' => $access,
$this->labeldatas => $icons,
'inframe' => $inframe
@ -74,7 +74,7 @@ class IconController extends Controller
return $this->render($this->labelentity.':edit.html.twig', [
'useheader' => !($inframe),
'usemenu' => false,
'usesidebar' => ($access=="config"),
'usesidebar' => ($access=="config"&&!$inframe),
'access' => $access,
$this->labeldata => $data,
'mode' => 'submit',
@ -119,7 +119,7 @@ class IconController extends Controller
return $this->render($this->labelentity.':edit.html.twig', [
'useheader' => !($inframe),
'usemenu' => false,
'usesidebar' => ($access=="config"),
'usesidebar' => ($access=="config"&&!$inframe),
'access' => $access,
$this->labeldata => $data,
'mode' => 'update',

View File

@ -804,7 +804,7 @@ class PagewidgetController extends Controller
}
$alertsroles=$qb->getQuery()->getResult();
foreach($alertsroles as $alertrole) {
if(!$alerts->contains($alertrole)) $alerts->add($alertrole);
if(!$alerts->contains($alertrole)&&!$alertrole->getReaders()->contains($this->getUser())) $alerts->add($alertrole);
}
}
@ -826,8 +826,8 @@ class PagewidgetController extends Controller
->setParameter("alertcategory",$alertcategoryfilter);
}
$alertsniveau01s=$qb->getQuery()->getResult();
foreach($alertsniveau01s as $alertsniveau01) {
if(!$alerts->contains($alertsniveau01s)) $alerts->add($alertsniveau01);
foreach($alertsniveau01s as $alertniveau01) {
if(!$alerts->contains($alertniveau01)&&!$alertniveau01->getReaders()->contains($this->getUser())) $alerts->add($alertniveau01);
}
// Récupération des alerts par group
@ -850,7 +850,7 @@ class PagewidgetController extends Controller
}
$alertsgroups=$qb->getQuery()->getResult();
foreach($alertsgroups as $alertgroup) {
if(!$alerts->contains($alertgroup)) $alerts->add($alertgroup);
if(!$alerts->contains($alertgroup)&&!$alertgroup->getReaders()->contains($this->getUser())) $alerts->add($alertgroup);
}
}

View File

@ -60,6 +60,11 @@ class Alert
*/
protected $unpublishedat;
/**
* @ORM\Column(name="fghideable", type="boolean")
*/
private $fghideable;
/**
* @var string
*
@ -91,6 +96,14 @@ class Alert
*/
protected $niveau01s;
/**
* @ORM\ManyToMany(targetEntity="Cadoles\CoreBundle\Entity\User", inversedBy="alertreaders", cascade={"persist"})
* @ORM\JoinTable(name="alertuserread",
* joinColumns={@ORM\JoinColumn(name="alert", referencedColumnName="id")},
* inverseJoinColumns={@ORM\JoinColumn(name="user", referencedColumnName="id")}
* )
*/
protected $readers;
// Is Online
public function isOnline()
@ -390,4 +403,62 @@ class Alert
{
return $this->niveau01s;
}
/**
* Set fghideable
*
* @param boolean $fghideable
*
* @return Alert
*/
public function setFghideable($fghideable)
{
$this->fghideable = $fghideable;
return $this;
}
/**
* Get fghideable
*
* @return boolean
*/
public function getFghideable()
{
return $this->fghideable;
}
/**
* Add reader
*
* @param \Cadoles\CoreBundle\Entity\User $reader
*
* @return Alert
*/
public function addReader(\Cadoles\CoreBundle\Entity\User $reader)
{
$this->readers[] = $reader;
return $this;
}
/**
* Remove reader
*
* @param \Cadoles\CoreBundle\Entity\User $reader
*/
public function removeReader(\Cadoles\CoreBundle\Entity\User $reader)
{
$this->readers->removeElement($reader);
}
/**
* Get readers
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getReaders()
{
return $this->readers;
}
}

View File

@ -27,6 +27,11 @@ class Icon
*/
private $label;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $tags;
/**
* @ORM\ManyToOne(targetEntity="Cadoles\CoreBundle\Entity\User", inversedBy="icons")
* @ORM\JoinColumn(nullable=true)
@ -398,4 +403,28 @@ class Icon
{
return $this->groups;
}
/**
* Set tags
*
* @param string $tags
*
* @return Icon
*/
public function setTags($tags)
{
$this->tags = $tags;
return $this;
}
/**
* Get tags
*
* @return string
*/
public function getTags()
{
return $this->tags;
}
}

View File

@ -36,6 +36,11 @@ class AlertType extends AbstractType
"config" => array("height" => "500px")
])
->add("fghideable",ChoiceType::class,[
"label" =>"Permettre aux utilisateurs de masquer l'annonce",
"choices" => ["non"=>"0","oui"=>"1"]
])
->add('alertcategory', EntityType::class, [
'label' => 'Catégorie',
'class' => 'CadolesPortalBundle:Alertcategory',

View File

@ -34,6 +34,11 @@ class IconType extends AbstractType
"disabled" => ($options["mode"]=="delete"?true:false)
)
);
$builder->add('tags', TextType::class, [
'label' => 'Tags',
'required' => false
]);
}
public function configureOptions(OptionsResolver $resolver)

View File

@ -163,6 +163,9 @@ cadoles_portal_config_ajax_alert_seleclist:
path: /config/alert/ajax/selectlist
defaults: { _controller: CadolesPortalBundle:Alert:ajaxseleclist }
cadoles_portal_user_alert_read:
path: /user/alert/read
defaults: { _controller: CadolesPortalBundle:Alert:read }
#== ALERT CATEGORY =======================================================================================================================================

View File

@ -46,6 +46,7 @@
<div class="form-group row clearfix">
<div class="col-md-8">
{{ form_row(form.title) }}
{{ form_row(form.fghideable) }}
</div>
<div class="col-md-4">
{{ form_row(form.alertcategory) }}

View File

@ -57,49 +57,31 @@
<div class="col-md-12" style="text-align:center;padding:0px">
{{ form_row(form.idicon) }}
<a class="btn btn-success" data-toggle="modal" data-target="#selicon" title='Ajouter' style="width:100%">Selectionner une Icône</a>
<a class="btn btn-success" onClick="selectIcon()" title='Ajouter' style="width:100%">Selectionner une Icône</a>
<a class="btn btn-danger" onClick="delIcon()" title='Détacher' style="width:100%">Détacher l'Icône</a>
</div>
</div>
</div>
<div id="selicon" class="modal fade bs-item-modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">SELECTIONNER UNE ICONE</h4>
</div>
<div class="modal-body">
<div class="form-group row clearfix">
<div class="col-md-12" style="margin-bottom:15px">
<a onclick="$('#selicon').modal('hide');" class="btn btn-default">Annuler</a>
</div>
<div class="col-md-12">
{% for icon in icons %}
<a href="#" onClick="selIcon({{ icon.id }})">
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px; margin-bottom:2px; background-color: #{{ color["main"]}}">
</a>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localjavascript %}
function selIcon(idicon) {
function selIcon(idicon,label) {
$("#alertcategory_idicon").val(idicon);
$("#diviconsel img").remove();
$("#icon-"+idicon).clone().appendTo($("#diviconsel"));
url="/{{ alias }}/"+label;
$("#diviconsel").append("<img src='"+url+"'>");
$("#diviconsel img").attr("height","100px");
$('#selicon').modal('hide');
$("#mymodal").modal("hide");
}
function selectIcon() {
$("#mymodal").find(".modal-title").html("SELECTIONNER UNE ICONE");
var url="{{ path('cadoles_portal_config_icon_select') }}";
$("#mymodal").find("#framemodal").attr("src",url);
$("#mymodal").modal("show");
}
function delIcon() {

View File

@ -69,51 +69,11 @@
<div class="col-md-12" style="text-align:center;padding:0px">
{{ form_row(form.idicon) }}
<a class="btn btn-success" data-toggle="modal" data-target="#selicon" title='Ajouter' style="width:100%">Selectionner une Icône</a>
<a class="btn btn-success" onClick="selectIcon()" title='Ajouter' style="width:100%">Selectionner une Icône</a>
<a class="btn btn-danger" onClick="delIcon()" title='Détacher' style="width:100%">Détacher l'Icône</a>
</div>
</div>
</div>
<div id="selicon" class="modal fade bs-item-modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">SELECTIONNER UNE ICONE</h4>
</div>
<div class="modal-body">
<div class="form-group row clearfix">
<div class="col-md-12" style="margin-bottom:15px">
<a onclick="$('#selicon').modal('hide');" class="btn btn-default">Annuler</a>
{% if access=="user" %}
<a href="{{ path('cadoles_portal_user_icon') }}" target="_parent" class="btn btn-default">Gérer mes Icônes</a>
{% endif %}
</div>
<div class="col-md-12">
{% if iconsuser is not empty %}
<h3>Mes Icônes</h3>
{% for icon in iconsuser %}
<a style="cursor:pointer" onClick="selIcon({{ icon.id }})">
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px">
</a>
{% endfor %}
<h3>Icônes Communs</h3>
{% endif %}
{% for icon in icons %}
<a style="cursor:pointer" onClick="selIcon({{ icon.id }})">
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px">
</a>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
{{ form_end(form) }}
{% endblock %}
@ -126,13 +86,21 @@
showhide();
});
function selIcon(idicon) {
function selIcon(idicon,label) {
$("#bookmark_idicon").val(idicon);
$("#diviconsel img").remove();
$("#icon-"+idicon).clone().appendTo($("#diviconsel"));
url="/{{ alias }}/"+label;
$("#diviconsel").append("<img src='"+url+"'>");
$("#diviconsel img").attr("height","100px");
$('#selicon').modal('hide');
$("#mymodal").modal("hide");
}
function selectIcon() {
$("#mymodal").find(".modal-title").html("SELECTIONNER UNE ICONE");
var url="{{ path('cadoles_portal_user_icon_select') }}";
$("#mymodal").find("#framemodal").attr("src",url);
$("#mymodal").modal("show");
}
function delIcon() {

View File

@ -53,6 +53,13 @@
{{ form_widget(form.label) }}
<a class="btn btn-info" style="width:90px" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Icône','{{ path('cadoles_portal_'~access~'_icon_icon') }}');" title='Ajouter un Logo'>Modifier</a>
</div>
<div style="width:200px; margin: 10px auto;text-align:center;">
Privilégiez des images carrées de minimum 90px par 90px et avec un fond transparent
</div>
{{ form_row(form.tags) }}
</div>
</div>
{{ form_end(form) }}

View File

@ -2,31 +2,73 @@
{% block pagewrapper %}
<div class="row">
<div class="col-md-12" style="margin-bottom:15px">
<a onclick="window.parent.$('#mymodal').modal('hide');" class="btn btn-default">Fermer</a>
{% if access=="user" %}
<a href="{{ path('cadoles_portal_user_icon',{'inframe':true}) }}" class="btn btn-default">Gérer mes Icônes</a>
{% else %}
<a href="{{ path('cadoles_portal_config_icon',{'inframe':true}) }}" class="btn btn-default">Gérer les Icônes</a>
{% endif %}
</div>
<div class="col-md-12">
<label class="control-label" for="group_label">Recherche</label>
<input type="text" id="icon_search" name="icon_search" class="form-control form-control" style="margin-bottom:15px">
{% if iconsuser is not empty %}
<h3>Mes Icônes</h3>
{% for icon in iconsuser %}
<a style="cursor:pointer" onClick="window.parent.selIcon({{ icon.id }},'{{icon.label}}')">
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px; margin-bottom:2px; background-color: #{{ color["main"]}}">
</a>
{% set tag = "" %}
{% if icon.tags %}
{% set tag = icon.tags %}
{% endif %}
{% if icon.label starts with 'uploads/icon/icon_' %}
{% set tag = tag ~ icon.label|replace({'uploads/icon/icon_':'', '.png':''}) %}
{% endif %}
<img onClick="window.parent.selIcon({{ icon.id }},'{{icon.label}}')" data="{{tag}}" id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="cursor:pointer; padding:2px; margin-bottom:2px; background-color: #{{ color["main"]}}">
{% endfor %}
<h3>Icônes Communs</h3>
{% endif %}
{% for icon in icons %}
<a style="cursor:pointer" onClick="window.parent.selIcon({{ icon.id }},'{{icon.label}}')">
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px; margin-bottom:2px; background-color: #{{ color["main"]}}">
</a>
{% set tag = "" %}
{% if icon.tags %}
{% set tag = icon.tags %}
{% endif %}
{% if icon.label starts with 'uploads/icon/icon_' %}
{% set tag = tag ~ icon.label|replace({'uploads/icon/icon_':'', '.png':''}) %}
{% endif %}
<img onClick="window.parent.selIcon({{ icon.id }},'{{icon.label}}')" data="{{tag}}" id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="cursor:pointer; padding:2px; margin-bottom:2px; background-color: #{{ color["main"]}}">
{% endfor %}
</div>
</div>
{% endblock %}
{% block localjavascript %}
$('document').ready(function(){
$( "#icon_search" ).focus();
});
$( "#icon_search" ).on("keyup", function() {
if($( "#icon_search" ).val()=="")
$(".grid-item-img").show();
else {
tags=$( "#icon_search" ).val().toLowerCase().split(' ');
$(".grid-item-img").hide();
tags.forEach(function(tag){
$(".grid-item-img").each(function(index) {
icontags=$( this ).attr("data");
if (typeof icontags !== 'undefined') {
if(icontags.includes(tag)) $(this).show();
}
});
});
}
});
{% endblock %}

View File

@ -71,38 +71,11 @@
<div class="col-md-12" style="text-align:center;padding:0px">
{{ form_row(form.idicon) }}
<a class="btn btn-success" data-toggle="modal" data-target="#selicon" title='Ajouter' style="width:100%">Selectionner une Icône</a>
<a class="btn btn-success" onClick="selectIcon()" title='Ajouter' style="width:100%">Selectionner une Icône</a>
<a class="btn btn-danger" onClick="delIcon()" title='Détacher' style="width:100%">Détacher l'Icône</a>
</div>
</div>
</div>
<div id="selicon" class="modal fade bs-item-modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">SELECTIONNER UNE ICONE</h4>
</div>
<div class="modal-body">
<div class="form-group row clearfix">
<div class="col-md-12" style="margin-bottom:15px">
<a onclick="$('#selicon').modal('hide');" class="btn btn-default">Annuler</a>
</div>
<div class="col-md-12">
{% for icon in icons %}
<a href="#" onClick="selIcon({{ icon.id }})">
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px;; margin-bottom:2px; background-color: #{{ color["main"]}}">
</a>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
{{ form_end(form) }}
{% endblock %}
@ -115,15 +88,24 @@
showhide();
});
function selIcon(idicon) {
function selIcon(idicon,label) {
$("#item_idicon").val(idicon);
$("#diviconsel img").remove();
$("#icon-"+idicon).clone().appendTo($("#diviconsel"));
url="/{{ alias }}/"+label;
$("#diviconsel").append("<img src='"+url+"'>");
$("#diviconsel img").attr("height","100px");
$('#selicon').modal('hide');
$("#mymodal").modal("hide");
}
function selectIcon() {
$("#mymodal").find(".modal-title").html("SELECTIONNER UNE ICONE");
var url="{{ path('cadoles_portal_config_icon_select') }}";
$("#mymodal").find("#framemodal").attr("src",url);
$("#mymodal").modal("show");
}
function delIcon() {
$("#diviconsel img").remove();
$("#item_idicon").val(null);

View File

@ -547,7 +547,7 @@
var grid = $('.grid').masonry(optiongrid);
}
// Place un message en leur
// Place un message en lu
function hideMessage(id) {
$.ajax({
method: "POST",
@ -566,4 +566,20 @@
}
});
}
// Place un message en lu
function hideAlert(id) {
$.ajax({
method: "POST",
url: "{{ path('cadoles_portal_user_alert_read') }}",
data: {
id:id
},
success: function() {
$("#alert-"+id).remove();
var grid = $('.grid').masonry(optiongrid);
}
});
}
{% endblock %}

View File

@ -61,7 +61,7 @@
</div>
<div class="col-md-12" style="text-align:center;padding:0px">
{{ form_row(form.idicon) }}
<a class="btn btn-success" data-toggle="modal" data-target="#selicon" title='Ajouter' style="width:100%">Selectionner une Icône</a>
<a class="btn btn-success" onClick="selectIcon()" title='Ajouter' style="width:100%">Selectionner une Icône</a>
</div>
</div>
</div>
@ -88,46 +88,6 @@
{{ form_widget(form) }}
</div>
<div id="selicon" class="modal fade bs-item-modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">SELECTIONNER UNE ICONE</h4>
</div>
<div class="modal-body" style="height: 480px; overflow-y: scroll;">
<div class="form-group row clearfix">
<div class="col-md-12" style="margin-bottom:15px">
<a onclick="$('#selicon').modal('hide');" class="btn btn-default">Annuler</a>
{% if access=="user" %}
<a href="{{ path('cadoles_portal_user_icon') }}" target="_parent" class="btn btn-default">Gérer mes Icônes</a>
{% endif %}
</div>
<div class="col-md-12">
{% if iconsuser is not empty %}
<h3>Mes Icônes</h3>
{% for icon in iconsuser %}
<a style="cursor:pointer" onClick="selIcon({{ icon.id }})">
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px; margin-bottom:2px; background-color: #{{ color["main"]}}">
</a>
{% endfor %}
<h3>Icônes Communs</h3>
{% endif %}
{% for icon in icons %}
<a href="#" onClick="selIcon({{ icon.id }})">
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px; margin-bottom:2px; background-color: #{{ color["main"]}}">
</a>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
{{ form_end(form) }}
{% endblock %}
@ -155,13 +115,22 @@
});
});
function selIcon(idicon) {
function selIcon(idicon,label) {
$("#pagewidget_idicon").val(idicon);
$("#diviconsel img").remove();
$("#icon-"+idicon).clone().appendTo($("#diviconsel"));
url="/{{ alias }}/"+label;
$("#diviconsel").append("<img src='"+url+"'>");
$("#diviconsel img").attr("height","100px");
$('#selicon').modal('hide');
$("#mymodal").modal("hide");
}
function selectIcon() {
$("#mymodal").find(".modal-title").html("SELECTIONNER UNE ICONE");
var url="{{ path('cadoles_portal_user_icon_select') }}";
$("#mymodal").find("#framemodal").attr("src",url);
$("#mymodal").modal("show");
}
{% endblock %}

View File

@ -32,7 +32,7 @@
<div class="widgetbody" style="{{ stylewidgetbody }}">
{% for alert in alerts %}
<div class="panel list-item" style="background: {{ alert.alertcategory.color ? '#'~alert.alertcategory.color : '#'~colormain }};">
<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 }}">
@ -41,9 +41,13 @@
{% endif %}
{{ alert.title }}
{% if alert.fghideable and app.user %}
&nbsp;<a onClick="hideAlert({{alert.id}})" style="cursor:pointer;" title="Ne plus afficher"><i class="fa fa-eye-slash"></i></a>
{%endif%}
</div>
<div id="alert-{{ alert.id }}" class="panel-body">
<div class="panel-body">
{{ alert.content|raw }}
</div>