Merge pull request #1066 from openclassify/dia

#3892 Abka.com.tr ihtiyaçlar
This commit is contained in:
spektra2147 2021-05-04 11:23:25 +03:00 committed by GitHub
commit 395e57efe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 9 deletions

View File

@ -230,7 +230,7 @@ ul {
/* End Map */ /* End Map */
/* Keyword */ /* Keyword */
#keywordFilter { #keywordFilter, .text-filter {
input { input {
font-size: calc(14rem / 16); font-size: calc(14rem / 16);
} }
@ -471,7 +471,7 @@ ul {
background-color: #3F475F; background-color: #3F475F;
font-weight: 400; font-weight: 400;
font-size: calc(12rem / 16); font-size: calc(12rem / 16);
padding: .2rem; padding: .2rem .5rem;
&:first-child { &:first-child {
border-top-left-radius: .25rem; border-top-left-radius: .25rem;
@ -495,7 +495,7 @@ ul {
} }
td { td {
padding: .4rem 0; padding: .4rem .5rem;
& > a { & > a {
img { img {
@ -559,7 +559,6 @@ ul {
} }
&.location-data, &.date-data { &.location-data, &.date-data {
width: 13%;
font-size: calc(13rem / 16); font-size: calc(13rem / 16);
color: #707070; color: #707070;
} }

View File

@ -345,6 +345,7 @@ return [
'ads_with_map' => 'Ads With Map', 'ads_with_map' => 'Ads With Map',
'advanced_sorting' => 'Advanced Sorting', 'advanced_sorting' => 'Advanced Sorting',
'filter_by_word' => 'Filter by word', 'filter_by_word' => 'Filter by word',
'filter_by' => 'Filter by :name',
'free' => 'Free', 'free' => 'Free',
'ad_date' => 'Ad Date', 'ad_date' => 'Ad Date',

View File

@ -1,11 +1,16 @@
{% set hideStandard = setting_value('visiosoft.module.advs::hide_listing_standard_price') %} {% set hideStandard = setting_value('visiosoft.module.advs::hide_listing_standard_price') %}
{% set listLocation = setting_value('visiosoft.module.location::list_page_location') %} {% 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"> <table class="w-100 text-center">
<thead> <thead>
<tr class="text-white"> <tr class="text-white">
<th class="text-nowrap" colspan="2">{{ trans('visiosoft.module.advs::field.ad_title') }}</th> <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 %} {% if listLocation %}
<th class="text-nowrap"> <th class="text-nowrap">
{{ trans('visiosoft.module.advs::field.city.name') }} {{ trans('visiosoft.module.advs::field.city.name') }}
@ -38,12 +43,18 @@
{% if not setting_value('visiosoft.module.advs::hide_ad_cat') %} {% if not setting_value('visiosoft.module.advs::hide_ad_cat') %}
<p class="cat-data mb-1">{{ adv.cat1_name }} /{{ adv.cat2_name }}</p> <p class="cat-data mb-1">{{ adv.cat1_name }} /{{ adv.cat2_name }}</p>
{% endif %} {% 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 }} {{ addBlock('list/extra-actions', {'ad': adv, 'vars': _context})|raw }}
</div> </div>
</td> </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 %} {% if listLocation %}
<td class="location-data"> <td class="location-data">
<p>{{ adv.country_name }}</p> <p>{{ adv.country_name }}</p>

View File

@ -30,6 +30,7 @@
'mainCats':mainCats, 'mainCats':mainCats,
'subCats':subCats, 'subCats':subCats,
'ranges':ranges, 'ranges':ranges,
'text':text,
'checkboxes':checkboxes, 'checkboxes':checkboxes,
'topfields' : topfields, 'topfields' : topfields,
'selectDropdown' : selectDropdown, 'selectDropdown' : selectDropdown,
@ -140,7 +141,7 @@
</div> </div>
<div class="px-3 mb-1"> <div class="px-3 mb-1">
<div class="d-flex justify-content-around mt-3 range-input-wrapper"> <div class="d-flex justify-content-around mt-3">
<input type="text" class="border-0 shadow-sm rounded px-3 py-1" name="keyword" <input type="text" class="border-0 shadow-sm rounded px-3 py-1" name="keyword"
value="{{ app.request.get('keyword') }}"> value="{{ app.request.get('keyword') }}">
</div> </div>

View File

@ -271,7 +271,7 @@ class AdvsController extends PublicController
$allCats = true; $allCats = true;
} }
$cFArray = $checkboxes = $topfields = $selectDropdown = $selectRange = $selectImage = $ranges = $radio = array(); $cFArray = $checkboxes = $topfields = $selectDropdown = $selectRange = $selectImage = $ranges = $radio = $text = $listingCFs = array();
if ($isActiveCustomFields) { if ($isActiveCustomFields) {
$returnvalues = app('Visiosoft\CustomfieldsModule\Http\Controller\CustomFieldsController')->index($mainCats, $subCats, $category); $returnvalues = app('Visiosoft\CustomfieldsModule\Http\Controller\CustomFieldsController')->index($mainCats, $subCats, $category);
@ -282,6 +282,23 @@ class AdvsController extends PublicController
$selectImage = $returnvalues['selectImage']; $selectImage = $returnvalues['selectImage'];
$ranges = $returnvalues['ranges']; $ranges = $returnvalues['ranges'];
$radio = $returnvalues['radio']; $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') $cFArray = app('Visiosoft\CustomfieldsModule\CustomField\Contract\CustomFieldRepositoryInterface')
->getCFParamValues($param); ->getCFParamValues($param);
@ -400,7 +417,7 @@ class AdvsController extends PublicController
$compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'param', $compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'param',
'user', 'featured_advs', 'viewType', 'topfields', 'selectDropdown', 'selectRange', 'selectImage', 'ranges', 'user', 'featured_advs', 'viewType', 'topfields', 'selectDropdown', 'selectRange', 'selectImage', 'ranges',
'seenList', 'radio', 'category', 'cityId', 'allCats', 'catText', 'cFArray'); 'text', 'seenList', 'radio', 'category', 'cityId', 'allCats', 'catText', 'cFArray', 'listingCFs');
return $this->viewTypeBasedRedirect($viewType, $compact); return $this->viewTypeBasedRedirect($viewType, $compact);
} }