mirror of
https://forge.chapril.org/tykayn/osm-commerces
synced 2025-06-20 01:44:42 +02:00
styles groupés, logo entête
This commit is contained in:
parent
ccab916286
commit
1e02b7062d
13 changed files with 261 additions and 142 deletions
|
@ -12,6 +12,15 @@
|
|||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script>
|
||||
function labourer() {
|
||||
window.location.href = '/admin/labourer/' + document.getElementById('app_admin_labourer').value;
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container mt-4">
|
||||
<div class="row">
|
||||
|
@ -21,6 +30,10 @@
|
|||
<div class="col-12">
|
||||
<h2>Statistiques : {{ stats|length }} commerces</h2>
|
||||
|
||||
<input class="form-control" type="text" id="app_admin_labourer" value="75013">
|
||||
<button class="btn btn-default" onclick="labourer() ">Labourer</button>
|
||||
|
||||
|
||||
<table class="table table-hover table-striped table-responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
@ -11,22 +11,26 @@
|
|||
.is-invalid { border: 1px solid red; }
|
||||
.is-invalid #validation_messages { color: red; }
|
||||
img { max-width: 100%; max-height: 400px; }
|
||||
@media (max-width: 768px) {
|
||||
.form-label { margin-bottom: 0.5rem; }
|
||||
.mb-3 { margin-bottom: 1rem !important; }
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container mt-4">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="container-fluid mt-4">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 col-lg-10 col-xl-8">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<h1 class="card-title mb-4">{{ 'display.welcome'|trans }} {{ commerce_overpass.tags_converted.name }}</h1>
|
||||
<div id="map" style="height: 400px; width: 100%;" class="rounded"></div>
|
||||
<h1 class="card-title h2 mb-4">{{ 'display.welcome'|trans }} {{ commerce_overpass.tags_converted.name }}</h1>
|
||||
<div id="map" style="height: 400px; width: 100%;" class="rounded mb-4"></div>
|
||||
|
||||
{% if commerce_overpass is not empty %}
|
||||
<form action="{{ path('app_public_submit', {'osm_object_id': commerce_overpass['@attributes'].id, 'version': commerce_overpass['@attributes'].version, 'changesetID': commerce_overpass['@attributes'].changeset }) }}" method="post" class="needs-validation">
|
||||
<input type="hidden" name="osm_kind" value="{{ osm_kind }}">
|
||||
<div class="mb-3">
|
||||
<div class="mb-4">
|
||||
<label for="commerce_id" class="form-label">{{ 'display.modify_commerce'|trans }}:
|
||||
<strong>
|
||||
{% if commerce_overpass.tags_converted.name is defined %}
|
||||
|
@ -38,20 +42,21 @@
|
|||
{% endif %}
|
||||
</strong>
|
||||
</label>
|
||||
<br/>
|
||||
<a class="btn btn-info" href="{{ path('app_public_index') }}">{{ 'display.contact_humans'|trans }}</a>
|
||||
<div class="mt-2">
|
||||
<a class="btn btn-info" href="{{ path('app_public_index') }}">{{ 'display.contact_humans'|trans }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if commerce.tags_converted.image is defined %}
|
||||
<img class="img-fluid mb-3" src="{{ commerce.tags_converted.image }}" alt="Image du lieu">
|
||||
<img class="img-fluid mb-4" src="{{ commerce.tags_converted.image }}" alt="Image du lieu">
|
||||
{% endif %}
|
||||
|
||||
<h2>{{ 'display.attributes'|trans }}</h2>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<label for="commerce_tag_value__name">{{'display.keys.name'|trans}}</label>
|
||||
<h2 class="h3 mb-3">{{ 'display.attributes'|trans }}</h2>
|
||||
<div class="row g-3 mb-4">
|
||||
<div class="col-12 col-md-4">
|
||||
<label for="commerce_tag_value__name" class="form-label">{{'display.keys.name'|trans}}</label>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="col-12 col-md-8">
|
||||
<input type="text" class="form-control" name="commerce_tag_value__name" value="{% if commerce_overpass.tags_converted.name is defined %}{{ commerce_overpass.tags_converted.name }}{% elseif commerce_overpass['@attributes'].name is defined %}{{ commerce_overpass['@attributes'].name }}{% endif %}">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -63,14 +68,9 @@
|
|||
{% include 'public/edit/address.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if hide_filled_inputs and (commerce_overpass.tags_converted.opening_hours) is defined and commerce_overpass.tags_converted.opening_hours is empty %}
|
||||
{% include 'public/edit/opening_hours.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
{% if (commerce_overpass.tags_converted.wheelchair) is defined %}
|
||||
{{ dump(commerce_overpass.tags_converted.wheelchair) }}
|
||||
{% endif %}
|
||||
|
||||
{% if hide_filled_inputs and (commerce_overpass.tags_converted.wheelchair) is defined and commerce_overpass.tags_converted.wheelchair is empty %}
|
||||
{% include 'public/edit/wheelchair.html.twig' %}
|
||||
|
@ -81,33 +81,43 @@
|
|||
|
||||
{% include 'public/edit/tags.html.twig' %}
|
||||
|
||||
<div id="validation_messages"></div>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="bi bi-send"></i>
|
||||
{{ 'display.submit'|trans }}
|
||||
</button>
|
||||
<div id="validation_messages" class="alert alert-danger d-none"></div>
|
||||
<div class="d-grid gap-2 d-md-flex justify-content-md-end mt-4">
|
||||
<button type="submit" class="btn btn-primary col-12 col-md-5">
|
||||
<i class="bi bi-send"></i>
|
||||
{{ 'display.submit'|trans }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="p-4">
|
||||
<span class="last-modification">{{ 'display.last_modification'|trans }}: {{ commerce_overpass['@attributes'].timestamp }}</span>,
|
||||
<strong>{{ 'display.days_ago'|trans({'%days%': date(commerce_overpass['@attributes'].timestamp).diff(date()).days}) }}</strong>
|
||||
{{ 'display.by'|trans }}
|
||||
<a href="https://www.openstreetmap.org/user/{{ commerce_overpass['@attributes'].user }}" target="_blank">{{ commerce_overpass['@attributes'].user }}</a>
|
||||
<div class="lien-OpenStreetMap">
|
||||
<a href="https://www.openstreetmap.org/node/{{ commerce_overpass['@attributes'].id }}" target="_blank">{{ 'display.view_on_osm'|trans }}</a>
|
||||
<div class="row justify-content-center mt-4">
|
||||
<div class="col-12 col-lg-10 col-xl-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex flex-column flex-md-row align-items-md-center justify-content-between">
|
||||
<div class="mb-3 mb-md-0">
|
||||
<span class="last-modification">{{ 'display.last_modification'|trans }}: {{ commerce_overpass['@attributes'].timestamp }}</span>,
|
||||
<strong>{{ 'display.days_ago'|trans({'%days%': date(commerce_overpass['@attributes'].timestamp).diff(date()).days}) }}</strong>
|
||||
{{ 'display.by'|trans }}
|
||||
<a href="https://www.openstreetmap.org/user/{{ commerce_overpass['@attributes'].user }}" target="_blank">{{ commerce_overpass['@attributes'].user }}</a>
|
||||
</div>
|
||||
<div class="lien-OpenStreetMap">
|
||||
<a href="https://www.openstreetmap.org/node/{{ commerce_overpass['@attributes'].id }}" target="_blank" class="btn btn-outline-secondary">
|
||||
{{ 'display.view_on_osm'|trans }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="disclaimer mt-3 p-3 bg-light rounded">
|
||||
<p class="mb-0">
|
||||
<strong>{{ 'display.disclaimer.title'|trans }}:</strong>
|
||||
{{ 'display.disclaimer.text'|trans }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
<div class="disclaimer p-3">
|
||||
<p>
|
||||
<strong>{{ 'display.disclaimer.title'|trans }}:</strong>
|
||||
{{ 'display.disclaimer.text'|trans }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -20,25 +20,26 @@
|
|||
<h1>
|
||||
<i class="bi bi-shop"></i> Mon Commerce OSM
|
||||
</h1>
|
||||
<p>
|
||||
Bonjour, ce site permet de modifier les informations de votre commerce sur OpenStreetMap afin de gagner en visibilité sur des milliers de sites web à la fois en une minute, c'est gratuit et sans engagement. Nous sommes bénévoles dans une association à but non lucratif.
|
||||
<br>
|
||||
Nous vous enverrons un lien unique pour cela par email, et si vous en avez besoin, nous pouvons vous aider.
|
||||
<p class="mt-4 p-4">
|
||||
Bonjour, ce site permet de modifier les informations de votre commerce sur OpenStreetMap afin de gagner en visibilité sur des milliers de sites web à la fois en une minute, c'est gratuit et sans engagement.
|
||||
<br>Nous sommes bénévoles dans une association à but non lucratif.
|
||||
<br>Nous vous enverrons un lien unique pour cela par email, et si vous en avez besoin, nous pouvons vous aider.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<label class="input-group-text" for="researchShop">Rechercher un commerce, écrivez son nom et la ville
|
||||
<i class="bi bi-search"></i> <input class="form-control" type="text" id="researchShop" placeholder="Rechercher un commerce">
|
||||
<label class="label" for="researchShop"><i class="bi bi-search bi-2x"></i> Rechercher un commerce, écrivez son nom et la ville
|
||||
</label>
|
||||
<input class="form-control" type="text" id="researchShop" placeholder="Mon commerce, Paris">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="resultsList"></div>
|
||||
<div id="proposeLink"></div>
|
||||
<div id="proposeMail">
|
||||
<div id="proposeLink" class="d-none"></div>
|
||||
<div id="proposeMail" class="d-none">
|
||||
|
||||
<input type="email" id="emailInput" class="form-control" placeholder="mon_email_de_commerce@exemple.com">
|
||||
<button type="submit" class="btn btn-primary p-4 d-block"> <i class="bi bi-envelope"></i> Envoyer</button>
|
||||
|
@ -62,13 +63,13 @@
|
|||
|
||||
// Créer les divs pour les messages
|
||||
const proposeLinkHtml = `
|
||||
<div id="proposeLink" class="alert alert-success">
|
||||
<div id="proposeLink" class="alert alert-success ">
|
||||
Un email a déjà été enregistré pour ce commerce. Nous vous enverrons le lien de modification.
|
||||
</div>
|
||||
`;
|
||||
|
||||
const proposeMailHtml = `
|
||||
<div id="proposeMail" class="alert alert-info">
|
||||
<div id="proposeMail" class="alert alert-info " >
|
||||
Aucun email n'est enregistré pour ce commerce. Veuillez saisir votre email pour recevoir le lien de modification.
|
||||
${emailFormHtml}
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'display.title'|trans }}{% endblock %}
|
||||
{% block title %}{{ 'display.title'|trans }} - accueil{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
|
@ -8,7 +8,7 @@
|
|||
<style>
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -6,13 +6,19 @@
|
|||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="{{ path('app_public_index') }}">{{ 'display.home'|trans }}</a>
|
||||
<a class="nav-link active" href="{{ path('app_public_index') }}">
|
||||
<i class="bi bi-house-fill"></i>
|
||||
{{ 'display.home'|trans }}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ path('app_public_dashboard') }}">{{ 'display.stats'|trans }}</a>
|
||||
<a class="nav-link" href="{{ path('app_public_dashboard') }}">
|
||||
<i class="bi bi-bar-chart-fill"></i>
|
||||
{{ 'display.stats'|trans }}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://openstreetmap.fr/contact/">{{ 'display.contact_humans'|trans }}</a>
|
||||
<a class="nav-link" href="https://openstreetmap.fr/contact/">
|
||||
<i class="bi bi-envelope-fill"></i>
|
||||
{{ 'display.contact_humans'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue