Merge remote-tracking branch 'origin/master'

This commit is contained in:
fatihalp 2020-06-08 16:57:34 +03:00
commit ca2360498c
17 changed files with 109 additions and 36 deletions

View File

@ -1,6 +1,7 @@
.dropleft-edit { .dropleft-edit {
right: 0; right: 0;
top: 40%; top: 40%;
z-index: 5;
} }
.dropleft-edit button { .dropleft-edit button {
transform: rotate(-90deg) translate(0, -100%); transform: rotate(-90deg) translate(0, -100%);

View File

@ -47,8 +47,6 @@
/* Mobile filter */ /* Mobile filter */
.mobile-list-action { .mobile-list-action {
margin-left: -30px;
margin-right: -30px;
border: 1px solid #dee2e68a; border: 1px solid #dee2e68a;
} }
@ -76,6 +74,10 @@
background: #c9c9c9; background: #c9c9c9;
} }
.mobile-list-action div:last-child a:after {
content: none;
}
.mobile-list-action i { .mobile-list-action i {
font-size: 19px; font-size: 19px;
color: #a1a1a1; color: #a1a1a1;
@ -106,3 +108,17 @@
#filterModal { #filterModal {
overflow-y: auto; overflow-y: auto;
} }
.result-text {
font-size: 13px;
margin: 0 -15px;
}
.result-text span:first-child {
font-weight: 500;
}
.result-text span:last-child {
color: #8f0100;
font-weight: 500;
}

View File

@ -141,4 +141,13 @@ $('.set_category').on('click', function () {
$('#filterModal').find('form').attr("action", '/advs/list'); $('#filterModal').find('form').attr("action", '/advs/list');
$('#filterModal').modal('toggle'); $('#filterModal').modal('toggle');
}) });
// Move filter on small screen
$(window).on("load resize", function () {
const width = (window.innerWidth > 0) ? window.innerWidth : screen.width;
if (width <= 575) {
const detach = $('#listFilterForm').detach();
$('#modalListFilterForm').append(detach);
}
});

View File

@ -173,5 +173,17 @@ $('.ad-info-right-bar-video').tooltip({
html: true html: true
}); });
$("#listFilterForm").submit(function(e) {
const inputs = $('#listFilterForm :input');
[...inputs].forEach((input) => {
if (input.type === 'checkbox' || input.type === 'radio') {
if ($(input).prop("checked") == false) {
$(input).prop('disabled', true);
}
} else {
if ($(input).val() == "" || $(input).find(':selected').val() == "") {
$(input).prop('disabled', true);
}
}
});
});

View File

