Compare commits

..

No commits in common. "de04ab9bdbb768dbea200672ad48cbc7095b516e" and "729ed9fba917bb8d503e18758c38389b98f37e8e" have entirely different histories.

1 changed files with 42 additions and 160 deletions

View File

@ -11,164 +11,50 @@
<a href="{{ path('cadoles_portal_config_alert_submit') }}" class="btn btn-success">Ajouter une Annonce</a> <a href="{{ path('cadoles_portal_config_alert_submit') }}" class="btn btn-success">Ajouter une Annonce</a>
<a href="{{ path('cadoles_portal_config_alertcategory_submit') }}" class="btn btn-success">Ajouter une Catégorie</a> <a href="{{ path('cadoles_portal_config_alertcategory_submit') }}" class="btn btn-success">Ajouter une Catégorie</a>
</p> </p>
<div id="listpending" class="panel panel-default">
<div class="panel-heading">
<h3 style="margin:0px">En Attente Publication</h2>
</div>
<div class="panel-body"> <div id="list" class="panel-group">
<div class="list panel-group"> {% for alert in alerts %}
{% for alert in alerts if alert.isPending %} <div
<div class="
class=" panel
panel list-item
list-item alertcategory-{{ alert.alertcategory.id }}
alertcategory-{{ alert.alertcategory.id }} {{ alert.isOnline ? "alertstatut-online" : ""}}
{{ alert.isOnline ? "alertstatut-online" : ""}} {{ alert.isPending ? "alertstatut-pending" : ""}}
{{ alert.isPending ? "alertstatut-pending" : ""}} {{ alert.isArchived ? "alertstatut-archived" : ""}}
{{ alert.isArchived ? "alertstatut-archived" : ""}} {% for group in alert.groups %}{{ ' group-' ~ group.id }}{% endfor %}
{% for group in alert.groups %}{{ ' group-' ~ group.id }}{% endfor %} {% for role in alert.roles %}{{ ' role-' ~ role }}{% endfor %}
{% for role in alert.roles %}{{ ' role-' ~ role }}{% endfor %} "
" data-alert-category-id="{{ alert.alertcategory.id }}"
data-alert-category-id="{{ alert.alertcategory.id }}" data-alert-id="{{ alert.id }}"
data-alert-id="{{ alert.id }}" style="background: {{ alert.alertcategory.color ? '#'~alert.alertcategory.color : '#'~color['main'] }};"
style="background: {{ alert.alertcategory.color ? '#'~alert.alertcategory.color : '#'~color['main'] }};" >
> <div class="panel-heading" role="tab">
<div class="panel-heading" role="tab"> <a href="{{ path('cadoles_portal_config_alert_update', { id: alert.id }) }}" class="panel-heading-icon pull-left">
<a href="{{ path('cadoles_portal_config_alert_update', { id: alert.id }) }}" class="panel-heading-icon pull-left"> {% if alert.alertcategory.icon %}
{% if alert.alertcategory.icon %} <img height="25" src="/{{ alias }}/{{ alert.alertcategory.icon.label }}">
<img height="25" src="/{{ alias }}/{{ alert.alertcategory.icon.label }}"> {% else %}
{% else %} <img height="25" src="/{{ alias }}/uploads/icon/icon_megaphone.png">
<img height="25" src="/{{ alias }}/uploads/icon/icon_megaphone.png"> {% endif %}
{% endif %} </a>
</a>
<a href="{{ path('cadoles_portal_config_alert_update', { id: alert.id }) }}">
<a href="{{ path('cadoles_portal_config_alert_update', { id: alert.id }) }}"> <i class="fa fa-arrows-v" style="color: rgba(255,255,255,.5);"></i>
<i class="fa fa-arrows-v" style="color: rgba(255,255,255,.5);"></i> {{ alert.title }}
{{ alert.title }} </a>
</a>
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#alert-{{ alert.id }}" aria-expanded="true" aria-controls="collapseOne" class="panel-heading-chevron pull-right">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#alert-{{ alert.id }}" aria-expanded="true" aria-controls="collapseOne" class="panel-heading-chevron pull-right"> <i class="fa fa-chevron-down"></i>
<i class="fa fa-chevron-down"></i> </a>
</a> </div>
</div>
<div id="alert-{{ alert.id }}" class="panel-body panel-collapse collapse">
{{ alert.content|raw }}
</div>
<div id="alert-{{ alert.id }}" class="panel-body panel-collapse collapse"> <input type="hidden" name="alert_item[id][]" value="{{ alert.id }}" />
{{ alert.content|raw }}
</div>
<input type="hidden" name="alert_item[id][]" value="{{ alert.id }}" />
</div>
{% endfor %}
</div> </div>
</div> {% endfor %}
</div>
<div id="listonline" class="panel panel-default">
<div class="panel-heading">
<h3 style="margin:0px">En Ligne</h2>
</div>
<div class="panel-body">
<div id="listonline" class="list panel-group">
{% for alert in alerts if alert.isOnline %}
<div
class="
panel
list-item
alertcategory-{{ alert.alertcategory.id }}
{{ alert.isOnline ? "alertstatut-online" : ""}}
{{ alert.isPending ? "alertstatut-pending" : ""}}
{{ alert.isArchived ? "alertstatut-archived" : ""}}
{% for group in alert.groups %}{{ ' group-' ~ group.id }}{% endfor %}
{% for role in alert.roles %}{{ ' role-' ~ role }}{% endfor %}
"
data-alert-category-id="{{ alert.alertcategory.id }}"
data-alert-id="{{ alert.id }}"
style="background: {{ alert.alertcategory.color ? '#'~alert.alertcategory.color : '#'~color['main'] }};"
>
<div class="panel-heading" role="tab">
<a href="{{ path('cadoles_portal_config_alert_update', { id: alert.id }) }}" class="panel-heading-icon pull-left">
{% 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 %}
</a>
<a href="{{ path('cadoles_portal_config_alert_update', { id: alert.id }) }}">
<i class="fa fa-arrows-v" style="color: rgba(255,255,255,.5);"></i>
{{ alert.title }}
</a>
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#alert-{{ alert.id }}" aria-expanded="true" aria-controls="collapseOne" class="panel-heading-chevron pull-right">
<i class="fa fa-chevron-down"></i>
</a>
</div>
<div id="alert-{{ alert.id }}" class="panel-body panel-collapse collapse">
{{ alert.content|raw }}
</div>
<input type="hidden" name="alert_item[id][]" value="{{ alert.id }}" />
</div>
{% endfor %}
</div>
</div>
</div>
<div id="listarchived" class="panel panel-default">
<div class="panel-heading">
<h3 style="margin:0px">Archivées</h2>
</div>
<div class="panel-body">
<div id="listarchived" class="list panel-group">
{% for alert in alerts if alert.isArchived %}
<div
class="
panel
list-item
alertcategory-{{ alert.alertcategory.id }}
{{ alert.isOnline ? "alertstatut-online" : ""}}
{{ alert.isPending ? "alertstatut-pending" : ""}}
{{ alert.isArchived ? "alertstatut-archived" : ""}}
{% for group in alert.groups %}{{ ' group-' ~ group.id }}{% endfor %}
{% for role in alert.roles %}{{ ' role-' ~ role }}{% endfor %}
"
data-alert-category-id="{{ alert.alertcategory.id }}"
data-alert-id="{{ alert.id }}"
style="background: {{ alert.alertcategory.color ? '#'~alert.alertcategory.color : '#'~color['main'] }};"
>
<div class="panel-heading" role="tab">
<a href="{{ path('cadoles_portal_config_alert_update', { id: alert.id }) }}" class="panel-heading-icon pull-left">
{% 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 %}
</a>
<a href="{{ path('cadoles_portal_config_alert_update', { id: alert.id }) }}">
<i class="fa fa-arrows-v" style="color: rgba(255,255,255,.5);"></i>
{{ alert.title }}
</a>
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#alert-{{ alert.id }}" aria-expanded="true" aria-controls="collapseOne" class="panel-heading-chevron pull-right">
<i class="fa fa-chevron-down"></i>
</a>
</div>
<div id="alert-{{ alert.id }}" class="panel-body panel-collapse collapse">
{{ alert.content|raw }}
</div>
<input type="hidden" name="alert_item[id][]" value="{{ alert.id }}" />
</div>
{% endfor %}
</div>
</div>
</div> </div>
</div> </div>
@ -333,11 +219,7 @@
}); });
} }
if($(".alertstatut-pending").length==0) $("#listpending").hide(); $( "#list" ).sortable({
if($(".alertstatut-online").length==0) $("#listonline").hide();
if($(".alertstatut-archived").length==0) $("#listarchived").hide();
$( ".list" ).sortable({
axis: "y", axis: "y",
placeholder: "list-item placeholder", placeholder: "list-item placeholder",
update: updateItems update: updateItems