mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Merge branch 'master' of https://github.com/openclassify/openclassify into navigation
This commit is contained in:
commit
913bb6816b
@ -60,7 +60,6 @@ return [
|
||||
'hide_standard_price_field',
|
||||
'hide_options_field',
|
||||
'hide_village_field',
|
||||
'hide_configurations',
|
||||
'make_all_fields_required',
|
||||
'make_map_required',
|
||||
'show_breadcrumb_when_creating_ad',
|
||||
|
||||
@ -146,13 +146,6 @@ return [
|
||||
'mode' => 'checkbox'
|
||||
]
|
||||
],
|
||||
'hide_configurations' => [
|
||||
'type' => 'anomaly.field_type.boolean',
|
||||
'config' => [
|
||||
'default_value' => false,
|
||||
'mode' => 'checkbox'
|
||||
]
|
||||
],
|
||||
'make_all_fields_required' => [
|
||||
'type' => 'anomaly.field_type.boolean',
|
||||
'config' => [
|
||||
|
||||
@ -133,7 +133,7 @@ label {
|
||||
color: #4A4A4A;
|
||||
font-weight: 600;
|
||||
|
||||
input {
|
||||
input, textarea {
|
||||
box-shadow: 0 calc(1rem / 16) calc(2rem / 16) rgba(0, 0, 0, .04);
|
||||
font-size: calc(17rem / 16);
|
||||
padding: 1.1rem 1.5rem;
|
||||
|
||||
@ -79,7 +79,7 @@
|
||||
</label>
|
||||
|
||||
{% if setting_value('visiosoft.module.advs::market_place') %}
|
||||
{{ addBlock('new-ad/fields', {'adv': adv})|raw }}
|
||||
{{ addBlock('new-ad/fields', {'adv': adv, 'rawClassified': rawClassified})|raw }}
|
||||
{% endif %}
|
||||
|
||||
<div id="priceInput" class="d-flex justify-content-between mb-4 flex-wrap">
|
||||
|
||||
@ -544,4 +544,23 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
->where('status', '=', 'approved')
|
||||
->where('slug', '!=', '');
|
||||
}
|
||||
|
||||
public function setConfig($key, $value)
|
||||
{
|
||||
$config = $this->config;
|
||||
$config = $config ? (array) json_decode($config) : [];
|
||||
|
||||
$config[$key] = $value;
|
||||
|
||||
$this->config = json_encode($config);
|
||||
$this->save();
|
||||
}
|
||||
|
||||
public function getConfig($key)
|
||||
{
|
||||
$config = $this->config;
|
||||
$config = $config ? (array) json_decode($config) : [];
|
||||
|
||||
return $config[$key] ?? null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -277,7 +277,6 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
||||
->where('advs_advs.id', $id)
|
||||
->leftJoin('users_users as u1', 'advs_advs.created_by_id', '=', 'u1.id')
|
||||
->select('advs_advs.*', 'u1.first_name as first_name', 'u1.last_name as last_name', 'u1.id as owner_id')
|
||||
->inRandomOrder()
|
||||
->first();
|
||||
|
||||
if ($adv) {
|
||||
|
||||
@ -97,4 +97,8 @@ interface AdvInterface extends EntryInterface
|
||||
public function lastCategory();
|
||||
|
||||
public function scopeCurrent($query);
|
||||
|
||||
public function setConfig($key, $value);
|
||||
|
||||
public function getConfig($key);
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
use Anomaly\SettingsModule\Setting\Contract\SettingRepositoryInterface;
|
||||
use Anomaly\Streams\Platform\Application\Application;
|
||||
use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryTranslationsModel;
|
||||
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
|
||||
use Anomaly\UsersModule\User\Contract\UserRepositoryInterface;
|
||||
use Illuminate\Filesystem\Filesystem;
|
||||
use Illuminate\Http\Request;
|
||||
@ -160,7 +161,7 @@ class AdvsController extends AdminController
|
||||
height: 20px;
|
||||
border: 1px solid #2980b9;
|
||||
border-radius: 3px;
|
||||
background-image:
|
||||
background-image:
|
||||
repeating-linear-gradient(
|
||||
-45deg,
|
||||
#2980b9,
|
||||
@ -185,15 +186,23 @@ class AdvsController extends AdminController
|
||||
<script>
|
||||
location.href = '" . $request->server('HTTP_REFERER') . "';
|
||||
</script>
|
||||
|
||||
|
||||
<a href='" . $request->server('HTTP_REFERER') . "'><b>Return Back</b></a>";
|
||||
echo "<br><a href='/admin'><b>Return Admin Panel</b></a>";
|
||||
}
|
||||
|
||||
|
||||
public function exportAdvs()
|
||||
public function exportAdvs(FormBuilder $builder, Request $request)
|
||||
{
|
||||
return Excel::download(new AdvsExport(), 'advs-' . time() . '.xlsx');
|
||||
if ($request['format'] === 'csv' || $request['format'] === 'xlsx') {
|
||||
return Excel::download(new AdvsExport(), 'advs-' . time() . '.' . $request['format']);
|
||||
}
|
||||
|
||||
$builder->setOptions([
|
||||
'form_view' => 'visiosoft.theme.defaultadmin::form/advs-export',
|
||||
]);
|
||||
|
||||
return $builder->render();
|
||||
}
|
||||
|
||||
public function advancedUpdate()
|
||||
|
||||
@ -762,7 +762,8 @@ class AdvsController extends PublicController
|
||||
}
|
||||
|
||||
return $this->view->make('visiosoft.module.advs::new-ad/new-create', compact(
|
||||
'request', 'formBuilder', 'cats_d', 'custom_fields'));
|
||||
'formBuilder', 'cats_d', 'custom_fields'
|
||||
));
|
||||
}
|
||||
|
||||
public function store
|
||||
@ -833,6 +834,10 @@ class AdvsController extends PublicController
|
||||
$adv->is_get_adv = ($this->request->is_get_adv and $get_categories_status) ? true : false;
|
||||
$adv->save();
|
||||
|
||||
if ($adv->is_get_adv) {
|
||||
$orderNote = \request('order_note') ?? '';
|
||||
$adv->setConfig('order_note', trim($orderNote));
|
||||
}
|
||||
|
||||
//Todo Create Event
|
||||
if (is_module_installed('visiosoft.module.customfields')) {
|
||||
@ -953,6 +958,7 @@ class AdvsController extends PublicController
|
||||
public function edit($id)
|
||||
{
|
||||
$adv = $this->adv_repository->find($id);
|
||||
$rawClassified = $adv;
|
||||
|
||||
if (is_null($adv)) {
|
||||
$this->messages->error(trans('visiosoft.module.advs::message.no_add_found'));
|
||||
@ -1008,7 +1014,10 @@ class AdvsController extends PublicController
|
||||
|
||||
return $this->view->make(
|
||||
'visiosoft.module.advs::new-ad/new-create',
|
||||
compact('id', 'cats_d', 'cats', 'adv', 'custom_fields', 'options', 'hidePrice', 'is_options', 'configurations')
|
||||
compact(
|
||||
'id', 'cats_d', 'cats', 'adv', 'custom_fields', 'options',
|
||||
'hidePrice','is_options', 'configurations', 'rawClassified'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -13,11 +13,9 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
|
||||
|
||||
public function getIconUrlAttribute()
|
||||
{
|
||||
if ($this->icon === null) {
|
||||
return $this->dispatch(new MakeImageInstance('visiosoft.module.advs::images/listing/sample-cat-icon.svg', 'img'))->url();
|
||||
}
|
||||
|
||||
return url($this->icon);
|
||||
return $this->dispatch(
|
||||
new MakeImageInstance($this->icon ?? 'visiosoft.module.advs::images/listing/sample-cat-icon.svg', 'img')
|
||||
)->url();
|
||||
}
|
||||
|
||||
public function getCat($id)
|
||||
|
||||
@ -10,4 +10,7 @@ return [
|
||||
|
||||
// Users Module
|
||||
'search_by_gsm_number' => 'Search By GSM Number',
|
||||
|
||||
// Adv Export
|
||||
'choose_file_type' => 'Choose File Type For Export',
|
||||
];
|
||||
|
||||
@ -10,4 +10,7 @@ return [
|
||||
|
||||
// Users Module
|
||||
'search_by_gsm_number' => 'GSM Numarasına Göre Ara',
|
||||
|
||||
// Adv Export
|
||||
'choose_file_type' => 'Dışa Aktarmak İçin Dosya Türünü Seçin',
|
||||
];
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
{% block content %}
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6>{{ trans('visiosoft.theme.defaultadmin::control_panel.choose_file_type') }}:</h6>
|
||||
</div>
|
||||
<div class="card-block">
|
||||
<a href="?format=csv" class="btn btn-outline-primary">CSV</a>
|
||||
<a href="?format=xlsx" class="btn btn-outline-primary">XLSX</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@ -39,7 +39,7 @@ class VisiosoftModuleProfileCreateAdressStream extends Migration
|
||||
'required' => true,
|
||||
],
|
||||
'city' => [
|
||||
'required' => true,
|
||||
'required' => false,
|
||||
],
|
||||
'district',
|
||||
'adress_content' => [
|
||||
|
||||
@ -22,7 +22,7 @@ class AdressFormFields
|
||||
'required' => true,
|
||||
],
|
||||
'city' => [
|
||||
'required' => true,
|
||||
'required' => false,
|
||||
],
|
||||
'district' => [
|
||||
'required' => setting_value( 'visiosoft.module.profile::required_district'),
|
||||
|
||||
@ -28,7 +28,7 @@ class AddressCompanyFormFields
|
||||
'required' => true,
|
||||
],
|
||||
'city' => [
|
||||
'required' => true,
|
||||
'required' => false,
|
||||
],
|
||||
'district',
|
||||
'adress_content' => [
|
||||
|
||||
@ -6,7 +6,6 @@ use Anomaly\Streams\Platform\Model\Users\UsersUsersEntryModel;
|
||||
use Anomaly\UsersModule\User\Contract\UserRepositoryInterface;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Visiosoft\AdvsModule\Adv\AdvModel;
|
||||
use Visiosoft\AdvsModule\Adv\Event\ChangeStatusAd;
|
||||
use Visiosoft\AdvsModule\Status\Contract\StatusRepositoryInterface;
|
||||
|
||||
@ -187,6 +187,10 @@ class ProfileModuleServiceProvider extends AddonServiceProvider
|
||||
|
||||
public function boot(AddonCollection $addonCollection)
|
||||
{
|
||||
if ($utmSource = request('utm_source')) {
|
||||
setcookie('utm_source', $utmSource);
|
||||
}
|
||||
|
||||
$slug = 'export';
|
||||
$section = [
|
||||
'title' => 'visiosoft.module.profile::button.export',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user