Merge pull request #386 from openclassify/dia

#823 edit button will be added to the detail page
This commit is contained in:
Fatih Alp 2020-03-04 18:27:18 +03:00 committed by GitHub
commit bae0b0f338
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,8 @@
.dropleft-edit {
right: 0;
top: 50%;
}
.dropleft-edit button {
transform: rotate(-90deg) translate(0, -100%);
transform-origin: 100% 0;
}

View File

@ -148,6 +148,7 @@ return [
'search_desc' => 'You can add and manage your favorite search selections here.',
'complaint_placeholder' => 'Type your complaint details here.',
'show_details' => 'Show Details',
'ad_actions' => 'Ad Actions',
'edit' => 'Edit',
'approve' => 'Approve',
'passive' => "Passive",

View File

@ -47,6 +47,8 @@
{{ addBlock('ad-detail/widget', {'price': adv.price, 'id': adv.id})|raw }}
{% endif %}
</div>
{% include "visiosoft.module.advs::ad-detail/partials/dropleft-edit" %}
</section>
{{ asset_add("scripts.js", "visiosoft.module.advs::js/viewed.js") }}

View File

@ -0,0 +1,26 @@
{% if app.auth.id == adv.created_by_id %}
<div class="btn-group dropleft dropleft-edit position-fixed">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ trans('visiosoft.module.advs::field.ad_actions') }}
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="/advs/edit_advs/{{ adv.id }}">
<i class="fas fa-pencil-alt"></i>
{{ trans('visiosoft.module.advs::field.edit') }}
</a>
{% if adv.status != "pending_admin" and adv.status != "approved" %}
<a class="dropdown-item"
href="{{ url_route('visiosoft.module.advs::status',[adv.id,"pending_admin"]) }}">
<i class="fa fa-eye"></i>
{{ trans('visiosoft.module.advs::field.approve') }}
</a>
{% else %}
<a class="dropdown-item" href="{{ url_route('visiosoft.module.advs::status',[adv.id,"passive"]) }}">
<i class="fa fa-ban"></i>
{{ trans('visiosoft.module.advs::field.passive') }}
</a>
{% endif %}
</div>
</div>
{{ asset_add("styles.css", "visiosoft.module.advs::css/dropleft-edit.css") }}
{% endif %}