mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-24 22:11:01 -06:00
reformat base theme
This commit is contained in:
parent
b28bc5c212
commit
77c6970cd9
@ -478,7 +478,6 @@ textarea {
|
|||||||
|
|
||||||
.offered-field {
|
.offered-field {
|
||||||
border-top: 1px solid #d5d5d5;
|
border-top: 1px solid #d5d5d5;
|
||||||
border-bottom: 1px solid #d5d5d5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-section h1.title {
|
.banner-section h1.title {
|
||||||
@ -1610,10 +1609,6 @@ a.verified i {
|
|||||||
width: 25px;
|
width: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.offered-field {
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.offered-row {
|
.offered-row {
|
||||||
padding-left: 0px;
|
padding-left: 0px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,37 +0,0 @@
|
|||||||
function sendCount() {
|
|
||||||
var id = $('.show-number').attr('data-id');
|
|
||||||
if (id != "") {
|
|
||||||
$.ajax({
|
|
||||||
type: 'POST',
|
|
||||||
url: '/ajax/countPhone',
|
|
||||||
data: 'id=' + id,
|
|
||||||
success: function (data) {
|
|
||||||
hideLoader()
|
|
||||||
$('.show-number').removeAttr('data-function');
|
|
||||||
},
|
|
||||||
beforeSend: function () {
|
|
||||||
showLoader()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
// Show Mobile Number
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
(function () {
|
|
||||||
$('.show-number').on('click', function () {
|
|
||||||
this.addEventListener('click', sendCount());
|
|
||||||
$('.hide-text').fadeIn(500, function () {
|
|
||||||
$(this).addClass('hide');
|
|
||||||
});
|
|
||||||
$('.hide-number').fadeIn(500, function () {
|
|
||||||
$(this).addClass('show');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}());
|
|
||||||
|
|
||||||
|
|
||||||
// script end
|
|
||||||
@ -1,90 +0,0 @@
|
|||||||
function getInput(field) {
|
|
||||||
var row = field.parent().parent();
|
|
||||||
return $(row).find('.add-cart-quantity-input');
|
|
||||||
}
|
|
||||||
|
|
||||||
//plus
|
|
||||||
$('.add-cart-upgrade button').on('click', function () {
|
|
||||||
var input = getInput($(this));
|
|
||||||
updatePrice(input, 'plus')
|
|
||||||
})
|
|
||||||
|
|
||||||
//minus
|
|
||||||
$('.add-cart-reduce button').on('click', function () {
|
|
||||||
var input = getInput($(this));
|
|
||||||
updatePrice(input, 'minus')
|
|
||||||
})
|
|
||||||
|
|
||||||
//change
|
|
||||||
$('.add-cart-quantity-input').on('change', function () {
|
|
||||||
var input = getInput($(this));
|
|
||||||
updatePrice(input, 'change')
|
|
||||||
})
|
|
||||||
|
|
||||||
function updatePrice(input, type) {
|
|
||||||
var ad_id = $(input).attr('data-id');
|
|
||||||
var current_quantity = $(input).val();
|
|
||||||
|
|
||||||
productDetail(ad_id, current_quantity, type, function (data) {
|
|
||||||
ChangeFieldForResponse(type, data.newPrice, data.newQuantity, data.maxQuantity)
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function productDetail(id, quantity, type, returnData) {
|
|
||||||
if (quantity == 0) {
|
|
||||||
quantity = 1;
|
|
||||||
}
|
|
||||||
$.ajax({
|
|
||||||
type: 'POST',
|
|
||||||
url: '/ajax/StockControl',
|
|
||||||
data: 'id=' + id + '&quantity=' + quantity + '&type=' + type,
|
|
||||||
success: function (data) {
|
|
||||||
hideLoader()
|
|
||||||
returnData(data);
|
|
||||||
},
|
|
||||||
beforeSend: function () {
|
|
||||||
showLoader()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function ChangeFieldForResponse(type, price, quantity, maxQuantity) {
|
|
||||||
if (parseInt(quantity) == 1) {
|
|
||||||
$('.add-cart-reduce button').attr('disabled', true);
|
|
||||||
} else {
|
|
||||||
$('.add-cart-reduce button').attr('disabled', false);
|
|
||||||
}
|
|
||||||
if (quantity == maxQuantity) {
|
|
||||||
$('.add-cart-upgrade button').attr('disabled', true);
|
|
||||||
} else {
|
|
||||||
$('.add-cart-upgrade button').attr('disabled', false);
|
|
||||||
}
|
|
||||||
$('.add-cart-quantity-input').val(parseInt(quantity));
|
|
||||||
$('.ad-price b').html(parseInt(price))
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.add-cart-button').on('click', function () {
|
|
||||||
var quantity = $('.add-cart-quantity-input').val();
|
|
||||||
var id = $('.add-cart-quantity-input').attr('data-id');
|
|
||||||
return addCart(id, quantity)
|
|
||||||
})
|
|
||||||
|
|
||||||
function addCart(id, quantity) {
|
|
||||||
$.ajax({
|
|
||||||
type: 'POST',
|
|
||||||
url: '/ajax/addCart',
|
|
||||||
data: 'id=' + id + '&quantity=' + quantity,
|
|
||||||
success: function (data) {
|
|
||||||
if (data.status == "success") {
|
|
||||||
var url = window.location.origin;
|
|
||||||
window.location.reload();
|
|
||||||
} else {
|
|
||||||
alert(data.msg);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
beforeSend: function () {
|
|
||||||
showLoader()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@ -9,68 +9,54 @@
|
|||||||
<meta property="og:image" content="{{ adv.getViewPhotoUrl|first }}">
|
<meta property="og:image" content="{{ adv.getViewPhotoUrl|first }}">
|
||||||
<meta property="og:type" content="website"/>
|
<meta property="og:type" content="website"/>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{{ asset_add("scripts.js", "theme::js.default.fotorama.min.js") }}
|
|
||||||
{{ asset_add("theme.css", "theme::css.default.fotorama.min.css") }}
|
|
||||||
{% if entries('advs').isEnabled('comments') %}
|
{% if entries('advs').isEnabled('comments') %}
|
||||||
{{ asset_add("styles.css", "visiosoft.module.comments::css/style.css") }}
|
{{ asset_add("styles.css", "visiosoft.module.comments::css/style.css") }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<section id="main" class="clearfix details-page">
|
<section id="main" class="clearfix details-page">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
{% include "theme::partials/messages" %}
|
{% include "theme::partials/messages" %}
|
||||||
|
|
||||||
|
<!-- breadcrumb -->
|
||||||
<div class="breadcrumb-section">
|
<div class="breadcrumb-section">
|
||||||
<!-- breadcrumb -->
|
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
{% for cat in categories %}
|
{% for cat in categories %}
|
||||||
<li><a href="{{ url_route('visiosoft.module.advs::list_cat', [cat.id]) }}">{{ cat['name'] }}</a>
|
<li>
|
||||||
|
<a href="{{ url_route('visiosoft.module.advs::list_cat', [cat.id]) }}">{{ cat['name'] }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ol><!-- breadcrumb -->
|
</ol>
|
||||||
<h2 class="title">{{ categories|last['name'] }}</h2>
|
<h2 class="title">{{ categories|last['name'] }}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- breadcrumb -->
|
||||||
|
|
||||||
<div class="section banner">
|
<!--detail-ad -->
|
||||||
</div><!-- banner -->
|
|
||||||
<div class="section slider">
|
<div class="section slider">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- carousel -->
|
|
||||||
<div class="col-md-7 slider-box">
|
|
||||||
|
|
||||||
{% if blocks('ad-item-picture-block-area') is null %}
|
{% include "theme::ad-detail/partials/slider" %}
|
||||||
{% include "visiosoft.theme.base::ad-detail/partials/blocks/ads-item-picture-block" %}
|
|
||||||
{% else %}
|
|
||||||
{{ blocks('ad-item-picture-block-area') }}
|
|
||||||
{% endif %}
|
|
||||||
</div><!-- Controls -->
|
|
||||||
|
|
||||||
<!-- slider-text -->
|
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<div class="slider-text">
|
{% include "theme::ad-detail/partials/detail" %}
|
||||||
{% if entries('advs').isEnabled('favs') %}
|
|
||||||
<a class="favorites" href="#"><i id="heart-icon-adv" class="far fa-heart"></i></a>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if blocks('ad-item-details-block-area') is null %}
|
|
||||||
{% include "visiosoft.theme.base::ad-detail/partials/blocks/ads-item-details-block" %}
|
|
||||||
{% else %}
|
|
||||||
{{ blocks('ad-item-details-block-area') }}
|
|
||||||
{% endif %}
|
|
||||||
</div><!-- slider-text -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if entries('advs').isEnabled('complaints') %}
|
{% if entries('advs').isEnabled('complaints') %}
|
||||||
<a class="complaints pull-right" id="complaints"
|
<a class="complaints pull-right" id="complaints"
|
||||||
title="{{ trans('visiosoft.module.advs::field.report') }}"><i
|
title="{{ trans('visiosoft.module.advs::field.report') }}"><i
|
||||||
class="fa fa-exclamation-triangle"></i></a>
|
class="fa fa-exclamation-triangle"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
</div><!-- slider -->
|
<!--detail-ad -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% if blocks('ad-item-content-block-area') is null %}
|
{% if blocks('ad-item-content-block-area') is null %}
|
||||||
{% include "visiosoft.theme.base::ad-detail/partials/blocks/ads-item-content-block" %}
|
{% include "visiosoft.theme.base::ad-detail/partials/content-ad" %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ blocks('ad-item-content-block-area') }}
|
{{ blocks('ad-item-content-block-area') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -79,7 +65,7 @@
|
|||||||
{% include "visiosoft.module.recommendedads::recommended-ads" %}
|
{% include "visiosoft.module.recommendedads::recommended-ads" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div><!-- container -->
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
@ -88,53 +74,14 @@
|
|||||||
{% include "visiosoft.module.complaints::modal" %}
|
{% include "visiosoft.module.complaints::modal" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if entries('advs').isEnabled('messages') %}
|
||||||
<div id="messages_modal" class="modal fade" role="dialog">
|
{% include "visiosoft.module.messages::ad-detail/modal" %}
|
||||||
<div class="modal-dialog">
|
{% endif %}
|
||||||
<form action="{{ url_route('visiosoft.module.messages::save_message', [adv.id]) }}" method="post">
|
|
||||||
<input id="message-token" type="hidden" name="_token" value="{{ csrf_token() }}">
|
|
||||||
<!-- Modal content-->
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header message-header">
|
|
||||||
<h4 class="modal-title">{{ trans('visiosoft.module.advs::field.send_message') }}</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body message-body">
|
|
||||||
<input id="adv-id" type="hidden" value="{{ adv.id }}">
|
|
||||||
<textarea name="detail" id="message-detail" rows="7"></textarea>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer message-footer">
|
|
||||||
<button id="message-button" type="button"
|
|
||||||
class="btn btn-primary">{{ trans('visiosoft.module.advs::field.send') }}</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="message-sent-modal" class="modal fade" role="dialog">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header message-header">
|
|
||||||
<h4 class="modal-title">{{ trans('visiosoft.module.advs::field.message_sent') }}</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body message-body">
|
|
||||||
<span>{{ trans('visiosoft.module.advs::field.asap') }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer message-footer">
|
|
||||||
<button type="button" class="btn btn-success" data-dismiss="modal">Ok</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if entries('advs').isEnabled('favs') %}
|
{% if entries('advs').isEnabled('favs') %}
|
||||||
{{ asset_add("scripts.js", "visiosoft.module.favs::js/favs.js") }}
|
{{ asset_add("scripts.js", "visiosoft.module.favs::js/favs.js") }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ asset_add("scripts.js", "visiosoft.theme.base::js/list-item.js") }}
|
|
||||||
{{ asset_add("scripts.js", "visiosoft.theme.base::js/quantity.js") }}
|
|
||||||
{{ asset_add("scripts.js", "visiosoft.theme.base::js/phoneCounter.js") }}
|
|
||||||
{{ asset_add("scripts.js", "visiosoft.theme.base::js/viewed.js") }}
|
|
||||||
|
|
||||||
{% if entries('advs').isEnabled('comments') %}
|
{% if entries('advs').isEnabled('comments') %}
|
||||||
{{ asset_add("scripts.js", "visiosoft.module.comments::js/ajaxcomment.js") }}
|
{{ asset_add("scripts.js", "visiosoft.module.comments::js/ajaxcomment.js") }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -143,6 +90,17 @@
|
|||||||
{% include "visiosoft.module.comparisons::comparison" %}
|
{% include "visiosoft.module.comparisons::comparison" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if entries('advs').isEnabled('phoneclickcounter') %}
|
||||||
|
{{ asset_add("scripts.js", "visiosoft.module.phoneclickcounter::js/phoneCounter.js") }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if entries('advs').isEnabled('carts') %}
|
||||||
|
{{ asset_add("scripts.js", "visiosoft.module.carts::js/quantity.js") }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ asset_add("scripts.js", "visiosoft.theme.base::js/list-item.js") }}
|
||||||
|
{{ asset_add("scripts.js", "visiosoft.theme.base::js/viewed.js") }}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block customjs %}
|
{% block customjs %}
|
||||||
|
|||||||
@ -0,0 +1,16 @@
|
|||||||
|
{% if app.auth.id == adv.created_by_id %}
|
||||||
|
<a class="btn btn-info edit-adv-btn" href="/advs/edit_advs/{{ adv.id }}"><i
|
||||||
|
class="fa fa-pencil-square-o"></i>
|
||||||
|
<font>{{ trans('visiosoft.module.advs::field.edit') }}</font></a>
|
||||||
|
{% if adv.status != "pending_admin" and adv.status != "approved" %}
|
||||||
|
<a class="btn btn-success approve-adv-btn"
|
||||||
|
href="{{ url_route('visiosoft.module.advs::status',[adv.id,"pending_admin"]) }}"><i
|
||||||
|
class="fa fa-eye"></i>
|
||||||
|
<font>{{ trans('visiosoft.module.advs::field.approve') }}</font></a>
|
||||||
|
{% else %}
|
||||||
|
<a class="btn btn-danger passive-adv-btn"
|
||||||
|
href="{{ url_route('visiosoft.module.advs::status',[adv.id,"passive"]) }}"><i
|
||||||
|
class="fa fa-ban"></i>
|
||||||
|
<font>{{ trans('visiosoft.module.advs::field.passive') }}</font></a>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
@ -1,162 +0,0 @@
|
|||||||
<h3 class="title">{{ adv.title }}</h3>
|
|
||||||
<h2 class="ad-price">
|
|
||||||
<b>{{ adv.price.format() }}</b> {{ adv.currency }}
|
|
||||||
{% if app.auth.id == adv.created_by_id %}
|
|
||||||
<a class="btn btn-info edit-adv-btn" href="/advs/edit_advs/{{ adv.id }}"><i
|
|
||||||
class="fa fa-pencil-square-o"></i>
|
|
||||||
<font>{{ trans('visiosoft.module.advs::field.edit') }}</font></a>
|
|
||||||
{% if adv.status != "pending_admin" and adv.status != "approved" %}
|
|
||||||
<a class="btn btn-success approve-adv-btn"
|
|
||||||
href="{{ url_route('visiosoft.module.advs::status',[adv.id,"pending_admin"]) }}"><i
|
|
||||||
class="fa fa-eye"></i>
|
|
||||||
<font>{{ trans('visiosoft.module.advs::field.approve') }}</font></a>
|
|
||||||
{% else %}
|
|
||||||
<a class="btn btn-danger passive-adv-btn"
|
|
||||||
href="{{ url_route('visiosoft.module.advs::status',[adv.id,"passive"]) }}"><i
|
|
||||||
class="fa fa-ban"></i>
|
|
||||||
<font>{{ trans('visiosoft.module.advs::field.passive') }}</font></a>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</h2>
|
|
||||||
<div class="user-interactions">
|
|
||||||
{% if adv.is_get_adv == "1" and adv.stock != "0" and entries('advs').isEnabled('carts') %}
|
|
||||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 add-cart-row">
|
|
||||||
<div class="add-cart-quantity-field">
|
|
||||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 add-cart-reduce">
|
|
||||||
<button type="button" class="btn btn-default btn-number bg-secondary"
|
|
||||||
data-type="minus"
|
|
||||||
data-field="quant[1]" disabled="true">
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-4 col-md-4 col-sm-2 col-xs-1 add-cart-quantity">
|
|
||||||
<input type="text" name="quant[1]" data-id="{{ adv.id }}"
|
|
||||||
class="form-control add-cart-quantity-input" value="1"
|
|
||||||
min="1" max="10">
|
|
||||||
<span>{{ trans('visiosoft.module.advs::field.quantity') }}</span>
|
|
||||||
{#Trans yapılacak#}
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 add-cart-upgrade">
|
|
||||||
<button type="button" class="btn btn-default btn-number"
|
|
||||||
data-type="plus"
|
|
||||||
data-field="quant[1]" {% if adv.stock < "2" %} disabled="true" {% endif %}>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="add-cart-button-field">
|
|
||||||
|
|
||||||
<a class="btn btn-success add-cart-button"
|
|
||||||
href="{{ url_route('addCart',[adv.id]) }}"><i
|
|
||||||
class="fa fa-shopping-cart"></i> {{ trans('visiosoft.module.orders::field.addcart') }}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
|
|
||||||
{% if entries('advs').isEnabled('favs') %}
|
|
||||||
<a id="owner-fav" href="#"><i id="heart-icon-seller" class="far fa-heart"></i></a>
|
|
||||||
{% endif %}
|
|
||||||
<span class="icon">{{ trans('visiosoft.module.advs::field.offered_by') }}:
|
|
||||||
<a id="owner"
|
|
||||||
href="{{ url_route('visiosoft.module.advs::list_user_ad', [adv.created_by_id]) }}"
|
|
||||||
data-content="{{ adv.owner_id }}">{{ adv.owner }}</a>
|
|
||||||
</span>
|
|
||||||
<span class="icon"> {{ trans('visiosoft.module.advs::field.ad_id') }}:
|
|
||||||
<a href="#" id="adv_id" class="time">{{ adv.id }}</a>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
|
|
||||||
<span class="icon"><i class="far fa-clock"></i><a
|
|
||||||
href="#">{{ adv.created_at|date('d/m/Y') }}</a></span>
|
|
||||||
|
|
||||||
{% if setting_value('visiosoft.module.location::detail_page_location') %}
|
|
||||||
<span class="icon"><i class="fa fa-map-marker"></i><a href="#">{{ adv.city_name }}
|
|
||||||
, {{ adv.country_name }}</a></span>
|
|
||||||
{% endif %}
|
|
||||||
{% if adv.isCorporate == 2 %}
|
|
||||||
<span class="icon"><i class="fa fa-suitcase"></i><a
|
|
||||||
href="{{ url_route('visiosoft.module.advs::list_user_ad', [adv.created_by_id]) }}">{{ adv.owner }}</a></span>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
|
|
||||||
{% if entries('advs').isEnabled('comparisons') %}
|
|
||||||
{% include "visiosoft.module.comparisons::comparebtn" %}
|
|
||||||
<span class="icon">{{ trans('visiosoft.module.comparisons::field.comparisonpagetitle') }}</span>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if(adv.video_url != null) %}
|
|
||||||
<div class="contact-with">
|
|
||||||
<h4>{{ trans('visiosoft.module.cloudinary::field.video') }}</h4>
|
|
||||||
<a class="btn btn-success" onclick="openVideo()"><i class="fa fa-file-video-o"
|
|
||||||
aria-hidden="true"></i> {{ trans('visiosoft.module.cloudinary::field.video') }}
|
|
||||||
</a>
|
|
||||||
<div class="modal fade" id="adv-video" tabindex="-1" role="dialog"
|
|
||||||
aria-labelledby="myModalLabel">
|
|
||||||
<div class="modal-dialog" role="document">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="close-modal text-right">
|
|
||||||
<button type="button" class="btn btn-danger" data-dismiss="modal">X
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<video controls loop class="img-responsive"
|
|
||||||
style="text-align: center; width: 100%">
|
|
||||||
<source src="{{ adv.video_url }}" class="video-src"
|
|
||||||
type="video/mp4"/>
|
|
||||||
</video>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% if(profile.getObject().gsm_phone is not null or profile.office_phone is not null or entries('advs').isEnabled('messages')) %}
|
|
||||||
<!-- contact-with -->
|
|
||||||
<div class="contact-with">
|
|
||||||
<h4> {{ trans('visiosoft.module.advs::field.contact_with') }}</h4>
|
|
||||||
{% if(profile.getObject().gsm_phone != null) %}
|
|
||||||
<span class="btn btn-red show-number" data-id="{{ adv.id }}">
|
|
||||||
<i class="fa fa-phone-square"></i>
|
|
||||||
<span class="hide-text">{{ trans('visiosoft.module.advs::field.click_phone') }} </span>
|
|
||||||
<span class="hide-number">{{ trans("visiosoft.module.advs::field.phone_gsm") }}
|
|
||||||
: {{ profile.getObject().gsm_phone }}
|
|
||||||
{% if profile.office_phone != null and profile.office_phone != "" %}
|
|
||||||
<br>
|
|
||||||
{{ trans("visiosoft.module.advs::field.phone_office") }}: {{ profile.office_phone }}
|
|
||||||
{% endif %}
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
{% endif %}
|
|
||||||
{% if entries('advs').isEnabled('messages') %}
|
|
||||||
<a data-content="{{ app.auth.id }}" id="message" class="btn"><i
|
|
||||||
class="fa fa-envelope-square"></i>{{ trans("visiosoft.module.advs::field.send_message") }}
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
</div><!-- contact-with -->
|
|
||||||
{% endif %}
|
|
||||||
{% if adv_detail_place_code %}
|
|
||||||
<div>
|
|
||||||
{{ adv_detail_place_code }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<!-- social-links -->
|
|
||||||
<div class="social-links">
|
|
||||||
<h4>{{ trans('visiosoft.module.advs::field.share') }}</h4>
|
|
||||||
<ul class="list-inline">
|
|
||||||
<li><a target="_blank"
|
|
||||||
href="https://www.facebook.com/sharer/sharer.php?u={{ app.request.uri }}"><i
|
|
||||||
class="fab fa-facebook-square"></i></a></li>
|
|
||||||
<li><a target="_blank"
|
|
||||||
href="https://twitter.com/intent/tweet?text={{ app.request.uri }}"><i
|
|
||||||
class="fab fa-twitter-square"></i></a></li>
|
|
||||||
<li><a target="_blank" href="https://wa.me/?text={{ app.request.uri }}"><i
|
|
||||||
class="fab fa-whatsapp"></i></a></li>
|
|
||||||
<li><a target="_blank"
|
|
||||||
href="https://www.linkedin.com/shareArticle?mini=true&url={{ app.request.uri }}"><i
|
|
||||||
class="fab fa-linkedin"></i></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<!-- social-links -->
|
|
||||||
</div>
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
<div class="fotorama"
|
|
||||||
data-width="700"
|
|
||||||
data-ratio="3/2"
|
|
||||||
data-nav="thumbs"
|
|
||||||
data-thumbheight="48">
|
|
||||||
{% set advPhoto = '' %}
|
|
||||||
{% if count(adv.files) == 0 %}
|
|
||||||
{% set advPhoto = img('theme::images/no-image.png').url %}
|
|
||||||
<a href="{{ image }}"><img src="{{ img('theme::images/no-image.png').url }}"></a>
|
|
||||||
{% else %}
|
|
||||||
{% for image in adv.getViewPhotoUrl %}
|
|
||||||
<a href="{{ image }}"><img src="{{ image }}"></a>
|
|
||||||
{% if loop.index == 1 %}
|
|
||||||
{% set advPhoto = image %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
@ -0,0 +1,112 @@
|
|||||||
|
<div class="slider-text">
|
||||||
|
{% if entries('advs').isEnabled('favs') %}
|
||||||
|
<!-- favorites ad -->
|
||||||
|
<a class="favorites" href="#">
|
||||||
|
<i id="heart-icon-adv" class="far fa-heart"></i>
|
||||||
|
</a>
|
||||||
|
<!-- favorites ad -->
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if blocks('ad-item-details-block-area') is null %}
|
||||||
|
|
||||||
|
<h3 class="title">{{ adv.title }}</h3>
|
||||||
|
|
||||||
|
<h2 class="ad-price">
|
||||||
|
<b>{{ adv.price.format() }}</b> {{ adv.currency }}
|
||||||
|
|
||||||
|
{% include "theme::ad-detail/partials/author-button" %}
|
||||||
|
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="user-interactions">
|
||||||
|
|
||||||
|
{% if adv.is_get_adv == "1" and adv.stock != "0" and entries('advs').isEnabled('carts') %}
|
||||||
|
{% include "visiosoft.module.carts::ad-detail/quantity" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
|
||||||
|
|
||||||
|
{% if entries('advs').isEnabled('favs') %}
|
||||||
|
<!-- favorites owner -->
|
||||||
|
<a id="owner-fav" href="#"><i id="heart-icon-seller" class="far fa-heart"></i></a>
|
||||||
|
<!-- favorites owner -->
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<span class="icon">{{ trans('visiosoft.module.advs::field.offered_by') }}:
|
||||||
|
<a id="owner" href="{{ url_route('visiosoft.module.advs::list_user_ad', [adv.created_by_id]) }}"
|
||||||
|
data-content="{{ adv.owner_id }}">{{ adv.owner }}</a>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span class="icon"> {{ trans('visiosoft.module.advs::field.ad_id') }}:
|
||||||
|
<a href="#" id="adv_id" class="time">{{ adv.id }}</a>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
|
||||||
|
|
||||||
|
<span class="icon"><i class="far fa-clock"></i>
|
||||||
|
<a href="#">{{ adv.created_at|date('d/m/Y') }}</a>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
{% if setting_value('visiosoft.module.location::detail_page_location') %}
|
||||||
|
<span class="icon">
|
||||||
|
<i class="fa fa-map-marker"></i>
|
||||||
|
<a href="#">{{ adv.city_name }}, {{ adv.country_name }}</a>
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if adv.isCorporate == 2 %}
|
||||||
|
<span class="icon">
|
||||||
|
<i class="fa fa-suitcase"></i>
|
||||||
|
<a href="{{ url_route('visiosoft.module.advs::list_user_ad',
|
||||||
|
[adv.created_by_id]) }}">{{ adv.owner }}</a>
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if entries('advs').isEnabled('comparisons') %}
|
||||||
|
|
||||||
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
|
||||||
|
{% include "visiosoft.module.comparisons::comparebtn" %}
|
||||||
|
|
||||||
|
<span class="icon">{{ trans('visiosoft.module.comparisons::field.comparisonpagetitle') }}</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if(adv.video_url != null) %}
|
||||||
|
<!-- cloudinary -->
|
||||||
|
{% include "visiosoft.module.cloudinary::ad-detail/player-modal" %}
|
||||||
|
<!-- cloudinary -->
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="contact-with">
|
||||||
|
<h4> {{ trans('visiosoft.module.advs::field.contact_with') }}</h4>
|
||||||
|
|
||||||
|
{% include "visiosoft.module.profile::ad-detail/contact-with" %}
|
||||||
|
|
||||||
|
{% if entries('advs').isEnabled('messages') %}
|
||||||
|
<!-- messages -->
|
||||||
|
{% include "visiosoft.module.messages::ad-detail/contact-with" %}
|
||||||
|
<!-- messages -->
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- social-links -->
|
||||||
|
<div class="social-links">
|
||||||
|
{% include "theme::ad-detail/partials/social" %}
|
||||||
|
</div>
|
||||||
|
<!-- social-links -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
{{ blocks('ad-item-details-block-area') }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
<div class="col-md-7 slider-box">
|
||||||
|
{% if blocks('ad-item-picture-block-area') is null %}
|
||||||
|
<div class="fotorama"
|
||||||
|
data-width="700"
|
||||||
|
data-ratio="3/2"
|
||||||
|
data-nav="thumbs"
|
||||||
|
data-thumbheight="48">
|
||||||
|
{% set advPhoto = '' %}
|
||||||
|
{% if count(adv.files) == 0 %}
|
||||||
|
{% set advPhoto = img('theme::images/no-image.png').url %}
|
||||||
|
<a href="{{ image }}"><img src="{{ img('theme::images/no-image.png').url }}"></a>
|
||||||
|
{% else %}
|
||||||
|
{% for image in adv.getViewPhotoUrl %}
|
||||||
|
<a href="{{ image }}"><img src="{{ image }}"></a>
|
||||||
|
{% if loop.index == 1 %}
|
||||||
|
{% set advPhoto = image %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
{{ blocks('ad-item-picture-block-area') }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
<h4>{{ trans('visiosoft.module.advs::field.share') }}</h4>
|
||||||
|
<ul class="list-inline">
|
||||||
|
<li><a target="_blank"
|
||||||
|
href="https://www.facebook.com/sharer/sharer.php?u={{ app.request.uri }}"><i
|
||||||
|
class="fab fa-facebook-square"></i></a></li>
|
||||||
|
<li><a target="_blank"
|
||||||
|
href="https://twitter.com/intent/tweet?text={{ app.request.uri }}"><i
|
||||||
|
class="fab fa-twitter-square"></i></a></li>
|
||||||
|
<li><a target="_blank" href="https://wa.me/?text={{ app.request.uri }}"><i
|
||||||
|
class="fab fa-whatsapp"></i></a></li>
|
||||||
|
<li><a target="_blank"
|
||||||
|
href="https://www.linkedin.com/shareArticle?mini=true&url={{ app.request.uri }}"><i
|
||||||
|
class="fab fa-linkedin"></i></a></li>
|
||||||
|
</ul>
|
||||||
@ -44,13 +44,13 @@ return [
|
|||||||
'name' => 'Village'
|
'name' => 'Village'
|
||||||
],
|
],
|
||||||
'gsm_phone' => [
|
'gsm_phone' => [
|
||||||
'name' => 'GSM Phone Number'
|
'name' => 'GSM Phone'
|
||||||
],
|
],
|
||||||
'land_phone' => [
|
'land_phone' => [
|
||||||
'name' => 'Land Phone Number'
|
'name' => 'Land Phone'
|
||||||
],
|
],
|
||||||
'office_phone' => [
|
'office_phone' => [
|
||||||
'name' => 'Office Phone Number'
|
'name' => 'Office Phone'
|
||||||
],
|
],
|
||||||
'register_type' => [
|
'register_type' => [
|
||||||
'name' => 'Register Type'
|
'name' => 'Register Type'
|
||||||
|
|||||||
@ -0,0 +1,30 @@
|
|||||||
|
{% set profile = findUserProfile(adv.created_by_id) %}
|
||||||
|
|
||||||
|
{% if profile.gsm_phone is not null %}
|
||||||
|
<span class="btn btn-red show-number" data-id="{{ adv.id }}">
|
||||||
|
<i class="fa fa-phone-square hide-text"></i>
|
||||||
|
<span class="hide-text">{{ trans('visiosoft.module.advs::field.click_phone') }}</span>
|
||||||
|
|
||||||
|
{% if profile.gsm_phone is not null %}
|
||||||
|
<p>
|
||||||
|
<i class="fas fa-mobile hide-number"></i>
|
||||||
|
<span class="hide-number">{{ trans("visiosoft.module.profile::field.gsm_phone.name") }}: {{ profile.gsm_phone }}</span>
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if profile.office_phone is not empty %}
|
||||||
|
<p>
|
||||||
|
<i class="fas fa-headset hide-number"></i>
|
||||||
|
<span class="hide-number">{{ trans("visiosoft.module.profile::field.office_phone.name") }}: {{ profile.office_phone }}</span>
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if profile.land_phone is not empty %}
|
||||||
|
<p>
|
||||||
|
<i class="fa fa-phone-square hide-number"></i>
|
||||||
|
<span class="hide-number">{{ trans("visiosoft.module.profile::field.office_phone.name") }}: {{ profile.office_phone }}</span>
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
<?php namespace Visiosoft\ProfileModule\Profile\Command;
|
||||||
|
|
||||||
|
use Visiosoft\ProfileModule\Profile\Contract\ProfileRepositoryInterface;
|
||||||
|
|
||||||
|
class FindUserProfile
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var $id
|
||||||
|
*/
|
||||||
|
protected $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GetProduct constructor.
|
||||||
|
* @param $id
|
||||||
|
*/
|
||||||
|
public function __construct($id)
|
||||||
|
{
|
||||||
|
$this->id = $id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ProfileRepositoryInterface $profileRepository
|
||||||
|
* @return |null
|
||||||
|
*/
|
||||||
|
public function handle(ProfileRepositoryInterface $profileRepository)
|
||||||
|
{
|
||||||
|
if ($this->id) {
|
||||||
|
return $profileRepository->findByUserID($this->id);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -9,8 +9,12 @@ interface ProfileRepositoryInterface extends EntryRepositoryInterface
|
|||||||
public function getProfile($id);
|
public function getProfile($id);
|
||||||
|
|
||||||
public function validPasswordByEmail($email);
|
public function validPasswordByEmail($email);
|
||||||
|
|
||||||
public function validPasswordByUsername($username);
|
public function validPasswordByUsername($username);
|
||||||
|
|
||||||
public function updateUserField($fields);
|
public function updateUserField($fields);
|
||||||
public function changePassword($fields,$password);
|
|
||||||
|
public function changePassword($fields, $password);
|
||||||
|
|
||||||
|
public function findByUserID($id);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -103,26 +103,31 @@ class ProfileRepository extends EntryRepository implements ProfileRepositoryInte
|
|||||||
|
|
||||||
public function changePassword($fields, $userPassword)
|
public function changePassword($fields, $userPassword)
|
||||||
{
|
{
|
||||||
if ($fields['new_password'] != $fields['re_new_password']) {
|
if ($fields['new_password'] != $fields['re_new_password']) {
|
||||||
$errorList[] = trans('anomaly.module.users::field.confirm_password.name');
|
$errorList[] = trans('anomaly.module.users::field.confirm_password.name');
|
||||||
$fields['error'] = $errorList;
|
$fields['error'] = $errorList;
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
$validator = $userPassword->validate($fields['new_password']);
|
$validator = $userPassword->validate($fields['new_password']);
|
||||||
$errorList = array();
|
$errorList = array();
|
||||||
foreach ($validator->errors()->all() as $error) {
|
foreach ($validator->errors()->all() as $error) {
|
||||||
$errorList[] = $error;
|
$errorList[] = $error;
|
||||||
}
|
}
|
||||||
if (count($errorList) != 0) {
|
if (count($errorList) != 0) {
|
||||||
$fields['error'] = $errorList;
|
$fields['error'] = $errorList;
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
UsersUsersEntryModel::query()->find(Auth::id())->update(['password' => Hash::make($fields['new_password'])]);
|
UsersUsersEntryModel::query()->find(Auth::id())->update(['password' => Hash::make($fields['new_password'])]);
|
||||||
unset($fields['new_password'], $fields['re_new_password'], $fields['confirm_password_input']);
|
unset($fields['new_password'], $fields['re_new_password'], $fields['confirm_password_input']);
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function findByUserID($id)
|
||||||
|
{
|
||||||
|
return $this->model->where('user_no_id', $id)->first();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,28 @@
|
|||||||
|
<?php namespace Visiosoft\ProfileModule;
|
||||||
|
|
||||||
|
use Anomaly\Streams\Platform\Addon\Plugin\Plugin;
|
||||||
|
use Visiosoft\ProfileModule\Profile\Command\FindUserProfile;
|
||||||
|
|
||||||
|
class ProfileModulePlugin extends Plugin
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getFunctions()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
new \Twig_SimpleFunction(
|
||||||
|
'findUserProfile',
|
||||||
|
function ($id) {
|
||||||
|
|
||||||
|
if (!$ad = $this->dispatch(new FindUserProfile($id))) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ad;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -22,7 +22,9 @@ class ProfileModuleServiceProvider extends AddonServiceProvider
|
|||||||
*
|
*
|
||||||
* @type array|null
|
* @type array|null
|
||||||
*/
|
*/
|
||||||
protected $plugins = [];
|
protected $plugins = [
|
||||||
|
ProfileModulePlugin::class
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The addon Artisan commands.
|
* The addon Artisan commands.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user