toodego: add road event tile (#32985)
This commit is contained in:
parent
0180c12598
commit
b9e1e2e0be
|
@ -25,6 +25,7 @@ div.leaflet-div-icon span.layer-autopartage,
|
|||
div.leaflet-div-icon span.layer-bibliotheque,
|
||||
div.leaflet-div-icon span.layer-decheterie,
|
||||
div.leaflet-div-icon span.layer-donnerie,
|
||||
div.leaflet-div-icon span.layer-evenement-routier,
|
||||
div.leaflet-div-icon span.layer-mairie,
|
||||
div.leaflet-div-icon span.layer-mdr,
|
||||
div.leaflet-div-icon span.layer-parc-velo,
|
||||
|
@ -64,6 +65,10 @@ div.leaflet-div-icon span.layer-donnerie {
|
|||
background-image: url($data_uri_ic_Donnerie);
|
||||
}
|
||||
|
||||
div.leaflet-div-icon span.layer-evenement-routier {
|
||||
background-image: url($data_uri_ic_Evenement_routier);
|
||||
}
|
||||
|
||||
div.leaflet-div-icon span.layer-mairie {
|
||||
background-image: url($data_uri_ic_Mairie);
|
||||
}
|
||||
|
|
|
@ -342,3 +342,9 @@ div.pmr {
|
|||
top: -8px;
|
||||
}
|
||||
}
|
||||
|
||||
div.evenement-routier {
|
||||
.tile-content p {
|
||||
margin-right : 0.5rem;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 31 43"><defs><style>.a{fill:#ff4e00;}.b,.c{fill:#fff;}.c{font-size:8.46px;font-family:Roboto-Black, Roboto;}</style></defs><title>Icones</title><path class="a" d="M15.5.7A15.2,15.2,0,0,0,.3,15.9a15.9,15.9,0,0,0,3.1,9.3L15.5,42l12-16.9a15.9,15.9,0,0,0,3.1-9.3A15.2,15.2,0,0,0,15.5.7Z"/><path class="b" d="M25,15.9a9.5,9.5,0,1,1-9.5-9.5A9.5,9.5,0,0,1,25,15.9Z"/><path class="a" d="M14.3,10,9.4,18.5a1.3,1.3,0,0,0,1.2,2h9.8a1.3,1.3,0,0,0,1.2-2L16.7,10A1.3,1.3,0,0,0,14.3,10Z"/><text class="c" transform="translate(14.4 18.9)">!</text></svg>
|
After Width: | Height: | Size: 590 B |
|
@ -0,0 +1,144 @@
|
|||
{% load combo gnm l10n assets %}
|
||||
{% with event=json.features.0 is_place_page=page|is_place_page place_page=cell|place_page %}
|
||||
{% get_tile_picture_size page as size %}
|
||||
<div class="tile evenement-routier {% if is_place_page %}is-place{% endif %}" data-place-type="evenement-routier">
|
||||
{% if is_place_page %}
|
||||
{% placeholder "infos-pratiques" name="Infos pratiques" render=False %}
|
||||
<div class="tile-picture" style="background-image: url({% asset_url place_page.picture "picture:banner:evenement-routier" size=size crop="center" %})"></div>
|
||||
{% else %}
|
||||
<div class="tile-picture" style="background-image: url({% asset_url place_page.picture "picture:evenement-routier" size=size crop="center" %})"></div>
|
||||
{% endif %}
|
||||
<div class="tile-head">
|
||||
<div class="tile-title">
|
||||
<h2>{{event.properties.townname}}</h2>
|
||||
<span class="producer" style="background-image: url({% asset_url "logo:grandlyon" %})">Grand Lyon</span>
|
||||
</div>
|
||||
</div>
|
||||
{% include "combo/dashboard_cell_icons.html" %}
|
||||
|
||||
{% if is_place_page %}
|
||||
|
||||
<div class="tile-content">
|
||||
|
||||
<div class="place-info">
|
||||
|
||||
{% if event.properties.probability != '' %}Probabilité : {{event.properties.probability}}{% endif %}
|
||||
{% if event.properties.starttime != '' %}<br />Du : {{event.properties.starttime}} {% endif %}
|
||||
{% if event.properties.endtime != '' %}au : {{event.properties.endtime}}{% endif %}
|
||||
{% if event.properties.publiccomment != '' %}<br />Détail : {{event.properties.publiccomment}}{% endif %}
|
||||
|
||||
<br />Confidentialité : {{event.properties.confidentiality}}
|
||||
<br />Info status : {{event.properties.informationstatus}}
|
||||
<br />Type : {{event.properties.type}}
|
||||
<br />Status : {{event.properties.status}}
|
||||
<br />Nb voie restraintes : {{event.properties.numberoflanesrestricted}}
|
||||
<br />Direction : {{event.properties.direction}}
|
||||
<br />disturbance activity type : {{event.properties.disturbanceacivitytype}}
|
||||
<br />effect on road layout : {{event.properties.effectonroadlayout}}
|
||||
<br />network management type : {{event.properties.networkmanagementtype}}
|
||||
<br />public event type : {{event.properties.publiceventtype}}
|
||||
<br />road maintennace type : {{event.properties.roadmaintenancetype}}
|
||||
<br />mobility : {{event.properties.mobility}}
|
||||
<br />Abnomal traffic type : {{event.properties.abnormaltraffictype}}
|
||||
<br />Future : {{event.properties.future}}
|
||||
|
||||
{% include "combo/json/includes/share.html" with place=event url=cell|place_page_url %}
|
||||
{% placeholder "infos-pratiques" %}
|
||||
</div>
|
||||
|
||||
<div class="place-data">
|
||||
|
||||
<div class="adresse">
|
||||
{% localize off %}
|
||||
<a class="action-goto" data-lat="{{event.geometry.coordinates.1}}" data-lng="{{event.geometry.coordinates.0}}" href="/m-y-rendre/?to={{cell.id}}">M'y rendre</a>
|
||||
{% endlocalize %}
|
||||
</div> <!-- adresse -->
|
||||
|
||||
</div> <!-- place-data -->
|
||||
|
||||
{% gnm_place_map event.geometry.coordinates.1 event.geometry.coordinates.0 %}
|
||||
|
||||
</div> <!-- tile-content -->
|
||||
|
||||
{% else %}
|
||||
<div class="tile-content">
|
||||
<p>
|
||||
{# formatage de la date car celle recue de data.grandlyon.com est difficilement lisible #}
|
||||
{% for comparedate in event.properties.starttime|slice:":-3"|split %}
|
||||
{% if forloop.first %}
|
||||
|
||||
{% if comparedate not in event.properties.endtime %}
|
||||
{# si starttime et endtime ne sont pas le meme jour on affiche du xxx au xxx #}
|
||||
<b>Du
|
||||
{% for dateitem in event.properties.starttime|slice:":-3"|split %}
|
||||
{# date #}
|
||||
{% if forloop.first %}
|
||||
{% for dateelt in dateitem|split:"-" reversed %}{{dateelt}}{% if not forloop.last %}/{% endif %}{% endfor %}
|
||||
{% endif %}
|
||||
{# heure #}
|
||||
{% if forloop.last %}
|
||||
{% for line in dateitem|split:":" %}
|
||||
{% if forloop.first and line != "00" %}{{line}}{% endif %}{% if forloop.first%}h{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</b>
|
||||
<b>au
|
||||
{% for dateitem in event.properties.endtime|slice:":-3"|split %}
|
||||
{# date #}
|
||||
{% if forloop.first %}
|
||||
{% for dateelt in dateitem|split:"-" reversed %}{{dateelt}}{% if not forloop.last %}/{% endif %}{% endfor %}
|
||||
{% endif %}
|
||||
{# heure #}
|
||||
{% if forloop.last %}
|
||||
{% for line in dateitem|split:":" %}
|
||||
{% if forloop.first and line != "00" %}{{line}}{% endif %}{% if forloop.first%}h{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</b>
|
||||
|
||||
{% else %}
|
||||
{# sinon on affiche le xxx de xxh à xxh #}
|
||||
<b>Le
|
||||
{% for dateitem in event.properties.starttime|slice:":-3"|split %}
|
||||
{# date #}
|
||||
{% if forloop.first %}
|
||||
{% for dateelt in dateitem|split:"-" reversed %}{{dateelt}}{% if not forloop.last %}/{% endif %}{% endfor %}
|
||||
{% endif %}
|
||||
{# heure #}
|
||||
{% if forloop.last %}
|
||||
de
|
||||
{% for line in dateitem|split:":" %}
|
||||
{% if forloop.first and line != "00" %}{{line}}{% endif %}{% if forloop.first%}h{% endif %}
|
||||
{% endfor %}
|
||||
a
|
||||
{% for dateitem in event.properties.endtime|slice:":-3"|split %}
|
||||
{% if forloop.last %}
|
||||
{% for line in dateitem|split:":" %}
|
||||
{% if forloop.first and line != "00" %}{{line}}{% endif %}{% if forloop.first%}h{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</b>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
||||
{# Affichage du commentaire public #}
|
||||
{% if event.properties.publiccomment != '' %}
|
||||
<p>
|
||||
{% for line in event.properties.publiccomment|split:"|" %}
|
||||
{{line}}.<br />
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="tile-actions">
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endwith %}
|
Loading…
Reference in New Issue