Merge pull request #302 from openclassify/vedat

Vedat
This commit is contained in:
Fatih Alp 2020-02-11 10:43:39 +03:00 committed by GitHub
commit 81b6fea143
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 59 additions and 66 deletions

View File

@ -1,78 +1,71 @@
<div class="slider-text">
{% 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">
<h3 class="ad-price">
<b>{{ adv.price.currency(null,'currency',false) }}</b>
<!-- priceField with Block -->
{{ addBlock('ad-detail/priceField',{'adv':adv})|raw }}
<!-- priceField with Block -->
</h3>
</div>
<div class="user-interactions">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
<h3 class="ad-price">
<b>{{ adv.price.currency(null,'currency',false) }}</b>
<!-- priceField with Block -->
{{ addBlock('ad-detail/priceField',{'adv':adv})|raw }}
<!-- priceField with Block -->
<div class="row">
<div class="col-md-12 m-2">
<!-- Author with Block -->
{{ addBlock('ad-detail/author',{'adv':adv})|raw }}
<!-- Author with Block -->
</h3>
{{ trans('visiosoft.module.advs::field.offered_by') }}:
<a id="owner"
href="{{ url_route('visiosoft.module.advs::list_user_ad', [adv.created_by_id]) }}"
data-content="{{ adv.owner_id }}"> {{ adv.first_name }} {{ adv.last_name }}
</a>
{{ addBlock('ad-detail/seller/action',{'seller_id':adv.owner_id})|raw }}
</div>
<div class="col-md-12 m-2">
<i class="fas fa-hashtag"></i>
{{ trans('visiosoft.module.advs::field.ad_id') }}:{{ adv.id }}
</div>
<div class="col-md-12 m-2">
<i class="far fa-clock text-dark"></i>
{{ adv.created_at|date('d/m/Y') }}
</div>
<!-- Detail With Block -->
{{ addBlock('ad-detail/details',{'adv':adv})|raw }}
{{ addBlock('ad-detail/widget-details',{'adv':adv})|raw }}
<!-- Detail With Block -->
{% if adv.isCorporate == 2 %}
<div class="col-md-12 m-2">
<i class="fa fa-suitcase"></i>
<a href="{{ url_route('visiosoft.module.advs::list_user_ad',
[adv.created_by_id]) }}"> {{ adv.first_name }} {{ adv.last_name }}</a>
</div>
{% endif %}
</div>
</div>
<div class="user-interactions">
<!-- Contact With Block -->
{% set contactWith = addBlock('ad-detail/contact-with',{'adv':adv}) %}
{% if contactWith != "" %}
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
<div class="row">
<div class="col-md-12 m-2">
<!-- Author with Block -->
{{ addBlock('ad-detail/author',{'adv':adv})|raw }}
<!-- Author with Block -->
{{ trans('visiosoft.module.advs::field.offered_by') }}:
<a id="owner"
href="{{ url_route('visiosoft.module.advs::list_user_ad', [adv.created_by_id]) }}"
data-content="{{ adv.owner_id }}"> {{ adv.first_name }} {{ adv.last_name }}
</a>
{{ addBlock('ad-detail/seller/action',{'seller_id':adv.owner_id})|raw }}
<div class="col-md-12 mt-2">
<h4><u>{{ trans('visiosoft.module.advs::field.contact_with') }}:</u></h4>
</div>
<div class="col-md-12 m-2">
<i class="fas fa-hashtag"></i>
{{ trans('visiosoft.module.advs::field.ad_id') }}:{{ adv.id }}
</div>
<div class="col-md-12 m-2">
<i class="far fa-clock text-dark"></i>
{{ adv.created_at|date('d/m/Y') }}
</div>
<!-- Detail With Block -->
{{ addBlock('ad-detail/details',{'adv':adv})|raw }}
{{ addBlock('ad-detail/widget-details',{'adv':adv})|raw }}
<!-- Detail With Block -->
{% if adv.isCorporate == 2 %}
<div class="col-md-12 m-2">
<i class="fa fa-suitcase"></i>
<a href="{{ url_route('visiosoft.module.advs::list_user_ad',
[adv.created_by_id]) }}"> {{ adv.first_name }} {{ adv.last_name }}</a>
</div>
{% endif %}
{{ contactWith|raw }}
</div>
</div>
{% endif %}
<!-- Contact With Block -->
<!-- Contact With Block -->
{% set contactWith = addBlock('ad-detail/contact-with',{'adv':adv}) %}
{% if contactWith != "" %}
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
<div class="row">
<div class="col-md-12 mt-2">
<h4><u>{{ trans('visiosoft.module.advs::field.contact_with') }}:</u></h4>
</div>
{{ contactWith|raw }}
</div>
</div>
{% endif %}
<!-- Contact With Block -->
<!-- social-links -->
<div class="social-links">
{% include "visiosoft.module.advs::ad-detail/partials/social" %}
</div>
<!-- social-links -->
<!-- social-links -->
<div class="social-links">
{% include "visiosoft.module.advs::ad-detail/partials/social" %}
</div>
{% else %}
{{ blocks('ad-item-details-block-area') }}
{% endif %}
<!-- social-links -->
</div>
</div>

View File

@ -12,7 +12,7 @@ class Extend extends ActionHandler
foreach ($selected as $id) {
$entry = $model->find($id);
$finishAt = $entry->finish_at ? $entry->finish_at->addDay(30) : date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + 30 day'));
$finishAt = $entry->finish_at ? $entry->finish_at->addDay(setting_value('visiosoft.module.advs::default_published_time')) : date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + ' . setting_value('visiosoft.module.advs::default_published_time') . ' day'));
$entry->finish_at = $finishAt;
$entry->update();
}