Skip to content

Commit

Permalink
Merge pull request #11 from ARCANESOFT/patch-1
Browse files Browse the repository at this point in the history
Fixing random stuff
  • Loading branch information
arcanedev-maroc authored Oct 17, 2017
2 parents 1c1d808 + 0ceeb7c commit d035ca8
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 44 deletions.
21 changes: 12 additions & 9 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
/_docs export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.scrutinizer.yml export-ignore
/.travis.yml export-ignore
/CONTRIBUTING.md export-ignore
/phpunit.xml.dist export-ignore
* text=auto

/.github export-ignore
/_docs export-ignore
/tests export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.scrutinizer.yml export-ignore
.travis.yml export-ignore
phpunit.xml.dist export-ignore
CONTRIBUTING.md export-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
* @author ARCANEDEV <[email protected]>
*
* @see \Arcanesoft\Blog\Models\Tag
* @see \Arcanesoft\Blog\Models\Category
*/
class CreateBlogCategoriesTable extends Migration
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* Class CreateBlogPostsTable
*
* @author ARCANEDEV <[email protected]>
*
* @see \Arcanesoft\Blog\Models\Post
*/
class CreateBlogPostsTable extends Migration
{
Expand Down
18 changes: 9 additions & 9 deletions resources/views/admin/categories/show.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php /** @var \Arcanesoft\Blog\Models\Category $category */ ?>
<?php /** @var Arcanesoft\Blog\Models\Category $category */ ?>

@inject('blog', 'Arcanesoft\Blog\Blog')

Expand Down Expand Up @@ -72,15 +72,15 @@
</div>
</div>
<div class="box-footer text-right">
@can(\Arcanesoft\Blog\Policies\CategoriesPolicy::PERMISSION_UPDATE)
@can(Arcanesoft\Blog\Policies\CategoriesPolicy::PERMISSION_UPDATE)
{{ ui_link('edit', route('admin::blog.categories.edit', [$category])) }}

@if ($category->trashed())
{{ ui_link('restore', '#restore-category-modal') }}
@endif
@endcan

@can(\Arcanesoft\Blog\Policies\CategoriesPolicy::PERMISSION_DELETE)
@can(Arcanesoft\Blog\Policies\CategoriesPolicy::PERMISSION_DELETE)
{{ ui_link('delete', '#delete-category-modal', [], ! $category->isDeletable()) }}
@endcan
</div>
Expand Down Expand Up @@ -114,11 +114,11 @@
<span class="label label-primary">{{ $post->slug }}</span>
</td>
<td class="text-right">
@can(\Arcanesoft\Blog\Policies\PostsPolicy::PERMISSION_SHOW)
@can(Arcanesoft\Blog\Policies\PostsPolicy::PERMISSION_SHOW)
{{ ui_link_icon('show', route('admin::blog.posts.show', [$post])) }}
@endcan

@can(\Arcanesoft\Blog\Policies\PostsPolicy::PERMISSION_UPDATE)
@can(Arcanesoft\Blog\Policies\PostsPolicy::PERMISSION_UPDATE)
{{ ui_link_icon('edit', route('admin::blog.posts.edit', [$post])) }}
@endcan
</td>
Expand All @@ -140,7 +140,7 @@
@endsection

@section('modals')
@can(\Arcanesoft\Blog\Policies\CategoriesPolicy::PERMISSION_UPDATE)
@can(Arcanesoft\Blog\Policies\CategoriesPolicy::PERMISSION_UPDATE)
@if ($category->trashed())
{{-- RESTORE MODAL --}}
<div id="restore-category-modal" class="modal fade" data-backdrop="false" tabindex="-1" role="dialog">
Expand All @@ -167,7 +167,7 @@
@endif
@endcan

@can(\Arcanesoft\Blog\Policies\CategoriesPolicy::PERMISSION_DELETE)
@can(Arcanesoft\Blog\Policies\CategoriesPolicy::PERMISSION_DELETE)
{{-- DELETE MODAL --}}
<div id="delete-category-modal" class="modal fade" data-backdrop="false" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
Expand Down Expand Up @@ -195,7 +195,7 @@

@section('scripts')
{{-- RESTORE SCRIPT --}}
@can(\Arcanesoft\Blog\Policies\CategoriesPolicy::PERMISSION_UPDATE)
@can(Arcanesoft\Blog\Policies\CategoriesPolicy::PERMISSION_UPDATE)
@if ($category->trashed())
<script>
$(function () {
Expand Down Expand Up @@ -235,7 +235,7 @@
@endcan

{{-- DELETE SCRIPT --}}
@can(\Arcanesoft\Blog\Policies\CategoriesPolicy::PERMISSION_DELETE)
@can(Arcanesoft\Blog\Policies\CategoriesPolicy::PERMISSION_DELETE)
@if ($category->isDeletable())
<script>
$(function () {
Expand Down
22 changes: 11 additions & 11 deletions resources/views/admin/tags/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php /** @var \Illuminate\Pagination\LengthAwarePaginator $tags */ ?>
<?php /** @var Illuminate\Pagination\LengthAwarePaginator $tags */ ?>

@inject('blog', 'Arcanesoft\Blog\Blog')

Expand Down Expand Up @@ -37,7 +37,7 @@
</thead>
<tbody>
@forelse($tags as $tag)
<?php /** @var \Arcanesoft\Blog\Models\Tag $tag */ ?>
<?php /** @var Arcanesoft\Blog\Models\Tag $tag */ ?>
<tr>
<td>
@if ($blog->isTranslatable())
Expand All @@ -61,18 +61,18 @@
{{ label_count($tag->posts->count()) }}
</td>
<td class="text-right">
@can(\Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_SHOW)
@can(Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_SHOW)
{{ ui_link_icon('show', route('admin::blog.tags.show', [$tag])) }}
@endcan

@can(\Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_UPDATE)
@can(Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_UPDATE)
{{ ui_link_icon('edit', route('admin::blog.tags.edit', [$tag])) }}
@if ($tag->trashed())
{{ ui_link_icon('restore', '#restore-tag-modal', ['data-tag-id' => $tag->id, 'data-tag-name' => $tag->name]) }}
@endif
@endcan

@can(\Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_DELETE)
@can(Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_DELETE)
{{ ui_link_icon('delete', '#delete-tag-modal', ['data-tag-id' => $tag->id, 'data-tag-name' => $tag->name]) }}
@endcan
</td>
Expand All @@ -96,7 +96,7 @@

@section('modals')
{{-- RESTORE MODAL --}}
@can(\Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_UPDATE)
@can(Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_UPDATE)
@if ($trashed)
<div id="restore-tag-modal" class="modal fade" data-backdrop="false" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
Expand All @@ -123,7 +123,7 @@
@endcan

{{-- DELETE MODAL --}}
@can(\Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_DELETE)
@can(Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_DELETE)
<div id="delete-tag-modal" class="modal fade" data-backdrop="false" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
{{ Form::open(['method' => 'DELETE', 'id' => 'delete-tag-form', 'class' => 'form form-loading', 'autocomplete' => 'off']) }}
Expand All @@ -150,7 +150,7 @@

@section('scripts')
{{-- RESTORE SCRIPT --}}
@can(\Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_UPDATE)
@can(Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_UPDATE)
@if ($trashed)
<script>
$(function () {
Expand Down Expand Up @@ -184,7 +184,7 @@
axios.put($restoreTagForm.attr('action'))
.then(function (response) {
if (response.data.status === 'success') {
if (response.data.code === 'success') {
$restoreTagModal.modal('hide');
location.reload();
}
Expand All @@ -208,7 +208,7 @@
@endcan

{{-- DELETE SCRIPT --}}
@can(\Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_DELETE)
@can(Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_DELETE)
<script>
var $deleteTagModal = $('div#delete-tag-modal'),
$deleteTagForm = $('form#delete-tag-form'),
Expand Down Expand Up @@ -240,7 +240,7 @@
axios.delete($deleteTagForm.attr('action'))
.then(function (response) {
if (response.data.status === 'success') {
if (response.data.code === 'success') {
$deleteTagModal.modal('hide');
location.reload();
}
Expand Down
24 changes: 12 additions & 12 deletions resources/views/admin/tags/show.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php /** @var \Arcanesoft\Blog\Models\Tag $tag */ ?>
<?php /** @var Arcanesoft\Blog\Models\Tag $tag */ ?>

@inject('blog', 'Arcanesoft\Blog\Blog')

Expand Down Expand Up @@ -73,15 +73,15 @@
</div>
</div>
<div class="box-footer text-right">
@can(\Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_UPDATE)
@can(Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_UPDATE)
{{ ui_link('edit', route('admin::blog.tags.edit', [$tag])) }}

@if ($tag->trashed())
{{ ui_link('restore', '#restore-tag-modal') }}
@endif
@endcan

@can(\Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_DELETE)
@can(Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_DELETE)
{{ ui_link('delete', '#delete-tag-modal') }}
@endcan
</div>
Expand All @@ -106,7 +106,7 @@
</thead>
<tbody>
@forelse ($tag->posts as $post)
<?php /** @var \Arcanesoft\Blog\Models\Post $post */ ?>
<?php /** @var Arcanesoft\Blog\Models\Post $post */ ?>
<tr>
<td style="width: 60px;">
<span class="label label-inverse">{{ strtoupper($post->locale) }}</span>
Expand All @@ -116,11 +116,11 @@
<span class="label label-primary">{{ $post->slug }}</span>
</td>
<td class="text-right">
@can(\Arcanesoft\Blog\Policies\PostsPolicy::PERMISSION_SHOW)
@can(Arcanesoft\Blog\Policies\PostsPolicy::PERMISSION_SHOW)
{{ ui_link_icon('show', route('admin::blog.posts.show', [$post])) }}
@endcan

@can(\Arcanesoft\Blog\Policies\PostsPolicy::PERMISSION_UPDATE)
@can(Arcanesoft\Blog\Policies\PostsPolicy::PERMISSION_UPDATE)
{{ ui_link_icon('edit', route('admin::blog.posts.edit', [$post])) }}
@endcan
</td>
Expand All @@ -143,7 +143,7 @@

@section('modals')
{{-- RESTORE MODAL --}}
@can(\Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_UPDATE)
@can(Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_UPDATE)
@if ($tag->trashed())
<div id="restore-tag-modal" class="modal fade" data-backdrop="false" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
Expand All @@ -170,7 +170,7 @@
@endcan

{{-- DELETE MODAL --}}
@can(\Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_DELETE)
@can(Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_DELETE)
<div id="delete-tag-modal" class="modal fade" data-backdrop="false" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
{{ Form::open(['route' => ['admin::blog.tags.delete', $tag], 'method' => 'DELETE', 'id' => 'delete-tag-form', 'class' => 'form form-loading', 'autocomplete' => 'off']) }}
Expand All @@ -197,7 +197,7 @@

@section('scripts')
{{-- RESTORE SCRIPT --}}
@can(\Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_UPDATE)
@can(Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_UPDATE)
@if ($tag->trashed())
<script>
$(function () {
Expand All @@ -218,7 +218,7 @@
axios.put($restoreTagForm.attr('action'))
.then(function (response) {
if (response.data.status === 'success') {
if (response.data.code === 'success') {
$restoreTagModal.modal('hide');
location.reload();
}
Expand All @@ -242,7 +242,7 @@
@endcan

{{-- DELETE SCRIPT --}}
@can(\Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_DELETE)
@can(Arcanesoft\Blog\Policies\TagsPolicy::PERMISSION_DELETE)
<script>
$(function () {
var $deleteTagModal = $('div#delete-tag-modal'),
Expand All @@ -262,7 +262,7 @@
axios.delete($deleteTagForm.attr('action'))
.then(function (response) {
if (response.data.status === 'success') {
if (response.data.code === 'success') {
$deleteTagModal.modal('hide');
@if ($tag->trashed())
location.replace("{{ route('admin::blog.tags.index') }}");
Expand Down
2 changes: 1 addition & 1 deletion src/Bases/Migration.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php namespace Arcanesoft\Blog\Bases;

use Arcanedev\Support\Bases\Migration as BaseMigration;
use Arcanedev\Support\Database\Migration as BaseMigration;

/**
* Class Migration
Expand Down
2 changes: 1 addition & 1 deletion src/Models/AbstractModel.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php namespace Arcanesoft\Blog\Models;

use Arcanedev\Support\Bases\Model as BaseModel;
use Arcanedev\Support\Database\Model as BaseModel;

/**
* Class AbstractModel
Expand Down

0 comments on commit d035ca8

Please sign in to comment.