mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-24 22:11:01 -06:00
fixed hide price for unauthorized users
This commit is contained in:
parent
89b64cbc1a
commit
efee230284
@ -1,6 +1,5 @@
|
|||||||
<div class="slider-text">
|
<div class="slider-text">
|
||||||
<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">
|
||||||
{{ setting_value('visiosoft.module.advs::show_price_to_members_only') ? (not auth_check() ? 'd-none') }}">
|
|
||||||
{% set standardPrice = adv.standard_price.value %}
|
{% set standardPrice = adv.standard_price.value %}
|
||||||
{% if standardPrice and standardPrice > 0 %}
|
{% if standardPrice and standardPrice > 0 %}
|
||||||
<div class="d-flex flex-wrap align-items-center">
|
<div class="d-flex flex-wrap align-items-center">
|
||||||
|
|||||||
@ -32,8 +32,7 @@
|
|||||||
<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 %}
|
||||||
{% if showPrice %}
|
{% if showPrice %}
|
||||||
<p class="price-data mb-1
|
<p class="price-data mb-1">
|
||||||
{{ setting_value('visiosoft.module.advs::show_price_to_members_only') ? (auth_check() ? false : 'd-none') }}">
|
|
||||||
{{ adv.price != '0' ? currency_format(adv.price,adv.currency) : trans('visiosoft.module.advs::field.free') }}
|
{{ adv.price != '0' ? currency_format(adv.price,adv.currency) : trans('visiosoft.module.advs::field.free') }}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@ -15,9 +15,7 @@
|
|||||||
{% if setting_value('visiosoft.module.advs::market_place') %}
|
{% if setting_value('visiosoft.module.advs::market_place') %}
|
||||||
<th class="text-nowrap">{{ trans('visiosoft.module.advs::field.listing_date') }}</th>
|
<th class="text-nowrap">{{ trans('visiosoft.module.advs::field.listing_date') }}</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<th class="text-nowrap {{ setting_value('visiosoft.module.advs::show_price_to_members_only') ? (auth_check() ? false : 'd-none') }}">
|
<th class="text-nowrap">{{ trans('visiosoft.module.advs::field.price.name') }}</th>
|
||||||
{{ trans('visiosoft.module.advs::field.price.name') }}
|
|
||||||
</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
@ -58,7 +56,7 @@
|
|||||||
<p>{{ adv.publish_at.value|date('Y') }}</p>
|
<p>{{ adv.publish_at.value|date('Y') }}</p>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td class="price-data {{ setting_value('visiosoft.module.advs::show_price_to_members_only') ? (auth_check() ? false : 'd-none') }}">
|
<td class="price-data">
|
||||||
{% if not hideStandard %}
|
{% if not hideStandard %}
|
||||||
<p class="text-nowrap">
|
<p class="text-nowrap">
|
||||||
<s>
|
<s>
|
||||||
|
|||||||
@ -48,7 +48,9 @@ class Currency
|
|||||||
$decimals = 0;
|
$decimals = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (setting_value('visiosoft.module.advs::show_price_to_members_only') && !auth()->check()){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return $prefix . number_format($number, $decimals, $point, str_replace(' ', ' ', $separator)) . $suffix;
|
return $prefix . number_format($number, $decimals, $point, str_replace(' ', ' ', $separator)) . $suffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user