@ -263,6 +263,8 @@ return [
"no_location" => "No location is selected.", "no_location" => "No location is selected.",
"continue" => 'Continue', "continue" => 'Continue',
"gallery" => 'Gallery', "gallery" => 'Gallery',
"ads" => 'Ads',
"were_found" => 'were found.',
// Pending screen // Pending screen
'pending_message_1' => 'The Ad is in the Approval Process', 'pending_message_1' => 'The Ad is in the Approval Process',

View File

@ -1,5 +1,9 @@
{% extends layout('list') %} {% extends layout('list') %}
{% block styles %}
{{ asset_style("visiosoft.module.advs::css/list.css") }}
{% endblock %}
{% block content %} {% block content %}
<section> <section>
@ -15,7 +19,15 @@
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
<div class="section recommended-classified"> <div class="section recommended-classified">
{% if catText %}
<div class="result-text border py-2 px-3 mb-3 d-none d-sm-block">
<p class="mb-0">
<span>"{{ catText }}"</span>
<span>{{ advs.total }} {{ trans('visiosoft.module.advs::field.ads')|lower }}</span>
{{ trans('visiosoft.module.advs::field.were_found') }}
</p>
</div>
{% endif %}
<div class="row breadcrumb list-header"> <div class="row breadcrumb list-header">
<div class="col-md-6 my-2 d-none d-sm-block"> <div class="col-md-6 my-2 d-none d-sm-block">
@ -61,7 +73,6 @@
</script> </script>
{{ asset_add("scripts.js", "visiosoft.module.advs::js/list.js") }} {{ asset_add("scripts.js", "visiosoft.module.advs::js/list.js") }}
{{ asset_add("styles.css", "visiosoft.module.advs::css/list.css") }}
{% endblock %} {% endblock %}
{% block customjs %} {% block customjs %}

View File

@ -36,7 +36,7 @@
{% endif %} {% endif %}
</a> </a>
</div> </div>
{% include "visiosoft.module.advs::list/partials/list-filter" %} <div id="modalListFilterForm"></div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,5 +1,5 @@
{% set formHtml %} {% set formHtml %}
<form action="{{ url_route('visiosoft.module.advs::list') }}" method="get"> <form action="{{ url_route('visiosoft.module.advs::list') }}" method="get" id="listFilterForm">
{% endset %} {% endset %}
{% set catSlug = null %} {% set catSlug = null %}
{% set citySlug = null %} {% set citySlug = null %}
@ -12,7 +12,7 @@
{% endif %} {% endif %}
{% if catSlug %} {% if catSlug %}
{% set formHtml %} {% set formHtml %}
<form action="{{ url_route('adv_list_seo', [catSlug, citySlug]) }}" method="get"> <form action="{{ url_route('adv_list_seo', [catSlug, citySlug]) }}" method="get" id="listFilterForm">
{% endset %} {% endset %}
{% endif %} {% endif %}
{{ formHtml }} {{ formHtml }}

View File

@ -279,9 +279,26 @@ class AdvsController extends PublicController
$viewType = $this->requestHttp->cookie('viewType'); $viewType = $this->requestHttp->cookie('viewType');
if (!isset($allCats)) {
if (count($mainCats) == 1 || count($mainCats) == 2) {
$catText = end($mainCats)['val'];
} elseif (count($mainCats) > 2) {
$catArray = array_slice($mainCats, 2);
$catText = '';
$loop = 0;
foreach ($catArray as $cat) {
$catText = !$loop ? $catText . $cat['val'] : $catText . ' ' . $cat['val'];
$loop++;
}
}
$this->template->set('showTitle', false);
$this->template->set('meta_title', $catText);
$this->template->set('meta_description', $catText);
}
$compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'request', 'param', $compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'request', 'param',
'user', 'featured_advs', 'viewType', 'topfields', 'selectDropdown', 'selectRange', 'selectImage', 'ranges', 'seenList', 'user', 'featured_advs', 'viewType', 'topfields', 'selectDropdown', 'selectRange', 'selectImage', 'ranges',
'searchedCountry', 'radio', 'categoryId', 'cityId', 'allCats'); 'seenList', 'searchedCountry', 'radio', 'categoryId', 'cityId', 'allCats', 'catText');
return $this->viewTypeBasedRedirect($viewType, $compact); return $this->viewTypeBasedRedirect($viewType, $compact);
} }

View File

@ -9,11 +9,11 @@
<div class="row p-2"> <div class="row p-2">
{% if setting_value('visiosoft.theme.base::latest_and_view_all_btn') %} {% if setting_value('visiosoft.theme.base::latest_and_view_all_btn') %}
<div class="col-md-6"> <div class="col-md-6">
<h4 class="p-2">{{ trans('theme::field.latest_ads') }}</h4> <h4 class="p-2">{{ trans('visiosoft.theme.base::field.latest_ads') }}</h4>
</div> </div>
<div class="col-md-6 text-right"> <div class="col-md-6 text-right">
<a class="btn btn-outline-secondary" <a class="btn btn-outline-secondary"
href="{{ url_route('visiosoft.module.advs::list') }}">{{ trans('theme::field.show_all') }}</a> href="{{ url_route('visiosoft.module.advs::list') }}">{{ trans('visiosoft.theme.base::field.show_all') }}</a>
</div> </div>
{% endif %} {% endif %}

View File

@ -12,22 +12,22 @@
<html> <html>
<head> <head>
{% include "theme::partials/metadata" %} {% include "visiosoft.theme.base::partials/metadata" %}
{% block styles %}{% endblock %} {% block styles %}{% endblock %}
</head> </head>
<body> <body>
{% include "theme::partials/header" %} {% include "visiosoft.theme.base::partials/header" %}
{{ addBlock('layouts/default/section')|raw }} {{ addBlock('layouts/default/section')|raw }}
<main id="main"> <main id="main">
<div class="container"> <div class="container">
{% include "theme::partials/messages" %} {% include "visiosoft.theme.base::partials/messages" %}
{% if (request_path() == '/') %} {% if (request_path() == '/') %}
{% include "theme::index/default" %} {% include "visiosoft.theme.base::index/default" %}
{% else %} {% else %}
{% block content %}{% endblock %} {% block content %}{% endblock %}
{% endif %} {% endif %}
@ -35,9 +35,9 @@
</div> </div>
</main> </main>
{% include "theme::partials/footer" %} {% include "visiosoft.theme.base::partials/footer" %}
{% include "theme::partials/assets" %} {% include "visiosoft.theme.base::partials/assets" %}
{% include "theme::partials/settings" %} {% include "visiosoft.theme.base::partials/settings" %}
</body> </body>
</html> </html>

