Merge pull request #792 from openclassify/dia

#2647 emlak24 yapılacaklar
This commit is contained in:
spektra2147 2020-11-12 17:26:15 +03:00 committed by GitHub
commit 77adb11c45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 91 additions and 16 deletions

View File

@ -23,14 +23,23 @@ return [
'latest-limit', 'latest-limit',
'popular_ads_limit', 'popular_ads_limit',
'default_view_type', 'default_view_type',
'hide_listing_standard_price',
'hide_zero_price', 'hide_zero_price',
'auto_approve', 'auto_approve',
'estimated_pending_time', 'estimated_pending_time',
'default_published_time', 'default_published_time',
'default_GET', 'default_GET',
'listing_page_image',
],
],
'create_ad' => [
'title' => 'visiosoft.module.advs::section.create_ad',
'fields' => [
'hide_standard_price_field', 'hide_standard_price_field',
'hide_options_field', 'hide_options_field',
'listing_page_image', 'hide_village_field',
'hide_configurations',
'make_map_required',
'show_breadcrumb_when_creating_ad', 'show_breadcrumb_when_creating_ad',
], ],
], ],

View File

@ -125,6 +125,34 @@ return [
'mode' => 'checkbox' 'mode' => 'checkbox'
] ]
], ],
'hide_village_field' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
'mode' => 'checkbox'
]
],
'hide_configurations' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
'mode' => 'checkbox'
]
],
'make_map_required' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
'mode' => 'checkbox'
]
],
'hide_listing_standard_price' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
'mode' => 'checkbox'
]
],
'enabled_currencies' => [ 'enabled_currencies' => [
'bind' => 'streams::currencies.enabled', 'bind' => 'streams::currencies.enabled',
'env' => 'ADV_ENABLED_CURRENCIES', 'env' => 'ADV_ENABLED_CURRENCIES',

View File

@ -0,0 +1,7 @@
$('#createEditAdvForm').submit(function () {
if ($('input[name=map_Val]').val().length === 0) {
alert(selectLocationAlert)
return false
}
return true
})

View File

@ -25,4 +25,5 @@ return [
'no_add_found' => 'No Ad Found!', 'no_add_found' => 'No Ad Found!',
'replicated_success' => 'The ad has been replicated successfully!', 'replicated_success' => 'The ad has been replicated successfully!',
'ad_doesnt_exist' => "This ad doesn't exist!", 'ad_doesnt_exist' => "This ad doesn't exist!",
'select_location_error' => "Please select a location on the map!",
]; ];

View File

@ -41,6 +41,7 @@ return [
'ads' => 'Ads', 'ads' => 'Ads',
'user' => 'User', 'user' => 'User',
'filter' => 'Filter', 'filter' => 'Filter',
'create_ad' => 'Create Ad',
'options' => [ 'options' => [
'title' => 'Options', 'title' => 'Options',
], ],

View File

@ -100,6 +100,20 @@ return [
'hide_options_field' => [ 'hide_options_field' => [
'name' => 'Hide Options Field', 'name' => 'Hide Options Field',
], ],
'hide_village_field' => [
'name' => 'Hide Village Field',
],
'hide_configurations' => [
'name' => 'Hide the Configurations Button',
'instructions' => 'Hide the Configurations Button in the Ad Preview Page',
],
'make_map_required' => [
'name' => 'Make Map Required',
'instructions' => 'Require the user to place a pin on the map when creating an ad',
],
'hide_listing_standard_price' => [
'name' => 'Hide Listing Standard Price',
],
'enabled_currencies' => [ 'enabled_currencies' => [
'name' => 'Enabled Currencies', 'name' => 'Enabled Currencies',
], ],

View File

@ -21,11 +21,13 @@
<div class="col-md-3 text-left justify-content-center align-self-center"> <div class="col-md-3 text-left justify-content-center align-self-center">
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<p class="theme-price-old small mb-0"><del> {% if not setting_value('visiosoft.module.advs::hide_listing_standard_price') %}
{{ adv.standard_price != adv.price and adv.standard_price != '0' <p class="theme-price-old small mb-0"><del>
? adv.standard_price.currency() {{ adv.standard_price != adv.price and adv.standard_price != '0'
: '' }} ? adv.standard_price.currency()
</del></p> : '' }}
</del></p>
{% endif %}
<b>{{ adv.price != '0' <b>{{ adv.price != '0'
? adv.price.currency() ? adv.price.currency()
: trans('visiosoft.module.advs::field.free') }}</b> : trans('visiosoft.module.advs::field.free') }}</b>

View File

@ -206,6 +206,13 @@
var pick_option = "{{ trans('visiosoft.module.location::field.pick_option.name') }}" var pick_option = "{{ trans('visiosoft.module.location::field.pick_option.name') }}"
</script> </script>
{% if setting_value('visiosoft.module.advs::make_map_required') %}
<script>
let selectLocationAlert = "{{ trans('visiosoft.module.advs::message.select_location_error') }}"
</script>
{{ asset_add("scripts.js", "visiosoft.module.advs::js/required-map.js") }}
{% endif %}
{{ asset_add("scripts.js", "visiosoft.module.advs::js/new-create.js") }} {{ asset_add("scripts.js", "visiosoft.module.advs::js/new-create.js") }}
{{ asset_add("scripts.js", "streams::js/form/form.js") }} {{ asset_add("scripts.js", "streams::js/form/form.js") }}
{{ asset_add("scripts.js", "streams::js/form/translations.js") }} {{ asset_add("scripts.js", "streams::js/form/translations.js") }}

View File

@ -16,10 +16,12 @@
{% else %} {% else %}
{% set continueLink = url_route('adv_detail_seo', [adv.slug, adv.id]) %} {% set continueLink = url_route('adv_detail_seo', [adv.slug, adv.id]) %}
{% endif %} {% endif %}
<a href="{{ route('visiosoft.module.advs::user.configrations.create') }}?ad={{ adv.id }}" {% if not setting_value('visiosoft.module.advs::hide_configurations') %}
class="btn btn-warning shadow-sm mr-4 text-white"> <a href="{{ route('visiosoft.module.advs::user.configrations.create') }}?ad={{ adv.id }}"
{{trans('visiosoft.module.advs::button.create_configurations')}} class="btn btn-warning shadow-sm mr-4 text-white">
</a> {{trans('visiosoft.module.advs::button.create_configurations')}}
</a>
{% endif %}
<a href="{{ url_route('visiosoft.module.advs::edit_adv', [adv.id]) }}" <a href="{{ url_route('visiosoft.module.advs::edit_adv', [adv.id]) }}"
class="btn preview-edit shadow-sm border"> class="btn preview-edit shadow-sm border">
{{ trans('visiosoft.module.advs::field.edit') }} {{ trans('visiosoft.module.advs::field.edit') }}
@ -33,10 +35,12 @@
<div class="preview-overlay position-absolute"></div> <div class="preview-overlay position-absolute"></div>
</div> </div>
<div class="preview-actions text-center"> <div class="preview-actions text-center">
<a href="{{ route('visiosoft.module.advs::user.configrations.create') }}?ad={{ adv.id }}" {% if not setting_value('visiosoft.module.advs::hide_configurations') %}
class="btn btn-warning shadow-sm mr-4 text-white"> <a href="{{ route('visiosoft.module.advs::user.configrations.create') }}?ad={{ adv.id }}"
{{trans('visiosoft.module.advs::button.create_configurations')}} class="btn btn-warning shadow-sm mr-4 text-white">
</a> {{trans('visiosoft.module.advs::button.create_configurations')}}
</a>
{% endif %}
<a href="{{ url_route('visiosoft.module.advs::edit_adv', [adv.id]) }}" class="btn preview-edit shadow-sm border"> <a href="{{ url_route('visiosoft.module.advs::edit_adv', [adv.id]) }}" class="btn preview-edit shadow-sm border">
{{ trans('visiosoft.module.advs::field.edit') }} {{ trans('visiosoft.module.advs::field.edit') }}
</a> </a>

View File

@ -27,8 +27,10 @@
class="location-field district-data">{{ form.fields.district|raw }}</li> class="location-field district-data">{{ form.fields.district|raw }}</li>
<li class="neighborhood-data" data-content="{{ adv['neighborhood'] }}" <li class="neighborhood-data" data-content="{{ adv['neighborhood'] }}"
class="location-field neighborhood-data">{{ form.fields.neighborhood|raw }}</li> class="location-field neighborhood-data">{{ form.fields.neighborhood|raw }}</li>
<li class="village-data" data-content="{{ adv['village'] }}" {% if not setting_value('visiosoft.module.advs::hide_village_field') %}
class="location-field">{{ form.fields.village|raw }}</li> <li class="village-data" data-content="{{ adv['village'] }}"
class="location-field">{{ form.fields.village|raw }}</li>
{% endif %}
</ul> </ul>
</div> </div>
<div class="col-sm-8"> <div class="col-sm-8">