Merge pull request #769 from openclassify/vedatakd

added role control
This commit is contained in:
Fatih Alp 2020-11-03 11:29:25 +03:00 committed by GitHub
commit 0c5cc1df10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 5 deletions

View File

@ -4,7 +4,7 @@
{% if standardPrice and standardPrice > 0 %}
<div class="d-flex flex-wrap align-items-center">
<h3 class="ad-price-standard mr-3 text-truncate">
<b>{{ adv.standard_price.currency(null,'currency') }}</b>
<b>{{ adv.standard_price.currency() }}</b>
</h3>
<h3 class="ad-price-standard-percentage text-white p-2">
<b>%{{ (100 - ((100 * adv.price.value) / adv.standard_price.value))|round(0, 'common') }}</b>
@ -12,7 +12,7 @@
</div>
{% endif %}
<h3 class="ad-price">
<b>{{ adv.price.currency(null,'currency') }}</b>
<b>{{ adv.price.currency() }}</b>
<!-- priceField with Block -->
{{ addBlock('ad-detail/priceField',{'adv':adv})|raw }}
<!-- priceField with Block -->

View File

@ -23,11 +23,11 @@
<div class="col-md-12">
<p class="theme-price-old small mb-0"><del>
{{ adv.standard_price != adv.price and adv.standard_price != '0'
? adv.standard_price.currency(null,"currency")
? adv.standard_price.currency()
: '' }}
</del></p>
<b>{{ adv.price != '0'
? adv.price.currency(null,"currency")
? adv.price.currency()
: trans('visiosoft.module.advs::field.free') }}</b>
</div>
{% if setting_value('visiosoft.module.location::list_page_location') %}

View File

@ -36,7 +36,7 @@
</div>
</td>
<td class="justify-content-center align-middle td-price">
<b>{{ adv.price.currency(null,'currency') }}</b>
<b>{{ adv.price.currency() }}</b>
</td>
<td class="justify-content-center align-middle td-date">
<small>{{ adv.created_at|date("d/m/Y") }}</small>

View File

@ -614,6 +614,9 @@ class AdvsController extends PublicController
}
$isActiveDopings = $this->adv_model->is_enabled('dopings');
if ($isActiveDopings) {
$isActiveDopings = doping_check_role();
}
return $this->view->make('visiosoft.module.advs::new-ad/preview/preview',
compact('adv', 'categories', 'features', 'isActiveDopings', 'configurations'));