mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-28 00:24:41 -06:00
Merge branch 'master' of https://github.com/openclassify/openclassify
This commit is contained in:
commit
dbe6fdcbe4
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
@ -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",
|
||||
|
||||
@ -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">
|
||||
|
||||
@ -36,23 +36,17 @@
|
||||
<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 }}
|
||||
</div>
|
||||
{{ addBlock('new-ad/fields')|raw }}
|
||||
<div style="display: none">
|
||||
{{ form.fields.slug|raw }}
|
||||
</div>
|
||||
</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>
|
||||
@ -76,9 +70,7 @@
|
||||
{{ form.fields.files.input |raw }}
|
||||
</div>
|
||||
</div>
|
||||
{% if entries('advs').isEnabled('customfields') %}
|
||||
{% include "visiosoft.module.customfields::new-ad/fields" %}
|
||||
{% endif %}
|
||||
{{ addBlock('new-ad/other-fields',{'custom_fields':custom_fields})|raw }}
|
||||
|
||||
{% include "visiosoft.module.location::new-ad/map" %}
|
||||
|
||||
@ -119,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") }}
|
||||
|
||||
@ -1,6 +1,11 @@
|
||||
#main {
|
||||
margin: 3rem 0;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.table-img-100 {
|
||||
max-width: 100px;
|
||||
}
|
||||
@ -1,12 +1,12 @@
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="{{ url("/") }}">{{ setting_value('streams::name', config_get('streams::distribution.name')) }}</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample07"
|
||||
aria-controls="navbarsExample07" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarContent"
|
||||
aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse">
|
||||
<div class="collapse navbar-collapse" id="navbarContent">
|
||||
{{ structure()
|
||||
.linkAttributesDropdown({'data-toggle': 'dropdown'})
|
||||
.item_class('nav-item')
|
||||
@ -20,8 +20,23 @@
|
||||
.childListClass('dropdown-menu')
|
||||
.cache({'namespace': 'user'})
|
||||
.render()|raw }}
|
||||
<ul class="nav navbar-nav navbar-right d-block d-sm-none">
|
||||
<li class="nav-item">
|
||||
{% if auth_check() %}
|
||||
<a class="nav-link" href="{{ url_route('anomaly.module.users::logout') }}">Logout</a>
|
||||
{% else %}
|
||||
<a class="nav-link" href="{{ url_route('anomaly.module.users::login') }}">Login</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url_route('profile::profile') }}">Profile</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/advs/create_adv" class="btn btn-primary">{{ trans("theme::button.post_ad.name") }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<div class="d-none d-sm-block">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="nav-item">
|
||||
{% if auth_check() %}
|
||||
@ -31,7 +46,7 @@
|
||||
{% endif %}
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url_route('visiosoft.module.profile::profile') }}">Profile</a>
|
||||
<a class="nav-link" href="{{ url_route('profile::profile') }}">Profile</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/advs/create_adv" class="btn btn-primary">{{ trans("theme::button.post_ad.name") }}</a>
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
<?php namespace Visiosoft\LocationModule\City\Command;
|
||||
|
||||
use Visiosoft\LocationModule\City\CityModel;
|
||||
|
||||
class GetCity
|
||||
{
|
||||
|
||||
/**
|
||||
* @var $id
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* GetProduct constructor.
|
||||
* @param $id
|
||||
*/
|
||||
public function __construct($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param CityModel $groups
|
||||
* @return |null
|
||||
*/
|
||||
public function handle(CityModel $groups)
|
||||
{
|
||||
if ($this->id) {
|
||||
return $groups->find($this->id);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
<?php namespace Visiosoft\LocationModule\Country\Command;
|
||||
|
||||
use Visiosoft\LocationModule\Country\CountryModel;
|
||||
|
||||
class GetCountry
|
||||
{
|
||||
|
||||
/**
|
||||
* @var $id
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* GetProduct constructor.
|
||||
* @param $id
|
||||
*/
|
||||
public function __construct($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param CountryModel $groups
|
||||
* @return |null
|
||||
*/
|
||||
public function handle(CountryModel $groups)
|
||||
{
|
||||
if ($this->id) {
|
||||
return $groups->find($this->id);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,8 @@
|
||||
<?php namespace Visiosoft\LocationModule;
|
||||
|
||||
use Anomaly\Streams\Platform\Addon\Plugin\Plugin;
|
||||
use Visiosoft\LocationModule\City\Command\GetCity;
|
||||
use Visiosoft\LocationModule\Country\Command\GetCountry;
|
||||
use Visiosoft\LocationModule\District\Command\GetDistrict;
|
||||
use Visiosoft\LocationModule\Neighborhood\Command\GetNeighborhood;
|
||||
|
||||
@ -32,6 +34,28 @@ class LocationModulePlugin extends Plugin
|
||||
return null;
|
||||
}
|
||||
|
||||
return $ad;
|
||||
}
|
||||
),
|
||||
new \Twig_SimpleFunction(
|
||||
'getCity',
|
||||
function ($id) {
|
||||
|
||||
if (!$ad = $this->dispatch(new GetCity($id))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $ad;
|
||||
}
|
||||
),
|
||||
new \Twig_SimpleFunction(
|
||||
'getCountry',
|
||||
function ($id) {
|
||||
|
||||
if (!$ad = $this->dispatch(new GetCountry($id))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $ad;
|
||||
}
|
||||
),
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
<?php namespace Visiosoft\ProfileModule\Adress\Command;
|
||||
|
||||
|
||||
use Visiosoft\ProfileModule\Adress\Contract\AdressRepositoryInterface;
|
||||
|
||||
class GetAddress
|
||||
{
|
||||
|
||||
/**
|
||||
* @var $id
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* GetProduct constructor.
|
||||
* @param $id
|
||||
*/
|
||||
public function __construct($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param AdressRepositoryInterface $adressRepository
|
||||
* @return \Anomaly\Streams\Platform\Model\EloquentModel|null
|
||||
*/
|
||||
public function handle(AdressRepositoryInterface $adressRepository)
|
||||
{
|
||||
if ($this->id) {
|
||||
return $adressRepository->find($this->id);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -68,8 +68,6 @@ class MyProfileController extends PublicController
|
||||
|
||||
$isActive = new AdvModel();
|
||||
$isActiveMessages = $isActive->is_enabled('messages');
|
||||
$isActiveOrders = $isActive->is_enabled('orders');
|
||||
$isBalanceActive = $isActive->is_enabled('balances');
|
||||
$isActivePackages = $isActive->is_enabled('packages');
|
||||
|
||||
|
||||
@ -86,19 +84,6 @@ class MyProfileController extends PublicController
|
||||
$menu_fields[] = $menu_messages;
|
||||
}
|
||||
|
||||
if ($isActiveOrders) {
|
||||
$advModel = new AdvModel();
|
||||
$OrderModel = new OrderModel();
|
||||
$OrderDetailModel = new OrderdetailModel();
|
||||
$myPurchase = $OrderModel->listMyOrders();
|
||||
$mySales = $OrderDetailModel->listMySales();
|
||||
foreach ($mySales as $index => $mySale) {
|
||||
if ($mySale->item_type == 'adv') {
|
||||
$mySales[$index]->detail_url = $advModel->getAdvDetailLinkByAdId($mySale->item_id);
|
||||
}
|
||||
$mySales[$index]->detail_url = "#";
|
||||
}
|
||||
}
|
||||
|
||||
$advs_count = new AdvModel();
|
||||
$advs_count = count($advs_count->myAdvsByUser()->get());
|
||||
@ -341,82 +326,6 @@ class MyProfileController extends PublicController
|
||||
return redirect('/');
|
||||
}
|
||||
|
||||
public function orderDetail($id)
|
||||
{
|
||||
$advModel = new AdvModel();
|
||||
$orderDetailModel = new OrderdetailModel();
|
||||
$details = $orderDetailModel->getDetail($id);
|
||||
foreach ($details as $index => $detail) {
|
||||
if ($detail->item_type == "adv") {
|
||||
$details[$index]->detail_url = $advModel->getAdvDetailLinkByAdId($detail->item_id);
|
||||
} else {
|
||||
$details[$index]->detail_url = "#";
|
||||
}
|
||||
}
|
||||
return $this->view->make('visiosoft.module.profile::profile.show-order', compact('details'));
|
||||
}
|
||||
|
||||
public function saleDetail($id)
|
||||
{
|
||||
$advModel = new AdvModel();
|
||||
$orderDetailModel = new OrderdetailModel();
|
||||
$details = $orderDetailModel->getOrder($id);
|
||||
if ($details->item_type == "adv") {
|
||||
$details->detail_url = $advModel->getAdvDetailLinkByAdId($details->item_id);
|
||||
} else {
|
||||
$details->detail_url = "#";
|
||||
}
|
||||
return $this->view->make('visiosoft.module.profile::profile.show-my-sale', compact('details'));
|
||||
}
|
||||
|
||||
public function addTrackingNumber(Request $request, OrderdetailRepository $orderdetailRepository)
|
||||
{
|
||||
$orderdetailRepository->addTransportnumber($request->id, $request->transportNumber, $request->transportDays);
|
||||
return back()->with('success', ['Success']);
|
||||
}
|
||||
|
||||
public function orderDelivered($id)
|
||||
{
|
||||
$orderDetailModel = new OrderdetailModel();
|
||||
$details = $orderDetailModel->status($id, 'paid_buyer');
|
||||
$orderPaymentModel = new OrderpaymentModel();
|
||||
$orderPaymentModel->addSalesPayment($id);
|
||||
return back()->with('success', [trans('visiosoft.module.profile::message.success')]);
|
||||
}
|
||||
|
||||
public function orderNotDelivered($id)
|
||||
{
|
||||
$orderDetailModel = new OrderdetailModel();
|
||||
$details = $orderDetailModel->status($id, 'error_buyer');
|
||||
return back()->with('success', [trans('visiosoft.module.profile::message.success')]);
|
||||
}
|
||||
|
||||
public function reportSales(Request $request, OrderdetailRepository $orderdetailRepository, Dispatcher $events)
|
||||
{
|
||||
if ($request->status == 'sendAgain') {
|
||||
$seller = Auth::user();
|
||||
$buyer = $orderdetailRepository->getOrderUser($request->id);
|
||||
$orderdetailRepository->report($request->id, $request->reportContent, 'awaiting_tracking_number');
|
||||
|
||||
$events->dispatch(new AgainPurchaseOrder($request->reportContent, $buyer));
|
||||
$events->dispatch(new AgainSaleOrder($request->reportContent, $seller));
|
||||
|
||||
// $buyer->notify(new AgainPuchaseOrder($request->reportContent, $buyer['display_name']));/*notify*/
|
||||
// $seller->notify(new AgainSaleOrder($request->reportContent, $seller['display_name']));/*notify*/
|
||||
|
||||
} else {
|
||||
$orderdetailRepository->report($request->id, $request->reportContent);
|
||||
$user = $orderdetailRepository->getOrderUser($request->id);
|
||||
$orderPaymentModel = new OrderpaymentModel();
|
||||
$orderPaymentModel->addCancelPayment($request->id, $request->reportContent);
|
||||
|
||||
$events->dispatch(new ReportOrder($request->reportContent, $user));
|
||||
// $user->notify(new ReportOrder($request->reportContent, $user['display_name']));/*notify*/
|
||||
|
||||
}
|
||||
return back()->with('success', [trans('visiosoft.module.profile::message.success')]);
|
||||
}
|
||||
|
||||
public function notification(Request $request)
|
||||
{
|
||||
$all = $request->all();
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php namespace Visiosoft\ProfileModule;
|
||||
|
||||
use Anomaly\Streams\Platform\Addon\Plugin\Plugin;
|
||||
use Visiosoft\ProfileModule\Adress\Command\GetAddress;
|
||||
use Visiosoft\ProfileModule\Profile\Command\FindUserProfile;
|
||||
|
||||
class ProfileModulePlugin extends Plugin
|
||||
@ -20,6 +21,17 @@ class ProfileModulePlugin extends Plugin
|
||||
return null;
|
||||
}
|
||||
|
||||
return $ad;
|
||||
}
|
||||
),
|
||||
new \Twig_SimpleFunction(
|
||||
'getAddress',
|
||||
function ($id) {
|
||||
|
||||
if (!$ad = $this->dispatch(new GetAddress($id))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $ad;
|
||||
}
|
||||
)
|
||||
|
||||
@ -110,16 +110,6 @@ class ProfileModuleServiceProvider extends AddonServiceProvider
|
||||
'profile/class/extendTime/{id},{type}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@extendAds',
|
||||
'profile/message/show/{id}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@showMessage',
|
||||
'profile/closeAccount' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@disableAccount',
|
||||
|
||||
'profile/order/{id}' => [
|
||||
'as' => 'visiosoft.module.profile::profile_order',
|
||||
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@orderDetail'
|
||||
],
|
||||
'profile/my-sale/{id}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@saleDetail',
|
||||
'profile/orders/add-transport-number' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@addTrackingNumber',
|
||||
'profile/orders/delivered-purchase/{id}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@orderDelivered',
|
||||
'profile/orders/not-delivered-purchase/{id}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@orderNotDelivered',
|
||||
'profile/orders/report-sales' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@reportSales',
|
||||
'profile/notification' => [
|
||||
'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@notification',
|
||||
],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user