v2 first commit
This commit is contained in:
@ -1,70 +1,80 @@
|
||||
<div id="review-items">
|
||||
@foreach($reviews->data as $review)
|
||||
<div class="post">
|
||||
<div class="user-block">
|
||||
<img class="img-circle img-bordered-sm" src="{{ $review->thumb }}" alt="{{ $review->author }}">
|
||||
<span class="username">
|
||||
{{ $review->author }}
|
||||
<span class="pull-right">
|
||||
@for($i = 1; $i <= $review->rating; $i++)
|
||||
<i class="fa fa-star"></i>
|
||||
@endfor
|
||||
@for($i = $review->rating; $i < 5; $i++)
|
||||
<i class="fa fa-star-o"></i>
|
||||
@endfor
|
||||
</span>
|
||||
</span>
|
||||
<span class="description">{{ Date::parse($review->created_at)->format($date_format) }}</span>
|
||||
<div class="media media-comment">
|
||||
<img alt="Image placeholder" class="avatar avatar-lg media-comment-avatar rounded-circle" src="{{ $review->thumb }}" alt="{{ $review->author }}">
|
||||
<div class="media-body">
|
||||
<div class="media-comment-text">
|
||||
<div class="d-flex">
|
||||
<h5 class="mt-0">{{ $review->author }}</h5>
|
||||
<h5 class="text-right ml-auto">@date($review->created_at)</h5>
|
||||
</div>
|
||||
<p class="text-sm lh-160">{!! nl2br($review->text) !!}</p>
|
||||
<div class="icon-actions">
|
||||
<a href="#" class="like active">
|
||||
<span class="text-yellow">
|
||||
@for($i = 1; $i <= $review->rating; $i++)
|
||||
<i class="fa fa-star"></i>
|
||||
@endfor
|
||||
@for($i = $review->rating; $i < 5; $i++)
|
||||
<i class="fa fa-star-o"></i>
|
||||
@endfor
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
{!! nl2br($review->text) !!}
|
||||
</p>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@stack('pagination_start')
|
||||
|
||||
@php
|
||||
$review_first_item = count($reviews->data) > 0 ? ($reviews->current_page - 1) * $reviews->per_page + 1 : null;
|
||||
$review_last_item = count($reviews->data) > 0 ? $review_first_item + count($reviews->data) - 1 : null;
|
||||
@endphp
|
||||
|
||||
@if ($review_first_item)
|
||||
<div class="pull-left" style="margin-top: 7px;">
|
||||
<small>{{ trans('pagination.showing', ['first' => $review_first_item, 'last' => $review_last_item, 'total' => $reviews->total, 'type' => strtolower(trans('modules.tab.reviews'))]) }}</small>
|
||||
</div>
|
||||
@stack('pagination_start')
|
||||
@php
|
||||
$review_first_item = count($reviews->data) > 0 ? ($reviews->current_page - 1) * $reviews->per_page + 1 : null;
|
||||
$review_last_item = count($reviews->data) > 0 ? $review_first_item + count($reviews->data) - 1 : null;
|
||||
@endphp
|
||||
|
||||
<div class="pull-right">
|
||||
<ul class="pagination pagination-sm no-margin">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($reviews->current_page <= 1)
|
||||
<li class="disabled"><span>«</span></li>
|
||||
@else
|
||||
<li><a href="{{ url(request()->path()) }}?page={{ $reviews->current_page - 1 }}" rel="prev">«</a></li>
|
||||
@endif
|
||||
@if ($review_first_item)
|
||||
<div class="row d-none">
|
||||
<div class="col-md-6">
|
||||
<span class="table-text hidden-lg">
|
||||
{{ trans('pagination.showing', ['first' => $review_first_item, 'last' => $review_last_item, 'total' => $reviews->total, 'type' => strtolower(trans('modules.tab.reviews'))]) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{{-- Pagination Elements --}}
|
||||
@for ($page = 1; $page <= $reviews->last_page; $page++)
|
||||
@if ($page == $reviews->current_page)
|
||||
<li class="active"><span>{{ $page }}</span></li>
|
||||
@else
|
||||
<li><a href="{{ url(request()->path()) }}?page={{ $page }}" data-page="{{ $page }}">{{ $page }}</a></li>
|
||||
@endif
|
||||
@endfor
|
||||
<div class="col-md-6">
|
||||
<ul class="pagination float-right">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($reviews->current_page <= 1)
|
||||
<li class="page-item disabled"><span class="page-link">«</span></li>
|
||||
@else
|
||||
<li><a class="page-link" href="{{ url(request()->path()) }}?page={{ $reviews->current_page - 1 }}" rel="prev">«</a></li>
|
||||
@endif
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($reviews->current_page != 1)
|
||||
<li><a href="{{ url(request()->path()) }}?page={{ $reviews->current_page + 1 }}" rel="next">»</a></li>
|
||||
@else
|
||||
<li class="disabled"><span>»</span></li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
@else
|
||||
<div class="pull-left">
|
||||
<small>{{ trans('general.no_records') }}</small>
|
||||
</div>
|
||||
@endif
|
||||
{{-- Pagination Elements --}}
|
||||
@for ($page = 1; $page <= $reviews->last_page; $page++)
|
||||
@if ($page == $reviews->current_page)
|
||||
<li class="page-item active"><span class="page-link">{{ $page }}</span></li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" href="{{ url(request()->path()) }}?page={{ $page }}" data-page="{{ $page }}">{{ $page }}</a></li>
|
||||
@endif
|
||||
@endfor
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($reviews->current_page != 1)
|
||||
<li class="page-item"><a class="page-link" href="{{ url(request()->path()) }}?page={{ $reviews->current_page + 1 }}" rel="next">»</a></li>
|
||||
@else
|
||||
<li class="page-item disabled"><span class="page-link">»</span></li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<small>{{ trans('general.no_records') }}</small>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@stack('pagination_end')
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user