diff --git a/addons/default/visiosoft/advs-module/resources/css/list-new.scss b/addons/default/visiosoft/advs-module/resources/css/list-new.scss index 94be8d5d1..b10b4fa9a 100644 --- a/addons/default/visiosoft/advs-module/resources/css/list-new.scss +++ b/addons/default/visiosoft/advs-module/resources/css/list-new.scss @@ -101,11 +101,16 @@ ul { & > div { div { line-height: 1; + + &.sub-cat { + margin-left: 1.65rem; + } } svg, img { width: 1.15rem; height: 1.15rem; + overflow: hidden; object-fit: contain; flex-shrink: 0; } @@ -117,13 +122,13 @@ ul { } .sub-cat { + a { + font-size: calc(12rem / 16); + } + li { margin-bottom: .25rem; - a { - font-size: calc(12rem / 16); - } - ul { padding-left: .5rem; margin-top: .25rem; diff --git a/addons/default/visiosoft/advs-module/resources/views/list/gallery.twig b/addons/default/visiosoft/advs-module/resources/views/list/gallery.twig index 9b915cdb7..6d2661063 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/gallery.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/gallery.twig @@ -7,7 +7,7 @@
- {{ addBlock('ad-list/partials/gallery',{'featured_advs':featured_advs})|raw }} + {{ addBlock('ad-list/partials/gallery',{'featured_advs': featured_advs, 'vars': _context})|raw }} {% for adv in advs %} {% endif %} -
+
{{ addBlock('ads-list/partials/before-display-mode', {'topfields': topfields})|raw }} diff --git a/addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig b/addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig index f958ac041..f2b170a79 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig @@ -18,7 +18,7 @@ - {{ addBlock('ad-list/partials/ads', {'featured_advs': featured_advs})|raw }} + {{ addBlock('ad-list/partials/ads', {'featured_advs': featured_advs, 'vars': _context})|raw }} {% for adv in advs %} diff --git a/addons/default/visiosoft/advs-module/resources/views/list/partials/price-filter.twig b/addons/default/visiosoft/advs-module/resources/views/list/partials/price-filter.twig index d446820c2..d00cd19a7 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/partials/price-filter.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/partials/price-filter.twig @@ -1,10 +1,13 @@ -{% set isHidden = false %} +{% set hidePriceCats = setting_value('visiosoft.module.advs::hide_price_categories') %} +{% if (hidePriceCats != null) %} + {% set cats = entries('cats','category').whereIn('id', hidePriceCats).get() %} + {% set isHidden = false %} - {% for cat in cats %} - {% if request().segment(2) == cat.slug %} - {% set isHidden = true %} - {% endif %} - {% endfor %} + {% for cat in cats %} + {% if request().segment(2) == cat.slug %} + {% set isHidden = true %} + {% endif %} + {% endfor %} {% endif %} {% if setting_value('visiosoft.module.advs::hide_price_filter') == false and not isHidden%} 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 58963fcd0..b93f7472c 100644 --- a/addons/default/visiosoft/advs-module/src/Http/Controller/AdvsController.php +++ b/addons/default/visiosoft/advs-module/src/Http/Controller/AdvsController.php @@ -290,7 +290,6 @@ class AdvsController extends PublicController unset($mainCats[0]);//remove last category } $allCats = false; -// dd($mainCats); } else { $mainCats = $this->category_repository->getMainCategories(); $allCats = true; diff --git a/addons/default/visiosoft/cats-module/resources/views/ads-list/partials/breadcrumb-mobile.twig b/addons/default/visiosoft/cats-module/resources/views/ads-list/partials/breadcrumb-mobile.twig index 8d5bba888..3aa858edd 100644 --- a/addons/default/visiosoft/cats-module/resources/views/ads-list/partials/breadcrumb-mobile.twig +++ b/addons/default/visiosoft/cats-module/resources/views/ads-list/partials/breadcrumb-mobile.twig @@ -1,8 +1,8 @@ {% if params.category %} {% for category_breadcrumbs in params.mainCats %}
  • - - {{ category_breadcrumbs['val'] }} + + {{ category_breadcrumbs.name }}
  • {% endfor %} diff --git a/addons/default/visiosoft/cats-module/resources/views/ads-list/partials/breadcrumb.twig b/addons/default/visiosoft/cats-module/resources/views/ads-list/partials/breadcrumb.twig index 775c9ea56..6cf97dc5a 100644 --- a/addons/default/visiosoft/cats-module/resources/views/ads-list/partials/breadcrumb.twig +++ b/addons/default/visiosoft/cats-module/resources/views/ads-list/partials/breadcrumb.twig @@ -1,9 +1,9 @@ {% if params.category %} {% for category_breadcrumbs in params.mainCats %} - - {{ category_breadcrumbs['val'] }} + + {{ category_breadcrumbs.name }} {% endfor %} diff --git a/addons/default/visiosoft/cats-module/resources/views/ads-list/partials/cat-filter.twig b/addons/default/visiosoft/cats-module/resources/views/ads-list/partials/cat-filter.twig index b7f071376..6813c3b3d 100644 --- a/addons/default/visiosoft/cats-module/resources/views/ads-list/partials/cat-filter.twig +++ b/addons/default/visiosoft/cats-module/resources/views/ads-list/partials/cat-filter.twig @@ -4,56 +4,30 @@
  • - {% if maincat.icon %} - {{ maincat.name }} - {% else %} - {{ img('visiosoft.module.advs::images/listing/sample-cat-icon.svg').data|raw }} + {% if (not categoryId) or (loop.first and categoryId) %} + {% if maincat.icon %} + {{ maincat.name }} + {% else %} + {{ img('visiosoft.module.advs::images/listing/sample-cat-icon.svg').data|raw }} + {% endif %} {% endif %} -
    - - {{ maincat.name }} - -{#
      #} -{# {% for subcat in subCats %}#} -{# {% if subcat.parent_category_id == maincat.id %}#} -{# {% set subCatId = entries('cats', 'category').find(subcat.id) %}#} - -{#
    • #} -{# #} -{# {{ subcat.name }}#} -{# #} -{# #} -{#
    • #} -{# {% endif %}#} -{# {% endfor %}#} -{#
    #} -
    -
    -
  • - -
  • -
    - {% if maincat.icon %} - {{ maincat.name }} - {% else %} - {{ img('visiosoft.module.advs::images/listing/sample-cat-icon.svg').data|raw }} - {% endif %} -
    +
    {{ maincat.name }} + {% if count(subCats) %} +
      + {% for subcat in subCats %} + {% if subcat.parent_category_id == maincat.id %} +
    • + + {{ subcat.name }} + +
    • + {% endif %} + {% endfor %} +
    + {% endif %}
  • diff --git a/addons/default/visiosoft/cats-module/src/Category/CategoryModel.php b/addons/default/visiosoft/cats-module/src/Category/CategoryModel.php index 560eb498c..3af75812f 100644 --- a/addons/default/visiosoft/cats-module/src/Category/CategoryModel.php +++ b/addons/default/visiosoft/cats-module/src/Category/CategoryModel.php @@ -20,17 +20,35 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface { return $this->parent_category; } - public function getMains($id) +// public function getMains($id) +// { +// $id = $id ?: $this->id; +// +// $categories = array(); +// $z = 1; +// for ($i = 1; $i <= $z; $i++) { +// if ($main = $this->newQuery()->where('id', $id)->first()->select('id', 'name', 'slug', '')) { +// $categories[] = $main; +// if ($main->parent_category_id != null) { +// $id = $main->parent_category_id; +// $z++; +// } +// } +// } +// $categories = array_reverse($categories); +// unset($categories[count($categories) - 1]); +// return $categories; +// } + + public function getMains($id = null) { + $id = $id ?: $this->id; + $categories = array(); $z = 1; for ($i = 1; $i <= $z; $i++) { - if ($main = $this->newQuery()->where('id', $id)->first()) { - $new = array(); - $new['id'] = $main->id; - $new['val'] = $main->name; - $new['slug'] = $main->slug; - $categories[] = $new; + if ($main = $this->find($id)) { + $categories[] = $main; if ($main->parent_category_id != null) { $id = $main->parent_category_id; $z++; @@ -42,4 +60,8 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface return $categories; } + public function getParent() + { + return $this->parent_category; + } } diff --git a/addons/default/visiosoft/profile-module/resources/assets/css/profile-nav.scss b/addons/default/visiosoft/profile-module/resources/assets/css/profile-nav.scss index ee7d447f4..5b2993b64 100644 --- a/addons/default/visiosoft/profile-module/resources/assets/css/profile-nav.scss +++ b/addons/default/visiosoft/profile-module/resources/assets/css/profile-nav.scss @@ -66,6 +66,10 @@ margin-right: .75rem; width: 1.5rem; height: 1.5rem; + + path { + fill: rgb(80, 80, 80); + } } p { diff --git a/addons/default/visiosoft/profile-module/resources/assets/css/profile.scss b/addons/default/visiosoft/profile-module/resources/assets/css/profile.scss index 7f4046095..969aa6755 100644 --- a/addons/default/visiosoft/profile-module/resources/assets/css/profile.scss +++ b/addons/default/visiosoft/profile-module/resources/assets/css/profile.scss @@ -60,10 +60,10 @@ } img { - width: 165px; + width: 130px; height: 130px; object-fit: cover; - border-radius: 20px; + border-radius: 50%; @media (max-width: 992px) { display: flex; justify-content: center; @@ -113,6 +113,36 @@ height: 34px; } } + + form { + .new-profile-image { + position: relative; + bottom: 25px; + right: 30px; + cursor: pointer; + + @media (max-width: 992px) { + bottom: 120px; + left: 100px; + top: auto; + } + + @media (max-width: 576px) { + bottom: auto; + left: auto; + top: 10px; + } + } + .file-field { + visibility: hidden; + height: 0; + width: 0; + + #file-modal { + visibility: visible; + } + } + } } #nav-details { diff --git a/addons/default/visiosoft/profile-module/resources/assets/js/profile.js b/addons/default/visiosoft/profile-module/resources/assets/js/profile.js index e33e21fce..c3a99ce4d 100644 --- a/addons/default/visiosoft/profile-module/resources/assets/js/profile.js +++ b/addons/default/visiosoft/profile-module/resources/assets/js/profile.js @@ -1 +1,18 @@ -phoneMask("input[name='gsm_phone'],input[name='office_phone'],input[name='land_phone']") \ No newline at end of file +phoneMask("input[name='gsm_phone'],input[name='office_phone'],input[name='land_phone']") + +$('.new-profile-image').on('click', () => { + $('#file').parent().find('a').click() +}) + +//Listen to your custom event +window.addEventListener('uploadedSingleField', function (e) { + $('.uploaded .btn-success').on('click',function(e){ + e.preventDefault(); + + let id_selected = $(this).attr('data-file'); + $.get(REQUEST_ROOT_PATH + '/streams/media-field_type/selected?uploaded=' +id_selected, function(data) { + let profile_image_preview_url = $('.file-rows-table').html(data).find('img').attr('src'); + $('.profile-image img').attr('src', profile_image_preview_url); + }) + }) +}); \ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/resources/images/camera.svg b/addons/default/visiosoft/profile-module/resources/images/camera.svg new file mode 100644 index 000000000..5bc280fa2 --- /dev/null +++ b/addons/default/visiosoft/profile-module/resources/images/camera.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/addons/default/visiosoft/profile-module/resources/images/detail2.svg b/addons/default/visiosoft/profile-module/resources/images/detail2.svg index 8e883c42d..763832a55 100644 --- a/addons/default/visiosoft/profile-module/resources/images/detail2.svg +++ b/addons/default/visiosoft/profile-module/resources/images/detail2.svg @@ -1,3 +1,18 @@ - - + + + + + + + + + + + + + + + + + diff --git a/addons/default/visiosoft/profile-module/resources/lang/en/field.php b/addons/default/visiosoft/profile-module/resources/lang/en/field.php index 8bf5e6803..62a8abf0d 100644 --- a/addons/default/visiosoft/profile-module/resources/lang/en/field.php +++ b/addons/default/visiosoft/profile-module/resources/lang/en/field.php @@ -469,6 +469,8 @@ return [ 'change_password' => 'Change Password', 'choose_an_option' => 'Choose an option...', 'change_status' => 'Change Status', + 'profile_settings' => 'Profile Settings', + 'profile_detail' => 'Profile Detail', // Register page 'accept_terms_label' => 'I accept the terms.', diff --git a/addons/default/visiosoft/profile-module/resources/views/profile/detail.twig b/addons/default/visiosoft/profile-module/resources/views/profile/detail.twig index 615961d8a..cb832fd1f 100644 --- a/addons/default/visiosoft/profile-module/resources/views/profile/detail.twig +++ b/addons/default/visiosoft/profile-module/resources/views/profile/detail.twig @@ -18,246 +18,130 @@
    - -
    - + +
    +