mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 06:46:08 -06:00
commit
0adb474f63
@ -112,7 +112,9 @@ class VisiosoftModuleAdvsCreateAdvsFields extends Migration
|
|||||||
]
|
]
|
||||||
],
|
],
|
||||||
'order' => 'anomaly.field_type.integer',
|
'order' => 'anomaly.field_type.integer',
|
||||||
'price' => 'anomaly.field_type.decimal',
|
'price' => [
|
||||||
|
'type' => 'visiosoft.field_type.decimal',
|
||||||
|
],
|
||||||
'currency' => [
|
'currency' => [
|
||||||
'type' => 'anomaly.field_type.select',
|
'type' => 'anomaly.field_type.select',
|
||||||
'config' => [
|
'config' => [
|
||||||
|
|||||||
@ -151,15 +151,6 @@ return [
|
|||||||
'mode' => 'upload',
|
'mode' => 'upload',
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'currencies' => [
|
|
||||||
"type" => "anomaly.field_type.checkboxes",
|
|
||||||
'bind' => 'adv.currencies',
|
|
||||||
'env' => 'ADV_CURRENCIES',
|
|
||||||
'config' => [
|
|
||||||
"default_value" => 'a:1:{i:0;s:1:"0";}',
|
|
||||||
'options' => Config::get('streams::currencies.enabled')
|
|
||||||
]
|
|
||||||
],
|
|
||||||
'free_currencyconverterapi_key' => [
|
'free_currencyconverterapi_key' => [
|
||||||
"type" => "anomaly.field_type.text",
|
"type" => "anomaly.field_type.text",
|
||||||
'bind' => 'adv.free_currencyconverterapi_key',
|
'bind' => 'adv.free_currencyconverterapi_key',
|
||||||
|
|||||||
@ -2,8 +2,7 @@
|
|||||||
{% if blocks('ad-item-details-block-area') is null %}
|
{% if blocks('ad-item-details-block-area') is null %}
|
||||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
|
||||||
<h3 class="ad-price">
|
<h3 class="ad-price">
|
||||||
<b>{{ currency_symbol(adv.currency) }}{{ adv.price.format() }}</b>
|
<b>{{ adv.price.currency(null,'currency',false) }}</b>
|
||||||
|
|
||||||
<!-- priceField with Block -->
|
<!-- priceField with Block -->
|
||||||
{{ addBlock('ad-detail/priceField',{'adv':adv})|raw }}
|
{{ addBlock('ad-detail/priceField',{'adv':adv})|raw }}
|
||||||
<!-- priceField with Block -->
|
<!-- priceField with Block -->
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<div class="col-md-3 text-left justify-content-center align-self-center">
|
<div class="col-md-3 text-left justify-content-center align-self-center">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<b>{{ adv.price.currency }}</b>
|
<b>{{ adv.price.currency(null,'currency',false) }}</b>
|
||||||
</div>
|
</div>
|
||||||
{% if setting_value('visiosoft.module.location::list_page_location') %}
|
{% if setting_value('visiosoft.module.location::list_page_location') %}
|
||||||
<div class="col-md-12 justify-content-center align-self-center text-truncate">
|
<div class="col-md-12 justify-content-center align-self-center text-truncate">
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="justify-content-center align-middle">
|
<td class="justify-content-center align-middle">
|
||||||
<b>{{ adv.price.currency }}</b>
|
<b>{{ adv.price.currency(null,'currency',false) }}</b>
|
||||||
</td>
|
</td>
|
||||||
<td class="justify-content-center align-middle">
|
<td class="justify-content-center align-middle">
|
||||||
<small>{{ adv.created_at|date("d/m/Y") }}</small>
|
<small>{{ adv.created_at|date("d/m/Y") }}</small>
|
||||||
|
|||||||
@ -190,15 +190,7 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
|||||||
|
|
||||||
|
|
||||||
if ($isActiveDopings) {
|
if ($isActiveDopings) {
|
||||||
if ($param == null) {
|
$query = app('Visiosoft\DopingsModule\Http\Controller\DopingsController')->search($query, $param);
|
||||||
$DopingModel = new DopingModel();
|
|
||||||
$doping_advs_ids = $DopingModel->getFeaturedAds(3);
|
|
||||||
$query = $query->whereIn('advs_advs.id', $doping_advs_ids);
|
|
||||||
}
|
|
||||||
$query = $query->leftJoin('dopings_dopings', function ($join) {
|
|
||||||
$join->on('advs_advs.id', '=', 'dopings_dopings.adv_name_id');
|
|
||||||
$join->where('dopings_dopings.doping_type_id', '=', 4);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
if (!empty($param['sort_by'])) {
|
if (!empty($param['sort_by'])) {
|
||||||
switch ($param['sort_by']) {
|
switch ($param['sort_by']) {
|
||||||
@ -215,8 +207,7 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
|||||||
} else {
|
} else {
|
||||||
$query = $query->orderBy('advs_advs.created_at', 'desc');
|
$query = $query->orderBy('advs_advs.created_at', 'desc');
|
||||||
if ($isActiveDopings) {
|
if ($isActiveDopings) {
|
||||||
$query = $query->select('advs_advs.*', 'advs_advs_translations.name as name',
|
$query = app('Visiosoft\DopingsModule\Http\Controller\DopingsController')->querySelect($query);
|
||||||
'advs_advs_translations.advs_desc as advs_desc', 'dopings_dopings.id as doping');
|
|
||||||
} else {
|
} else {
|
||||||
$query = $query->select('advs_advs.*', 'advs_advs_translations.name as name',
|
$query = $query->select('advs_advs.*', 'advs_advs_translations.name as name',
|
||||||
'advs_advs_translations.advs_desc as advs_desc');
|
'advs_advs_translations.advs_desc as advs_desc');
|
||||||
|
|||||||
@ -163,6 +163,7 @@ class AdvsController extends PublicController
|
|||||||
|
|
||||||
foreach ($featured_advs as $index => $ad) {
|
foreach ($featured_advs as $index => $ad) {
|
||||||
$featured_advs[$index]->detail_url = $this->adv_model->getAdvDetailLinkByModel($ad, 'list');
|
$featured_advs[$index]->detail_url = $this->adv_model->getAdvDetailLinkByModel($ad, 'list');
|
||||||
|
$featured_advs[$index]->price = number_format($ad->price);
|
||||||
$featured_advs[$index] = $this->adv_model->AddAdsDefaultCoverImage($ad);
|
$featured_advs[$index] = $this->adv_model->AddAdsDefaultCoverImage($ad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -198,7 +198,7 @@ function SelectOnClick() {
|
|||||||
var id = $(this).attr('data-id');
|
var id = $(this).attr('data-id');
|
||||||
|
|
||||||
if ($(this).attr('data-field') == "country") {
|
if ($(this).attr('data-field') == "country") {
|
||||||
input.val(id)
|
$('input[name="country"]').val(id)
|
||||||
text_html.html(input_text)
|
text_html.html(input_text)
|
||||||
$(".filter-location-body input[type='checkbox']").prop('checked', false);
|
$(".filter-location-body input[type='checkbox']").prop('checked', false);
|
||||||
$(".filter-location-body li[data-id='" + id + "'] input[type='checkbox']").prop('checked', true);
|
$(".filter-location-body li[data-id='" + id + "'] input[type='checkbox']").prop('checked', true);
|
||||||
|
|||||||
@ -3,13 +3,13 @@
|
|||||||
<b>
|
<b>
|
||||||
<span class="float-left">{{ trans('visiosoft.module.location::field.address.name') }}</span>
|
<span class="float-left">{{ trans('visiosoft.module.location::field.address.name') }}</span>
|
||||||
</b>
|
</b>
|
||||||
<a href="#" class="a-sahibinden-type selected-country filter-country-btn float-right">
|
|
||||||
<small>{{ getCountry(setting_value('visiosoft.module.location::default_country')).name }}</small>
|
|
||||||
</a>
|
|
||||||
{% set country = setting_value('visiosoft.module.location::default_country') %}
|
{% set country = setting_value('visiosoft.module.location::default_country') %}
|
||||||
{% if app.request.get('country') %}
|
{% if app.request.get('country') %}
|
||||||
{% set country = app.request.get('country') %}
|
{% set country = app.request.get('country') %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<a href="#" class="a-sahibinden-type selected-country filter-country-btn float-right">
|
||||||
|
<small>{{ getCountry(country).name }}</small>
|
||||||
|
</a>
|
||||||
<input name="country" value="{{ country }}" type="hidden">
|
<input name="country" value="{{ country }}" type="hidden">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 px-0 py-1">
|
<div class="col-12 px-0 py-1">
|
||||||
|
|||||||
@ -67,6 +67,8 @@
|
|||||||
"anomaly/html_block-extension": "~1.0.0",
|
"anomaly/html_block-extension": "~1.0.0",
|
||||||
"anomaly/wysiwyg_block-extension": "~1.0.0",
|
"anomaly/wysiwyg_block-extension": "~1.0.0",
|
||||||
"ammadeuss/laravel-html-dom-parser": "^1.1",
|
"ammadeuss/laravel-html-dom-parser": "^1.1",
|
||||||
|
"visiosoft/decimal-field_type": "~2.1.0",
|
||||||
|
"visiosoft/integer-field_type": "~2.1.0",
|
||||||
"guzzlehttp/guzzle": "~6.3.3"
|
"guzzlehttp/guzzle": "~6.3.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user