From 134c56840b291c538afd8bff115061148e62fe24 Mon Sep 17 00:00:00 2001 From: Diatrex Date: Wed, 30 Sep 2020 11:55:17 +0300 Subject: [PATCH 1/4] #1760 [core] Listing show parameters --- .../advs-module/resources/css/list.css | 46 +++++++++ .../advs-module/resources/images/close.svg | 2 + .../src/Http/Controller/advsController.php | 93 +++++++++++++++++-- 3 files changed, 132 insertions(+), 9 deletions(-) create mode 100644 addons/default/visiosoft/advs-module/resources/images/close.svg diff --git a/addons/default/visiosoft/advs-module/resources/css/list.css b/addons/default/visiosoft/advs-module/resources/css/list.css index 6cb92603a..e7df1d293 100644 --- a/addons/default/visiosoft/advs-module/resources/css/list.css +++ b/addons/default/visiosoft/advs-module/resources/css/list.css @@ -124,6 +124,52 @@ font-weight: 500; } +.result-text .filter-tabs > div { + margin: 3px 16px 4px 0; +} + +.result-text .filter-tabs div > span { + color: #292d2e; +} + +.result-text .filter-tabs a { + background-color: #eee; + font-size: 12px; + padding: 4px 7px; + border-radius: 2px; + text-decoration: none; + max-width: 400px; +} + +.result-text .filter-tabs a:hover { + background-color: #e0e0e0; +} + +.result-text .filter-tabs a span { + color: #666; +} + +.result-text .filter-tabs a:hover span { + color: #444; +} + +.result-text .filter-tabs a:hover button { + background-color: #CD7D22; +} + +.result-text .filter-tabs a button { + height: 12px; + width: 12px; + background-color: #EC9C4A; + border-radius: 2px; +} + +.result-text .filter-tabs a svg { + flex-shrink: 0; + height: 6px; + width: 6px; +} + a.sort-by-open-dropdown:hover { color: #8598AA !important; } diff --git a/addons/default/visiosoft/advs-module/resources/images/close.svg b/addons/default/visiosoft/advs-module/resources/images/close.svg new file mode 100644 index 000000000..07737b3d1 --- /dev/null +++ b/addons/default/visiosoft/advs-module/resources/images/close.svg @@ -0,0 +1,2 @@ + + 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 cd0839ab2..987cbb876 100644 --- a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php +++ b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php @@ -4,9 +4,7 @@ use Anomaly\SettingsModule\Setting\Contract\SettingRepositoryInterface; use Anomaly\Streams\Platform\Http\Controller\PublicController; use Anomaly\Streams\Platform\Message\MessageBag; use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel; -use Anomaly\Streams\Platform\Model\Advs\PurchasePurchaseEntryModel; use Anomaly\Streams\Platform\Model\Complaints\ComplaintsComplainTypesEntryModel; -use Anomaly\Streams\Platform\Model\Options\OptionsAdvertisementEntryModel; use Anomaly\UsersModule\User\Contract\UserRepositoryInterface; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Http\Request; @@ -19,16 +17,15 @@ use Visiosoft\AdvsModule\Adv\Event\ChangedStatusAd; use Visiosoft\AdvsModule\Adv\Event\CreatedAd; use Visiosoft\AdvsModule\Adv\Event\priceChange; use Visiosoft\AdvsModule\Adv\Event\showAdPhone; -use Visiosoft\AdvsModule\Adv\Event\UpdateAd; use Visiosoft\AdvsModule\Adv\Event\viewAd; use Visiosoft\AdvsModule\Adv\Form\AdvFormBuilder; use Visiosoft\AdvsModule\Option\Contract\OptionRepositoryInterface; use Visiosoft\AlgoliaModule\Search\SearchModel; -use Visiosoft\AlgoliatestModule\Http\Controller\Admin\IndexController; use Visiosoft\CatsModule\Category\CategoryModel; use Visiosoft\CatsModule\Category\Contract\CategoryRepositoryInterface; use Visiosoft\CloudinaryModule\Video\VideoModel; -use Visiosoft\CommentsModule\Comment\Events\CreateNewComment; +use Visiosoft\CustomfieldsModule\CustomField\Contract\CustomFieldRepositoryInterface; +use Visiosoft\CustomfieldsModule\CustomField\CustomFieldModel; use Visiosoft\FavsModule\Http\Controller\FavsController; use Visiosoft\LocationModule\City\CityModel; use Visiosoft\LocationModule\City\CityRepository; @@ -36,11 +33,8 @@ use Visiosoft\LocationModule\Country\Contract\CountryRepositoryInterface; use Visiosoft\LocationModule\District\DistrictModel; use Visiosoft\LocationModule\Neighborhood\NeighborhoodModel; use Visiosoft\LocationModule\Village\VillageModel; -use Visiosoft\PackagesModule\Http\Controller\PackageFEController; use Visiosoft\PackagesModule\Package\PackageModel; use Visiosoft\ProfileModule\Adress\Contract\AdressRepositoryInterface; -use Visiosoft\QrcontactModule\Qr\QrModel; -use Visiosoft\StoreModule\Ad\AdModel; class AdvsController extends PublicController { @@ -69,6 +63,11 @@ class AdvsController extends PublicController private $optionRepository; + + + + private $customFieldRepository; + public function __construct( UserRepositoryInterface $userRepository, @@ -95,7 +94,10 @@ class AdvsController extends PublicController Dispatcher $events, - Request $request + Request $request, + + + CustomFieldRepositoryInterface $customFieldRepository ) { $this->userRepository = $userRepository; @@ -125,6 +127,7 @@ class AdvsController extends PublicController parent::__construct(); $this->optionRepository = $optionRepository; + $this->customFieldRepository = $customFieldRepository; } @@ -292,6 +295,76 @@ class AdvsController extends PublicController $selectImage = $returnvalues['selectImage']; $ranges = $returnvalues['ranges']; $radio = $returnvalues['radio']; + + $customFieldParameters = array_filter($param, function ($var) { + return strpos($var, 'cf_') === 0 + || strpos($var, 'min_cf_') === 0 + || strpos($var, 'max_cf_') === 0; + }, ARRAY_FILTER_USE_KEY); + + $cFArray = array(); + foreach ($customFieldParameters as $id => $value) { + if (strpos($id, 'min_cf_') === 0 || strpos($id, 'max_cf_') === 0) { + $cFId = substr($id, 7); + $cF = $this->customFieldRepository->newQuery()->find($cFId); + $keyExists = array_key_exists($cFId, $cFArray); + if (strpos($id, 'min_cf_') === 0) { + if ($keyExists) { + $cFArray[$cFId] = [ + 'name' => $cFArray[$cFId]['name'], + 'value' => [ + 'min' => $value, + 'max' => $cFArray[$cFId]['value']['max'], + ] + ]; + } else { + $cFArray[$cFId] = [ + 'name' => $cF->name, + 'value' => [ + 'min' => $value, + ] + ]; + } + } else { + if ($keyExists) { + $cFArray[$cFId] = [ + 'name' => $cFArray[$cFId]['name'], + 'value' => [ + 'min' => $cFArray[$cFId]['value']['min'], + 'max' => $value, + ] + ]; + } else { + $cFArray[$cFId] = [ + 'name' => $cF->name, + 'value' => [ + 'max' => $value, + ] + ]; + } + } + } elseif (strpos($id, 'cf_') === 0) { + $cFId = substr($id, 3); + $cF = $this->customFieldRepository->newQuery()->find($cFId); + if ($cF->type === 'radio' || $cF->type === 'selecttop') { + $cFArray[$cFId] = [ + 'name' => $cF->name, + 'value' => reset($value) + ]; + } elseif ($cF->type === 'selectdropdown') { + $cFArray[$cFId] = [ + 'name' => $cF->name, + 'value' => $value + ]; + } elseif ($cF->type === 'select') { + $cFArray[$cFId] = [ + 'name' => $cF->name, + 'value' => $value + ]; + } + } + } + dd($cFArray); } Cookie::queue(Cookie::make('last_search', $this->requestHttp->getRequestUri(), 84000)); @@ -331,6 +404,8 @@ class AdvsController extends PublicController 'user', 'featured_advs', 'viewType', 'topfields', 'selectDropdown', 'selectRange', 'selectImage', 'ranges', 'seenList', 'radio', 'categoryId', 'cityId', 'allCats', 'catText'); +// dd($checkboxes, $radio, $param, $returnvalues , $topfields , $selectDropdown , $selectRange , $selectImage , $ranges); + return $this->viewTypeBasedRedirect($viewType, $compact); } From e6eea8088d86593e4bc18be1b4b672ea0ec25641 Mon Sep 17 00:00:00 2001 From: Diatrex Date: Wed, 30 Sep 2020 18:57:36 +0300 Subject: [PATCH 2/4] #1760 [core] Listing show parameters --- .../visiosoft/advs-module/composer.json | 3 + .../advs-module/resources/css/list.css | 4 + .../advs-module/resources/lang/en/field.php | 9 +- .../advs-module/src/Adv/AdvRepository.php | 40 ++-- .../src/Http/Controller/advsController.php | 201 ++++++++---------- .../visiosoft/advs-module/src/helpers.php | 8 + 6 files changed, 127 insertions(+), 138 deletions(-) create mode 100644 addons/default/visiosoft/advs-module/src/helpers.php diff --git a/addons/default/visiosoft/advs-module/composer.json b/addons/default/visiosoft/advs-module/composer.json index 53cd02315..4f132dd3e 100644 --- a/addons/default/visiosoft/advs-module/composer.json +++ b/addons/default/visiosoft/advs-module/composer.json @@ -2,6 +2,9 @@ "name": "visiosoft/advs-module", "type": "streams-addon", "autoload": { + "files": [ + "src/helpers.php" + ], "psr-4": { "Visiosoft\\AdvsModule\\": "src/" } diff --git a/addons/default/visiosoft/advs-module/resources/css/list.css b/addons/default/visiosoft/advs-module/resources/css/list.css index e7df1d293..106d931be 100644 --- a/addons/default/visiosoft/advs-module/resources/css/list.css +++ b/addons/default/visiosoft/advs-module/resources/css/list.css @@ -164,6 +164,10 @@ border-radius: 2px; } +.result-text .filter-tabs a button:focus { + outline: none; +} + .result-text .filter-tabs a svg { flex-shrink: 0; height: 6px; diff --git a/addons/default/visiosoft/advs-module/resources/lang/en/field.php b/addons/default/visiosoft/advs-module/resources/lang/en/field.php index 2d09d304e..6fde4408d 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/field.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/field.php @@ -248,6 +248,9 @@ return [ 'in_the_last_24_hours' => [ 'name' => 'In The Last 24 Hours' ], + 'in_the_last_day' => [ + 'name' => 'In The Last 24 Hours' + ], 'in_the_last_week' => [ 'name' => 'In The Last Week' ], @@ -297,5 +300,9 @@ return [ // New create page 'options' => 'Options', - 'free' => 'Free' + 'free' => 'Free', + 'ad_date' => 'Ad Date', + 'photo_video' => 'Photo, Video', + 'and_above' => 'and above', + 'and_below' => 'and below', ]; diff --git a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php index 93afdb38f..e39e5580a 100644 --- a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php +++ b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php @@ -100,17 +100,19 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface if (!empty($param['user'])) { $query = $query->where('advs_advs.created_by_id', $param['user']); } - if (!empty($param['min_price'])) { - $num = $param['min_price']; - $int = (int)$num; - $column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') >=" . $int; - $query = $query->whereRaw($column); - } - if (!empty($param['max_price'])) { - $num = $param['max_price']; - $int = (int)$num; - $column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') <=" . $int; - $query = $query->whereRaw($column); + if (!empty($param['currency'])) { + if (!empty($param['min_price'])) { + $num = $param['min_price']; + $int = (int)$num; + $column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') >=" . $int; + $query = $query->whereRaw($column); + } + if (!empty($param['max_price'])) { + $num = $param['max_price']; + $int = (int)$num; + $column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') <=" . $int; + $query = $query->whereRaw($column); + } } if (!empty($param['date'])) { if ($param['date'] === 'day') { @@ -147,22 +149,6 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface $query = app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->filterSearch($customParameters, $param, $query); } - - if (!empty($param['max_price'])) { - $num = $param['max_price']; - $int = (int)$num; - $column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') <=" . $int; - $query = $query->whereRaw($column); - } - - if (!empty($param['max_price'])) { - $num = $param['max_price']; - $int = (int)$num; - $column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') <=" . $int; - $query = $query->whereRaw($column); - } - - // //UPDATE `default_advs_advs` SET `coor` = (PointFromText('POINT(41.085022 28.804754)')) WHERE `default_advs_advs`.`id` = 8 // //SELECT * FROM `default_advs_advs` WHERE ST_DISTANCE(ST_GeomFromText('POINT(41.0709052 28.829627)'), coor) < 20 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 47efea43c..e153a7e91 100644 --- a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php +++ b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php @@ -11,7 +11,6 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Cookie; use Visiosoft\AdvsModule\Adv\AdvModel; -use Visiosoft\AdvsModule\Adv\Command\appendRequestURL; use Visiosoft\AdvsModule\Adv\Contract\AdvRepositoryInterface; use Visiosoft\AdvsModule\Adv\Event\ChangedStatusAd; use Visiosoft\AdvsModule\Adv\Event\CreatedAd; @@ -24,8 +23,6 @@ use Visiosoft\AlgoliaModule\Search\SearchModel; use Visiosoft\CatsModule\Category\CategoryModel; use Visiosoft\CatsModule\Category\Contract\CategoryRepositoryInterface; use Visiosoft\CloudinaryModule\Video\VideoModel; -use Visiosoft\CustomfieldsModule\CustomField\Contract\CustomFieldRepositoryInterface; -use Visiosoft\CustomfieldsModule\CustomField\CustomFieldModel; use Visiosoft\FavsModule\Http\Controller\FavsController; use Visiosoft\LocationModule\City\CityModel; use Visiosoft\LocationModule\City\CityRepository; @@ -63,11 +60,6 @@ class AdvsController extends PublicController private $optionRepository; - - - - private $customFieldRepository; - public function __construct( UserRepositoryInterface $userRepository, @@ -94,10 +86,7 @@ class AdvsController extends PublicController Dispatcher $events, - Request $request, - - - CustomFieldRepositoryInterface $customFieldRepository + Request $request ) { $this->userRepository = $userRepository; @@ -125,9 +114,8 @@ class AdvsController extends PublicController $this->requestHttp = $request; - parent::__construct(); $this->optionRepository = $optionRepository; - $this->customFieldRepository = $customFieldRepository; + parent::__construct(); } @@ -156,10 +144,9 @@ class AdvsController extends PublicController } if (isset($param['cat'])) { unset($param['cat']); - return redirect($this->fullLink( + return redirect(fullLink( $param, - route('adv_list_seo', [$categoryId->slug]), - array() + route('adv_list_seo', [$categoryId->slug]) )); } } elseif (isset($param['cat']) && !empty($param['cat'])) { // Only Param @@ -169,10 +156,9 @@ class AdvsController extends PublicController return redirect('/'); } unset($param['cat']); - return redirect($this->fullLink( + return redirect(fullLink( $param, - route('adv_list_seo', [$categoryId->slug]), - array() + route('adv_list_seo', [$categoryId->slug]) )); } @@ -189,23 +175,21 @@ class AdvsController extends PublicController if (is_null($city) && $isOneCity) { // Param and no slug $cityId = $this->cityRepository->find($param['city'][0]); unset($param['city']); - return redirect($this->fullLink( + return redirect(fullLink( $param, - route('adv_list_seo', [$categoryId->slug, $cityId->slug]), - array() + route('adv_list_seo', [$categoryId->slug, $cityId->slug]) )); } elseif ($isOneCity) { // Param and slug $cityId = $this->cityRepository->find($param['city'][0]); if ($city !== $cityId->slug) { unset($param['city']); - return redirect($this->fullLink( + return redirect(fullLink( $param, - route('adv_list_seo', [$categoryId->slug, $cityId->slug]), - array() + route('adv_list_seo', [$categoryId->slug, $cityId->slug]) )); } } elseif ($city && $isMultipleCity) { // Slug and multiple param cities - return redirect($this->fullLink( + return redirect(fullLink( $param, route('adv_list_seo', [$categoryId->slug]), array() @@ -213,18 +197,16 @@ class AdvsController extends PublicController } elseif ($city) { if (isset($param['city'][0]) && empty($param['city'][0])) { // Slug and empty param unset($param['city']); - return redirect($this->fullLink( + return redirect(fullLink( $param, - route('adv_list_seo', [$categoryId->slug]), - array() + route('adv_list_seo', [$categoryId->slug]) )); } else { // Only slug $cityId = $this->cityRepository->findBy('slug', $city); if (!$cityId) { - return redirect($this->fullLink( + return redirect(fullLink( $param, - route('adv_list_seo', [$categoryId->slug]), - array() + route('adv_list_seo', [$categoryId->slug]) ), 301); } } @@ -247,10 +229,9 @@ class AdvsController extends PublicController if ($advs->currentPage() > $advs->lastPage()) { unset($param['page']); - return redirect($this->fullLink( + return redirect(fullLink( $param, - \request()->url(), - array() + \request()->url() ), 301); } @@ -292,6 +273,7 @@ class AdvsController extends PublicController $allCats = true; } + $cFArray = array(); if ($isActiveCustomFields) { $returnvalues = app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->index($mainCats, $subCats); $checkboxes = $returnvalues['checkboxes']; @@ -302,75 +284,81 @@ class AdvsController extends PublicController $ranges = $returnvalues['ranges']; $radio = $returnvalues['radio']; - $customFieldParameters = array_filter($param, function ($var) { - return strpos($var, 'cf_') === 0 - || strpos($var, 'min_cf_') === 0 - || strpos($var, 'max_cf_') === 0; - }, ARRAY_FILTER_USE_KEY); + $cFArray = app('Visiosoft\CustomfieldsModule\CustomField\Contract\CustomFieldRepositoryInterface') + ->getCFParamValues($param); + } - $cFArray = array(); - foreach ($customFieldParameters as $id => $value) { - if (strpos($id, 'min_cf_') === 0 || strpos($id, 'max_cf_') === 0) { - $cFId = substr($id, 7); - $cF = $this->customFieldRepository->newQuery()->find($cFId); - $keyExists = array_key_exists($cFId, $cFArray); - if (strpos($id, 'min_cf_') === 0) { - if ($keyExists) { - $cFArray[$cFId] = [ - 'name' => $cFArray[$cFId]['name'], - 'value' => [ - 'min' => $value, - 'max' => $cFArray[$cFId]['value']['max'], - ] - ]; - } else { - $cFArray[$cFId] = [ - 'name' => $cF->name, - 'value' => [ - 'min' => $value, - ] - ]; - } - } else { - if ($keyExists) { - $cFArray[$cFId] = [ - 'name' => $cFArray[$cFId]['name'], - 'value' => [ - 'min' => $cFArray[$cFId]['value']['min'], - 'max' => $value, - ] - ]; - } else { - $cFArray[$cFId] = [ - 'name' => $cF->name, - 'value' => [ - 'max' => $value, - ] - ]; - } - } - } elseif (strpos($id, 'cf_') === 0) { - $cFId = substr($id, 3); - $cF = $this->customFieldRepository->newQuery()->find($cFId); - if ($cF->type === 'radio' || $cF->type === 'selecttop') { - $cFArray[$cFId] = [ - 'name' => $cF->name, - 'value' => reset($value) - ]; - } elseif ($cF->type === 'selectdropdown') { - $cFArray[$cFId] = [ - 'name' => $cF->name, - 'value' => $value - ]; - } elseif ($cF->type === 'select') { - $cFArray[$cFId] = [ - 'name' => $cF->name, - 'value' => $value - ]; - } + $photoVideoParams = ['photo', 'video']; + $photoExists = false; + foreach ($photoVideoParams as $pV) { + if (\request()->{$pV} === 'true') { + $removalLink = array_filter($param, function ($singleParam) use ($pV) { + return $singleParam !== $pV; + }, ARRAY_FILTER_USE_KEY); + $removalLink = fullLink($removalLink, \request()->url()); + + if ($photoExists) { + $cFArray['photoVideo']['value'][] = [ + 'name' => trans('visiosoft.module.advs::field.ads_with_' . $pV . '.name'), + 'removalLink' => $removalLink + ]; + } else { + $cFArray['photoVideo'] = [ + 'name' => trans('visiosoft.module.advs::field.photo_video'), + 'value' => [ + [ + 'name' => trans('visiosoft.module.advs::field.ads_with_' . $pV . '.name'), + 'removalLink' => $removalLink + ] + ] + ]; + $photoExists = true; } } - dd($cFArray); + } + + if ($dateParam = \request()->date) { + $removalLink = array_filter($param, function ($singleParam) { + return $singleParam !== 'date'; + }, ARRAY_FILTER_USE_KEY); + $removalLink = fullLink($removalLink, \request()->url()); + + $cFArray[] = [ + 'name' => trans('visiosoft.module.advs::field.ad_date'), + 'value' => [ + [ + 'name' => trans('visiosoft.module.advs::field.in_the_last_' . $dateParam . '.name'), + 'removalLink' => $removalLink + ] + ] + ]; + } + + $minPrice = \request()->min_price; + $maxPrice = \request()->max_price; + if ($minPrice || $maxPrice) { + $removalLink = array_filter($param, function ($singleParam) { + return $singleParam !== 'min_price' && $singleParam !== 'max_price' && $singleParam !== 'currency'; + }, ARRAY_FILTER_USE_KEY); + $removalLink = fullLink($removalLink, \request()->url()); + + if ($minPrice && $maxPrice) { + $name = "$minPrice - $maxPrice"; + } elseif ($minPrice) { + $name = "$minPrice " . trans('visiosoft.module.advs::field.and_above'); + } elseif ($maxPrice) { + $name = "$maxPrice " . trans('visiosoft.module.advs::field.and_below'); + } + + $cFArray[] = [ + 'name' => trans('visiosoft.module.advs::field.price.name'), + 'value' => [ + [ + 'name' => $name, + 'removalLink' => $removalLink + ] + ] + ]; } Cookie::queue(Cookie::make('last_search', $this->requestHttp->getRequestUri(), 84000)); @@ -408,18 +396,11 @@ class AdvsController extends PublicController $compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'param', 'user', 'featured_advs', 'viewType', 'topfields', 'selectDropdown', 'selectRange', 'selectImage', 'ranges', - 'seenList', 'radio', 'categoryId', 'cityId', 'allCats', 'catText'); - -// dd($checkboxes, $radio, $param, $returnvalues , $topfields , $selectDropdown , $selectRange , $selectImage , $ranges); + 'seenList', 'radio', 'categoryId', 'cityId', 'allCats', 'catText', 'cFArray'); return $this->viewTypeBasedRedirect($viewType, $compact); } - public function fullLink($request, $url, $newParameters) - { - return $this->dispatch(new appendRequestURL($request, $url, $newParameters)); - } - public function viewTypeBasedRedirect($viewType, $compact) { if (!$viewType) { diff --git a/addons/default/visiosoft/advs-module/src/helpers.php b/addons/default/visiosoft/advs-module/src/helpers.php new file mode 100644 index 000000000..05ca84938 --- /dev/null +++ b/addons/default/visiosoft/advs-module/src/helpers.php @@ -0,0 +1,8 @@ +dispatch(new appendRequestURL($request, $url, $newParameters)); +} \ No newline at end of file From 6204e1de42697c9ef91af6903b3e9b13ecb5518e Mon Sep 17 00:00:00 2001 From: Diatrex Date: Thu, 1 Oct 2020 10:50:27 +0300 Subject: [PATCH 3/4] #1760 [core] Listing show parameters --- .../advs-module/resources/css/list.css | 20 ++++++++ .../advs-module/resources/lang/en/field.php | 1 + .../resources/views/list/list.twig | 46 +++++++++++++++---- 3 files changed, 59 insertions(+), 8 deletions(-) diff --git a/addons/default/visiosoft/advs-module/resources/css/list.css b/addons/default/visiosoft/advs-module/resources/css/list.css index 106d931be..a515dee8a 100644 --- a/addons/default/visiosoft/advs-module/resources/css/list.css +++ b/addons/default/visiosoft/advs-module/resources/css/list.css @@ -115,6 +115,14 @@ font-size: 13px; } +.result-text h1 { + font-size: 13px; + margin: 0; + padding-right: 6px; + line-height: 1.5; + max-width: 330px; +} + .result-text span:first-child { font-weight: 500; } @@ -141,6 +149,18 @@ max-width: 400px; } +.result-text .filter-tabs div:last-child a { + background-color: unset; + font-size: 10px; + padding: 4px 7px; + text-decoration: none; + color: #039; +} + +.result-text .filter-tabs div:last-child a:hover { + text-decoration: underline; +} + .result-text .filter-tabs a:hover { background-color: #e0e0e0; } diff --git a/addons/default/visiosoft/advs-module/resources/lang/en/field.php b/addons/default/visiosoft/advs-module/resources/lang/en/field.php index 6fde4408d..fc6f0d4dc 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/field.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/field.php @@ -305,4 +305,5 @@ return [ 'photo_video' => 'Photo, Video', 'and_above' => 'and above', 'and_below' => 'and below', + 'clear_all' => 'Clear All', ]; diff --git a/addons/default/visiosoft/advs-module/resources/views/list/list.twig b/addons/default/visiosoft/advs-module/resources/views/list/list.twig index 21792d979..dccc1f09f 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/list.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/list.twig @@ -19,15 +19,45 @@