From a96537e10b7734f6084fd775d8e4c102ff70d683 Mon Sep 17 00:00:00 2001 From: Diatrex Date: Thu, 17 Dec 2020 15:32:59 +0300 Subject: [PATCH] =?UTF-8?q?#2916=20emlak24=20acil=20yap=C4=B1lmas=C4=B1=20?= =?UTF-8?q?gereken=20maddeler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/config/settings/sections.php | 2 ++ .../resources/config/settings/settings.php | 12 ++++++++++++ .../resources/css/post-category.css | 5 +++-- .../advs-module/resources/css/step.scss | 10 +--------- .../advs-module/resources/css/step2.css | 18 ++++++++++++++++++ .../visiosoft/advs-module/resources/js/cats.js | 2 +- .../advs-module/resources/lang/en/setting.php | 8 ++++++++ .../resources/views/new-ad/partials/steps.twig | 1 + .../resources/views/new-ad/post-cat.twig | 6 +++--- .../advs-module/src/Adv/AdvRepository.php | 4 +++- .../src/Http/Controller/advsController.php | 7 ++++++- .../resources/lang/en/button.php | 1 + .../views/address/partials/fields.twig | 4 ++-- .../resources/views/profile/ads.twig | 3 +++ 14 files changed, 64 insertions(+), 19 deletions(-) create mode 100644 addons/default/visiosoft/advs-module/resources/css/step2.css diff --git a/addons/default/visiosoft/advs-module/resources/config/settings/sections.php b/addons/default/visiosoft/advs-module/resources/config/settings/sections.php index 92d4a8d3c..8ac2928e0 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings/sections.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings/sections.php @@ -37,6 +37,8 @@ return [ 'create_ad' => [ 'title' => 'visiosoft.module.advs::section.create_ad', 'fields' => [ + 'steps_color', + 'create_ad_button_color', 'hide_standard_price_field', 'hide_options_field', 'hide_village_field', diff --git a/addons/default/visiosoft/advs-module/resources/config/settings/settings.php b/addons/default/visiosoft/advs-module/resources/config/settings/settings.php index d3c42dd98..70cb3439a 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings/settings.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings/settings.php @@ -350,4 +350,16 @@ return [ 'bind' => 'override_text', 'env' => 'OVERRIDE_TEXT', ], + 'steps_color' => [ + "type" => "anomaly.field_type.colorpicker", + "config" => [ + "default_value" => '#209579', + ] + ], + 'create_ad_button_color' => [ + "type" => "anomaly.field_type.colorpicker", + "config" => [ + "default_value" => '#00a651', + ] + ], ]; diff --git a/addons/default/visiosoft/advs-module/resources/css/post-category.css b/addons/default/visiosoft/advs-module/resources/css/post-category.css index e3b8d8645..62a146a6d 100644 --- a/addons/default/visiosoft/advs-module/resources/css/post-category.css +++ b/addons/default/visiosoft/advs-module/resources/css/post-category.css @@ -52,8 +52,9 @@ display: none; } -.next-stap img { +.next-stap svg { width: 60px; + height: 60px; } .next-stap p { @@ -62,7 +63,7 @@ } .btn-1 { - background-color: #00a651; + background-color: {{ setting_value('visiosoft.module.advs::create_ad_button_color') }}; padding: 5px 30px 7px; color: #fff; border: 1px solid #dadada; diff --git a/addons/default/visiosoft/advs-module/resources/css/step.scss b/addons/default/visiosoft/advs-module/resources/css/step.scss index b898317a4..fd08b6c4d 100644 --- a/addons/default/visiosoft/advs-module/resources/css/step.scss +++ b/addons/default/visiosoft/advs-module/resources/css/step.scss @@ -6,16 +6,10 @@ min-width: 0; &.current { - &::after { - background: linear-gradient(to right, #209579 50%, #dfdfdf 50%); - } - .bullet { - color: #209579; background-color: #fff; - border: .2rem solid #209579; @media only screen and (min-width: 768px) { - border: .3rem solid #209579; + border-width: .3rem; } } @@ -43,7 +37,6 @@ left: 0; z-index: -1; width: 100%; - background-color: #209579; @media only screen and (min-width: 768px) { height: .3rem; top: 1.4rem; @@ -58,7 +51,6 @@ display: inline-block; position: relative; line-height: 20px; - background-color: #209579; @media only screen and (min-width: 768px) { height: 3rem; width: 3rem; diff --git a/addons/default/visiosoft/advs-module/resources/css/step2.css b/addons/default/visiosoft/advs-module/resources/css/step2.css new file mode 100644 index 000000000..8cc7f023c --- /dev/null +++ b/addons/default/visiosoft/advs-module/resources/css/step2.css @@ -0,0 +1,18 @@ +{% set stepsColor = setting_value('visiosoft.module.advs::steps_color') %} + +#stepProgressBar .step.current .bullet { + color: {{ stepsColor }}; + border: 0.2rem solid {{ stepsColor }}; +} + +#stepProgressBar .step .bullet { + background-color: {{ stepsColor }}; +} + +#stepProgressBar .step.current::after { + background: linear-gradient(to right, {{ stepsColor }} 50%, #dfdfdf 50%); +} + +#stepProgressBar .step::after { + background-color: {{ stepsColor }}; +} diff --git a/addons/default/visiosoft/advs-module/resources/js/cats.js b/addons/default/visiosoft/advs-module/resources/js/cats.js index 2b0536cac..0879d9127 100644 --- a/addons/default/visiosoft/advs-module/resources/js/cats.js +++ b/addons/default/visiosoft/advs-module/resources/js/cats.js @@ -26,7 +26,7 @@ $(document).ready(function () { success: function (response) { hideLoader(); if(response['title'] != undefined){ - response['success'] ? $('.cross-icon').hide() : $('.check-icon').hide(); + response['success'] ? $('.post-icon > svg:last-of-type').hide() : $('.post-icon > svg:first-of-type').hide(); let btn = ''; if (response['link']) { diff --git a/addons/default/visiosoft/advs-module/resources/lang/en/setting.php b/addons/default/visiosoft/advs-module/resources/lang/en/setting.php index c773d2cce..ab4017740 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/setting.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/setting.php @@ -211,4 +211,12 @@ return [ 'name' => 'Override Text', 'instructions' => 'Old Value:New Value' ], + 'steps_color' => [ + 'name' => 'Steps Color', + 'instructions' => 'Changes the progressive steps color.' + ], + 'create_ad_button_color' => [ + 'name' => 'Create Ad Button Color', + 'instructions' => 'Changes the button that shows up when the new ad category selection is finished.' + ], ]; diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/partials/steps.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/partials/steps.twig index 92757a6ff..24285d9fe 100644 --- a/addons/default/visiosoft/advs-module/resources/views/new-ad/partials/steps.twig +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/partials/steps.twig @@ -1,4 +1,5 @@ diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig index 330d1154c..7bbde4831 100644 --- a/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig @@ -47,9 +47,9 @@
-
- - +
+ {{ img('visiosoft.module.advs::images/check.svg').data|raw }} + {{ img('visiosoft.module.advs::images/cross.svg').data|raw }}
diff --git a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php index ded2da4d6..34e959716 100644 --- a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php +++ b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php @@ -444,7 +444,9 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface public function extendAds($allAds, $isAdmin = false) { - if (!is_numeric($allAds)) { + if (is_array($allAds)) { + $advs = $this->newQuery()->whereIn('id', $allAds); + } elseif (!is_numeric($allAds)) { if ($isAdmin && auth()->user()->hasRole('admin')) { $advs = $this->newQuery(); } else { diff --git a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php index 484e10959..7a6e8f6af 100644 --- a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php +++ b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php @@ -1244,7 +1244,12 @@ class AdvsController extends PublicController public function extendAll($isAdmin = null) { - $adsExtended = $this->adv_repository->extendAds(true, $isAdmin); + if (\request()->unpublished) { + $allAds = $this->adv_model->pendingAdvsByUser()->pluck('id')->all(); + } else { + $allAds = true; + } + $adsExtended = $this->adv_repository->extendAds($allAds, $isAdmin); $this->messages->success(trans('visiosoft.module.advs::message.extended', ['number' => $adsExtended])); return $this->redirect->back(); } diff --git a/addons/default/visiosoft/profile-module/resources/lang/en/button.php b/addons/default/visiosoft/profile-module/resources/lang/en/button.php index 1d8634703..d777538e8 100644 --- a/addons/default/visiosoft/profile-module/resources/lang/en/button.php +++ b/addons/default/visiosoft/profile-module/resources/lang/en/button.php @@ -9,6 +9,7 @@ return [ 'delete' => 'Delete', 'extend' => 'Extend', 'extend_all' => 'Extend All', + 'extend_unpublished' => 'Extend Unpublished', 'edit' => 'Edit', 'go_profile' => 'Go to Profile Detail', 'go_user' => 'Go to User Detail', diff --git a/addons/default/visiosoft/profile-module/resources/views/address/partials/fields.twig b/addons/default/visiosoft/profile-module/resources/views/address/partials/fields.twig index 2f3aad4ca..40849fd67 100644 --- a/addons/default/visiosoft/profile-module/resources/views/address/partials/fields.twig +++ b/addons/default/visiosoft/profile-module/resources/views/address/partials/fields.twig @@ -17,11 +17,11 @@
- {{ form.fields.city|raw }} + {{ form.fields.city.setPlaceholder(trans('visiosoft.module.profile::field.choose_an_option'))|raw }}
- {{ form.fields.district|raw }} + {{ form.fields.district.setPlaceholder(trans('visiosoft.module.profile::field.choose_an_option'))|raw }}
diff --git a/addons/default/visiosoft/profile-module/resources/views/profile/ads.twig b/addons/default/visiosoft/profile-module/resources/views/profile/ads.twig index 75107fb3b..225679fb3 100644 --- a/addons/default/visiosoft/profile-module/resources/views/profile/ads.twig +++ b/addons/default/visiosoft/profile-module/resources/views/profile/ads.twig @@ -35,6 +35,9 @@ {{ trans('visiosoft.module.profile::button.extend_all') }} + + {{ trans('visiosoft.module.profile::button.extend_unpublished') }} + {% endif %}