mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 14:56:13 -06:00
Merge pull request #63 from openclassify/vedat
Fixed Home Add Cart Icon
This commit is contained in:
commit
262d472e31
@ -1,9 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
$('#complaints').on('click', function () {
|
|
||||||
$('#complaints_modal').modal('toggle');
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#message').on('click', function () {
|
$('#message').on('click', function () {
|
||||||
if ($('#adv_id').data('content') == $('#message').data('content')) {
|
if ($('#adv_id').data('content') == $('#message').data('content')) {
|
||||||
alert("You can't send messages to your own ad.")
|
alert("You can't send messages to your own ad.")
|
||||||
@ -32,9 +28,6 @@ $('#message-button').on('click', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#complaint-radio').on('click', function () {
|
|
||||||
$(this).closest("textarea").toggle();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
function openVideo(){
|
function openVideo(){
|
||||||
|
|||||||
@ -33,5 +33,8 @@ return [
|
|||||||
],
|
],
|
||||||
'fields' => [
|
'fields' => [
|
||||||
'title' => 'Custom Fields'
|
'title' => 'Custom Fields'
|
||||||
|
],
|
||||||
|
'assets_clear' => [
|
||||||
|
'name' => 'Assets Clear'
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|||||||
@ -32,6 +32,10 @@ class AdvsModule extends Module
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'assets_clear' => [
|
||||||
|
'title' => 'visiosoft.module.advs::section.assets_clear.name',
|
||||||
|
'href' => '/admin/assets/clear',
|
||||||
|
]
|
||||||
// 'custom_fields' => [
|
// 'custom_fields' => [
|
||||||
// 'buttons' => [
|
// 'buttons' => [
|
||||||
// 'new_custom_field',
|
// 'new_custom_field',
|
||||||
|
|||||||
@ -161,6 +161,10 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
|||||||
'advs/delete/{id}' => 'Visiosoft\AdvsModule\Http\Controller\advsController@softDeleteAdv',
|
'advs/delete/{id}' => 'Visiosoft\AdvsModule\Http\Controller\advsController@softDeleteAdv',
|
||||||
'check_user' => 'Visiosoft\AdvsModule\Http\Controller\advsController@checkUser',
|
'check_user' => 'Visiosoft\AdvsModule\Http\Controller\advsController@checkUser',
|
||||||
'keySearch' => 'Visiosoft\AdvsModule\Http\Controller\AjaxController@keySearch',
|
'keySearch' => 'Visiosoft\AdvsModule\Http\Controller\AjaxController@keySearch',
|
||||||
|
'adv/addCart/{id}' => [
|
||||||
|
'as' => 'adv_AddCart',
|
||||||
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@advAddCart',
|
||||||
|
],
|
||||||
'ajax/StockControl' => [
|
'ajax/StockControl' => [
|
||||||
'as' => 'adv_stock_control_ajax',
|
'as' => 'adv_stock_control_ajax',
|
||||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@stockControl',
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@stockControl',
|
||||||
@ -177,6 +181,10 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
|||||||
'as' => 'visiosoft.module.advs::view_type',
|
'as' => 'visiosoft.module.advs::view_type',
|
||||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@viewType',
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@viewType',
|
||||||
],
|
],
|
||||||
|
'admin/assets/clear' => [
|
||||||
|
'as' => 'assets_clear',
|
||||||
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@assetsClear',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -309,7 +317,13 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
|||||||
'title' => 'visiosoft.module.advs::button.general_settings',
|
'title' => 'visiosoft.module.advs::button.general_settings',
|
||||||
'href' => '/admin/settings/modules/visiosoft.module.advs',
|
'href' => '/admin/settings/modules/visiosoft.module.advs',
|
||||||
];
|
];
|
||||||
|
$slug2 = 'assets_clear';
|
||||||
|
$section2 = [
|
||||||
|
'title' => 'visiosoft.module.advs::section.assets_clear.name',
|
||||||
|
'href' => '/admin/assets/clear',
|
||||||
|
];
|
||||||
$addonCollection->get('anomaly.module.settings')->addSection($slug, $section);
|
$addonCollection->get('anomaly.module.settings')->addSection($slug, $section);
|
||||||
|
$addonCollection->get('anomaly.module.settings')->addSection($slug2, $section2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -2,10 +2,12 @@
|
|||||||
|
|
||||||
|
|
||||||
use Anomaly\SettingsModule\Setting\Contract\SettingRepositoryInterface;
|
use Anomaly\SettingsModule\Setting\Contract\SettingRepositoryInterface;
|
||||||
|
use Anomaly\Streams\Platform\Application\Application;
|
||||||
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
|
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
|
||||||
use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel;
|
use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel;
|
||||||
use Anomaly\Streams\Platform\Model\Cats\CatsCategoryEntryModel;
|
use Anomaly\Streams\Platform\Model\Cats\CatsCategoryEntryModel;
|
||||||
use Anomaly\Streams\Platform\Model\Users\UsersUsersEntryModel;
|
use Anomaly\Streams\Platform\Model\Users\UsersUsersEntryModel;
|
||||||
|
use Illuminate\Filesystem\Filesystem;
|
||||||
use Visiosoft\AdvsModule\Adv\Table\Filter\CategoryFilterQuery;
|
use Visiosoft\AdvsModule\Adv\Table\Filter\CategoryFilterQuery;
|
||||||
use Visiosoft\AdvsModule\Adv\Table\Filter\CityFilterQuery;
|
use Visiosoft\AdvsModule\Adv\Table\Filter\CityFilterQuery;
|
||||||
use Visiosoft\AdvsModule\Adv\Table\Filter\UserFilterQuery;
|
use Visiosoft\AdvsModule\Adv\Table\Filter\UserFilterQuery;
|
||||||
@ -169,4 +171,12 @@ class AdvsController extends AdminController
|
|||||||
$events->dispatch(new ChangeStatusAd($id, $settings));//Create Notify
|
$events->dispatch(new ChangeStatusAd($id, $settings));//Create Notify
|
||||||
return back();
|
return back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function assetsClear(Filesystem $files, Application $application)
|
||||||
|
{
|
||||||
|
$directory = 'assets';
|
||||||
|
$files->deleteDirectory($directory = $application->getAssetsPath($directory), true);
|
||||||
|
echo "<h1>Success</h1>" . "<br>";
|
||||||
|
echo "<a href='/admin'><b>Return Admin Panel</b></a>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -812,6 +812,22 @@ class AdvsController extends PublicController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function advAddCart($id)
|
||||||
|
{
|
||||||
|
$quantity = 1;
|
||||||
|
$thisModel = new AdvModel();
|
||||||
|
$adv = $thisModel->isAdv($id);
|
||||||
|
$response = array();
|
||||||
|
if ($adv) {
|
||||||
|
$cart = $thisModel->addCart($adv, $quantity);
|
||||||
|
$response['status'] = "success";
|
||||||
|
} else {
|
||||||
|
$response['status'] = "error";
|
||||||
|
$response['msg'] = trans('visiosoft.module.advs::message.error_added_cart');
|
||||||
|
}
|
||||||
|
return redirect('/cart/');
|
||||||
|
}
|
||||||
|
|
||||||
public function addCart(Request $request)
|
public function addCart(Request $request)
|
||||||
{
|
{
|
||||||
$id = $request->id;
|
$id = $request->id;
|
||||||
|
|||||||
@ -146,7 +146,7 @@
|
|||||||
<!-- item-info-right -->
|
<!-- item-info-right -->
|
||||||
<div class="user-option pull-right">
|
<div class="user-option pull-right">
|
||||||
{% if adv.is_get_adv == "1" %}
|
{% if adv.is_get_adv == "1" %}
|
||||||
<a href="#" data-toggle="tooltip" data-placement="top"
|
<a href="{{ url_route('adv_AddCart',[adv.id]) }}" data-toggle="tooltip" data-placement="top"
|
||||||
title="{{ trans('visiosoft.module.advs::field.online_shopping') }}"><i
|
title="{{ trans('visiosoft.module.advs::field.online_shopping') }}"><i
|
||||||
class="fa fa-shopping-cart"></i> </a>
|
class="fa fa-shopping-cart"></i> </a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -235,7 +235,7 @@
|
|||||||
<!-- item-info-right -->
|
<!-- item-info-right -->
|
||||||
<div class="user-option pull-right">
|
<div class="user-option pull-right">
|
||||||
{% if adv.is_get_adv == "1" %}
|
{% if adv.is_get_adv == "1" %}
|
||||||
<a href="#" data-toggle="tooltip" data-placement="top"
|
<a href="{{ url_route('adv_AddCart',[adv.id]) }}" data-toggle="tooltip" data-placement="top"
|
||||||
title="{{ adv.city_name }}, {{ adv.country_name }}"><i
|
title="{{ adv.city_name }}, {{ adv.country_name }}"><i
|
||||||
class="fa fa-shopping-cart"></i> </a>
|
class="fa fa-shopping-cart"></i> </a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -297,7 +297,7 @@
|
|||||||
<!-- item-info-right -->
|
<!-- item-info-right -->
|
||||||
<div class="user-option pull-right">
|
<div class="user-option pull-right">
|
||||||
{% if adv.is_get_adv == "1" %}
|
{% if adv.is_get_adv == "1" %}
|
||||||
<a href="#" data-toggle="tooltip" data-placement="top"
|
<a href="{{ url_route('adv_AddCart',[adv.id]) }}" data-toggle="tooltip" data-placement="top"
|
||||||
title="{{ trans('visiosoft.module.advs::field.online_shopping') }}"><i
|
title="{{ trans('visiosoft.module.advs::field.online_shopping') }}"><i
|
||||||
class="fa fa-shopping-cart"></i> </a>
|
class="fa fa-shopping-cart"></i> </a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@ -3,6 +3,9 @@
|
|||||||
use Anomaly\FilesModule\Disk\Contract\DiskRepositoryInterface;
|
use Anomaly\FilesModule\Disk\Contract\DiskRepositoryInterface;
|
||||||
use Anomaly\FilesModule\Folder\Contract\FolderRepositoryInterface;
|
use Anomaly\FilesModule\Folder\Contract\FolderRepositoryInterface;
|
||||||
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
|
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Chumper\Zipper\Zipper;
|
||||||
|
|
||||||
|
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
@ -57,6 +60,19 @@ class ProfileModuleSeeder extends Seeder
|
|||||||
],
|
],
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$repository = "https://raw.githubusercontent.com/openclassify/Openclassify-Demo-Data/master/";
|
||||||
|
file_put_contents(__DIR__ . "/advListingPage.sql", fopen($repository . "advListingPage.sql", 'r'));
|
||||||
|
file_put_contents("adv_listing_page.zip", fopen($repository . "adv_listing_page.zip", 'r'));
|
||||||
|
$zipper = new Zipper();
|
||||||
|
$zipper->make('adv_listing_page.zip')->folder('adv_listing_page')->extractTo(base_path() . '/public/app/default/files-module/local/adv_listing_page/');
|
||||||
|
$zipper->close();
|
||||||
|
|
||||||
|
Model::unguard();
|
||||||
|
DB::unprepared(file_get_contents(__DIR__ . '/advListingPage.sql'));
|
||||||
|
Model::reguard();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user