diff --git a/static/landes-cd40/config.json b/static/landes-cd40/config.json index 5995d14d..eb9a6219 100644 --- a/static/landes-cd40/config.json +++ b/static/landes-cd40/config.json @@ -111,6 +111,31 @@ "log_errors": false, "cache_duration": 0, "force_async": true + }, + "department-demands": { + "name": "Demandes du département", + "url": "{{ passerelle_url }}proxy/phe/request/api_publik.php?sub={{ user_nameid }}", + "form": [ + {"label": "Titre de la cellule", "varname": "title", "required": false} + ], + "varnames": ["user_id"], + "log_errors": false, + "cache_duration": 5, + "force_async": true, + "additional-data": [ + { + "key": "extranet", + "url": "{{ passerelle_url }}proxy/extranet/request/api_publik.php?sub={{ user_nameid }}", + "cache_duration": 5, + "log_errors": false + }, + { + "key": "transmlph", + "url": "{{ passerelle_url }}proxy/transmlph/request/api_publik.php?sub={{ user_nameid }}", + "cache_duration": 5, + "log_errors": false + } + ] } } } diff --git a/templates/variants/landes-cd40/combo/json/department-demands.html b/templates/variants/landes-cd40/combo/json/department-demands.html new file mode 100644 index 00000000..402eb218 --- /dev/null +++ b/templates/variants/landes-cd40/combo/json/department-demands.html @@ -0,0 +1,34 @@ +{% if title %} +

{{ title }}

+{% endif %} + +{% if json.err and extranet.err and transmlph.err %} +
+

Informations indisponibles.

+
+{% else %} + {% with json.data|add:extranet.data|add:transmlph.data as data %} + {% if data %} + + {% else %} +
+

Aucune demande.

+
+ {% endif %} + {% endwith %} +{% endif %}