This commit is contained in:
Diatrex 2020-02-19 15:20:00 +03:00
commit 27710512c1
17 changed files with 376 additions and 329 deletions

View File

@ -118,10 +118,12 @@ Onur Üre @onurure
Fatih Alp @fatihalp
Emek Sancar
Emek Sancar @emeksancar
Ozcan Durak @ozcandurak
Dia @Diatrex
## Thanks to
Ryan and it's stream platform and pyrocms it makes OpenClassify more powerfull.

View File

@ -11,6 +11,7 @@ return [
'approve' => "Approve",
'decline' => 'Decline',
'extend' => 'Extend',
'extend_all' => 'Extend All',
'sub_category' => 'Sub Categories',
'add_sub_category' => 'Add Sub Category',
'sub_cities' => 'Sub Cities',

View File

@ -10,7 +10,8 @@ return [
'new_village' => 'Yeni köy',
'approve' => "Onayla",
'decline' => 'Reddet',
'extend' => 'Uzat',
'extend' => 'Tarihi Güncelle',
'extend_all' => 'Tümünün Tarihini Güncelle',
'sub_category' => 'Alt Kategoriler',
'add_sub_category' => 'Alt Kategori Ekle',
'sub_cities' => 'Alt Şehirler',

View File

@ -1,7 +1,7 @@
{% set formHtml %}
<form action="{{ url_route('visiosoft.module.advs::list') }}" method="get">
{% endset %}
{% if 'cat' in param|keys %}
<form action="{{ url_route('visiosoft.module.advs::list') }}" method="get">
{% endset %}
{% if 'cat' in param|keys %}
{% if not param['cat'] is empty %}
{% set catId = entries('cats', 'category').find(param['cat']) %}
{% set cityId = null %}
@ -15,8 +15,8 @@
<form action="{{ url_route('adv_list_seo', [catId.slug, cityId.slug]) }}" method="get">
{% endset %}
{% endif %}
{% endif %}
{{ formHtml }}
{% endif %}
{{ formHtml }}
<div class="row">
<input type="hidden" name="cat" value="{{ app.request.get('cat') }}">
<input type="hidden" name="user" value="{{ app.request.get('user') }}">
@ -29,6 +29,7 @@
'subCats':subCats,
'ranges':ranges,
'checkboxes':checkboxes,
'topfields' : topfields,
'radio':radio,
'countries':countries,
'cities':cities,
@ -54,13 +55,15 @@
style="max-height: 300px;">
<div class="d-flex flex-column p-3 m-0">
<div class="form-check py-1">
<input class="form-check-input" type="radio" name="date" id="dateDay" value="day">
<input class="form-check-input" type="radio" name="date" id="dateDay"
value="day">
<label class="form-check-label" for="dateDay">
{{ trans("visiosoft.module.advs::field.in_the_last_24_hours.name") }}
</label>
</div>
<div class="form-check py-1">
<input class="form-check-input" type="radio" name="date" id="dateWeek" value="week">
<input class="form-check-input" type="radio" name="date" id="dateWeek"
value="week">
<label class="form-check-label" for="dateWeek">
{{ trans("visiosoft.module.advs::field.in_the_last_week.name") }}
</label>
@ -116,7 +119,8 @@
<div class="card mb-3">
<div class="card-header breadcrumb mb-0" id="mapHeading">
<h5 class="mb-0">
<button class="btn btn-link text-dark" data-toggle="collapse" data-target="#mapFilter"
<button class="btn btn-link text-dark" data-toggle="collapse"
data-target="#mapFilter"
aria-expanded="true" aria-controls="mapFilter">
<i class="fa fa-map"></i>
{{ trans("visiosoft.module.advs::field.map.name") }}
@ -197,4 +201,4 @@
</div>
</div>
</div>
</form>
</form>

View File

@ -8,7 +8,7 @@
</a>
<ul class="dropdown-menu" x-placement="bottom-start">
<ul class="dropdown-menu px-2 mt-0" x-placement="bottom-start">
<li>
<a href="#" data-value="sort_price_up"
class="sort-by-item text-dark">{{ trans("visiosoft.module.advs::field.price_high") }}</a>

View File

@ -27,7 +27,6 @@ class AdvCriteria extends EntryCriteria
return $ads;
}
public function advsofDay()
{
$advModel = new AdvModel();
@ -69,6 +68,24 @@ class AdvCriteria extends EntryCriteria
return $ads;
}
public function findAdsByCategoryId($catId)
{
$advModel = new AdvModel();
$advs = AdvModel::query()
->whereDate('finish_at', '>=', date("Y-m-d H:i:s"))
->where('status', '=', 'approved')
->where('slug', '!=', '')
->where('cat1', $catId)
->get();
$ads = $advModel->getLocationNames($advs);
foreach ($ads as $index => $ad) {
$ads[$index]->detail_url = $advModel->getAdvDetailLinkByModel($ad, 'list');
$ads[$index] = $advModel->AddAdsDefaultCoverImage($ad);
}
return $ads;
}
public function getCurrentLocale()
{
return locale_get_display_name(config('app.locale'));

View File

@ -30,6 +30,11 @@ class AdvsModule extends Module
'new_adv' => [
'href' => "/advs/create_adv",
],
'extend_all' => [
'href' => "/admin/advs/extendAll",
'icon' => 'fa fa-calendar',
'type' => 'info'
],
],
],
'assets_clear' => [

View File

@ -212,7 +212,10 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
'as' => 'ajax::getAds',
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AjaxController@getMyAds'
],
'admin/advs/extendAll' => [
'as' => 'advs::extendAll',
'uses' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@extendAll',
],
];
/**

View File

@ -257,4 +257,13 @@ class AdvsController extends AdminController
<a href='" . $request->server('HTTP_REFERER') . "'><b>Return Back</b></a>";
echo "<br><a href='/admin'><b>Return Admin Panel</b></a>";
}
public function extendAll()
{
$advs = $this->model->get();
$new_date = date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + ' . setting_value('visiosoft.module.advs::default_published_time') . ' day'));
$advs->update(['finish_at' => $new_date]);
$this->messages->success(trans('visiosoft.module.advs::field.extended'));
return $this->redirect->to('admin/advs/advs');
}
}

View File

@ -8,7 +8,8 @@ return [
'title' => 'visiosoft.theme.base::section.catalog_mode.name',
'fields' => [
'navigation_title', 'navigation_action', 'date_fields', 'price_fields',
'breadcrumbs', 'ad_details', 'ad_details_tab','latest_and_view_all_btn'
'breadcrumbs', 'ad_details', 'ad_details_tab','latest_and_view_all_btn',
'register_page_instruction_logo'
],
],
],

View File

@ -49,5 +49,11 @@ return [
"default_value" => 1,
]
],
'register_page_instruction_logo' => [
'type' => 'anomaly.field_type.file',
"config" => [
"folders" => ['images'],
"mode" => "upload",
]
],
];

View File

@ -123,7 +123,4 @@
padding-right: 85px;
background-color: #fff;
}
#header {
display: none;
}
}

View File

@ -7,3 +7,8 @@
position: relative;
top: 4px;
}
.personal-advantages img {
max-height: 60px;
max-width: 60px;
}

View File

@ -28,4 +28,7 @@ return [
'latest_and_view_all_btn' => [
'name' => 'Latest and View All Btn',
],
'register_page_instruction_logo' => [
'name' => 'Register Page Instruction Logo',
],
];

View File

@ -1,18 +1,8 @@
{% extends "theme::layouts/default" %}
{% block content %}
{% set logo_web = file(setting_value('visiosoft.theme.sahibinden::logo_web')).url %}
{% if logo_web is null %}
{% set logo_web = img('visiosoft.theme.sahibinden::images/logo_web.png').url %}
{% endif %}
<div class="col-12 px-5 mx-4">
<a href="{{ url("/") }}">
<img class="img-responsive d-none d-sm-block logo-web"
src="{{ logo_web }}"></a>
</div>
<div class="row justify-content-center">
<div class="col-12 text-left m-0 row justify-content-center">
<div class="col-12 col-lg-5 m-3 login-section">
{% set form = form('signIn')
.redirect(app.request.get('redirect'))

View File

@ -40,8 +40,11 @@
<div class="col-12 col-md-6 py-3 pr-0 instructions d-none d-md-block">
<div class="border personal-advantages py-5 px-5">
<div class="d-flex align-items-center mb-4">
<img src="{{ img('visiosoft.theme.base::images/register-instruction.png').url }}">
<h4 class="ml-3">
{% if setting_value('visiosoft.theme.base::register_page_instruction_logo') %}
<img class="mr-3"
src="{{ file(setting_value('visiosoft.theme.base::register_page_instruction_logo')).url }}">
{% endif %}
<h4 class="mb-0">
{{ trans('visiosoft.theme.base::field.personal_registration_header') }}
</h4>
</div>

View File

@ -80,7 +80,7 @@
"visiosoft/integer-field_type": "~2.1.0",
"guzzlehttp/guzzle": "~6.3.3"
},
"replace" : {
"replace": {
"anomaly/streams-platform": "*"
},
"require-dev": {