mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#1760 [core] Listing show parameters
This commit is contained in:
parent
21c0eae1aa
commit
134c56840b
@ -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;
|
||||
}
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" width="512" height="512" x="0" y="0" viewBox="0 0 512.001 512.001" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g><g xmlns="http://www.w3.org/2000/svg"><path d="m512.001 84.853-84.853-84.853-171.147 171.147-171.148-171.147-84.853 84.853 171.148 171.147-171.148 171.148 84.853 84.853 171.148-171.147 171.147 171.147 84.853-84.853-171.148-171.148z" fill="#ffffff" data-original="#000000" style="" class=""/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 604 B |
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user