Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-adminpanel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
laravel-adminpanel
Commits
86e360dd
Commit
86e360dd
authored
Dec 08, 2017
by
Vipul Basapati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored Blog Module and removed unnecessary files
parent
7456b1f3
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
119 additions
and
179 deletions
+119
-179
BlogsController.php
app/Http/Controllers/Backend/Blogs/BlogsController.php
+26
-22
BlogsTableController.php
app/Http/Controllers/Backend/Blogs/BlogsTableController.php
+4
-7
PagesController.php
app/Http/Controllers/Backend/Pages/PagesController.php
+0
-3
PagesTableController.php
app/Http/Controllers/Backend/Pages/PagesTableController.php
+0
-3
Blog.php
app/Models/Blogs/Blog.php
+21
-1
BlogsRepository.php
app/Repositories/Backend/Blogs/BlogsRepository.php
+54
-71
module.php
config/module.php
+3
-0
create.blade.php
resources/views/backend/blogs/create.blade.php
+1
-1
edit.blade.php
resources/views/backend/blogs/edit.blade.php
+1
-1
index.blade.php
resources/views/backend/blogs/index.blade.php
+6
-6
blogs-header-buttons.blade.php
...ews/backend/blogs/partials/blogs-header-buttons.blade.php
+0
-0
blogcategories-header-buttons.blade.php
...includes/partials/blogcategories-header-buttons.blade.php
+0
-29
modules-header-buttons.blade.php
...ackend/includes/partials/modules-header-buttons.blade.php
+0
-32
create.blade.php
resources/views/backend/pages/create.blade.php
+1
-1
edit.blade.php
resources/views/backend/pages/edit.blade.php
+1
-1
index.blade.php
resources/views/backend/pages/index.blade.php
+1
-1
pages-header-buttons.blade.php
...ews/backend/pages/partials/pages-header-buttons.blade.php
+0
-0
No files found.
app/Http/Controllers/Backend/Blogs/BlogsController.php
View file @
86e360dd
...
...
@@ -29,18 +29,18 @@ class BlogsController extends Controller
/**
* @var BlogsRepository
*/
protected
$blog
s
;
protected
$blog
;
/**
* @param
BlogsRepository $blogs
* @param
\App\Repositories\Backend\Blogs\BlogsRepository $blog
*/
public
function
__construct
(
BlogsRepository
$blog
s
)
public
function
__construct
(
BlogsRepository
$blog
)
{
$this
->
blog
s
=
$blogs
;
$this
->
blog
=
$blog
;
}
/**
* @param ManageBlogsRequest $request
* @param
\App\Http\Requests\Backend\Blogs\
ManageBlogsRequest $request
*
* @return mixed
*/
...
...
@@ -52,14 +52,14 @@ class BlogsController extends Controller
}
/**
* @param ManageBlogsRequest $request
* @param
\App\Http\Requests\Backend\Blogs\
ManageBlogsRequest $request
*
* @return mixed
*/
public
function
create
(
ManageBlogsRequest
$request
)
{
$blogTags
=
BlogTag
::
getSelectData
();
$blogCategories
=
BlogCategory
::
getSelectData
();
$blogTags
=
BlogTag
::
getSelectData
();
return
view
(
'backend.blogs.create'
)
->
with
([
'blogCategories'
=>
$blogCategories
,
...
...
@@ -69,22 +69,22 @@ class BlogsController extends Controller
}
/**
* @param StoreBlogsRequest $request
* @param
\App\Http\Requests\Backend\Blogs\
StoreBlogsRequest $request
*
* @return mixed
*/
public
function
store
(
StoreBlogsRequest
$request
)
{
$input
=
$request
->
all
();
$this
->
blogs
->
create
(
$input
,
$tagsArray
,
$categoriesArray
);
$this
->
blog
->
create
(
$request
->
except
(
'_token'
));
return
redirect
()
->
route
(
'admin.blogs.index'
)
->
withFlashSuccess
(
trans
(
'alerts.backend.blogs.created'
));
return
redirect
()
->
route
(
'admin.blogs.index'
)
->
with
(
'flash_success'
,
trans
(
'alerts.backend.blogs.created'
));
}
/**
* @param Blog $blog
* @param ManageBlogsRequest $request
* @param
\App\Models\Blogs\
Blog $blog
* @param
\App\Http\Requests\Backend\Blogs\
ManageBlogsRequest $request
*
* @return mixed
*/
...
...
@@ -107,8 +107,8 @@ class BlogsController extends Controller
}
/**
* @param Blog $blog
* @param UpdateBlogsRequest $request
* @param
\App\Models\Blogs\
Blog $blog
* @param
\App\Http\Requests\Backend\Blogs\
UpdateBlogsRequest $request
*
* @return mixed
*/
...
...
@@ -116,21 +116,25 @@ class BlogsController extends Controller
{
$input
=
$request
->
all
();
$this
->
blog
s
->
update
(
$blog
,
$input
);
$this
->
blog
->
update
(
$blog
,
$request
->
except
([
'_token'
,
'_method'
])
);
return
redirect
()
->
route
(
'admin.blogs.index'
)
->
withFlashSuccess
(
trans
(
'alerts.backend.blogs.updated'
));
return
redirect
()
->
route
(
'admin.blogs.index'
)
->
with
(
'flash_success'
,
trans
(
'alerts.backend.blogs.updated'
));
}
/**
* @param Blog $blog
* @param ManageBlogsRequest $request
* @param
\App\Models\Blogs\
Blog $blog
* @param
\App\Http\Requests\Backend\Blogs\
ManageBlogsRequest $request
*
* @return mixed
*/
public
function
destroy
(
Blog
$blog
,
ManageBlogsRequest
$request
)
{
$this
->
blog
s
->
delete
(
$blog
);
$this
->
blog
->
delete
(
$blog
);
return
redirect
()
->
route
(
'admin.blogs.index'
)
->
withFlashSuccess
(
trans
(
'alerts.backend.blogs.deleted'
));
return
redirect
()
->
route
(
'admin.blogs.index'
)
->
with
(
'flash_success'
,
trans
(
'alerts.backend.blogs.deleted'
));
}
}
app/Http/Controllers/Backend/Blogs/BlogsTableController.php
View file @
86e360dd
...
...
@@ -13,13 +13,10 @@ use Yajra\DataTables\Facades\DataTables;
*/
class
BlogsTableController
extends
Controller
{
/**
* @var BlogsRepository
*/
protected
$blogs
;
/**
* @param BlogsRepository $cmspages
* @param
\App\Repositories\Backend\Blogs\
BlogsRepository $cmspages
*/
public
function
__construct
(
BlogsRepository
$blogs
)
{
...
...
@@ -27,7 +24,7 @@ class BlogsTableController extends Controller
}
/**
* @param ManageBlogsRequest $request
* @param
\App\Http\Requests\Backend\Blogs\
ManageBlogsRequest $request
*
* @return mixed
*/
...
...
@@ -39,13 +36,13 @@ class BlogsTableController extends Controller
return
$blogs
->
status
;
})
->
addColumn
(
'publish_datetime'
,
function
(
$blogs
)
{
return
Carbon
::
parse
(
$blogs
->
publish_datetime
)
->
format
(
'd/m/Y h:i A'
);
return
$blogs
->
publish_datetime
->
format
(
'd/m/Y h:i A'
);
})
->
addColumn
(
'created_by'
,
function
(
$blogs
)
{
return
$blogs
->
user_name
;
})
->
addColumn
(
'created_at'
,
function
(
$blogs
)
{
return
Carbon
::
parse
(
$blogs
->
created_at
)
->
toDateString
();
return
$blogs
->
created_at
->
toDateString
();
})
->
addColumn
(
'actions'
,
function
(
$blogs
)
{
return
$blogs
->
action_buttons
;
...
...
app/Http/Controllers/Backend/Pages/PagesController.php
View file @
86e360dd
...
...
@@ -17,9 +17,6 @@ use App\Repositories\Backend\Pages\PagesRepository;
*/
class
PagesController
extends
Controller
{
/**
* @var PagesRepository
*/
protected
$pages
;
/**
...
...
app/Http/Controllers/Backend/Pages/PagesTableController.php
View file @
86e360dd
...
...
@@ -13,9 +13,6 @@ use Yajra\DataTables\Facades\DataTables;
*/
class
PagesTableController
extends
Controller
{
/**
* @var PagesRepository
*/
protected
$pages
;
/**
...
...
app/Models/Blogs/Blog.php
View file @
86e360dd
...
...
@@ -17,6 +17,26 @@ class Blog extends BaseModel
// BlogAttribute::getEditButtonAttribute insteadof ModelTrait;
}
protected
$fillable
=
[
'name'
,
'slug'
,
'publish_datetime'
,
'content'
,
'meta_title'
,
'cannonical_link'
,
'meta_keywords'
,
'meta_description'
,
'status'
,
'featured_image'
,
'created_by'
];
protected
$dates
=
[
'publish_datetime'
,
'created_at'
,
'updated_at'
];
/**
* The database table used by the model.
*
...
...
@@ -27,6 +47,6 @@ class Blog extends BaseModel
public
function
__construct
(
array
$attributes
=
[])
{
parent
::
__construct
(
$attributes
);
$this
->
table
=
config
(
'
access.blogs_
table'
);
$this
->
table
=
config
(
'
module.blogs.
table'
);
}
}
app/Repositories/Backend/Blogs/BlogsRepository.php
View file @
86e360dd
...
...
@@ -2,17 +2,19 @@
namespace
App\Repositories\Backend\Blogs
;
use
DB
;
use
Carbon\Carbon
;
use
App\Models\Blogs\Blog
;
use
App\Models\BlogTags\BlogTag
;
use
App\Http\Utilities\FileUploads
;
use
App\Exceptions\GeneralException
;
use
App\Repositories\BaseRepository
;
use
App\Models\BlogMapTags\BlogMapTag
;
use
App\Events\Backend\Blogs\BlogUpdated
;
use
App\Events\Backend\Blogs\BlogCreated
;
use
App\Events\Backend\Blogs\BlogDeleted
;
use
App\Events\Backend\Blogs\BlogUpdated
;
use
App\Exceptions\GeneralException
;
use
App\Http\Utilities\FileUploads
;
use
App\Models\BlogCategories\BlogCategory
;
use
App\Models\BlogMapCategories\BlogMapCategory
;
use
App\Models\BlogMapTags\BlogMapTag
;
use
App\Models\Blogs\Blog
;
use
App\Repositories\BaseRepository
;
use
Carbon\Carbon
;
use
DB
;
/**
* Class BlogsRepository.
...
...
@@ -30,14 +32,14 @@ class BlogsRepository extends BaseRepository
public
function
getForDataTable
()
{
return
$this
->
query
()
->
leftjoin
(
config
(
'access.users_table'
),
config
(
'access.users_table'
)
.
'.id'
,
'='
,
config
(
'
access.blogs_
table'
)
.
'.created_by'
)
->
leftjoin
(
config
(
'access.users_table'
),
config
(
'access.users_table'
)
.
'.id'
,
'='
,
config
(
'
module.blogs.
table'
)
.
'.created_by'
)
->
select
([
config
(
'
access.blogs_
table'
)
.
'.id'
,
config
(
'
access.blogs_
table'
)
.
'.name'
,
config
(
'
access.blogs_
table'
)
.
'.publish_datetime'
,
config
(
'
access.blogs_
table'
)
.
'.status'
,
config
(
'
access.blogs_
table'
)
.
'.created_by'
,
config
(
'
access.blogs_
table'
)
.
'.created_at'
,
config
(
'
module.blogs.
table'
)
.
'.id'
,
config
(
'
module.blogs.
table'
)
.
'.name'
,
config
(
'
module.blogs.
table'
)
.
'.publish_datetime'
,
config
(
'
module.blogs.
table'
)
.
'.status'
,
config
(
'
module.blogs.
table'
)
.
'.created_by'
,
config
(
'
module.blogs.
table'
)
.
'.created_at'
,
config
(
'access.users_table'
)
.
'.first_name as user_name'
,
]);
}
...
...
@@ -45,46 +47,34 @@ class BlogsRepository extends BaseRepository
/**
* @param array $input
*
* @throws GeneralException
* @throws
\App\Exceptions\
GeneralException
*
* @return bool
*/
public
function
create
(
array
$input
)
{
$tagsArray
=
$this
->
createTagsArray
(
$input
[
'tags'
]);
$categoriesArray
=
$this
->
createCategoriesArray
(
$input
[
'categories'
]);
DB
::
transaction
(
function
()
use
(
$input
,
$tagsArray
,
$categoriesArray
)
{
$blogs
=
self
::
MODEL
;
$blogs
=
new
$blogs
();
$blogs
->
name
=
$input
[
'name'
];
$blogs
->
slug
=
str_slug
(
$input
[
'name'
]);
$blogs
->
content
=
$input
[
'content'
];
$blogs
->
publish_datetime
=
Carbon
::
parse
(
$input
[
'publish_datetime'
]);
// Image Upload
$image
=
$this
->
uploadImage
(
$input
);
$blogs
->
featured_image
=
$image
[
'featured_image'
];
$blogs
->
meta_title
=
$input
[
'meta_title'
];
$blogs
->
cannonical_link
=
$input
[
'cannonical_link'
];
$blogs
->
meta_keywords
=
$input
[
'meta_keywords'
];
$blogs
->
meta_description
=
$input
[
'meta_description'
];
$blogs
->
status
=
$input
[
'status'
];
$blogs
->
created_by
=
access
()
->
user
()
->
id
;
if
(
$blogs
->
save
())
{
$tagsArray
=
$this
->
createTags
(
$input
[
'tags'
]);
$categoriesArray
=
$this
->
createCategories
(
$input
[
'categories'
]);
unset
(
$input
[
'tags'
],
$input
[
'categories'
]);
DB
::
transaction
(
function
()
use
(
$input
,
$tagsArray
,
$categoriesArray
)
{
$input
[
'slug'
]
=
str_slug
(
$input
[
'name'
]);
$input
[
'publish_datetime'
]
=
Carbon
::
parse
(
$input
[
'publish_datetime'
]);
$input
=
$this
->
uploadImage
(
$input
);
$input
[
'created_by'
]
=
access
()
->
user
()
->
id
;
if
(
$blog
=
Blog
::
create
(
$input
))
{
// Inserting associated category's id in mapper table
if
(
count
(
$categoriesArray
))
{
$blog
s
->
categories
()
->
sync
(
$categoriesArray
);
$blog
->
categories
()
->
sync
(
$categoriesArray
);
}
// Inserting associated tag's id in mapper table
if
(
count
(
$tagsArray
))
{
$blog
s
->
tags
()
->
sync
(
$tagsArray
);
$blog
->
tags
()
->
sync
(
$tagsArray
);
}
event
(
new
BlogCreated
(
$blog
s
));
event
(
new
BlogCreated
(
$blog
));
return
true
;
}
...
...
@@ -96,46 +86,39 @@ class BlogsRepository extends BaseRepository
/**
* Update Blog.
*
* @param
$blogs
* @param
\App\Models\Blogs\Blog $blog
* @param array $input
*/
public
function
update
(
$blogs
,
array
$input
)
public
function
update
(
Blog
$blog
,
array
$input
)
{
$tagsArray
=
$this
->
createTagsArray
(
$input
[
'tags'
]);
$categoriesArray
=
$this
->
createCategoriesArray
(
$input
[
'categories'
]);
$blogs
->
name
=
$input
[
'name'
];
$blogs
->
slug
=
str_slug
(
$input
[
'name'
]);
$blogs
->
content
=
$input
[
'content'
];
$blogs
->
publish_datetime
=
Carbon
::
parse
(
$input
[
'publish_datetime'
]);
$blogs
->
meta_title
=
$input
[
'meta_title'
];
$blogs
->
cannonical_link
=
$input
[
'cannonical_link'
];
$blogs
->
meta_keywords
=
$input
[
'meta_keywords'
];
$blogs
->
meta_description
=
$input
[
'meta_description'
];
$blogs
->
status
=
$input
[
'status'
];
$blogs
->
updated_by
=
access
()
->
user
()
->
id
;
$tagsArray
=
$this
->
createTags
(
$input
[
'tags'
]);
$categoriesArray
=
$this
->
createCategories
(
$input
[
'categories'
]);
unset
(
$input
[
'tags'
],
$input
[
'categories'
]);
$input
[
'slug'
]
=
str_slug
(
$input
[
'name'
]);
$input
[
'publish_datetime'
]
=
Carbon
::
parse
(
$input
[
'publish_datetime'
]);
$input
[
'updated_by'
]
=
access
()
->
user
()
->
id
;
// Uploading Image
if
(
array_key_exists
(
'featured_image'
,
$input
))
{
$this
->
deleteOldFile
(
$blog
s
);
$this
->
deleteOldFile
(
$blog
);
$input
=
$this
->
uploadImage
(
$input
);
$blogs
->
featured_image
=
$input
[
'featured_image'
];
}
DB
::
transaction
(
function
()
use
(
$blog
s
,
$input
,
$tagsArray
,
$categoriesArray
)
{
if
(
$blog
s
->
save
(
))
{
DB
::
transaction
(
function
()
use
(
$blog
,
$input
,
$tagsArray
,
$categoriesArray
)
{
if
(
$blog
->
update
(
$input
))
{
// Updateing associated category's id in mapper table
if
(
count
(
$categoriesArray
))
{
$blog
s
->
categories
()
->
sync
(
$categoriesArray
);
$blog
->
categories
()
->
sync
(
$categoriesArray
);
}
// Updating associated tag's id in mapper table
if
(
count
(
$tagsArray
))
{
$blog
s
->
tags
()
->
sync
(
$tagsArray
);
$blog
->
tags
()
->
sync
(
$tagsArray
);
}
event
(
new
BlogUpdated
(
$blog
s
));
event
(
new
BlogUpdated
(
$blog
));
return
true
;
}
...
...
@@ -147,13 +130,13 @@ class BlogsRepository extends BaseRepository
}
/**
* Creating Tags
Array
.
* Creating Tags.
*
* @param Array($tags)
*
* @return array
*/
public
function
createTags
Array
(
$tags
)
public
function
createTags
(
$tags
)
{
//Creating a new array for tags (newly created)
$tags_array
=
[];
...
...
@@ -171,13 +154,13 @@ class BlogsRepository extends BaseRepository
}
/**
* Creating
Tags Array
.
* Creating
Categories
.
*
* @param Array($
tag
s)
* @param Array($
categorie
s)
*
* @return array
*/
public
function
createCategories
Array
(
$categories
)
public
function
createCategories
(
$categories
)
{
//Creating a new array for categories (newly created)
$categories_array
=
[];
...
...
@@ -196,13 +179,13 @@ class BlogsRepository extends BaseRepository
}
/**
* @param
Model
$blog
* @param
\App\Models\Blogs\Blog
$blog
*
* @throws GeneralException
*
* @return bool
*/
public
function
delete
(
Model
$blog
)
public
function
delete
(
Blog
$blog
)
{
DB
::
transaction
(
function
()
use
(
$blog
)
{
if
(
$blog
->
delete
())
{
...
...
config/module.php
View file @
86e360dd
...
...
@@ -14,5 +14,8 @@ return [
],
'blog_categories'
=>
[
'table'
=>
'blog_categories'
],
'blogs'
=>
[
'table'
=>
'blogs'
]
];
resources/views/backend/blogs/create.blade.php
View file @
86e360dd
...
...
@@ -17,7 +17,7 @@
<h3 class="
box
-
title
">{{ trans('labels.backend.blogs.create') }}</h3>
<div class="
box
-
tools
pull
-
right
">
@include('backend.
include
s.partials.blogs-header-buttons')
@include('backend.
blog
s.partials.blogs-header-buttons')
</div><!--box-tools pull-right-->
</div><!-- /.box-header -->
...
...
resources/views/backend/blogs/edit.blade.php
View file @
86e360dd
...
...
@@ -18,7 +18,7 @@
<h3 class="
box
-
title
">{{ trans('labels.backend.blogs.edit') }}</h3>
<div class="
box
-
tools
pull
-
right
">
@include('backend.
include
s.partials.blogs-header-buttons')
@include('backend.
blog
s.partials.blogs-header-buttons')
</div><!--box-tools pull-right-->
</div><!-- /.box-header -->
...
...
resources/views/backend/blogs/index.blade.php
View file @
86e360dd
...
...
@@ -12,7 +12,7 @@
<h3 class="
box
-
title
">{{ trans('labels.backend.blogs.management') }}</h3>
<div class="
box
-
tools
pull
-
right
">
@include('backend.
include
s.partials.blogs-header-buttons')
@include('backend.
blog
s.partials.blogs-header-buttons')
</div>
</div><!-- /.box-header -->
...
...
@@ -76,11 +76,11 @@
type: 'post'
},
columns: [
{data: 'name', name: '
{
{config('
access.blogs_
table')}}.name'
}
,
{data: 'publish_datetime', name: '
{
{config('
access.blogs_
table')}}.publish_datetime'
}
,
{data: 'status', name: '
{
{config('
access.blogs_
table')}}.status'
}
,
{data: 'created_by', name: '
{
{config('
access.blogs_
table')}}.created_by'
}
,
{data: 'created_at', name: '
{
{config('
access.blogs_
table')}}.created_at'
}
,
{data: 'name', name: '
{
{config('
module.blogs.
table')}}.name'
}
,
{data: 'publish_datetime', name: '
{
{config('
module.blogs.
table')}}.publish_datetime'
}
,
{data: 'status', name: '
{
{config('
module.blogs.
table')}}.status'
}
,
{data: 'created_by', name: '
{
{config('
module.blogs.
table')}}.created_by'
}
,
{data: 'created_at', name: '
{
{config('
module.blogs.
table')}}.created_at'
}
,
{data: 'actions', name: 'actions', searchable: false, sortable: false}
],
order: [[3, "
asc
"]],
...
...
resources/views/backend/
include
s/partials/blogs-header-buttons.blade.php
→
resources/views/backend/
blog
s/partials/blogs-header-buttons.blade.php
100755 → 100644
View file @
86e360dd
File moved
resources/views/backend/includes/partials/blogcategories-header-buttons.blade.php
deleted
100755 → 0
View file @
7456b1f3
<!--Action Button-->
@if(Active::checkUriPattern('admin/blogcategories'))
<div
class=
"btn-group"
>
<button
type=
"button"
class=
"btn btn-warning btn-flat dropdown-toggle"
data-toggle=
"dropdown"
>
Export
<span
class=
"caret"
></span>
<span
class=
"sr-only"
>
Toggle Dropdown
</span>
</button>
<ul
class=
"dropdown-menu"
role=
"menu"
>
<li
id=
"copyButton"
><a
href=
"#"
><i
class=
"fa fa-clone"
></i>
Copy
</a></li>
<li
id=
"csvButton"
><a
href=
"#"
><i
class=
"fa fa-file-text-o"
></i>
CSV
</a></li>
<li
id=
"excelButton"
><a
href=
"#"
><i
class=
"fa fa-file-excel-o"
></i>
Excel
</a></li>
<li
id=
"pdfButton"
><a
href=
"#"
><i
class=
"fa fa-file-pdf-o"
></i>
PDF
</a></li>
<li
id=
"printButton"
><a
href=
"#"
><i
class=
"fa fa-print"
></i>
Print
</a></li>
</ul>
</div>
@endif
<!--Action Button-->
<div
class=
"btn-group"
>
<button
type=
"button"
class=
"btn btn-primary btn-flat dropdown-toggle"
data-toggle=
"dropdown"
>
Action
<span
class=
"caret"
></span>
<span
class=
"sr-only"
>
Toggle Dropdown
</span>
</button>
<ul
class=
"dropdown-menu"
role=
"menu"
>
<li><a
href=
"{{route('admin.blogcategories.index')}}"
><i
class=
"fa fa-list-ul"
></i>
{{trans('menus.backend.blogcategories.all')}}
</a></li>
@permission('create-blog-category')
<li><a
href=
"{{route('admin.blogcategories.create')}}"
><i
class=
"fa fa-plus"
></i>
{{trans('menus.backend.blogcategories.create')}}
</a></li>
@endauth
</ul>
</div>
\ No newline at end of file
resources/views/backend/includes/partials/modules-header-buttons.blade.php
deleted
100755 → 0
View file @
7456b1f3
<!--Action Button-->
@if(Active::checkUriPattern('admin/modules'))
<div
class=
"btn-group"
>
<button
type=
"button"
class=
"btn btn-warning btn-flat dropdown-toggle"
data-toggle=
"dropdown"
>
Export
<span
class=
"caret"
></span>
<span
class=
"sr-only"
>
Toggle Dropdown
</span>
</button>
<ul
class=
"dropdown-menu"
role=
"menu"
>
<li
id=
"copyButton"
><a
href=
"#"
><i
class=
"fa fa-clone"
></i>
Copy
</a></li>
<li
id=
"csvButton"
><a
href=
"#"
><i
class=
"fa fa-file-text-o"
></i>
CSV
</a></li>
<li
id=
"excelButton"
><a
href=
"#"
><i
class=
"fa fa-file-excel-o"
></i>
Excel
</a></li>
<li
id=
"pdfButton"
><a
href=
"#"
><i
class=
"fa fa-file-pdf-o"
></i>
PDF
</a></li>
<li
id=
"printButton"
><a
href=
"#"
><i
class=
"fa fa-print"
></i>
Print
</a></li>
</ul>
</div>
@endif
<!--Action Button-->
<div
class=
"btn-group"
>
<button
type=
"button"
class=
"btn btn-primary btn-flat dropdown-toggle"
data-toggle=
"dropdown"
>
Action
<span
class=
"caret"
></span>
<span
class=
"sr-only"
>
Toggle Dropdown
</span>
</button>
<ul
class=
"dropdown-menu"
role=
"menu"
>
<li><a
href=
"{{route('admin.modules.index')}}"
><i
class=
"fa fa-list-ul"
></i>
{{trans('menus.backend.modules.all')}}
</a></li>
{{-- Will fill the permission later --}}
{{-- @permission('create-faq') --}}
<li><a
href=
"{{route('admin.modules.create')}}"
><i
class=
"fa fa-plus"
></i>
{{trans('menus.backend.modules.create')}}
</a></li>
{{-- @endauth --}}
</ul>
</div>
<div
class=
"clearfix"
></div>
\ No newline at end of file
resources/views/backend/pages/create.blade.php
View file @
86e360dd
...
...
@@ -17,7 +17,7 @@
<h3 class="
box
-
title
">{{ trans('labels.backend.pages.create') }}</h3>
<div class="
box
-
tools
pull
-
right
">
@include('backend.
includ
es.partials.pages-header-buttons')
@include('backend.
pag
es.partials.pages-header-buttons')
</div><!--box-tools pull-right-->
</div><!-- /.box-header -->
...
...
resources/views/backend/pages/edit.blade.php
View file @
86e360dd
...
...
@@ -17,7 +17,7 @@
<h3 class="
box
-
title
">{{ trans('labels.backend.pages.edit') }}</h3>
<div class="
box
-
tools
pull
-
right
">
@include('backend.
includ
es.partials.pages-header-buttons')
@include('backend.
pag
es.partials.pages-header-buttons')
</div><!--box-tools pull-right-->
</div><!-- /.box-header -->
...
...
resources/views/backend/pages/index.blade.php
View file @
86e360dd
...
...
@@ -12,7 +12,7 @@
<h3 class="
box
-
title
">{{ trans('labels.backend.pages.management') }}</h3>
<div class="
box
-
tools
pull
-
right
">
@include('backend.
includ
es.partials.pages-header-buttons')
@include('backend.
pag
es.partials.pages-header-buttons')
</div>
</div><!-- /.box-header -->
...
...
resources/views/backend/
includ
es/partials/pages-header-buttons.blade.php
→
resources/views/backend/
pag
es/partials/pages-header-buttons.blade.php
View file @
86e360dd
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment