diff --git a/addons/default/visiosoft/advs-module/resources/views/ad-detail/partials/detail.twig b/addons/default/visiosoft/advs-module/resources/views/ad-detail/partials/detail.twig index 359812161..57ff63ab2 100644 --- a/addons/default/visiosoft/advs-module/resources/views/ad-detail/partials/detail.twig +++ b/addons/default/visiosoft/advs-module/resources/views/ad-detail/partials/detail.twig @@ -1,78 +1,71 @@
- {% if blocks('ad-item-details-block-area') is null %} +
+

+ {{ adv.price.currency(null,'currency',false) }} + + {{ addBlock('ad-detail/priceField',{'adv':adv})|raw }} + + +

+
+
+
-

- {{ adv.price.currency(null,'currency',false) }} - - {{ addBlock('ad-detail/priceField',{'adv':adv})|raw }} - +
+
+ + {{ addBlock('ad-detail/author',{'adv':adv})|raw }} + -

+ {{ trans('visiosoft.module.advs::field.offered_by') }}: + {{ adv.first_name }} {{ adv.last_name }} + + {{ addBlock('ad-detail/seller/action',{'seller_id':adv.owner_id})|raw }} +
+
+ + {{ trans('visiosoft.module.advs::field.ad_id') }}:{{ adv.id }} +
+
+ + {{ adv.created_at|date('d/m/Y') }} +
+ + + {{ addBlock('ad-detail/details',{'adv':adv})|raw }} + {{ addBlock('ad-detail/widget-details',{'adv':adv})|raw }} + + + {% if adv.isCorporate == 2 %} + + {% endif %} +
-
+ + {% set contactWith = addBlock('ad-detail/contact-with',{'adv':adv}) %} + {% if contactWith != "" %}
-
- - {{ addBlock('ad-detail/author',{'adv':adv})|raw }} - - - {{ trans('visiosoft.module.advs::field.offered_by') }}: - {{ adv.first_name }} {{ adv.last_name }} - - {{ addBlock('ad-detail/seller/action',{'seller_id':adv.owner_id})|raw }} +
+

{{ trans('visiosoft.module.advs::field.contact_with') }}:

-
- - {{ trans('visiosoft.module.advs::field.ad_id') }}:{{ adv.id }} -
-
- - {{ adv.created_at|date('d/m/Y') }} -
- - - {{ addBlock('ad-detail/details',{'adv':adv})|raw }} - {{ addBlock('ad-detail/widget-details',{'adv':adv})|raw }} - - - {% if adv.isCorporate == 2 %} - - {% endif %} + {{ contactWith|raw }}
+ {% endif %} + - - {% set contactWith = addBlock('ad-detail/contact-with',{'adv':adv}) %} - {% if contactWith != "" %} -
-
-
-

{{ trans('visiosoft.module.advs::field.contact_with') }}:

