Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions resources/views/comments/_actions.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<div class="my-1 row justify-content-between no-gutters">
<div class="col-auto">
@can('reply-to-comment', $comment)
<button data-toggle="modal" data-target="#reply-modal-{{ $comment->getKey() }}" class="btn btn-sm px-3 py-2 px-sm-2 py-sm-1 btn-faded text-uppercase"><i class="fas fa-comment"></i><span
class="ml-2 d-none d-sm-inline-block">Reply</span></button>
<a data-toggle="modal" href="#reply-modal-{{ $comment->getKey() }}" class=" text-secondary px-3 py-2 px-sm-2 py-sm-1 text-uppercase"><i class="fas fa-comment"></i><span
class="ml-2 d-none d-sm-inline-block">Reply</span></a>
@endcan
@can('edit-comment', $comment)
<button data-toggle="modal" data-target="#comment-modal-{{ $comment->getKey() }}" class="btn btn-sm px-3 py-2 px-sm-2 py-sm-1 btn-faded text-uppercase"><i class="fas fa-edit"></i><span
class="ml-2 d-none d-sm-inline-block">Edit</span></button>
<a data-toggle="modal" href="#comment-modal-{{ $comment->getKey() }}" class="text-secondary px-3 py-2 px-sm-2 py-sm-1 text-uppercase"><i class="fas fa-edit"></i><span
class="ml-2 d-none d-sm-inline-block">Edit</span></a>
@endcan
@if (((Auth::user()->id == $comment->commentable_id && $comment->commentable_type == 'App\Models\User\UserProfile') || Auth::user()->isStaff) && (isset($compact) && !$compact))
<button data-toggle="modal" data-target="#feature-modal-{{ $comment->getKey() }}" class="btn btn-sm px-3 py-2 px-sm-2 py-sm-1 btn-faded text-success text-uppercase"><i class="fas fa-star"></i><span
class="ml-2 d-none d-sm-inline-block">{{ $comment->is_featured ? 'Unf' : 'F' }}eature Comment</span></button>
<a data-toggle="modal" href="#feature-modal-{{ $comment->getKey() }}" class="text-success px-3 py-2 px-sm-2 py-sm-1 text-uppercase"><i class="fas fa-star"></i><span
class="ml-2 d-none d-sm-inline-block">{{ $comment->is_featured ? 'Unf' : 'F' }}eature Comment</span></a>
@endif
@can('delete-comment', $comment)
<button data-toggle="modal" data-target="#delete-modal-{{ $comment->getKey() }}" class="btn btn-sm px-3 py-2 px-sm-2 py-sm-1 btn-outline-danger text-uppercase"><i class="fas fa-minus-circle"></i><span
Expand All @@ -22,10 +22,10 @@ class="ml-2 d-none d-sm-inline-block">Delete</span></button>
<div class="col-auto text-right">
{{-- Likes Section --}}
<a href="#" data-toggle="modal" data-target="#show-likes-{{ $comment->id }}">
<button href="#" data-toggle="tooltip" title="Click to View" class="btn btn-sm px-3 py-2 px-sm-2 py-sm-1 btn-faded">
<a href="#" data-toggle="tooltip" title="Click to View" class="px-3 py-2 px-sm-2 py-sm-1">
{{ $comment->likes()->where('is_like', 1)->count() -$comment->likes()->where('is_like', 0)->count() }}
{{ $comment->likes()->where('is_like', 1)->count() -$comment->likes()->where('is_like', 0)->count() !=1? 'Likes': 'Like' }}
</button>
</a>
</a>
{!! Form::open(['url' => 'comments/' . $comment->id . '/like/1', 'class' => 'd-inline-block']) !!}
{!! Form::button('<i class="fas fa-thumbs-up"></i>', [
Expand Down