mirror of
https://forge.chapril.org/tykayn/osm-commerces
synced 2025-06-20 01:44:42 +02:00
up templates
This commit is contained in:
parent
b1965abe06
commit
f15fec6d18
12 changed files with 185 additions and 105 deletions
13
README.md
13
README.md
|
@ -21,6 +21,19 @@ déployer sur un serveur ayant du php 8
|
|||
|
||||
créer un utilisateur et sa base
|
||||
|
||||
## en postgresql
|
||||
```shell
|
||||
sudo -u postgres psql -c "CREATE USER sf WITH PASSWORD 'sfrgdHYJi56631lyshFSQGfd45452ùwdf54f8fg5dfhg5_tyfdgthIOPHFUGH';"
|
||||
sudo -u postgres psql -c "CREATE DATABASE \"osm-my-commerce\" OWNER sf;"
|
||||
```
|
||||
|
||||
## en mysql
|
||||
|
||||
```shell
|
||||
mysql -u root -p
|
||||
CREATE USER 'sf'@'localhost' IDENTIFIED BY 'sfrgdHYJi56631lyshFSQGfd45452ùwdf54f8fg5dfhg5_tyfdgthIOPHFUGH';
|
||||
CREATE DATABASE `osm-my-commerce`;
|
||||
GRANT ALL PRIVILEGES ON `osm-my-commerce`.* TO 'sf'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
|
||||
```
|
||||
|
|
24
cipherbliss-osm-commerce.config.caddy
Normal file
24
cipherbliss-osm-commerce.config.caddy
Normal file
|
@ -0,0 +1,24 @@
|
|||
osm-commerces.cipherbliss.com {
|
||||
root * /home/poule/encrypted/stockage-syncable/www/development/html/osm-commerce-sf/public
|
||||
|
||||
# serve files directly if they can be found (e.g. CSS or JS files in public/)
|
||||
encode zstd gzip
|
||||
file_server
|
||||
|
||||
# otherwise, use PHP-FPM (replace "unix//var/..." with "127.0.0.1:9000" when using TCP)
|
||||
php_fastcgi unix//var/run/php/php8.4-fpm.sock {
|
||||
# only fall back to root index.php aka front controller.
|
||||
try_files {path} index.php
|
||||
}
|
||||
|
||||
# Logs
|
||||
log {
|
||||
output file /var/log/caddy/access-osm-commerce-sf.log
|
||||
format console
|
||||
}
|
||||
|
||||
@phpFile {
|
||||
path *.php*
|
||||
}
|
||||
error @phpFile "Not found" 404
|
||||
}
|
|
@ -61,7 +61,15 @@
|
|||
<input type="hidden" name="osm_kind" value="{{ osm_kind }}">
|
||||
<div class="mb-3">
|
||||
<label for="commerce_id" class="form-label">{{ 'display.modify_commerce'|trans }}:
|
||||
<strong>{{ commerce.tags_converted.name }}</strong>
|
||||
<strong>
|
||||
{% if commerce.tags_converted.name is defined %}
|
||||
{{ commerce.tags_converted.name }}
|
||||
{% elseif commerce['@attributes'].name is defined %}
|
||||
{{ commerce['@attributes'].name }}
|
||||
{% else %}
|
||||
{{ 'display.unknown'|trans }}
|
||||
{% endif %}
|
||||
</strong>
|
||||
</label>
|
||||
<br/>
|
||||
|
||||
|
@ -92,118 +100,22 @@
|
|||
|
||||
{% if commerce.tags_converted.amenity is defined %}
|
||||
{% if commerce.tags_converted.amenity == 'townhall' %}
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<label for="commerce_tag_value__building">{{'display.keys.building'|trans}}</label>
|
||||
|
||||
<select class="form-control" placeholder="{{'display.please_select'|trans}}" name="commerce_tag_value__building">
|
||||
<option value="">{{'display.please_select'|trans}}</option>
|
||||
<option value="main">{{'display.values.building.main'|trans}}</option>
|
||||
<option value="annex">{{'display.values.building.annex'|trans}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'public/edit/townhall.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
{% if commerce.tags_converted.amenity == 'restaurant' %}
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<label for="commerce_tag_value__cuisine">{{'display.keys.cuisine'|trans}}</label>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<input type="text" class="form-control" name="commerce_tag_value__cuisine"
|
||||
placeholder="française;italienne;japonaise"
|
||||
value="{% if commerce.tags_converted.cuisine is defined %}{{ commerce.tags_converted.cuisine }}{% endif %}">
|
||||
<small class="form-text text-muted">{{'display.help.cuisine'|trans}}</small>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'public/edit/restaurant.html.twig' %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="ask_angela">
|
||||
<h2>{{ 'display.ask_angela'|trans }}</h2>
|
||||
<p class="description">{{ 'display.ask_angela_description'|trans }}</p>
|
||||
<p class="more-info">
|
||||
<a href="https://www.openstreetmap.fr/contact/" target="_blank">{{ 'display.ask_angela_more_info'|trans }}</a>
|
||||
</p>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<label for="commerce_tag_value__angela">{{'display.ask_angela'|trans}}</label>
|
||||
|
||||
<input type="checkbox" name="commerce_tag_value__angela" value="yes">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="wheelchair">
|
||||
<h2>{{ 'display.wheelchair'|trans }}</h2>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<label for="commerce_tag_value__wheelchair">{{'display.keys.wheelchair'|trans}}</label>
|
||||
|
||||
<select class="form-control" placeholder="{{'display.please_select'|trans}}" name="commerce_tag_value__wheelchair" value="{% if commerce.tags_converted.wheelchair is defined %}{{ commerce.tags_converted.wheelchair }}{% endif %}">
|
||||
<option value="">{{'display.please_select'|trans}}</option>
|
||||
<option value="yes">{{'display.values.wheelchair.yes'|trans}}</option>
|
||||
<option value="limited">{{'display.values.wheelchair.limited'|trans}}</option>
|
||||
<option value="no">{{'display.values.wheelchair.no'|trans}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="opening_hours">
|
||||
<h2>{{ 'display.opening_hours'|trans }}</h2>
|
||||
<p class="description">{{ 'display.opening_hours_description'|trans }}</p>
|
||||
|
||||
<input type="checkbox" name="commerce_tag_value__opening_hours_1" value="yes">
|
||||
Lundi de
|
||||
|
||||
<input type="number" name="commerce_tag_value__opening_hours_1_midday_hour" value="">
|
||||
à
|
||||
<input type="number" name="commerce_tag_value__opening_hours_1_midday_minute" value="">.
|
||||
|
||||
<input type="checkbox" name="commerce_tag_value__opening_hours_1_midday" value="yes">
|
||||
et
|
||||
|
||||
<input type="number" name="commerce_tag_value__opening_hours_1_midday_hour" value="">
|
||||
à
|
||||
<input type="number" name="commerce_tag_value__opening_hours_1_midday_minute" value="">.
|
||||
|
||||
<input type="checkbox" name="commerce_tag_value__opening_hours_1_evening" value="yes">
|
||||
<hr>
|
||||
|
||||
</div>
|
||||
<div id="addresses">
|
||||
<h2>{{ 'display.address'|trans }}</h2>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<label for="commerce_tag_value__addr:housenumber">{{'display.keys.addr:housenumber'|trans}}</label>
|
||||
|
||||
<label for="commerce_tag_value__addr:street">{{'display.keys.addr:street'|trans}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<fieldset>
|
||||
{% for attributes in commerce.tag %}
|
||||
{% for kv in attributes %}
|
||||
{% if kv.k == 'opening_hours' %}
|
||||
{{ 'display.keys.opening_hours'|trans }}
|
||||
{% else %}
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<input type="text" class="form-control hidden" name="commerce_tag_key__{{ kv.k }}" value="{{ kv.k }}" readonly>
|
||||
<span class="label-translated">{{ ('display.keys.' ~ kv.k)|trans }}</span>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<input type="text" class="form-control" name="commerce_tag_value__{{ kv.k }}" value="{{ kv.v }}">
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
{% include 'public/edit/ask_angela.html.twig' %}
|
||||
{% include 'public/edit/wheelchair.html.twig' %}
|
||||
{% include 'public/edit/opening_hours.html.twig' %}
|
||||
{% include 'public/edit/address.html.twig' %}
|
||||
{% include 'public/edit/tags.html.twig' %}
|
||||
|
||||
<button type="submit" class="btn btn-primary">{{ 'display.submit'|trans }}</button>
|
||||
</form>
|
||||
|
|
10
templates/public/edit/address.html.twig
Normal file
10
templates/public/edit/address.html.twig
Normal file
|
@ -0,0 +1,10 @@
|
|||
<div id="addresses">
|
||||
<h2>{{ 'display.address'|trans }}</h2>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<label for="commerce_tag_value__addr:housenumber">{{'display.keys.addr:housenumber'|trans}}</label>
|
||||
|
||||
<label for="commerce_tag_value__addr:street">{{'display.keys.addr:street'|trans}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
15
templates/public/edit/ask_angela.html.twig
Normal file
15
templates/public/edit/ask_angela.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
<div id="ask_angela">
|
||||
<h2>{{ 'display.ask_angela'|trans }}</h2>
|
||||
<p class="description">{{ 'display.ask_angela_description'|trans }}</p>
|
||||
<p class="more-info">
|
||||
<a href="https://www.openstreetmap.fr/contact/" target="_blank">{{ 'display.ask_angela_more_info'|trans }}</a>
|
||||
</p>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<label for="commerce_tag_value__angela">{{'display.ask_angela'|trans}}</label>
|
||||
|
||||
<input type="checkbox" name="commerce_tag_value__angela" value="yes">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
22
templates/public/edit/opening_hours.html.twig
Normal file
22
templates/public/edit/opening_hours.html.twig
Normal file
|
@ -0,0 +1,22 @@
|
|||
<div id="opening_hours">
|
||||
<h2>{{ 'display.opening_hours'|trans }}</h2>
|
||||
<p class="description">{{ 'display.opening_hours_description'|trans }}</p>
|
||||
|
||||
<input type="checkbox" name="commerce_tag_value__opening_hours_1" value="yes">
|
||||
Lundi de
|
||||
|
||||
<input type="number" name="commerce_tag_value__opening_hours_1_midday_hour" value="">
|
||||
à
|
||||
<input type="number" name="commerce_tag_value__opening_hours_1_midday_minute" value="">.
|
||||
|
||||
<input type="checkbox" name="commerce_tag_value__opening_hours_1_midday" value="yes">
|
||||
et
|
||||
|
||||
<input type="number" name="commerce_tag_value__opening_hours_1_midday_hour" value="">
|
||||
à
|
||||
<input type="number" name="commerce_tag_value__opening_hours_1_midday_minute" value="">.
|
||||
|
||||
<input type="checkbox" name="commerce_tag_value__opening_hours_1_evening" value="yes">
|
||||
<hr>
|
||||
|
||||
</div>
|
11
templates/public/edit/restaurant.html.twig
Normal file
11
templates/public/edit/restaurant.html.twig
Normal file
|
@ -0,0 +1,11 @@
|
|||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<label for="commerce_tag_value__cuisine">{{'display.keys.cuisine'|trans}}</label>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<input type="text" class="form-control" name="commerce_tag_value__cuisine"
|
||||
placeholder="française;italienne;japonaise"
|
||||
value="{% if commerce.tags_converted.cuisine is defined %}{{ commerce.tags_converted.cuisine }}{% endif %}">
|
||||
<small class="form-text text-muted">{{'display.help.cuisine'|trans}}</small>
|
||||
</div>
|
||||
</div>
|
22
templates/public/edit/tags.html.twig
Normal file
22
templates/public/edit/tags.html.twig
Normal file
|
@ -0,0 +1,22 @@
|
|||
{% block tags %}<fieldset>
|
||||
<div id="tags">
|
||||
|
||||
{% for attributes in commerce.tag %}
|
||||
{% for kv in attributes %}
|
||||
{# {% if kv.k == 'opening_hours' %}
|
||||
{{ 'display.keys.opening_hours'|trans }}
|
||||
{% else %} #}
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<input type="text" class="form-control hidden" name="commerce_tag_key__{{ kv.k }}" value="{{ kv.k }}" readonly>
|
||||
<span class="label-translated">{{ ('display.keys.' ~ kv.k)|trans }}</span>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<input type="text" class="form-control" name="commerce_tag_value__{{ kv.k }}" value="{{ kv.v }}">
|
||||
</div>
|
||||
{# {% endif %} #}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
</div></fieldset>
|
||||
{% endblock %}
|
11
templates/public/edit/townhall.html.twig
Normal file
11
templates/public/edit/townhall.html.twig
Normal file
|
@ -0,0 +1,11 @@
|
|||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<label for="commerce_tag_value__building">{{'display.keys.building'|trans}}</label>
|
||||
|
||||
<select class="form-control" placeholder="{{'display.please_select'|trans}}" name="commerce_tag_value__building" value="{% if commerce.tags_converted.building is defined %}{{ commerce.tags_converted.building }}{% endif %}">
|
||||
<option value="">{{'display.please_select'|trans}}</option>
|
||||
<option value="main">{{'display.values.building.main'|trans}}</option>
|
||||
<option value="annex">{{'display.values.building.annex'|trans}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
15
templates/public/edit/wheelchair.html.twig
Normal file
15
templates/public/edit/wheelchair.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
<div id="wheelchair">
|
||||
<h2>{{ 'display.wheelchair'|trans }}</h2>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<label for="commerce_tag_value__wheelchair">{{'display.keys.wheelchair'|trans}}</label>
|
||||
|
||||
<select class="form-control" placeholder="{{'display.please_select'|trans}}" name="commerce_tag_value__wheelchair" value="{% if commerce.tags_converted.wheelchair is defined %}{{ commerce.tags_converted.wheelchair }}{% endif %}">
|
||||
<option value="">{{'display.please_select'|trans}}</option>
|
||||
<option value="yes">{{'display.values.wheelchair.yes'|trans}}</option>
|
||||
<option value="limited">{{'display.values.wheelchair.limited'|trans}}</option>
|
||||
<option value="no">{{'display.values.wheelchair.no'|trans}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -21,6 +21,7 @@ display:
|
|||
attributes: 'Attributes'
|
||||
opening_hours: 'Opening hours'
|
||||
opening_hours_description: 'Good opening hours are important for customers to find you.'
|
||||
unknown: 'Unknown'
|
||||
values:
|
||||
wheelchair:
|
||||
yes: 'the place is fully accessible in wheelchair'
|
||||
|
|
|
@ -13,16 +13,33 @@ display:
|
|||
by: "par"
|
||||
view_on_osm: "Voir sur OpenStreetMap"
|
||||
please_select: "Veuillez sélectionner"
|
||||
unknown: "Inconnu"
|
||||
wheelchair: "Accès PMR"
|
||||
ask_angela: "Demander Angela"
|
||||
ask_angela_description: "Ce lieu participe à la campagne nationale 'Demander Angela' pour aider à la prévention du harcèlement"
|
||||
ask_angela_more_info: "Plus d'informations sur la campagne"
|
||||
address: "Adresse"
|
||||
attributes: "Attributs"
|
||||
opening_hours: "Horaires d'ouverture"
|
||||
opening_hours_description: "De bons horaires d'ouverture sont importants pour que les clients puissent vous trouver."
|
||||
values:
|
||||
wheelchair: "Accès PMR"
|
||||
wheelchair:
|
||||
yes: "le lieu est totalement praticable en fauteuil roulant"
|
||||
limited: "le lieu est accessible en fauteuil roulant mais pas partout"
|
||||
no: "le lieu n'est pas accessible en fauteuil roulant"
|
||||
angela:
|
||||
yes: "Oui"
|
||||
no: "Non"
|
||||
building:
|
||||
main: "Principal"
|
||||
annex: "Annexe"
|
||||
cuisine: "Cuisine"
|
||||
keys:
|
||||
tags: "étiquettes"
|
||||
name: "Nom"
|
||||
address: "Adresse"
|
||||
phone: "Téléphone"
|
||||
building: "Bâtiment"
|
||||
contact:email: "Email"
|
||||
contact:phone: "Téléphone du contact"
|
||||
address:housenumber: "Numéro de rue"
|
||||
|
@ -35,6 +52,13 @@ display:
|
|||
shop: "Type de commerce"
|
||||
tourism: "Tourisme"
|
||||
wheelchair: "Accès PMR"
|
||||
addr:housenumber: "Numéro de rue"
|
||||
addr:street: "Rue"
|
||||
addr:city: "Ville"
|
||||
addr:postcode: "Code postal"
|
||||
amenity: "Équipement"
|
||||
source: "Source"
|
||||
ref:FR:SIRET: "SIRET"
|
||||
disclaimer:
|
||||
title: "Attention"
|
||||
text: "Ce site est un travail en cours, ceci est une démonstration sur un objet fictif qui utilise les données de l'API OpenStreetMap."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue