From 0fb6d7ad0d51c2063dbe82971401ef1b681faafb Mon Sep 17 00:00:00 2001 From: Onur Date: Sun, 7 Jul 2019 08:52:50 +0300 Subject: [PATCH 1/4] moved comparison button to own module --- .../visiosoft/advs-module/resources/views/advs/list.twig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/default/visiosoft/advs-module/resources/views/advs/list.twig b/addons/default/visiosoft/advs-module/resources/views/advs/list.twig index 8b6220f0d..f8cbcb539 100644 --- a/addons/default/visiosoft/advs-module/resources/views/advs/list.twig +++ b/addons/default/visiosoft/advs-module/resources/views/advs/list.twig @@ -124,10 +124,8 @@ {% if entries('advs').isEnabled('comparisons') %} - - - - + + {% include "visiosoft.module.comparisons::comparebtn" %} {% endif %} From e9ba284f2223b92c07ec26cf794ea197be26de7c Mon Sep 17 00:00:00 2001 From: Onur Date: Sun, 7 Jul 2019 10:37:21 +0300 Subject: [PATCH 2/4] #13 frontend ui improved --- .../resources/views/advs/list-item.twig | 71 ++++++++++--------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/addons/default/visiosoft/advs-module/resources/views/advs/list-item.twig b/addons/default/visiosoft/advs-module/resources/views/advs/list-item.twig index ffa77daa3..0f51353ca 100644 --- a/addons/default/visiosoft/advs-module/resources/views/advs/list-item.twig +++ b/addons/default/visiosoft/advs-module/resources/views/advs/list-item.twig @@ -54,31 +54,6 @@ {% endif %} - {% if(adv.video_url != null) %} - - {% endif %} @@ -144,20 +119,20 @@
{% if entries('advs').isEnabled('favs') %} - + {% endif %} - {{ trans('visiosoft.module.advs::field.offered_by') }}: + {{ trans('visiosoft.module.advs::field.offered_by') }}: {{ adv.owner }} - {{ trans('visiosoft.module.advs::field.ad_id') }}: + {{ trans('visiosoft.module.advs::field.ad_id') }}: {{ adv.id }}
- +
+ {% if entries('advs').isEnabled('comparisons') %} + {% include "visiosoft.module.comparisons::comparebtn" %} + {{ trans('visiosoft.module.comparisons::field.comparisonpagetitle') }} + {% endif %} +
+ + {% if(adv.video_url != null) %} +
+

{{ trans('visiosoft.module.cloudinary::field.video') }}

