diff --git a/dicos/91_ninegate.xml b/dicos/91_ninegate.xml
index c3115bb3..41bb8e51 100644
--- a/dicos/91_ninegate.xml
+++ b/dicos/91_ninegate.xml
@@ -13,6 +13,7 @@
+
@@ -76,8 +77,6 @@
- 4200
-
oui
@@ -213,7 +212,6 @@
non
-
@@ -918,28 +916,6 @@
non
non
-
-
- non
-
- ninegate_widead_url
-
-
-
- oui
- activer_ead_reverseproxy
- port_ead_reverseproxy
- 4200
- 4200
-
-
-
- https://
- web_url
- :
- ninegate_widead_port
- /connect/?server=1
-
diff --git a/src/ninegate-1.0/scripts/ninegate-postservice-00.sh b/src/ninegate-1.0/scripts/ninegate-postservice-00.sh
index 568f644d..cb2d40ba 100755
--- a/src/ninegate-1.0/scripts/ninegate-postservice-00.sh
+++ b/src/ninegate-1.0/scripts/ninegate-postservice-00.sh
@@ -1,7 +1,5 @@
#!/bin/bash
-export HTTP_PROXY="192.168.57.160:8080"
-export HTTPS_PROXY="192.168.57.160:8080"
cd /var/www/html/ninegate
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/InitDataCommand.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/InitDataCommand.php
index a640b5ec..a0962fe7 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/InitDataCommand.php
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/InitDataCommand.php
@@ -960,6 +960,7 @@ class InitDataCommand extends ContainerAwareCommand
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widroundcube_url);
+ $entityItem->setBadgeurl("/ninegate/imap-unread.php");
$em->persist($entityItem);
}
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 c285e46f..8d4cc2b5 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Alert.php
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Alert.php
@@ -63,7 +63,7 @@ class Alert
/**
* @ORM\Column(name="fghideable", type="boolean")
*/
- private $fghideable=true;
+ private $fghideable;
/**
* @var string
@@ -149,7 +149,7 @@ class Alert
{
$today = new \DateTime();
if (null === $this->unpublishedat) {
- return false;
+ return true;
}
if ($this->unpublishedat->getTimestamp() < $today->getTimestamp()) {
return true;
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Item.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Item.php
index 0093680b..a73b7a52 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Item.php
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Entity/Item.php
@@ -101,7 +101,7 @@ class Item
* @ORM\Column(name="badgeurl", type="string", length=250, nullable=true)
*/
private $badgeurl;
-
+
/**
* @var string
*
@@ -659,13 +659,13 @@ class Item
}
/**
- * Set badgeurl
+ * Set badgeurl.
*
- * @param string $badgeurl
+ * @param string|null $badgeurl
*
* @return Item
*/
- public function setBadgeurl($badgeurl)
+ public function setBadgeurl($badgeurl = null)
{
$this->badgeurl = $badgeurl;
@@ -673,9 +673,9 @@ class Item
}
/**
- * Get badgeurl
+ * Get badgeurl.
*
- * @return string
+ * @return string|null
*/
public function getBadgeurl()
{
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/AlertType.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/AlertType.php
index da9c81c3..daae87a9 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/AlertType.php
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/AlertType.php
@@ -119,14 +119,12 @@ class AlertType extends AbstractType
->add('publishedat', DateType::class, [
'label' => 'Publier du',
'input' => 'datetime',
- 'widget' => 'single_text'
])
->add('unpublishedat', DateType::class, [
'label' => 'Jusqu\'au',
'input' => 'datetime',
'required' => false,
- 'widget' => 'single_text',
'years' => range(date('Y'), date('Y')+10)
]);
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/ItemType.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/ItemType.php
index bee632a3..5ed44e62 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/ItemType.php
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/ItemType.php
@@ -122,7 +122,7 @@ class ItemType extends AbstractType
'label' => "Badge URL",
'required' => false,
])
-
+
->add('essential', CheckboxType::class, [
"label" => "Item essentiel ?",
"required" => false
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 ab9df0f2..a230a52e 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,164 +11,50 @@
Ajouter une Annonce
Ajouter une Catégorie
-
-
-
-
En Attente Publication
-
-
-
- {% for alert in alerts if alert.isPending %}
-
-
+
+ {% for alert in alerts %}
+
+
+
+
+ {{ alert.content|raw }}
+
-
- {{ alert.content|raw }}
-
-
-
-
- {% endfor %}
+
-
-
-
-
-
-
En Ligne
-
-
-
-
- {% for alert in alerts if alert.isOnline %}
-
-
-
-
- {{ alert.content|raw }}
-
-
-
-
- {% endfor %}
-
-
-
-
-
-
-
Archivées
-
-
-
-
- {% for alert in alerts if alert.isArchived %}
-
-
-
-
- {{ alert.content|raw }}
-
-
-
-
- {% endfor %}
-
-
+ {% endfor %}
@@ -333,11 +219,7 @@
});
}
- if($(".alertstatut-pending").length==0) $("#listpending").hide();
- if($(".alertstatut-online").length==0) $("#listonline").hide();
- if($(".alertstatut-archived").length==0) $("#listarchived").hide();
-
- $( ".list" ).sortable({
+ $( "#list" ).sortable({
axis: "y",
placeholder: "list-item placeholder",
update: updateItems
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Item/edit.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Item/edit.html.twig
index 7bae7cce..afb54563 100755
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Item/edit.html.twig
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Item/edit.html.twig
@@ -50,7 +50,7 @@
{{ form_row(form.essential) }}
{{ form_row(form.content) }}
{{ form_row(form.badgeurl) }}
- {{ form_row(form.protected) }}
+ {{ form_row(form.protected) }}
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Page/viewwidget.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Page/viewwidget.html.twig
index 3c9f1c46..b80e731f 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Page/viewwidget.html.twig
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Page/viewwidget.html.twig
@@ -263,6 +263,18 @@
}
});
+ // badgeurl item
+ $(".itembadgeurl").each(function() {
+ mybadge=$(this);
+ $.ajax({
+ method: "GET",
+ url: $(this).data("url"),
+ success: function(data) {
+ mybadge.append(data);
+ }
+ });
+ });
+
// Création des slick
slick();
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewitem.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewitem.html.twig
index 1e002912..716fba30 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewitem.html.twig
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewitem.html.twig
@@ -203,6 +203,9 @@
{{ bookmark.item.title }}
+ {% if not bookmark.item.badgeurl is empty %}
+
+ {% endif %}
{{ bookmark.item.subtitle|nl2br }}
@@ -256,6 +259,9 @@
{{ bookmark.item.title }}
+ {% if not bookmark.item.badgeurl is empty %}
+
+ {% endif %}
{{ bookmark.item.subtitle|nl2br }}
@@ -402,6 +408,9 @@
{{ item.title }}
+ {% if not item.badgeurl is empty %}
+
+ {% endif %}
{{ item.subtitle|nl2br }}
diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewitemessential.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewitemessential.html.twig
index 3addd179..2e8b42d9 100644
--- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewitemessential.html.twig
+++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewitemessential.html.twig
@@ -102,6 +102,9 @@
{% endif %}
+ {% if not bookmark.item.badgeurl is empty %}
+
3
+ {% endif %}
{% if bookmark.item.icon %}
@@ -112,6 +115,9 @@
{{ bookmark.item.title }}
+ {% if not bookmark.item.badgeurl is empty %}
+
+ {% endif %}
{{ bookmark.item.subtitle|nl2br }}
@@ -197,6 +203,9 @@
{{ item.title }}
+ {% if not item.badgeurl is empty %}
+
+ {% endif %}
{{ item.subtitle|nl2br }}
diff --git a/tmpl/ninegate-template.yml b/tmpl/ninegate-template.yml
index 9593f65c..91e69cc7 100644
--- a/tmpl/ninegate-template.yml
+++ b/tmpl/ninegate-template.yml
@@ -300,7 +300,11 @@ parameters:
%if %%getVar("ninegate_activate_widead", 'non') == "oui"
activate_widead: true
- widead_url: %%ninegate_widead_url
+ %if %%getVar("activer_ead_reverseproxy", 'non') == "oui"
+ widead_url: https://%%web_url:%%port_ead_reverseproxy/connect/?server=1
+ %else
+ widead_url: https://%%web_url:4200/connect/?server=1
+ %end if
%else
activate_widead: false
%end if
diff --git a/tmpl/ninegate-unread.php b/tmpl/ninegate-unread.php
new file mode 100644
index 00000000..16ebf844
--- /dev/null
+++ b/tmpl/ninegate-unread.php
@@ -0,0 +1,35 @@
+unseen;
+ echo $count;
+ %end if
+?>