-
- {{ contactWith|raw }} -
-
- {% endif %} - - - - - - + + - - {% else %} - {{ blocks('ad-item-details-block-area') }} - {% endif %} - + +
\ No newline at end of file diff --git a/addons/default/visiosoft/advs-module/resources/views/list/partials/list-filter.twig b/addons/default/visiosoft/advs-module/resources/views/list/partials/list-filter.twig index 2c8e7940e..6185bc537 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/partials/list-filter.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/partials/list-filter.twig @@ -33,7 +33,7 @@
-
+
- + @@ -64,7 +65,8 @@
@@ -73,13 +75,15 @@ style="max-height: 300px;">
- +
- + @@ -105,7 +109,8 @@ style="max-height: 300px;">
- + @@ -133,13 +138,13 @@ {% set active_currencies = setting_value('visiosoft.module.advs::enabled_currencies') %}
@@ -147,7 +152,9 @@
diff --git a/addons/default/visiosoft/advs-module/src/Adv/Command/appendRequestURL.php b/addons/default/visiosoft/advs-module/src/Adv/Command/appendRequestURL.php new file mode 100644 index 000000000..03715dba0 --- /dev/null +++ b/addons/default/visiosoft/advs-module/src/Adv/Command/appendRequestURL.php @@ -0,0 +1,78 @@ +url = $url; + $this->request = $request; + $this->new_parameters = $new_parameters; + } + + /** + * @return appendRequestURL + */ + public function handle() + { + return $this->url + . (Str::contains($this->url, '?') ? '&' : '?') + . Arr::query($this->appends(array_merge($this->request, $this->new_parameters))); + } + + /** + * @param $key + * @param null $value + * @return $this|appendRequestURL + */ + public function appends($key, $value = null) + { + if (is_null($key)) { + return $this->query; + } + + if (is_array($key)) { + return $this->appendArray($key)->query; + } + + return $this->addQuery($key, $value)->query; + } + + /** + * @param array $keys + * @return $this + */ + protected function appendArray(array $keys) + { + foreach ($keys as $key => $value) { + $this->addQuery($key, $value); + } + + return $this; + } + + /** + * @param $key + * @param $value + * @return $this + */ + protected function addQuery($key, $value) + { + $this->query[$key] = $value; + + return $this; + } +} diff --git a/addons/default/visiosoft/advs-module/src/Adv/Table/Handler/Extend.php b/addons/default/visiosoft/advs-module/src/Adv/Table/Handler/Extend.php index 2f353b33a..0809dcc3f 100644 --- a/addons/default/visiosoft/advs-module/src/Adv/Table/Handler/Extend.php +++ b/addons/default/visiosoft/advs-module/src/Adv/Table/Handler/Extend.php @@ -12,7 +12,7 @@ class Extend extends ActionHandler foreach ($selected as $id) { $entry = $model->find($id); - $finishAt = $entry->finish_at ? $entry->finish_at->addDay(30) : date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + 30 day')); + $finishAt = $entry->finish_at ? $entry->finish_at->addDay(setting_value('visiosoft.module.advs::default_published_time')) : date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + ' . setting_value('visiosoft.module.advs::default_published_time') . ' day')); $entry->finish_at = $finishAt; $entry->update(); } diff --git a/addons/default/visiosoft/advs-module/src/AdvsModulePlugin.php b/addons/default/visiosoft/advs-module/src/AdvsModulePlugin.php index cfbb7fd70..da7789d85 100644 --- a/addons/default/visiosoft/advs-module/src/AdvsModulePlugin.php +++ b/addons/default/visiosoft/advs-module/src/AdvsModulePlugin.php @@ -1,6 +1,7 @@ dispatch(new appendRequestURL($request, $url, $new_parameters)); + } ) ]; } diff --git a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php index 24c6c5339..7ed8f86bd 100644 --- a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php +++ b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php @@ -164,8 +164,6 @@ class AdvsController extends PublicController $featured_advs[$index]->detail_url = $this->adv_model->getAdvDetailLinkByModel($ad, 'list'); $featured_advs[$index] = $this->adv_model->AddAdsDefaultCoverImage($ad); } - - $advs = $dopingModel->reFilterAdvs(2, $advs); } foreach ($advs as $index => $ad) { @@ -216,13 +214,13 @@ class AdvsController extends PublicController $userProfile = $this->profile_repository->getProfile($user->id); } - $compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'request', - 'user', 'userProfile', 'featured_advs', 'type', 'topfields', 'ranges', 'seenList', 'searchedCountry', 'radio'); - Cookie::queue(Cookie::make('last_search', $this->requestHttp->getRequestUri(), 84000)); $viewType = $this->requestHttp->cookie('viewType'); + $compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'request', + 'user', 'userProfile', 'featured_advs', 'viewType', 'topfields', 'ranges', 'seenList', 'searchedCountry', 'radio'); + if (isset($viewType) and $viewType == 'table') return $this->view->make('visiosoft.module.advs::list/table', $compact); elseif (isset($viewType) and $viewType == 'map') diff --git a/addons/default/visiosoft/base-theme/resources/css/register.css b/addons/default/visiosoft/base-theme/resources/css/register.css new file mode 100644 index 000000000..c6feb3978 --- /dev/null +++ b/addons/default/visiosoft/base-theme/resources/css/register.css @@ -0,0 +1,9 @@ +.small-notice { + background-color: #f7f7f7; +} + +.small-notice i { + font-size: 18px; + position: relative; + top: 4px; +} \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/images/register-instruction.png b/addons/default/visiosoft/base-theme/resources/images/register-instruction.png new file mode 100644 index 000000000..9e48f5f49 Binary files /dev/null and b/addons/default/visiosoft/base-theme/resources/images/register-instruction.png differ diff --git a/addons/default/visiosoft/base-theme/resources/js/phonefield.js b/addons/default/visiosoft/base-theme/resources/js/phonefield.js index 4dbe2ba3a..79aee3ece 100644 --- a/addons/default/visiosoft/base-theme/resources/js/phonefield.js +++ b/addons/default/visiosoft/base-theme/resources/js/phonefield.js @@ -1,13 +1,16 @@ -var inputQuery = document.querySelector("input[name=\"phone\"]"); -var iti = intlTelInput(inputQuery, { - hiddenInput: "full_phone", - class:"form-control", - initialCountry: "auto", - geoIpLookup: function (success, failure) { - $.get("https://ipinfo.io", function () { - }, "jsonp").always(function (resp) { - var countryCode = (resp && resp.country) ? resp.country : ""; - success(countryCode); - }); - } -}); +// Personal Registration +var inputQueries = document.querySelectorAll("input[name=\"phone\"]"); +inputQueries.forEach(function (inputQuery, key) { + var iti = intlTelInput(inputQuery, { + hiddenInput: "full_phone", + class:"form-control", + initialCountry: "auto", + geoIpLookup: function (success, failure) { + $.get("https://ipinfo.io", function () { + }, "jsonp").always(function (resp) { + var countryCode = (resp && resp.country) ? resp.country : ""; + success(countryCode); + }) + } + }) +}); \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/lang/en/field.php b/addons/default/visiosoft/base-theme/resources/lang/en/field.php index 3a4e13ec3..4e1fb6920 100644 --- a/addons/default/visiosoft/base-theme/resources/lang/en/field.php +++ b/addons/default/visiosoft/base-theme/resources/lang/en/field.php @@ -22,4 +22,12 @@ return [ 'forgot_password' => 'I Forgot My Password', 'email_or_phone_number' => 'Email Address or Phone Number', 'phone_number' => 'Phone Number', + + // Registration instructions + 'personal_registration_header' => 'What Are Individual Membership Advantages?', + 'personal_registration_body' => 'Sell and rent your home, car, sell your unused items, get new ones.', + 'personal_registration_list_1' => 'Post a free ad,', + 'personal_registration_list_2' => 'Add the ads you are interested in, follow the price changes after adding them to your favorites, create favorite searches that meet your criteria,', + 'personal_registration_list_3' => 'Send messages to the ad owners on the site.', + 'register_information_note' => 'The information on this page is taken for ' . env('APPLICATION_DOMAIN') . ' membership. You can find detailed information about the protection of personal data here.', ]; \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/lang/tr/field.php b/addons/default/visiosoft/base-theme/resources/lang/tr/field.php index c33f904dd..59eb7a1ad 100644 --- a/addons/default/visiosoft/base-theme/resources/lang/tr/field.php +++ b/addons/default/visiosoft/base-theme/resources/lang/tr/field.php @@ -23,10 +23,10 @@ return [ 'email_or_phone_number' => 'E-Posta Adresiniz veya Telefon Numaranız', 'phone_number' => 'Telefon Numarası', - // Registration instructions 'personal_registration_header' => 'Bireysel Üyelik Avantajları Nelerdir?', - 'personal_registration_body' => 'Evinizi, arabanızı satmak ve kiralamak, kullanılmayan eşyalarınızı satmak, yenilerini almak.', - 'personal_registration_list_1' => 'Ücretsiz bir reklam gönderin,', + 'personal_registration_body' => '', + 'personal_registration_list_1' => 'Ücretsiz bir ilan gönderin,', + 'personal_registration_list_2' => 'İlgilendiğiniz reklamları ekleyin, favorilerinize ekledikten sonra fiyat değişikliklerini takip edin, kriterlerinize uygun favori aramalar oluşturun,', 'personal_registration_list_3' => 'Sitedeki reklam sahiplerine mesaj gönderin.', 'register_information_note' => 'Bu sayfadaki bilgiler ' . env('APPLICATION_DOMAIN') . ' üyelik. Kişisel verilerin korunması hakkında ayrıntılı bilgiyi burada bulabilirsiniz.', diff --git a/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/partials/register-form.twig b/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/partials/register-form.twig new file mode 100644 index 000000000..8c85dc0ba --- /dev/null +++ b/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/partials/register-form.twig @@ -0,0 +1,73 @@ +
+
+ + +
+ {{ form.fields.first_name.setPlaceholder(trans('visiosoft.theme.base::field.first_name')).input|raw }} + {{ form.fields.username.setValue(random()).setAttributes({ + 'class' :'hidden', + }).input|raw }} +
+
+
+
+
+ + +
+ {{ form.fields.last_name.setPlaceholder(trans('visiosoft.theme.base::field.last_name')).input|raw }} +
+
+
+{% if setting_value('visiosoft.module.advs::register_email_field') %} +
+ +
+{% else %} + {% set domain = config('app.url')|replace({ ('https://'): '',('http://'): '',('/'): '/' }) %} + {% if domain == "localhost" %} + {% set domain = "example.com" %} + {% endif %} + {{ form.fields.email.setValue(random()~"@"~domain).setAttributes({ + 'class' :'hidden', + }).input|raw }} +{% endif %} +
+
+ + +
+ {{ form.fields.password.setPlaceholder(trans('visiosoft.theme.base::field.password')).input|raw }} +
+
+
+
+ +
\ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/register.twig b/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/register.twig index dbd572ad5..d18bc71ab 100644 --- a/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/register.twig +++ b/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/register.twig @@ -1,105 +1,68 @@ {% extends "theme::layouts/default" %} {% block content %} -
-
- {% set form = form('register2').redirect(request_get('redirect', '/')) - .get() %} - {{ form_open({ - 'class': 'row form ' ~ form.options.class , - 'enctype': 'multipart/form-data', - 'url':form.options.url - })|raw }} -
-
- +
+
+ + {{ addBlock('register/register-type')|raw }} + +
+ {% set form = form('register2').redirect(request_get('redirect', '/')) + .get() %} + {{ form_open({ + 'class': 'row form ' ~ form.options.class , + 'enctype': 'multipart/form-data', + 'url':form.options.url + })|raw }} + + {% include 'visiosoft.theme.base::addons/anomaly/users-module/partials/register-form' %} + +
+
+ -
- {{ form.fields.first_name.setPlaceholder(trans('visiosoft.theme.base::field.first_name')).input|raw }} - {{ form.fields.username.setValue(random()).setAttributes({ - 'class' :'hidden', - }).input|raw }}
+ + {{ form_close() }}
-
-
- -
- {{ form.fields.last_name.setPlaceholder(trans('visiosoft.theme.base::field.last_name')).input|raw }} -
+ {{ addBlock('register/corporate-register')|raw }} + +
+ +
+
+
+ +

+ {{ trans('visiosoft.theme.base::field.personal_registration_header') }} +

+
+ {{ trans('visiosoft.theme.base::field.personal_registration_body') }} +
+
    +
  • {{ trans('visiosoft.theme.base::field.personal_registration_list_1') }}
  • +
  • {{ trans('visiosoft.theme.base::field.personal_registration_list_2') }}
  • +
  • {{ trans('visiosoft.theme.base::field.personal_registration_list_3') }}
  • +
-
- -
- {% if setting_value('visiosoft.module.advs::register_email_field') %} -
- +
+
+ + + {{ trans('visiosoft.theme.base::field.register_information_note') }} +
- {% else %} - {% set domain = config('app.url')|replace({ ('https://'): '',('http://'): '',('/'): '/' }) %} - {% if domain == "localhost" %} - {% set domain = "example.com" %} - {% endif %} - {{ form.fields.email.setValue(random()~"@"~domain).setAttributes({ - 'class' :'hidden', - }).input|raw }} - {% endif %} -
-
- - -
- {{ form.fields.password.setPlaceholder(trans('visiosoft.theme.base::field.password')).input|raw }} -
-
-
-
-
- - -
- -
-
@@ -108,6 +71,7 @@ {{ asset_add("scripts.js", "visiosoft.theme.base::js/utils.js") }} {{ asset_add("scripts.js", "visiosoft.theme.base::js/phonefield.js") }} {{ asset_add("styles.css", "visiosoft.theme.base::css/intlTelInput.css") }} + {{ asset_add("styles.css", "visiosoft.theme.base::css/register.css") }} {% endblock %} diff --git a/addons/default/visiosoft/base-theme/resources/views/partials/messages.twig b/addons/default/visiosoft/base-theme/resources/views/partials/messages.twig index 411fe9650..6ea3181dd 100644 --- a/addons/default/visiosoft/base-theme/resources/views/partials/messages.twig +++ b/addons/default/visiosoft/base-theme/resources/views/partials/messages.twig @@ -7,7 +7,7 @@ ×Close - {% for message in message_get('success') %} + {% for message in message_pull('success') %} {{ trans(message)|markdown }} {% endfor %}
@@ -20,7 +20,7 @@ ×Close - {% for message in message_get('info') %} + {% for message in message_pull('info') %} {{ trans(message)|markdown }} {% endfor %}
@@ -34,7 +34,7 @@ ×Close - {% for message in message_get('warning') %} + {% for message in message_pull('warning') %} {{ trans(message)|markdown }} {% endfor %}
@@ -48,7 +48,7 @@ ×Close - {% for message in message_get('error') %} + {% for message in message_pull('error') %} {{ trans(message)|markdown }} {% endfor %}
diff --git a/addons/default/visiosoft/base-theme/resources/views/partials/metadata.twig b/addons/default/visiosoft/base-theme/resources/views/partials/metadata.twig index 59f8bdb9a..c785a3670 100644 --- a/addons/default/visiosoft/base-theme/resources/views/partials/metadata.twig +++ b/addons/default/visiosoft/base-theme/resources/views/partials/metadata.twig @@ -4,29 +4,7 @@ - - - - - - - - -{% block ogdata %} - - - - - - -{% endblock %} - - - {{ setting_value('streams::name', config_get('streams::distribution.name')) }} - › - {{ trans(template.meta_title) }} - +{% include "visiosoft.theme.base::partials/metatags" %} {#{{ favicons("theme::img/favicon.png") }}#} diff --git a/addons/default/visiosoft/base-theme/resources/views/partials/metatags.twig b/addons/default/visiosoft/base-theme/resources/views/partials/metatags.twig new file mode 100644 index 000000000..3a0518888 --- /dev/null +++ b/addons/default/visiosoft/base-theme/resources/views/partials/metatags.twig @@ -0,0 +1,16 @@ + + + + + + + + + + + {{ setting_value('streams::name', config_get('streams::distribution.name')) }} + › + {{ trans(template.meta_title) }} + + +{% include "visiosoft.theme.base::partials/ogdata" %} diff --git a/addons/default/visiosoft/base-theme/resources/views/partials/navigation.twig b/addons/default/visiosoft/base-theme/resources/views/partials/navigation.twig index c3eb3190c..168d5248c 100644 --- a/addons/default/visiosoft/base-theme/resources/views/partials/navigation.twig +++ b/addons/default/visiosoft/base-theme/resources/views/partials/navigation.twig @@ -34,7 +34,7 @@ {% endif %}