diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Alert.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Alert.php index 281adc18..c285e46f 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Alert.php +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Alert.php @@ -149,7 +149,7 @@ class Alert { $today = new \DateTime(); if (null === $this->unpublishedat) { - return true; + return false; } if ($this->unpublishedat->getTimestamp() < $today->getTimestamp()) { return true; diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Alert/list.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Alert/list.html.twig index a230a52e..ab9df0f2 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Alert/list.html.twig +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Alert/list.html.twig @@ -11,50 +11,164 @@ Ajouter une Annonce Ajouter une Catégorie

+ +
+
+

En Attente Publication

+
-
- {% for alert in alerts %} -
- - -
- {{ alert.content|raw }} -
+
+
+ {% for alert in alerts if alert.isPending %} + + {% endfor %}
- {% endfor %} +
+
+ +
+
+

En Ligne

+
+ +
+
+ {% for alert in alerts if alert.isOnline %} + + {% endfor %} +
+
+
+ +
+
+

Archivées

+
+ +
+
+ {% for alert in alerts if alert.isArchived %} + + {% endfor %} +
+
@@ -219,7 +333,11 @@ }); } - $( "#list" ).sortable({ + if($(".alertstatut-pending").length==0) $("#listpending").hide(); + if($(".alertstatut-online").length==0) $("#listonline").hide(); + if($(".alertstatut-archived").length==0) $("#listarchived").hide(); + + $( ".list" ).sortable({ axis: "y", placeholder: "list-item placeholder", update: updateItems