Merge branch 'master' of https://github.com/openclassify/openclassify into basetheme

This commit is contained in:
vedatakd 2019-12-25 10:33:32 +03:00
commit 6026cd15f0
11 changed files with 194 additions and 11 deletions

View File

@ -79,6 +79,24 @@ class VisiosoftModuleAdvsCreateAdvsFields extends Migration
"default_value" => NULL,
]
],
'cat8' => [
'type' => 'anomaly.field_type.select',
'config' => [
"default_value" => NULL,
]
],
'cat9' => [
'type' => 'anomaly.field_type.select',
'config' => [
"default_value" => NULL,
]
],
'cat10' => [
'type' => 'anomaly.field_type.select',
'config' => [
"default_value" => NULL,
]
],
'parent_category' => [
'type' => 'anomaly.field_type.relationship',
'config' => [

View File

@ -42,6 +42,9 @@ class VisiosoftModuleAdvsCreateAdvsStream extends Migration
'cat5',
'cat6',
'cat7',
'cat8',
'cat9',
'cat10',
'price' => [
'required' => true
],

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

View File

@ -19,6 +19,18 @@ return [
'price' => [
'name' => 'Price'
],
'date' => [
'name' => 'Date'
],
'photo' => [
'name' => 'Photo'
],
'video' => [
'name' => 'Video'
],
'map' => [
'name' => 'Map'
],
'stock' => [
'name' => 'Stock'
],
@ -220,4 +232,22 @@ return [
'min' => [
'name' => 'Min',
],
'in_the_last_24_hours' => [
'name' => 'In The Last 24 Hours'
],
'in_the_last_week' => [
'name' => 'In The Last Week'
],
'in_the_last_month' => [
'name' => 'In The Last Month'
],
'ads_with_photo' => [
'name' => 'Ads With Photo'
],
'ads_with_video' => [
'name' => 'Ads With Video'
],
'yes' => [
'name' => 'Yes'
]
];

View File

@ -179,7 +179,7 @@ return [
"edit_adv" => "İlanı Düzenle",
"mandatory_fields" => "Zorunlu alanlar",
"ad_post" => "İlan Yayını",
"sell_item" => "Bir ürün veya hizmet satmak",
"sell_item" => "Detaylı bilgileri giriniz",
"search_save" => "Favori arama başarıyla kaydedildi",
"address" => "Adres",
"email" => "E-Posta",

View File

@ -19,6 +19,103 @@
'villages':villages
})|raw }}
<!-- Date Filter Start -->
<div class="card mb-3">
<div class="card-header breadcrumb mb-0" id="dateHeading">
<h5 class="mb-0">
<button class="btn btn-link text-dark" data-toggle="collapse" data-target="#date"
aria-expanded="true" aria-controls="date">
<i class="fa fa-calendar"></i>
{{ trans("visiosoft.module.advs::field.date.name") }}
</button>
</h5>
</div>
<div id="dateContainer" class="collapse show overflow-auto" aria-labelledby="dateHeading"
data-parent="#filter"
style="max-height: 300px;">
<div class="row p-3 m-0">
<div class="form-check py-1">
<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">
<label class="form-check-label" for="dateWeek">
{{ trans("visiosoft.module.advs::field.in_the_last_week.name") }}
</label>
</div>
<div class="form-check py-1">
<input class="form-check-input" type="radio" name="date" id="dateMonth" value="month">
<label class="form-check-label" for="dateMonth">
{{ trans("visiosoft.module.advs::field.in_the_last_month.name") }}
</label>
</div>
</div>
</div>
</div>
<!-- Date Filter End -->
<!-- Media Filter Start -->
<div class="card mb-3">
<div class="card-header breadcrumb mb-0" id="mediaHeading">
<h5 class="mb-0">
<button class="btn btn-link text-dark" data-toggle="collapse" data-target="#media"
aria-expanded="true" aria-controls="media">
<i class="fa fa-camera"></i>
{{ trans("visiosoft.module.advs::field.photo.name") }}, {{ trans("visiosoft.module.advs::field.video.name") }}
</button>
</h5>
</div>
<div id="mediaContainer" class="collapse show overflow-auto" aria-labelledby="mediaHeading"
data-parent="#filter"
style="max-height: 300px;">
<div class="row p-3 m-0">
<div class="form-check py-1">
<input class="form-check-input" type="checkbox" value="true" name="photo" id="photo">
<label class="form-check-label" for="photo">
{{ trans("visiosoft.module.advs::field.ads_with_photo.name") }}
</label>
</div>
<div class="form-check py-1">
<input class="form-check-input" type="checkbox" value="true" name="video" id="video">
<label class="form-check-label" for="video">
{{ trans("visiosoft.module.advs::field.ads_with_video.name") }}
</label>
</div>
</div>
</div>
</div>
<!-- Media Filter End -->
<!-- Map Filter Start -->
<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"
aria-expanded="true" aria-controls="mapFilter">
<i class="fa fa-map"></i>
{{ trans("visiosoft.module.advs::field.map.name") }}
</button>
</h5>
</div>
<div id="mapContainer" class="collapse show overflow-auto" aria-labelledby="mapHeading"
data-parent="#filter"
style="max-height: 300px;">
<div class="row p-3 m-0">
<div class="form-check py-1">
<input class="form-check-input" type="checkbox" value="true" name="map" id="mapFilter">
<label class="form-check-label" for="mapFilter">
{{ trans("visiosoft.module.advs::field.yes.name") }}
</label>
</div>
</div>
</div>
</div>
<!-- Map Filter End -->
<!-- Price Filter Start -->
<div class="card mb-3">
<div class="card-header breadcrumb mb-0" id="priceHeading">
<h5 class="mb-0">
@ -58,7 +155,7 @@
</div>
</div>
</div>
<!-- Price Filter End -->
<div class="card">
<div class="card-header bg-primary text-center" id="submitHeading">

