Merge pull request #1114 from openclassify/dia

#4316 module on/off options
This commit is contained in:
spektra2147 2021-07-15 12:58:10 +03:00 committed by GitHub
commit f0609df06c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 9 deletions

View File

@ -133,8 +133,8 @@ return [
],
'market_place' => [
'name' => 'Market Place',
'instructions' => 'If the marketplace is down, your site will act as ecommerce. For example,
some fields in the profile such as ads, dopings, messages, sale, packages and store are not visible and
'instructions' => 'If the marketplace is down, your site will act as ecommerce. For example,
some fields in the profile such as ads, dopings, messages, sale, packages and store are not visible and
removes corporate membership.'
],
'price_area_hidden' => [

View File

@ -246,10 +246,10 @@
</div>
</div>
<h5 class="mt-5 pb-1 border-bottom">
<h5 class="mt-5 pb-1 border-bottom upload-photos-title">
{{ trans('visiosoft.module.advs::field.upload_photos') }}
</h5>
<div class="bg-light p-4">
<div class="bg-light p-4 upload-photos-wrapper">
<div class="row form-group images">
<div class="col-md-12">
{{ form.fields.files.input |raw }}
@ -268,6 +268,9 @@
</div>
</div>
</div>
{{ addBlock('advs/create/under-images-field', {'vars': _context})|raw }}
{% set other_fields = addBlock('new-ad/other-fields',{'custom_fields':custom_fields,'id':id}) %}
{% if other_fields or (custom_fields and count(custom_fields)) %}
<h5 class="mt-5 pb-1 border-bottom">
@ -338,4 +341,4 @@
{{ asset_add("scripts.js", "streams::js/form/form.js") }}
{{ asset_add("scripts.js", "streams::js/form/translations.js") }}
{% endblock %}
{% endblock %}

View File

@ -63,4 +63,4 @@
{{ asset_add("styles.css", "visiosoft.module.advs::css/detail.css") }}
{{ asset_add("styles.css", "visiosoft.module.advs::css/preview.css") }}
{% endblock %}
{% endblock %}

View File

@ -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();
}
}

View File

@ -91,4 +91,6 @@ interface AdvInterface extends EntryInterface
public function approve();
public function changeStatus($status);
public function canEdit();
}

View File

@ -1,5 +1,8 @@
$('.remote').on('show.bs.modal', function (e) {
if (typeof e.relatedTarget !== "undefined") {
$(this).find('.modal-content').load(e.relatedTarget.href);
$(this).find('.modal-content').load(e.relatedTarget.href, function () {
const event = new Event('custom.modal.loaded');
$(this).closest('.modal').get(0).dispatchEvent(event);
});
}
});
});

View File

@ -23,7 +23,7 @@ class DefaultadminThemeServiceProvider extends AddonServiceProvider
],
TableIsQuerying::class => [
AddGsmFilter::class,
AddViewAdsButton::class
AddViewAdsButton::class,
],
];