Skip to content

Commit

Permalink
Merge branch 'master' of github.com:summerblue/phphub5
Browse files Browse the repository at this point in the history
  • Loading branch information
summerblue committed Aug 9, 2016
2 parents 37d1744 + f185671 commit 983fb60
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
10 changes: 10 additions & 0 deletions app/Models/Model.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
namespace App\Models;

use Watson\Rememberable\Rememberable;
use Illuminate\Database\Eloquent\Model as Eloquent;

abstract class Model extends Eloquent
{
use Rememberable;
}
2 changes: 1 addition & 1 deletion resources/views/topics/partials/replies.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<span> ⋅ </span>
@endif

@if ($currentUser && ($currentUser->can("manage_topics") || $currentUser->id == $reply->user_id) )
@if ($currentUser && ($manage_topics || $currentUser->id == $reply->user_id) )
<a id="reply-delete-{{ $reply->id }}" data-ajax="delete" href="javascript:void(0);" data-url="{{route('replies.destroy', [$reply->id])}}" title="{{lang('Delete')}}">
<i class="fa fa-trash-o"></i>
</a>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/topics/partials/topic_operate.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<div class="pull-right actions">

@if ($currentUser && $currentUser->can("manage_topics") )
@if ($currentUser && $manage_topics )
<a data-ajax="post" id="topic-recomend-button" href="javascript:void(0);" data-url="{{ route('topics.recommend', [$topic->id]) }}" class="admin {{ $topic->is_excellent == 'yes' ? 'active' : ''}}" title="{{ lang('Mark as Excellent') }}">
<i class="fa fa-trophy"></i>
</a>
Expand All @@ -28,7 +28,7 @@
</a>
@endif

@if ( $currentUser && ($currentUser->can("manage_topics") || $currentUser->id == $topic->user_id) )
@if ( $currentUser && ($manage_topics || $currentUser->id == $topic->user_id) )
<a id="topic-append-button" href="javascript:void(0);" title="{{ lang('Append') }}" class="admin" data-toggle="modal" data-target="#exampleModal">
<i class="fa fa-plus"></i>
</a>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/topics/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
@endforeach
</div>

@include('topics.partials.topic_operate')
@include('topics.partials.topic_operate', ['manage_topics' => $currentUser ? $currentUser->can("manage_topics") : false])
</div>


Expand Down Expand Up @@ -104,7 +104,7 @@ class="vote btn btn-primary {{ $currentUser && $topic->votes()->ByWhom(Auth::id(
<div class="panel-body">

@if (count($replies))
@include('topics.partials.replies')
@include('topics.partials.replies', ['manage_topics' => $currentUser ? $currentUser->can("manage_topics") : false])
<div id="replies-empty-block" class="empty-block hide">{{ lang('No comments') }}~~</div>
@else
<ul class="list-group row"></ul>
Expand Down

0 comments on commit 983fb60

Please sign in to comment.