From 2e743391b90ded11484992107fd1c16bd30cbd3e Mon Sep 17 00:00:00 2001 From: vedatakd Date: Thu, 30 Jan 2020 17:49:37 +0300 Subject: [PATCH] move to location settings --- .../advs-module/resources/config/settings.php | 51 ----------- .../views/ad-detail/partials/map.twig | 4 +- .../advs-module/resources/views/list/map.twig | 2 +- .../resources/views/new-ad/new-create.twig | 8 +- .../resources/config/settings.php | 34 -------- .../resources/config/settings/sections.php | 30 +++++++ .../resources/config/settings/settings.php | 71 +++++++++++++++ .../location-module/resources/js/settings.js | 86 +++++++++++++++++++ .../resources/lang/en/section.php | 3 + .../resources/lang/en/setting.php | 21 +++++ .../resources/lang/tr/section.php | 3 + .../resources/lang/tr/setting.php | 30 +++++-- .../resources/views/new-ad/map.twig | 2 +- .../resources/views/settings/field.twig | 8 ++ 14 files changed, 255 insertions(+), 98 deletions(-) delete mode 100644 addons/default/visiosoft/location-module/resources/config/settings.php create mode 100644 addons/default/visiosoft/location-module/resources/config/settings/sections.php create mode 100644 addons/default/visiosoft/location-module/resources/config/settings/settings.php create mode 100644 addons/default/visiosoft/location-module/resources/js/settings.js create mode 100644 addons/default/visiosoft/location-module/resources/views/settings/field.twig diff --git a/addons/default/visiosoft/advs-module/resources/config/settings.php b/addons/default/visiosoft/advs-module/resources/config/settings.php index 49440ad18..df8cbb733 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings.php @@ -74,41 +74,6 @@ return [ ], ], - 'default_country' => [ - 'type' => 'anomaly.field_type.relationship', - 'bind' => 'adv.default_country', - 'env' => 'ADV_COUNTRY', - 'config' => [ - 'related' => CountryModel::class, - "default_value" => 212, - ] - ], - 'default_city' => [ - 'type' => 'anomaly.field_type.relationship', - 'bind' => 'adv.default_city', - 'env' => 'ADV_CITY', - 'config' => [ - 'related' => LocationCitiesEntryModel::class, - "default_value" => 34, - ] - ], - 'default_district' => [ - 'type' => 'anomaly.field_type.relationship', - 'bind' => 'adv.default_district', - 'env' => 'ADV_DISTRICT', - 'config' => [ - 'related' => LocationDistrictsEntryModel::class, - "default_value" => 1091, - ] - ], - 'google_map_key' => [ - 'type' => 'anomaly.field_type.text', - 'bind' => 'adv.google_map_key', - 'env' => 'ADV_MAP_KEY', - 'config' => [ - 'default_value' => 'AIzaSyCAGc0z8kg9rKGVy2FizFKoz0FoWWWzoGQ', - ], - ], 'google_statistic_code' => [ 'type' => 'anomaly.field_type.editor', 'bind' => 'adv.google_statistic_code', @@ -117,22 +82,6 @@ return [ 'default_value' => '', ], ], - 'map_coordinates_long' => [ - 'type' => 'anomaly.field_type.text', - 'bind' => 'adv.map_coordinates_long', - 'env' => 'ADV_MAP_LONG', - 'config' => [ - 'default_value' => '28.74558607285155', - ], - ], - 'map_coordinates_lat' => [ - 'type' => 'anomaly.field_type.text', - 'bind' => 'adv.map_coordinates_lat', - 'env' => 'ADV_MAP_LAT', - 'config' => [ - 'default_value' => '40.97817786299617', - ], - ], 'logo' => [ 'type' => 'anomaly.field_type.file', 'bind' => 'adv.logo', diff --git a/addons/default/visiosoft/advs-module/resources/views/ad-detail/partials/map.twig b/addons/default/visiosoft/advs-module/resources/views/ad-detail/partials/map.twig index a6f0320b9..22fd037e7 100644 --- a/addons/default/visiosoft/advs-module/resources/views/ad-detail/partials/map.twig +++ b/addons/default/visiosoft/advs-module/resources/views/ad-detail/partials/map.twig @@ -7,7 +7,7 @@ - {% endif %} diff --git a/addons/default/visiosoft/advs-module/resources/views/list/map.twig b/addons/default/visiosoft/advs-module/resources/views/list/map.twig index 933f3cd8e..391f56f13 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/map.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/map.twig @@ -128,7 +128,7 @@ {% endblock %} diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig index 664ae6094..05db8de6a 100644 --- a/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig @@ -109,10 +109,10 @@ {{ asset_add("scripts.js", "visiosoft.module.advs::js/location.js") }} {% endif %} \ No newline at end of file diff --git a/addons/default/visiosoft/location-module/resources/views/settings/field.twig b/addons/default/visiosoft/location-module/resources/views/settings/field.twig new file mode 100644 index 000000000..25f439851 --- /dev/null +++ b/addons/default/visiosoft/location-module/resources/views/settings/field.twig @@ -0,0 +1,8 @@ + +{{ asset_add("scripts.js","visiosoft.module.location::js/settings.js") }} \ No newline at end of file