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 Fatih Alp @fatihalp
Emek Sancar Emek Sancar @emeksancar
Ozcan Durak @ozcandurak Ozcan Durak @ozcandurak
Dia @Diatrex
## Thanks to ## Thanks to
Ryan and it's stream platform and pyrocms it makes OpenClassify more powerfull. Ryan and it's stream platform and pyrocms it makes OpenClassify more powerfull.

View File

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

View File

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

View File

@ -29,6 +29,7 @@
'subCats':subCats, 'subCats':subCats,
'ranges':ranges, 'ranges':ranges,
'checkboxes':checkboxes, 'checkboxes':checkboxes,
'topfields' : topfields,
'radio':radio, 'radio':radio,
'countries':countries, 'countries':countries,
'cities':cities, 'cities':cities,
@ -54,13 +55,15 @@
style="max-height: 300px;"> style="max-height: 300px;">
<div class="d-flex flex-column p-3 m-0"> <div class="d-flex flex-column p-3 m-0">
<div class="form-check py-1"> <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"> <label class="form-check-label" for="dateDay">
{{ trans("visiosoft.module.advs::field.in_the_last_24_hours.name") }} {{ trans("visiosoft.module.advs::field.in_the_last_24_hours.name") }}
</label> </label>
</div> </div>
<div class="form-check py-1"> <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"> <label class="form-check-label" for="dateWeek">
{{ trans("visiosoft.module.advs::field.in_the_last_week.name") }} {{ trans("visiosoft.module.advs::field.in_the_last_week.name") }}
</label> </label>
@ -116,7 +119,8 @@
<div class="card mb-3"> <div class="card mb-3">
<div class="card-header breadcrumb mb-0" id="mapHeading"> <div class="card-header breadcrumb mb-0" id="mapHeading">
<h5 class="mb-0"> <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"> aria-expanded="true" aria-controls="mapFilter">
<i class="fa fa-map"></i> <i class="fa fa-map"></i>
{{ trans("visiosoft.module.advs::field.map.name") }} {{ trans("visiosoft.module.advs::field.map.name") }}

View File

@ -8,7 +8,7 @@
</a> </a>
<ul class="dropdown-menu" x-placement="bottom-start"> <ul class="dropdown-menu px-2 mt-0" x-placement="bottom-start">
<li> <li>
<a href="#" data-value="sort_price_up" <a href="#" data-value="sort_price_up"
class="sort-by-item text-dark">{{ trans("visiosoft.module.advs::field.price_high") }}</a> 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; return $ads;
} }
public function advsofDay() public function advsofDay()
{ {
$advModel = new AdvModel(); $advModel = new AdvModel();
@ -69,6 +68,24 @@ class AdvCriteria extends EntryCriteria
return $ads; 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() public function getCurrentLocale()
{ {
return locale_get_display_name(config('app.locale')); return locale_get_display_name(config('app.locale'));

View File

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

View File

@ -212,7 +212,10 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
'as' => 'ajax::getAds', 'as' => 'ajax::getAds',
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AjaxController@getMyAds' '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>"; <a href='" . $request->server('HTTP_REFERER') . "'><b>Return Back</b></a>";
echo "<br><a href='/admin'><b>Return Admin Panel</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', 'title' => 'visiosoft.theme.base::section.catalog_mode.name',
'fields' => [ 'fields' => [
'navigation_title', 'navigation_action', 'date_fields', 'price_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, "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; padding-right: 85px;
background-color: #fff; background-color: #fff;
} }
#header {
display: none;
}
} }

View File

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

View File

@ -28,4 +28,7 @@ return [
'latest_and_view_all_btn' => [ 'latest_and_view_all_btn' => [
'name' => '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" %} {% extends "theme::layouts/default" %}
{% block content %} {% 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="row justify-content-center">
<div class="col-12 text-left m-0 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"> <div class="col-12 col-lg-5 m-3 login-section">
{% set form = form('signIn') {% set form = form('signIn')
.redirect(app.request.get('redirect')) .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="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="border personal-advantages py-5 px-5">
<div class="d-flex align-items-center mb-4"> <div class="d-flex align-items-center mb-4">
<img src="{{ img('visiosoft.theme.base::images/register-instruction.png').url }}"> {% if setting_value('visiosoft.theme.base::register_page_instruction_logo') %}
<h4 class="ml-3"> <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') }} {{ trans('visiosoft.theme.base::field.personal_registration_header') }}
</h4> </h4>
</div> </div>