diff --git a/addons/default/visiosoft/advs-module/resources/lang/en/setting.php b/addons/default/visiosoft/advs-module/resources/lang/en/setting.php index 9eb3da933..005f2dd3f 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/setting.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/setting.php @@ -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' => [ diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig index 73013aa25..4c0f772aa 100644 --- a/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig @@ -246,10 +246,10 @@ -
+
{{ trans('visiosoft.module.advs::field.upload_photos') }}
-
+
{{ form.fields.files.input |raw }} @@ -268,6 +268,9 @@
+ + {{ 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)) %}
@@ -338,4 +341,4 @@ {{ asset_add("scripts.js", "streams::js/form/form.js") }} {{ asset_add("scripts.js", "streams::js/form/translations.js") }} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/preview/preview.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/preview/preview.twig index b2f6b6724..f35434419 100644 --- a/addons/default/visiosoft/advs-module/resources/views/new-ad/preview/preview.twig +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/preview/preview.twig @@ -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 %} \ No newline at end of file +{% endblock %} diff --git a/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php b/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php index 8acd42a55..1ebe01dd3 100644 --- a/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php +++ b/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php @@ -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(); + } } diff --git a/addons/default/visiosoft/advs-module/src/Adv/Contract/AdvInterface.php b/addons/default/visiosoft/advs-module/src/Adv/Contract/AdvInterface.php index be650c398..de1339d4e 100644 --- a/addons/default/visiosoft/advs-module/src/Adv/Contract/AdvInterface.php +++ b/addons/default/visiosoft/advs-module/src/Adv/Contract/AdvInterface.php @@ -91,4 +91,6 @@ interface AdvInterface extends EntryInterface public function approve(); public function changeStatus($status); + + public function canEdit(); } diff --git a/addons/default/visiosoft/base-theme/resources/js/modal_include.js b/addons/default/visiosoft/base-theme/resources/js/modal_include.js index 1e9bc078f..48742635a 100644 --- a/addons/default/visiosoft/base-theme/resources/js/modal_include.js +++ b/addons/default/visiosoft/base-theme/resources/js/modal_include.js @@ -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); + }); } -}); \ No newline at end of file +}); diff --git a/addons/default/visiosoft/defaultadmin-theme/src/DefaultadminThemeServiceProvider.php b/addons/default/visiosoft/defaultadmin-theme/src/DefaultadminThemeServiceProvider.php index 70fc9b229..83c91cc4b 100644 --- a/addons/default/visiosoft/defaultadmin-theme/src/DefaultadminThemeServiceProvider.php +++ b/addons/default/visiosoft/defaultadmin-theme/src/DefaultadminThemeServiceProvider.php @@ -23,7 +23,7 @@ class DefaultadminThemeServiceProvider extends AddonServiceProvider ], TableIsQuerying::class => [ AddGsmFilter::class, - AddViewAdsButton::class + AddViewAdsButton::class, ], ];