mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 23:06:08 -06:00
Merge branch 'master' of https://github.com/openclassify/openclassify into basetheme
This commit is contained in:
commit
a25c0c444a
@ -42,6 +42,9 @@ return [
|
|||||||
'currencies' => [
|
'currencies' => [
|
||||||
'name' => 'Active Currencies',
|
'name' => 'Active Currencies',
|
||||||
],
|
],
|
||||||
|
'latest-limit' => [
|
||||||
|
'name' => 'Latest Limit',
|
||||||
|
],
|
||||||
'site_address' => [
|
'site_address' => [
|
||||||
'name' => 'Site address',
|
'name' => 'Site address',
|
||||||
'warning' => 'Auto added www. www.<strong>sitename.com</strong> ',
|
'warning' => 'Auto added www. www.<strong>sitename.com</strong> ',
|
||||||
|
|||||||
@ -47,6 +47,8 @@
|
|||||||
{{ blocks('ad-item-content-block-area') }}
|
{{ blocks('ad-item-content-block-area') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{{ addBlock('ad-detail/widget', {'price': adv.price, 'id': adv.id})|raw }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,9 @@
|
|||||||
{% block listContent %}
|
{% block listContent %}
|
||||||
{% include "visiosoft.module.advs::list/partials/ads" %}
|
{% include "visiosoft.module.advs::list/partials/ads" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
</div>
|
||||||
|
<div class="d-flex justify-content-center">
|
||||||
|
{{ advs.appends(request_query()).links()|raw }}
|
||||||
</div>
|
</div>
|
||||||
{# <div class="category-tabs"></div>#}
|
{# <div class="category-tabs"></div>#}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,25 +1,30 @@
|
|||||||
{% if app.request.get('user') != null or app.request.get('user') != "" %}
|
{% if app.request.get('user') != null or app.request.get('user') != "" %}
|
||||||
|
{% set store = entries('store','store').where('user_id', user.id).first() %}
|
||||||
{% if userProfile.adv_listing_banner.url == '' %}
|
{% if store is null %}
|
||||||
{% set background_user = img('visiosoft.module.advs::images/user_section_back.png').url %}
|
{% set user = entries('store','user').where('user_id', user.id).first() %}
|
||||||
{% else %}
|
{% set store = user.store %}
|
||||||
{% set background_user = userProfile.adv_listing_banner.url %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="col-md-12 upper-list-banner" style="background-image: url('{{ background_user }}');">
|
{% if store is not null %}
|
||||||
<div class="row">
|
{% if store.store_banner is null %}
|
||||||
<div class="col-md-3 col-xs-3">
|
{% set background_image = img('visiosoft.module.advs::images/user_section_back.png').url %}
|
||||||
<div class="card m-4">
|
{% else %}
|
||||||
{% if user.file is null %}
|
{% set background_image = store.store_banner.url %}
|
||||||
<img src="{{ img('visiosoft.module.advs::images/sample-logo.jpg').url }}"
|
{% endif %}
|
||||||
class="card-img-top">
|
<div class="col-md-12 upper-list-banner" style="background-image: url('{{ background_image }}');">
|
||||||
{% else %}
|
<div class="row">
|
||||||
<img src="{{ user.file.url }}" class="card-img-top">
|
<div class="col-md-3 col-xs-3">
|
||||||
{% endif %}
|
<div class="card m-4">
|
||||||
<div class="card-body">
|
{% if store.file is null %}
|
||||||
<h5 class="card-title">{{ user.first_name }} {{ user.last_name }}</h5>
|
<img src="{{ img('visiosoft.theme.base::images/no-image.png').url }}" class="card-img-top">
|
||||||
|
{% else %}
|
||||||
|
<img src="{{ store.file.url }}" class="card-img-top">
|
||||||
|
{% endif %}
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title text-center mb-0">{{ store.name }}</h5>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -48,8 +48,6 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
|||||||
|
|
||||||
public function searchAdvs($type, $param = null, $customParameters = null, $limit = null)
|
public function searchAdvs($type, $param = null, $customParameters = null, $limit = null)
|
||||||
{
|
{
|
||||||
//dd($param);
|
|
||||||
|
|
||||||
$isActiveDopings = new AdvModel();
|
$isActiveDopings = new AdvModel();
|
||||||
$isActiveDopings = $isActiveDopings->is_enabled('dopings');
|
$isActiveDopings = $isActiveDopings->is_enabled('dopings');
|
||||||
|
|
||||||
@ -125,11 +123,9 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
|||||||
if (!empty($param['photo'])) {
|
if (!empty($param['photo'])) {
|
||||||
$query = $query->whereNotNull('cover_photo');
|
$query = $query->whereNotNull('cover_photo');
|
||||||
}
|
}
|
||||||
// if (!empty($param['video'])) {
|
if (!empty($param['video'])) {
|
||||||
// $int = (int)$num;
|
$query = $query->where('cover_photo', 'like', '%video/upload/w_400,e_loop%');
|
||||||
// $column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') <=" . $int;
|
}
|
||||||
// $query = $query->whereRaw($column);
|
|
||||||
// }
|
|
||||||
if (!empty($param['map']) && $param['map'] == true) {
|
if (!empty($param['map']) && $param['map'] == true) {
|
||||||
$query = $query->whereNotNull('map_Val');
|
$query = $query->whereNotNull('map_Val');
|
||||||
}
|
}
|
||||||
@ -246,7 +242,6 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
|||||||
$query = $query->select('advs_advs.*', 'advs_advs_translations.name as name', 'advs_advs_translations.advs_desc as advs_desc');
|
$query = $query->select('advs_advs.*', 'advs_advs_translations.name as name', 'advs_advs_translations.advs_desc as advs_desc');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($type == "list") {
|
if ($type == "list") {
|
||||||
return $query->paginate($this->settings->value('streams::per_page'));
|
return $query->paginate($this->settings->value('streams::per_page'));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -207,6 +207,7 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
|||||||
'as' => 'ajax::getAds',
|
'as' => 'ajax::getAds',
|
||||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AjaxController@getMyAds'
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AjaxController@getMyAds'
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php namespace Visiosoft\AdvsModule\Http\Controller;
|
<?php namespace Visiosoft\AdvsModule\Http\Controller;
|
||||||
|
|
||||||
use Anomaly\Streams\Platform\Http\Controller\PublicController;
|
use Anomaly\Streams\Platform\Http\Controller\PublicController;
|
||||||
|
use Anomaly\UsersModule\User\UserModel;
|
||||||
use Visiosoft\AdvsModule\Adv\AdvModel;
|
use Visiosoft\AdvsModule\Adv\AdvModel;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Visiosoft\AdvsModule\Adv\Contract\AdvRepositoryInterface;
|
use Visiosoft\AdvsModule\Adv\Contract\AdvRepositoryInterface;
|
||||||
@ -9,14 +10,17 @@ use Visiosoft\LocationModule\District\DistrictModel;
|
|||||||
use Visiosoft\LocationModule\Neighborhood\NeighborhoodModel;
|
use Visiosoft\LocationModule\Neighborhood\NeighborhoodModel;
|
||||||
use Visiosoft\LocationModule\Village\VillageModel;
|
use Visiosoft\LocationModule\Village\VillageModel;
|
||||||
use Visiosoft\CatsModule\Category\CategoryModel;
|
use Visiosoft\CatsModule\Category\CategoryModel;
|
||||||
|
use Visiosoft\NotificationsModule\Notify\Notification\SendLoanApplicationMail;
|
||||||
|
|
||||||
class AjaxController extends PublicController
|
class AjaxController extends PublicController
|
||||||
{
|
{
|
||||||
private $adv_model;
|
private $adv_model;
|
||||||
|
private $userModel;
|
||||||
|
|
||||||
public function __construct(AdvModel $advModel)
|
public function __construct(AdvModel $advModel, UserModel $userModel)
|
||||||
{
|
{
|
||||||
$this->adv_model = $advModel;
|
$this->adv_model = $advModel;
|
||||||
|
$this->userModel = $userModel;
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -465,14 +465,6 @@ class AdvsController extends PublicController
|
|||||||
return redirect('/');
|
return redirect('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($advModel->is_enabled('store')) {
|
|
||||||
$StoreAdModel = new AdModel();
|
|
||||||
if ($request->store != "0" and $request->store != null) {
|
|
||||||
$StoreAdModel->createStoreAdLoggedInUser($request->store, $request->update_id);
|
|
||||||
} else {
|
|
||||||
$StoreAdModel->removeAdStore($request->update_id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$adv->is_get_adv = $request->is_get_adv;
|
$adv->is_get_adv = $request->is_get_adv;
|
||||||
$adv->save();
|
$adv->save();
|
||||||
|
|
||||||
|
|||||||
@ -71,7 +71,7 @@ class CategoryController extends AdminController
|
|||||||
return $this->redirect->back();
|
return $this->redirect->back();
|
||||||
}
|
}
|
||||||
|
|
||||||
$locale = $this->getRequestLang($all);
|
$locale = config('streams::locales.enabled');
|
||||||
|
|
||||||
$translatable = array();
|
$translatable = array();
|
||||||
foreach ($all as $key => $value) {
|
foreach ($all as $key => $value) {
|
||||||
@ -171,31 +171,6 @@ class CategoryController extends AdminController
|
|||||||
return substr_compare($string, $test, $strlen - $testlen, $testlen) === 0;
|
return substr_compare($string, $test, $strlen - $testlen, $testlen) === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRequestLang($request) {
|
|
||||||
$locale = array();
|
|
||||||
foreach ($request as $key => $field) {
|
|
||||||
$locale[] = substr($key, 0, -2);
|
|
||||||
}
|
|
||||||
$notTrans = array();
|
|
||||||
$trans = array();
|
|
||||||
foreach ($locale as $translatable) {
|
|
||||||
if (!in_array($translatable, $notTrans)) {
|
|
||||||
$notTrans[] = $translatable;
|
|
||||||
} else {
|
|
||||||
$trans[] = $translatable;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$locale = array();
|
|
||||||
foreach ($request as $key => $field) {
|
|
||||||
foreach (array_unique($trans) as $entry) {
|
|
||||||
if (strpos($key, $entry) === 0) {
|
|
||||||
$locale[] = substr($key, -2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $locale;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function edit(CategoryFormBuilder $form, Request $request, $id)
|
public function edit(CategoryFormBuilder $form, Request $request, $id)
|
||||||
{
|
{
|
||||||
if ($request->action == "update") {
|
if ($request->action == "update") {
|
||||||
|
|||||||
@ -10,4 +10,7 @@ return [
|
|||||||
'detail_page_location' => [
|
'detail_page_location' => [
|
||||||
'name' => 'Detail Page Location Field',
|
'name' => 'Detail Page Location Field',
|
||||||
],
|
],
|
||||||
|
'show_search_location_btn' => [
|
||||||
|
'name' => 'Show Search Location Button',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -0,0 +1,45 @@
|
|||||||
|
function crud(params, url, type, callback) {
|
||||||
|
$.ajax({
|
||||||
|
type: type,
|
||||||
|
data: params,
|
||||||
|
url: url,
|
||||||
|
success: function (response) {
|
||||||
|
console.log(response)
|
||||||
|
callback(response);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getMyMessages(type) {
|
||||||
|
crud({'type': type}, '/api/messages', 'GET', function (response) {
|
||||||
|
$('#nav-' + type).html("");
|
||||||
|
$.each(response, function (index, message) {
|
||||||
|
$('#nav-' + type).append(
|
||||||
|
addMessagesRow(
|
||||||
|
message.id,
|
||||||
|
message.sender_name,
|
||||||
|
message.receiver_name,
|
||||||
|
message.sent_at
|
||||||
|
)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.profile-ads-tab a').on('click', function () {
|
||||||
|
getMyMessages($(this).attr('data-type'))
|
||||||
|
});
|
||||||
|
|
||||||
|
getMyMessages('inbox');
|
||||||
|
|
||||||
|
function addMessagesRow(id, senderName, receiverName, sentAt) {
|
||||||
|
return `
|
||||||
|
<a href="/message/${id}/detail">
|
||||||
|
<div class="alert alert-success">
|
||||||
|
<h5 class="alert-heading">${from}:<small class="pl-1">${senderName}</small></h5>
|
||||||
|
<h5 class="alert-heading">${to}:<small class="pl-1">${receiverName}</small></h5>
|
||||||
|
<small class="mb-0">${sentAt}</small>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
`
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user