diff --git a/local/modules/Front/Controller/OrderController.php b/local/modules/Front/Controller/OrderController.php index 6b9ebd88..5b678956 100644 --- a/local/modules/Front/Controller/OrderController.php +++ b/local/modules/Front/Controller/OrderController.php @@ -23,6 +23,9 @@ namespace Front\Controller; use Front\Front; +use LivraisonParSecteurs\LivraisonParSecteurs; +use LivraisonParSecteurs\Model\LpsAreaCityQuery; +use LivraisonParSecteurs\Model\LpsAreaQuery; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\Exception\PropelException; use Symfony\Component\HttpFoundation\Response as BaseResponse; @@ -46,6 +49,7 @@ use Thelia\Model\Order; use Thelia\Model\OrderProductQuery; use Thelia\Model\OrderQuery; use Thelia\Module\AbstractDeliveryModule; +use Thelia\Module\BaseModule; use Thelia\Module\Exception\DeliveryException; /** diff --git a/templates/backOffice/custom/assets/img/pin.svg b/local/modules/LivraisonParSecteurs/templates/backOffice/default/assets/img/pin.svg similarity index 100% rename from templates/backOffice/custom/assets/img/pin.svg rename to local/modules/LivraisonParSecteurs/templates/backOffice/default/assets/img/pin.svg diff --git a/local/modules/LivraisonParSecteurs/templates/backOffice/default/includes/area-cities.html b/local/modules/LivraisonParSecteurs/templates/backOffice/default/includes/area-cities.html index dc930a33..0174acb6 100644 --- a/local/modules/LivraisonParSecteurs/templates/backOffice/default/includes/area-cities.html +++ b/local/modules/LivraisonParSecteurs/templates/backOffice/default/includes/area-cities.html @@ -26,7 +26,7 @@ height: 30px !important; } - .pin { + .pin-lps { height: 25px; margin-left: 12px; } @@ -82,7 +82,7 @@ {loop name="cities" type="lps_area_cities" area_id="$area_id" order="title"} {$ZIPCODE} - {$TITLE}{if $LATITUDE eq '' or $LONGITUDE eq ''}Pas de coordonnées{/if} + {$TITLE}{if $LATITUDE eq '' or $LONGITUDE eq ''}Pas de coordonnées{/if}
{loop name="auth-delete" type="auth" role="ADMIN" resource="admin.lps.cities" access="DELETE" module="LivraisonParSecteurs"} diff --git a/local/modules/LivraisonParSecteurs/templates/backOffice/default/scheduled-deliveries.html b/local/modules/LivraisonParSecteurs/templates/backOffice/default/scheduled-deliveries.html index 1ea9d47e..38d5fd6e 100644 --- a/local/modules/LivraisonParSecteurs/templates/backOffice/default/scheduled-deliveries.html +++ b/local/modules/LivraisonParSecteurs/templates/backOffice/default/scheduled-deliveries.html @@ -29,15 +29,15 @@ {loop name="deliveries-loop" type="scheduled_deliveries" domicile_ou_retrait="domicile" only_future="true" order="date"} {if $DELTA <= 7} - {assign var=path value="{image file='/assets/img/flag-green.png'}"} + {assign var=path value="{image file='assets/img/drapeau-vert.png'}"} {assign var=alt value='Drapeau vert'} {/if} {if $DELTA <= 4} - {assign var=path value="{image file='/assets/img/flag-orange.png'}"} + {assign var=path value="{image file='assets/img/drapeau-orange.png'}"} {assign var=alt value='Drapeau orange'} {/if} {if $DELTA <= 1} - {assign var=path value="{image file='/assets/img/flag-red.png'}"} + {assign var=path value="{image file='assets/img/drapeau-rouge.png'}"} {assign var=alt value='Drapeau rouge'} {/if} {assign var=title value="{$DELTA} jour(s) de délai"} diff --git a/local/modules/PointRetrait/I18n/fr_FR.php b/local/modules/PointRetrait/I18n/fr_FR.php index 111f7a6c..cc03eca9 100644 --- a/local/modules/PointRetrait/I18n/fr_FR.php +++ b/local/modules/PointRetrait/I18n/fr_FR.php @@ -10,12 +10,14 @@ return array( 'Edit a place' => 'Modifier un lieu de retrait', 'Location set' => 'Coordonnées GPS présentes ?', 'Main' => 'Généralités', + 'Message no location' => 'Ce point de retrait ne possède pas de coordonnées GPS : il est conseillé de localiser l\'adresse, pour les clients', 'Minimum amount' => 'Minimum de commande', 'Module name' => 'Point de Retrait AuxBieauxLegumes', 'My places' => 'Point de retrait AuxBieauxLegumes', 'My withdrawal places' => 'Mes points de retrait AuxBieauxLegumes', 'Order number' => 'N° de commande', 'Place' => 'Point de retrait', + 'Recenter map' => 'Recentrer la carte sur l\'adresse', 'Revert origin position' => 'Revenir à la position d\'origine', 'Schedule' => 'Horaires de retrait', 'Scheduled date' => 'Date de retrait prévue', diff --git a/local/modules/PointRetrait/templates/backOffice/default/assets/css/styles.css b/local/modules/PointRetrait/templates/backOffice/default/assets/css/styles.css index 51b10a72..3c10fc5e 100644 --- a/local/modules/PointRetrait/templates/backOffice/default/assets/css/styles.css +++ b/local/modules/PointRetrait/templates/backOffice/default/assets/css/styles.css @@ -42,4 +42,25 @@ margin-top: 25px; text-align: center; font-style: italic; +} + +#submit-geoloc { + width: 50px; + cursor: pointer; +} + +.bouton-geoloc { + display: inline-block; + align-items: center; + margin-top: 25px; +} + +.bouton-geoloc span { + font-size: larger; + font-weight: 600; +} + +.pin-pdr { + height: 25px; + margin-left: 12px; } \ No newline at end of file diff --git a/local/modules/PointRetrait/templates/backOffice/default/assets/img/compass.svg b/local/modules/PointRetrait/templates/backOffice/default/assets/img/compass.svg new file mode 100644 index 00000000..9bad51ff --- /dev/null +++ b/local/modules/PointRetrait/templates/backOffice/default/assets/img/compass.svg @@ -0,0 +1 @@ +Compass \ No newline at end of file diff --git a/local/modules/PointRetrait/templates/backOffice/default/assets/img/logo-reserve.png b/local/modules/PointRetrait/templates/backOffice/default/assets/img/logo-reserve.png deleted file mode 100644 index 4c3a5ae9..00000000 Binary files a/local/modules/PointRetrait/templates/backOffice/default/assets/img/logo-reserve.png and /dev/null differ diff --git a/local/modules/PointRetrait/templates/backOffice/default/assets/img/pin.svg b/local/modules/PointRetrait/templates/backOffice/default/assets/img/pin.svg new file mode 100644 index 00000000..35417c6c --- /dev/null +++ b/local/modules/PointRetrait/templates/backOffice/default/assets/img/pin.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/local/modules/PointRetrait/templates/backOffice/default/includes/main.html b/local/modules/PointRetrait/templates/backOffice/default/includes/main.html index f33ab611..c0559cce 100644 --- a/local/modules/PointRetrait/templates/backOffice/default/includes/main.html +++ b/local/modules/PointRetrait/templates/backOffice/default/includes/main.html @@ -23,7 +23,7 @@ {/form_field}
-
+
{form_field form=$form field="title"}
-
+
{form_field form=$form field="minimum_amount"}
-
- {form_field form=$form field="latitude"} - - {/form_field} - {form_field form=$form field="longitude"} - - {/form_field} -
- - -
@@ -163,7 +152,7 @@
-
+
{form_field form=$form field="access_comment"}
+
+
+ Geolocate + {intl l="Recenter map" d="pointretrait"} +
+ {form_field form=$form field="latitude"} + + {/form_field} + {form_field form=$form field="longitude"} + + {/form_field} +
+
diff --git a/local/modules/PointRetrait/templates/backOffice/default/js/main-js.html b/local/modules/PointRetrait/templates/backOffice/default/js/main-js.html index 7e6157d1..7b2ab7cf 100644 --- a/local/modules/PointRetrait/templates/backOffice/default/js/main-js.html +++ b/local/modules/PointRetrait/templates/backOffice/default/js/main-js.html @@ -1,6 +1,7 @@ \ No newline at end of file diff --git a/local/modules/PointRetrait/templates/backOffice/default/place-edit.html b/local/modules/PointRetrait/templates/backOffice/default/place-edit.html index 49075d7a..ccb32b68 100644 --- a/local/modules/PointRetrait/templates/backOffice/default/place-edit.html +++ b/local/modules/PointRetrait/templates/backOffice/default/place-edit.html @@ -11,6 +11,9 @@ {/block} {block name="main-content"} + + +
{assign "place_id" $smarty.get.place_id} @@ -43,6 +46,8 @@ {/loop}
+ +
{* @@ -69,6 +74,10 @@ var hash = location.hash.slice(1); if (!hash) hash = "main"; $('#tabbed-menu a[href="#' + hash + '"]').tab('show'); + + if ($("#latitude").val() == '') + alert ($('#message-pas-de-coordonnees').val()); + }); {/javascripts} diff --git a/local/modules/PointRetrait/templates/backOffice/default/places-list.html b/local/modules/PointRetrait/templates/backOffice/default/places-list.html index 00ae4307..3dc21804 100644 --- a/local/modules/PointRetrait/templates/backOffice/default/places-list.html +++ b/local/modules/PointRetrait/templates/backOffice/default/places-list.html @@ -49,7 +49,7 @@ mais{extends file="admin-layout.tpl"}
- {$ADDRESS1}
{$ZIPCODE} {$CITY} + {$ADDRESS1}
{$ZIPCODE} {$CITY}{if $LATITUDE eq '' or $LONGITUDE eq ''}Pas de coordonnées{/if} {$DELIVERY_DAYS}{if $DELIVERY_DAYS eq ''}{intl l="There is no schedule for this place" d='pointretrait'}{/if} {$PRICE} € {$MINIMUM_AMOUNT} € diff --git a/local/modules/PointRetrait/templates/backOffice/default/scheduled-withdrawals.html b/local/modules/PointRetrait/templates/backOffice/default/scheduled-withdrawals.html index ff2be328..7b2450bb 100644 --- a/local/modules/PointRetrait/templates/backOffice/default/scheduled-withdrawals.html +++ b/local/modules/PointRetrait/templates/backOffice/default/scheduled-withdrawals.html @@ -28,15 +28,15 @@ {loop name="deliveries-loop" type="scheduled_deliveries" domicile_ou_retrait="retrait" only_future="true" order="date"} {if $DELTA <= 7} - {assign var=path value="{image file='/assets/img/flag-green.png'}"} + {assign var=path value="{image file='assets/img/drapeau-vert.png'}"} {assign var=alt value='Drapeau vert'} {/if} {if $DELTA <= 4} - {assign var=path value="{image file='/assets/img/flag-orange.png'}"} + {assign var=path value="{image file='assets/img/drapeau-orange.png'}"} {assign var=alt value='Drapeau orange'} {/if} {if $DELTA <= 1} - {assign var=path value="{image file='/assets/img/flag-red.png'}"} + {assign var=path value="{image file='assets/img/drapeau-rouge.png'}"} {assign var=alt value='Drapeau rouge'} {/if} {assign var=title value="{$DELTA} jour(s) de délai"} diff --git a/templates/backOffice/custom/assets/img/flag-orange.png b/templates/backOffice/custom/assets/img/drapeau-orange.png similarity index 100% rename from templates/backOffice/custom/assets/img/flag-orange.png rename to templates/backOffice/custom/assets/img/drapeau-orange.png diff --git a/templates/backOffice/custom/assets/img/flag-red.png b/templates/backOffice/custom/assets/img/drapeau-rouge.png similarity index 100% rename from templates/backOffice/custom/assets/img/flag-red.png rename to templates/backOffice/custom/assets/img/drapeau-rouge.png diff --git a/templates/backOffice/custom/assets/img/flag-green.png b/templates/backOffice/custom/assets/img/drapeau-vert.png similarity index 100% rename from templates/backOffice/custom/assets/img/flag-green.png rename to templates/backOffice/custom/assets/img/drapeau-vert.png