View File

@ -14,7 +14,7 @@
{{ asset_add("theme.js", "visiosoft.theme.base::js/jquery.maskedinput.js") }} {{ asset_add("theme.js", "visiosoft.theme.base::js/jquery.maskedinput.js") }}
{{ asset_add("theme.js", "visiosoft.theme.base::js/intlTelInput.min.js") }} {{ asset_add("theme.js", "visiosoft.theme.base::js/intlTelInput.min.js") }}
{{ asset_add("theme.js", "visiosoft.theme.base::js/utils.js") }} {{ asset_add("theme.js", "visiosoft.theme.base::js/utils.js") }}
{{ asset_add("theme.js", "visiosoft.theme.base::js/phoneField.js") }} {{ asset_add("theme.js", "visiosoft.theme.base::js/phonefield.js") }}
{{ asset_add("theme.js", "visiosoft.theme.base::js/jquery.inputmask.bundle.min.js") }} {{ asset_add("theme.js", "visiosoft.theme.base::js/jquery.inputmask.bundle.min.js") }}
{# Theme Scripts #} {# Theme Scripts #}

View File

@ -1,5 +1,5 @@
<header id="header"> <header id="header">
{% include "theme::partials/navigation" %} {% include "visiosoft.theme.base::partials/navigation" %}
</header> </header>

View File

@ -8,8 +8,11 @@
<!-- Meta Tags --> <!-- Meta Tags -->
<title> <title>
{{ setting_value('streams::name', config_get('streams::distribution.name')) }} {% set showTitle = template.showTitle is same as(false) ? false : true %}
&#8250; {% if showTitle %}
{{ setting_value('streams::name', config_get('streams::distribution.name')) }}
&#8250;
{% endif %}
{{ trans(template.meta_title) }} {{ trans(template.meta_title) }}
</title> </title>

View File

@ -37,7 +37,7 @@
<a class="nav-link" href="{{ url_route('profile::profile') }}">{{ trans('visiosoft.theme.base::field.profile') }}</a> <a class="nav-link" href="{{ url_route('profile::profile') }}">{{ trans('visiosoft.theme.base::field.profile') }}</a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="/advs/create_adv" class="btn btn-primary">{{ trans("theme::button.post_ad.name") }}</a> <a href="/advs/create_adv" class="btn btn-primary">{{ trans("visiosoft.theme.base::button.post_ad.name") }}</a>
</li> </li>
</ul> </ul>
{% endif %} {% endif %}
@ -56,7 +56,7 @@
<a class="nav-link" href="{{ url_route('profile::profile') }}">{{ trans('visiosoft.theme.base::field.profile') }}</a> <a class="nav-link" href="{{ url_route('profile::profile') }}">{{ trans('visiosoft.theme.base::field.profile') }}</a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="/advs/create_adv" class="btn btn-primary">{{ trans("theme::button.post_ad.name") }}</a> <a href="/advs/create_adv" class="btn btn-primary">{{ trans("visiosoft.theme.base::button.post_ad.name") }}</a>
</li> </li>
</ul> </ul>
{% endif %} {% endif %}

View File

@ -41,13 +41,15 @@ class AddViewAdsButton
protected function addViewAdsButton(UserTableBuilder $builder) protected function addViewAdsButton(UserTableBuilder $builder)
{ {
$buttons = $builder->getButtons(); $buttons = $builder->getButtons();
$dropdown = array_merge($buttons['settings']['dropdown'], [ if (isset($buttons['settings'])) {
"ads" => [ $dropdown = array_merge($buttons['settings']['dropdown'], [
"text" => trans('visiosoft.theme.defaultadmin::button.view_ads'), "ads" => [
"href" => "admin/advs?filter_User={entry.id}" "text" => trans('visiosoft.theme.defaultadmin::button.view_ads'),
] "href" => "admin/advs?filter_User={entry.id}"
]); ]
$buttons['settings']['dropdown'] = $dropdown; ]);
$builder->setButtons($buttons); $buttons['settings']['dropdown'] = $dropdown;
$builder->setButtons($buttons);
}
} }
} }

View File

@ -102,4 +102,4 @@
<script> <script>
var default_country = "{{ setting_value('visiosoft.module.location::default_country') }}" var default_country = "{{ setting_value('visiosoft.module.location::default_country') }}"
</script> </script>
{{ asset_add("scripts.js", "visiosoft.theme.base::js/phoneField.js") }} {{ asset_add("scripts.js", "visiosoft.theme.base::js/phonefield.js") }}