Skip to content

Commit

Permalink
Merge pull request #202 from avored/dev
Browse files Browse the repository at this point in the history
mergin dev to master
  • Loading branch information
indpurvesh authored Aug 16, 2018
2 parents 9279a94 + 33c82fd commit 2a75645
Show file tree
Hide file tree
Showing 92 changed files with 5,212 additions and 51,551 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Changelog
All notable changes to this project will be documented in this file.

## 2.9.3
### Added
- Added a changelog to see precisely what changes have been made between each release.
- Setup Category API with Passport Auth and Resource.
- Setup Property API with the help of Laravel API Resource.
- Setup Attribute API with the help of Laravel API Resource.
- Setup Page API with the help of Laravel API Resource.
- Setup Product API with the help of Laravel API Resource.
- Disabled Admin User If user is Super admin
- Setup Breadcrumb for Admin Cms Page Index,Edit & Create Route.
- Setup SweeetAlert Before Product Delete.
- Setup SweeetAlert Before Subscribe User Delete.
- Setup SweeetAlert Before User Role Delete.
- Setup SweeetAlert Before Site Currency Delete.
- Setup SweeetAlert Before Banner Delete.
- Setup SweeetAlert Before CMS Page Delete.
- Setup SweeetAlert Before Product Attribute Delete.
- Setup SweeetAlert Before Product Property Delete.
- Setup SweeetAlert Before Product Category Delete.


### Fixed
- CSS issue on Order page with the Options dropdown.
5 changes: 3 additions & 2 deletions avored.admin.webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ mix.config.fileLoaderDirs.fonts = 'vendor/avored-admin/fonts';
mix.config.fileLoaderDirs.images = 'vendor/avored-admin/images';


//mix.js('modules/avored/ecommerce/resources/assets/js/app.js', 'public/vendor/avored-admin/js');
//mix.sass('modules/avored/ecommerce/resources/assets/sass/app.scss', 'public/vendor/avored-admin/css');
mix.js('vendor/avored/framework/resources/assets/js/app.js', 'public/vendor/avored-admin/js');
mix.sass('vendor/avored/framework/resources/assets/sass/app.scss', 'public/vendor/avored-admin/css');

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"avored/dummy-data": "~2.0",
"fabpot/goutte": "^3.2",
"fideloper/proxy": "~4.0",
"avored/framework": "~2.0"
"avored/framework": "~2.1"
},
"require-dev" : {
"filp/whoops" : "~2.0",
Expand Down
75 changes: 75 additions & 0 deletions modules/avored/banner/resources/views/banner/show.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
@extends('avored-framework::layouts.app')
@section('content')
<div class="card">
<div class="card-header">
Banner Details
</div>

<div class="card-body table-bordered">
<table class="table">
<tr>
<td>Name</td>
<td>{{ $banner->name }}</td>
</tr>

<tr>
<td>Image</td>
<td><img src="{{ asset($banner->image_path) }}" style="max-height:100px" /></td>
</tr>

<tr>
<td>Alt Text</td>
<td>{{ $banner->alt_text }}</td>
</tr>

<tr>
<td>Url</td>
<td>{{ $banner->url }}</td>
</tr>

<tr>
<td>Target</td>
<td>{{ $banner->target }}</td>
</tr>

<tr>
<td>Status</td>
<td>{{ $banner->status }}</td>
</tr>

<tr>
<td>Sort Order</td>
<td>{{ $banner->sort_order }}</td>
</tr>

</table>

<div class="float-left">

<form method="post" action="{{ route('admin.banner.destroy', $banner->id) }}">
@csrf()
@method('delete')
<button
onClick="event.preventDefault();
swal({
dangerMode: true,
title: 'Are you sure?',
icon: 'warning',
buttons: true,
text: 'Once deleted, you will not be able to recover this Page!',
}).then((willDelete) => {
if (willDelete) {
jQuery(this).parents('form:first').submit();
}
});"
class="btn btn-danger" >
Destroy
</button>
</form>

</div>
<a class="btn" href="{{ route('admin.banner.index') }}">Cancel</a>
</div>
</div>

@stop
3 changes: 3 additions & 0 deletions modules/avored/banner/routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@
Route::delete('banner/{banner}', 'BannerController@destroy')
->name('banner.destroy');

Route::get('banner/{banner}', 'BannerController@show')
->name('banner.show');

});

12 changes: 2 additions & 10 deletions modules/avored/banner/src/DataGrid/Banner.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,8 @@ public function __construct($model)
})
->linkColumn('edit', [], function ($model) {
return "<a href='".route('admin.banner.edit', $model->id)."' >Edit</a>";
})->linkColumn('destroy', [], function ($model) {
return "<form id='admin-banner-destroy-".$model->id."'
method='POST'
action='".route('admin.banner.destroy', $model->id)."'>
<input name='_method' type='hidden' value='DELETE' />
".csrf_field()."
<a href='#'
onclick=\"jQuery('#admin-banner-destroy-$model->id').submit()\"
>Destroy</a>
</form>";
})->linkColumn('show', [], function ($model) {
return "<a href='".route('admin.banner.show', $model->id)."' >Show</a>";
});

$this->dataGrid = $dataGrid;
Expand Down
13 changes: 9 additions & 4 deletions modules/avored/banner/src/Http/Controllers/BannerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,26 @@ public function edit(Banner $banner)
{
return view('avored-banner::banner.edit')->with('model', $banner);
}

public function update(BannerRequest $request, Banner $banner)
{
$image = $request->get('image');

if (null != $image) {
$dbPath = $this->_uploadBanner($image);
$request->merge(['image_path' => $dbPath]);
}

$banner->update($request->all());

return redirect()->route('admin.banner.index');
}

public function show(Banner $banner)
{
return view('avored-banner::banner.show')->with('banner', $banner);
}

public function destroy(Banner $banner)
{
$banner->delete();
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 1 addition & 3 deletions modules/avored/dummy-data/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
"require" : {
"php" : ">=7.1.3",
"avored/module-installer" : "1.*",
"avored/framework" : "~2.0",
"avored/banner" : "~2.0",
"avored/featured" : "~2.0"
"avored/framework" : "~2.0"
},
"autoload" : {
"classmap" : [
Expand Down
Loading

0 comments on commit 2a75645

Please sign in to comment.