View File

@ -4,13 +4,12 @@
{% set background_user = img('visiosoft.module.advs::images/user_section_back.png').url %}
{% else %}
{% set background_user = userProfile.adv_listing_banner.url %}
{% endif %}
<div class="col-md-12 upper-list-banner" style="background-image: url('{{ background_user }}');">
<div class="row">
<div class="col-md-3 col-xs-3">
<div class="card m-4">
<img src="https://i.pinimg.com/736x/9a/a7/1a/9aa71a7ce0656e55d083fa07fc36b8cc.jpg"
<img src="{{ img('visiosoft.module.advs::images/sample-logo.jpg').url }}"
class="card-img-top">
{# <img src="{{ user.file.url }}" class="card-img-top">#}
<div class="card-body">

View File

@ -36,12 +36,6 @@
<input type="hidden" name="update_id" value="{{ id }}">
<fieldset>
<div class="section postdetails">
<h4>
{{ trans('visiosoft.module.advs::field.sell_item') }}
<span class="pull-right">
* {{ trans('visiosoft.module.advs::field.mandatory_fields') }}
</span>
</h4>
<div class="row form-group add-title">
<div class="col-md-12">
{{ nameField|raw }}
@ -52,7 +46,7 @@
</div>
{{ addBlock('new-ad/fields')|raw }}
<div class="row form-group select-price">
<label class="col-sm-2 label-title col-xs-12">
<label class="col-sm-2 col-xs-12">
{{ form.fields.price.label|raw }}
<span class="required">*</span>
</label>
@ -117,6 +111,7 @@
var default_GET = "{{ setting_value('visiosoft.module.advs::default_GET') }}";
var adv_id = "{{ id }}";
</script>
<script src="https://maps.googleapis.com/maps/api/js?key={{ setting_value('visiosoft.module.advs::google_map_key') }}&callback="
type="text/javascript"></script>
{{ asset_add("scripts.js", "visiosoft.module.advs::js/new-create.js") }}

View File

@ -2,6 +2,7 @@
use Anomaly\SettingsModule\Setting\Contract\SettingRepositoryInterface;
use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
use Visiosoft\AdvsModule\Adv\Contract\AdvRepositoryInterface;
use Anomaly\Streams\Platform\Entry\EntryRepository;
@ -112,6 +113,26 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
$column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') <=" . $int;
$query = $query->whereRaw($column);
}
if (!empty($param['date'])) {
if ($param['date'] === 'day') {
$query = $query->where('advs_advs.publish_at', '>=', Carbon::now()->subDay());
} elseif ($param['date'] === 'week') {
$query = $query->where('advs_advs.publish_at', '>=', Carbon::now()->subWeek());
} elseif ($param['date'] === 'month') {
$query = $query->where('advs_advs.publish_at', '>=', Carbon::now()->subMonth());
}
}
if (!empty($param['photo'])) {
$query = $query->whereNotNull('cover_photo');
}
// if (!empty($param['video'])) {
// $int = (int)$num;
// $column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') <=" . $int;
// $query = $query->whereRaw($column);
// }
if (!empty($param['map']) && $param['map'] == true) {
$query = $query->whereNotNull('map_Val');
}
foreach ($param as $para => $value) {
if (substr($para, 0, 3) === "cf_") {

View File

@ -86,6 +86,8 @@ class AdvsController extends AdminController
'wrapper' => function (EntryInterface $entry, Request $request) {
if (strpos($entry->cover_photo, 'http') === 0) {
$wrapper = '<img width="64" src="'.$entry->cover_photo.'">';
} else if (is_null($entry->cover_photo)) {
$wrapper = '<img width="64" src="{{ img(\'visiosoft.theme.base::images/no-image.png\').url }}">';
} else {
$wrapper = '<img width="64" src="'.$request->root().'/'.$entry->cover_photo.'">';
}

View File

@ -1,7 +1,19 @@
<?php namespace Visiosoft\LocationModule;
use Anomaly\Streams\Platform\Addon\AddonServiceProvider;
use Anomaly\Streams\Platform\Model\Location\LocationCitiesEntryModel;
use Anomaly\Streams\Platform\Model\Location\LocationDistrictsEntryModel;
use Anomaly\Streams\Platform\Model\Location\LocationNeighborhoodsEntryModel;
use Anomaly\Streams\Platform\Model\Location\LocationVillageEntryModel;
use Visiosoft\LocationModule\City\CityModel;
use Visiosoft\LocationModule\City\CityRepository;
use Visiosoft\LocationModule\City\Contract\CityRepositoryInterface;
use Visiosoft\LocationModule\District\Contract\DistrictRepositoryInterface;
use Visiosoft\LocationModule\District\DistrictModel;
use Visiosoft\LocationModule\District\DistrictRepository;
use Visiosoft\LocationModule\Neighborhood\Contract\NeighborhoodRepositoryInterface;
use Visiosoft\LocationModule\Neighborhood\NeighborhoodModel;
use Visiosoft\LocationModule\Neighborhood\NeighborhoodRepository;
use Visiosoft\LocationModule\Village\Contract\VillageRepositoryInterface;
use Visiosoft\LocationModule\Village\VillageRepository;
use Visiosoft\LocationModule\Village\VillageModel;
@ -118,6 +130,9 @@ class LocationModuleServiceProvider extends AddonServiceProvider
* @type array|null
*/
protected $bindings = [
LocationCitiesEntryModel::class => CityModel::class,
LocationDistrictsEntryModel::class => DistrictModel::class,
LocationNeighborhoodsEntryModel::class => NeighborhoodModel::class,
// AdvsCfValuesEntryModel::class => CfValueModel::class,
// AdvsCustomFieldAdvsEntryModel::class => CustomFieldAdvModel::class,
// AdvsCustomFieldsEntryModel::class => CustomFieldModel::class,
@ -130,6 +145,9 @@ class LocationModuleServiceProvider extends AddonServiceProvider
* @type array|null
*/
protected $singletons = [
CityRepositoryInterface::class => CityRepository::class,
DistrictRepositoryInterface::class => DistrictRepository::class,
NeighborhoodRepositoryInterface::class => NeighborhoodRepository::class,
// CfValueRepositoryInterface::class => CfValueRepository::class,
// CustomFieldAdvRepositoryInterface::class => CustomFieldAdvRepository::class,
// CustomFieldRepositoryInterface::class => CustomFieldRepository::class,