Projet

Général

Profil

0001-braine-l-alleud-get-deliberations-communales-from-pl.patch

Nicolas Roche, 09 novembre 2021 11:39

Télécharger (3,98 ko)

Voir les différences:

Subject: [PATCH] braine-l-alleud: get deliberations-communales from plone
 (#58182)

 static/braine-l-alleud/_custom.scss                         | 6 ------
 static/braine-l-alleud/config.json                          | 2 +-
 .../combo/json/deliberations-communales.html                | 6 +++---
 3 files changed, 4 insertions(+), 10 deletions(-)
static/braine-l-alleud/_custom.scss
242 242
			&:checked::before {
243 243
				left: #{$switch-width - $switch-slider-diameter};
244 244
				box-shadow: -1px 1px 3px rgba(0,0,0,.6)
245 245
			}
246 246
		}
247 247
	}
248 248
}
249 249

  
250
.gru-content div.cell.deliberations-communales {
251
	h2 + div {
252
		padding: 0;
253
	}
254
}
255

  
256 250
.delib,
257 251
.eventitem,
258 252
.newsitem {
259 253
	display: flex;
260 254
	margin-bottom: 1ex;
261 255
	@media screen and (max-width: $nav-mobile-limit) {
262 256
		flex-direction: column;
263 257
	}
static/braine-l-alleud/config.json
54 54
               ],
55 55
               "name" : "Actualités",
56 56
               "url" : "{{ passerelle_url }}plone-restapi/{{ connector }}/q/{{ query }}/"
57 57
            },
58 58
            "deliberations-communales": {
59 59
               "cache_duration" : 360,
60 60
               "force_async" : false,
61 61
               "name" : "Délibérations communales",
62
               "url" : "{{ braine_deliberations_communales_json_url|safe }}"
62
               "url" : "{{ passerelle_url }}plone-restapi/{{ braine_deliberations_communales_connector_slug }}/q/{{ braine_deliberations_communales_query_slug }}/"
63 63
            },
64 64
            "evenements" : {
65 65
               "cache_duration" : 120,
66 66
               "force_async" : false,
67 67
               "form" : [
68 68
                  {
69 69
                     "label" : "Identifiant du connecteur Plone REST API",
70 70
                     "type" : "string",
templates/variants/braine-l-alleud/combo/json/deliberations-communales.html
1 1
{% load dashboard static thumbnail %}
2 2
{% if not in_dashboard %}
3 3
<div class="dashboard-settings">
4 4
<div class="dashboard-meta">
5 5
<h2>Délibérations communales</h2>
6
<div>Soyez informés dès que les décisions publiques du Conseil communal auront été approuvées par ses membres.</div>
6
<div>{{json.meta.description}}</div>
7 7
</div>
8 8
<div class="dashboard-switch">
9 9
  {% with tile=cell|as_dashboard_cell:request.user %}
10 10
  <input type="checkbox" id="deliberations-communales-id"
11 11
      data-add-tile-url="{% url 'combo-dashboard-add-tile' cell_reference=cell.get_reference %}"
12 12
      {% if tile %}
13 13
      checked
14 14
      data-remove-tile-url="{% url 'combo-dashboard-remove-tile' cell_reference=tile.cell.get_reference %}"
......
35 35
  });
36 36
  </script>
37 37
</div>
38 38
</div>
39 39

  
40 40
{% else %}
41 41
<h2>Délibérations communales</h2>
42 42

  
43
{% for entry in json.items|slice:":5" %}
43
{% for entry in json.data %}
44 44
<div class="delib">
45 45
<img src="{{site_base}}{% static "" %}{{css_variant}}/placeholder-logo-bla.jpeg" alt="" height="160" width="160">
46 46
<div>
47
        <h3><a href="{{ entry|get:'@id' }}">Séance du {{ entry.title }}</a></h3>
47
        <h3><a href="{{ entry.PLONE_id }}">Séance du {{ entry.title }}</a></h3>
48 48
        <br>
49 49
        <p>
50 50
        {% if entry.review_state == 'decision' %}Décision
51 51
        {% elif entry.review_state == 'in_project' %}Projet de décision
52 52
        {% endif %}</p>
53 53
</div>
54 54
</div>
55 55
{% empty %}
56
-