mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#4309 iş makinası needs
This commit is contained in:
parent
3803a54616
commit
b6fce6972d
@ -17,6 +17,9 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="preview-actions text-center">
|
||||
|
||||
{{ addBlock('advs/preview/button', {'adID': adv.id})|raw }}
|
||||
|
||||
{% if isActive('packages') and setting_value('visiosoft.module.packages::move_the_buy_package_to_the_end') and (auth_user().isAdmin or not auth_user().hasPermission('visiosoft.module.packages::packages.no_read')) %}
|
||||
{% set continueLink = url_route('visiosoft.module.packages::add_package', [adv.id]) %}
|
||||
{% elseif isActive('dopings') %}
|
||||
@ -45,6 +48,9 @@
|
||||
<div class="preview-overlay position-absolute"></div>
|
||||
</div>
|
||||
<div class="preview-actions text-center">
|
||||
|
||||
{{ addBlock('advs/preview/button', {'adID': adv.id})|raw }}
|
||||
|
||||
{% if not setting_value('visiosoft.module.advs::hide_configurations') %}
|
||||
<a href="{{ route('visiosoft.module.advs::user.configrations.create') }}?ad={{ adv.id }}"
|
||||
class="btn btn-warning shadow-sm mr-4 text-white">
|
||||
@ -63,4 +69,4 @@
|
||||
{{ asset_add("styles.css", "visiosoft.module.advs::css/detail.css") }}
|
||||
{{ asset_add("styles.css", "visiosoft.module.advs::css/preview.css") }}
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@ -505,4 +505,9 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
{
|
||||
$this->update(['status' => $status]);
|
||||
}
|
||||
|
||||
public function canEdit()
|
||||
{
|
||||
return $this->created_by_id == \auth()->id() || \auth()->user()->isAdmin();
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,4 +91,6 @@ interface AdvInterface extends EntryInterface
|
||||
public function approve();
|
||||
|
||||
public function changeStatus($status);
|
||||
|
||||
public function canEdit();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user