mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Merge branch 'master' of https://github.com/openclassify/openclassify into vedat
# Conflicts: # addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig
This commit is contained in:
commit
88123aca9f
@ -230,7 +230,7 @@ ul {
|
||||
/* End Map */
|
||||
|
||||
/* Keyword */
|
||||
#keywordFilter {
|
||||
#keywordFilter, .text-filter {
|
||||
input {
|
||||
font-size: calc(14rem / 16);
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -345,6 +345,7 @@ return [
|
||||
'ads_with_map' => 'Ads With Map',
|
||||
'advanced_sorting' => 'Advanced Sorting',
|
||||
'filter_by_word' => 'Filter by word',
|
||||
'filter_by' => 'Filter by :name',
|
||||
|
||||
'free' => 'Free',
|
||||
'ad_date' => 'Ad Date',
|
||||
|
||||
@ -1,11 +1,17 @@
|
||||
{% 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="3">{{ 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 %}
|
||||
<th class="text-nowrap">
|
||||
{{ trans('visiosoft.module.advs::field.city.name') }}
|
||||
@ -35,12 +41,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>
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
'mainCats':mainCats,
|
||||
'subCats':subCats,
|
||||
'ranges':ranges,
|
||||
'text':text,
|
||||
'checkboxes':checkboxes,
|
||||
'topfields' : topfields,
|
||||
'selectDropdown' : selectDropdown,
|
||||
@ -140,7 +141,7 @@
|
||||
</div>
|
||||
|
||||
<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"
|
||||
value="{{ app.request.get('keyword') }}">
|
||||
</div>
|
||||
|
||||
@ -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 = $text = $listingCFs = array();
|
||||
|
||||
if ($isActiveCustomFields) {
|
||||
$returnvalues = app('Visiosoft\CustomfieldsModule\Http\Controller\CustomFieldsController')->index($mainCats, $subCats, $category);
|
||||
@ -282,6 +282,23 @@ class AdvsController extends PublicController
|
||||
$selectImage = $returnvalues['selectImage'];
|
||||
$ranges = $returnvalues['ranges'];
|
||||
$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);
|
||||
@ -400,7 +417,7 @@ class AdvsController extends PublicController
|
||||
|
||||
$compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'param',
|
||||
'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);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user