mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#3915 abka filtreleme
This commit is contained in:
parent
eca266248f
commit
415161c2ba
@ -471,7 +471,7 @@ ul {
|
||||
background-color: #3F475F;
|
||||
font-weight: 400;
|
||||
font-size: calc(12rem / 16);
|
||||
padding: .2rem;
|
||||
padding: .2rem .5rem;
|
||||
|
||||
&:first-child {
|
||||
border-top-left-radius: .25rem;
|
||||
@ -495,7 +495,7 @@ ul {
|
||||
}
|
||||
|
||||
td {
|
||||
padding: .4rem 0;
|
||||
padding: .4rem .5rem;
|
||||
|
||||
& > a {
|
||||
img {
|
||||
@ -559,7 +559,6 @@ ul {
|
||||
}
|
||||
|
||||
&.location-data, &.date-data {
|
||||
width: 13%;
|
||||
font-size: calc(13rem / 16);
|
||||
color: #707070;
|
||||
}
|
||||
|
||||
@ -1,11 +1,16 @@
|
||||
{% set hideStandard = setting_value('visiosoft.module.advs::hide_listing_standard_price') %}
|
||||
{% set listLocation = setting_value('visiosoft.module.location::list_page_location') %}
|
||||
|
||||
<div id="listing" class="w-100">
|
||||
<div id="listing" class="w-100 table-responsive">
|
||||
<table class="w-100 text-center">
|
||||
<thead>
|
||||
<tr class="text-white">
|
||||
<th class="text-nowrap" colspan="2">{{ trans('visiosoft.module.advs::field.ad_title') }}</th>
|
||||
|
||||
{% for cF in listingCFs %}
|
||||
<th class="text-nowrap">{{ cF.name }}</th>
|
||||
{% endfor %}
|
||||
|
||||
{% if listLocation %}
|
||||
<th class="text-nowrap">
|
||||
{{ trans('visiosoft.module.advs::field.city.name') }}
|
||||
@ -38,12 +43,18 @@
|
||||
{% if not setting_value('visiosoft.module.advs::hide_ad_cat') %}
|
||||
<p class="cat-data mb-1">{{ adv.cat1_name }} /{{ adv.cat2_name }}</p>
|
||||
{% endif %}
|
||||
<div class="action-data d-flex align-items-center">
|
||||
<div class="action-data d-flex align-items-center text-truncate">
|
||||
|
||||
{{ addBlock('list/extra-actions', {'ad': adv, 'vars': _context})|raw }}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{% for listingCF in listingCFs %}
|
||||
{% set feature = adv.features[listingCF.slug.value] %}
|
||||
<td class="location-data">{{ feature ? feature.custom_field_value : '-' }}</td>
|
||||
{% endfor %}
|
||||
|
||||
{% if listLocation %}
|
||||
<td class="location-data">
|
||||
<p>{{ adv.country_name }}</p>
|
||||
|
||||
@ -271,7 +271,7 @@ class AdvsController extends PublicController
|
||||
$allCats = true;
|
||||
}
|
||||
|
||||
$cFArray = $checkboxes = $topfields = $selectDropdown = $selectRange = $selectImage = $ranges = $radio = array();
|
||||
$cFArray = $checkboxes = $topfields = $selectDropdown = $selectRange = $selectImage = $ranges = $radio = $listingCFs = array();
|
||||
|
||||
if ($isActiveCustomFields) {
|
||||
$returnvalues = app('Visiosoft\CustomfieldsModule\Http\Controller\CustomFieldsController')->index($mainCats, $subCats, $category);
|
||||
@ -284,6 +284,22 @@ class AdvsController extends PublicController
|
||||
$radio = $returnvalues['radio'];
|
||||
$text = $returnvalues['text'];
|
||||
|
||||
$listingCFs = app('Visiosoft\CustomfieldsModule\CustomField\Contract\CustomFieldRepositoryInterface')
|
||||
->getSeenCustomFieldsWithCategory($category);
|
||||
foreach ($advs as $adv) {
|
||||
if ($adv->cf_json) {
|
||||
$tempFeatures = app('Visiosoft\CustomfieldsModule\Http\Controller\CustomFieldsController')
|
||||
->view($adv);
|
||||
$features = array();
|
||||
foreach ($listingCFs as $listingCF) {
|
||||
if ($key = array_search($listingCF->slug, array_column($tempFeatures, 'slug'))) {
|
||||
$features[$listingCF->slug] = $tempFeatures[$key];
|
||||
}
|
||||
}
|
||||
$adv->features = $features;
|
||||
}
|
||||
}
|
||||
|
||||
$cFArray = app('Visiosoft\CustomfieldsModule\CustomField\Contract\CustomFieldRepositoryInterface')
|
||||
->getCFParamValues($param);
|
||||
}
|
||||
@ -401,7 +417,7 @@ class AdvsController extends PublicController
|
||||
|
||||
$compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'param',
|
||||
'user', 'featured_advs', 'viewType', 'topfields', 'selectDropdown', 'selectRange', 'selectImage', 'ranges',
|
||||
'text', 'seenList', 'radio', 'category', 'cityId', 'allCats', 'catText', 'cFArray');
|
||||
'text', 'seenList', 'radio', 'category', 'cityId', 'allCats', 'catText', 'cFArray', 'listingCFs');
|
||||
|
||||
return $this->viewTypeBasedRedirect($viewType, $compact);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user