+ {{ trans('visiosoft.module.cloudinary::field.video') }} + + +
+ {% endif %} {% if(profile.getObject().gsm_phone is not null or profile.office_phone is not null or entries('advs').isEnabled('messages')) %}
@@ -189,9 +197,6 @@ class="fa fa-envelope-square">{{ trans("visiosoft.module.advs::field.send_message") }} {% endif %} - {% if entries('advs').isEnabled('comparisons') %} - {% include "visiosoft.module.comparisons::comparebtn" %} - {% endif %}
{% endif %} {% if adv_detail_place_code %} From 5b5ccca639a885c7992d33e2ef09df2712458295 Mon Sep 17 00:00:00 2001 From: vedatakd Date: Mon, 8 Jul 2019 13:59:43 +0300 Subject: [PATCH 3/4] Package model does not exist fix --- .../src/Http/Controller/advsController.php | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) 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 741b6407f..8506a46e4 100644 --- a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php +++ b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php @@ -123,14 +123,13 @@ class AdvsController extends PublicController Cookie::queue(Cookie::make('last_search', $request->getRequestUri(), 84000)); - $viewType = $request->cookie('viewType'); - if (isset($viewType) and $viewType == 'table') { - return $this->view->make('visiosoft.module.advs::advs/table', $compact); - } elseif (isset($viewType) and $viewType == 'map') - { - return $this->view->make('visiosoft.module.advs::advs/map', $compact); - } - return $this->view->make('visiosoft.module.advs::advs/list', $compact); + $viewType = $request->cookie('viewType'); + if (isset($viewType) and $viewType == 'table') { + return $this->view->make('visiosoft.module.advs::advs/table', $compact); + } elseif (isset($viewType) and $viewType == 'map') { + return $this->view->make('visiosoft.module.advs::advs/map', $compact); + } + return $this->view->make('visiosoft.module.advs::advs/list', $compact); } public function viewType($type) @@ -316,7 +315,6 @@ class AdvsController extends PublicController Dispatcher $events, AdvModel $advModel, CategoryModel $categoryModel, - PackageModel $packageModel, AdModel $StoreAdModel ) { @@ -335,6 +333,7 @@ class AdvsController extends PublicController if ($advModel->is_enabled('packages') and $adv->slug == "") { $parent_cat = $categoryModel->getParentCats($request->cat1, 'parent_id'); + $packageModel = new PackageModel(); $package = $packageModel->reduceLimit($parent_cat, 'reduce'); if ($package != null) { return redirect('/')->with('error', trans('visiosoft.module.advs::message.please_buy_package')); @@ -342,7 +341,7 @@ class AdvsController extends PublicController } if ($advModel->is_enabled('store') and $adv->slug == "") { - if ($request->store != "0" and $request->store != null ) { + if ($request->store != "0" and $request->store != null) { $StoreAdModel->createStoreAdLoggedInUser($request->store, $request->update_id); } } @@ -568,7 +567,7 @@ class AdvsController extends PublicController } - public function statusAds($id, $type, SettingRepositoryInterface $settings, Dispatcher $events, AdvModel $advModel, PackageModel $packageModel) + public function statusAds($id, $type, SettingRepositoryInterface $settings, Dispatcher $events, AdvModel $advModel) { $ad = $advModel->getAdv($id); $auto_approved = $settings->value('visiosoft.module.advs::auto_approve'); @@ -582,6 +581,7 @@ class AdvsController extends PublicController $advModel->publish_at_Ads($id); if ($ad->finish_at == NULL AND $type == "approved") { if ($advModel->is_enabled('packages')) { + $packageModel = new PackageModel(); $published_time = $packageModel->reduceTimeLimit($ad->cat1); if ($published_time != null) { $default_published_time = $published_time; From 0d735330846a3974055adbe95f5b10c88fa675f9 Mon Sep 17 00:00:00 2001 From: vedatakd Date: Mon, 8 Jul 2019 14:25:29 +0300 Subject: [PATCH 4/4] Class Package model does not exist fix --- .../advs-module/src/Http/Controller/advsController.php | 7 +++---- .../src/Http/Controller/MyProfileController.php | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) 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 8506a46e4..8bfb63a1f 100644 --- a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php +++ b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php @@ -314,8 +314,7 @@ class AdvsController extends PublicController CategoryRepositoryInterface $categoryRepository, Dispatcher $events, AdvModel $advModel, - CategoryModel $categoryModel, - AdModel $StoreAdModel + CategoryModel $categoryModel ) { if (!Auth::user()) { @@ -341,6 +340,7 @@ class AdvsController extends PublicController } if ($advModel->is_enabled('store') and $adv->slug == "") { + $StoreAdModel = new AdModel(); if ($request->store != "0" and $request->store != null) { $StoreAdModel->createStoreAdLoggedInUser($request->store, $request->update_id); } @@ -499,8 +499,7 @@ class AdvsController extends PublicController AdvFormBuilder $advFormBuilder, AdvRepositoryInterface $advRepository, CategoryRepositoryInterface $categoryRepository, - AdvModel $advModel, - UserModel $StoreUserModel + AdvModel $advModel ) { $nameField = HTMLDomParser::str_get_html($advFormBuilder->render($id)->getContent()); diff --git a/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php b/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php index a7db2886b..10b224d39 100644 --- a/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php +++ b/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php @@ -238,7 +238,7 @@ class MyProfileController extends PublicController } } - public function statusAds($id, $type, SettingRepositoryInterface $settings, Dispatcher $events, AdvModel $advModel, PackageModel $packageModel) + public function statusAds($id, $type, SettingRepositoryInterface $settings, Dispatcher $events, AdvModel $advModel) { $ad = $advModel->getAdv($id); $auto_approved = $settings->value('visiosoft.module.advs::auto_approve'); @@ -252,6 +252,7 @@ class MyProfileController extends PublicController $advModel->publish_at_Ads($id); if ($ad->finish_at == NULL AND $type == "approved") { if ($advModel->is_enabled('packages')) { + $packageModel = new PackageModel(); $published_time = $packageModel->reduceTimeLimit($ad->cat1); if($published_time != null) {