Module review and home page syntax fixed

This commit is contained in:
cuneytsenturk 2018-12-11 17:21:11 +03:00
parent 5134037035
commit f456dd3d43
2 changed files with 34 additions and 26 deletions

View File

@ -11,6 +11,7 @@
@include('partials.modules.bar')
<div class="row">
@if ($paid)
<div class="col-md-12">
<div class="content-header no-padding-left">
<h3>{{ trans('modules.top_paid') }}</h3>
@ -24,7 +25,9 @@
@include('partials.modules.no_apps')
@endif
</div>
@endif
@if ($new)
<div class="col-md-12">
<div class="content-header no-padding-left">
<h3>{{ trans('modules.new') }}</h3>
@ -38,7 +41,9 @@
@include('partials.modules.no_apps')
@endif
</div>
@endif
@if ($free)
<div class="col-md-12">
<div class="content-header no-padding-left">
<h3>{{ trans('modules.top_free') }}</h3>
@ -52,5 +57,6 @@
@include('partials.modules.no_apps')
@endif
</div>
@endif
</div>
@endsection

View File

@ -1,60 +1,62 @@
<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>
<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 class="description">{{ \Carbon\Carbon::parse($review->created_at)->format('F d, Y') }}</span>
</div>
<!-- /.user-block -->
<p>
{!! nl2br($review->text) !!}
</p>
</span>
<span class="description">{{ Date::parse($review->created_at)->format($date_format) }}</span>
</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>
<div class="pull-right">
<ul class="pagination pagination-sm no-margin">
{{-- Previous Page Link --}}
@if ($reviews->current_page <= 1)
<li class="disabled"><span>&laquo;</span></li>
<li class="disabled"><span>&laquo;</span></li>
@else
<li><a href="{{ url(request()->path()) }}?page={{ $reviews->current_page - 1 }}" rel="prev">&laquo;</a></li>
<li><a href="{{ url(request()->path()) }}?page={{ $reviews->current_page - 1 }}" rel="prev">&laquo;</a></li>
@endif
{{-- Pagination Elements --}}
@for ($page = 1; $page <= $reviews->last_page; $page++)
@if ($page == $reviews->current_page)
<li class="active"><span>{{ $page }}</span></li>
<li class="active"><span>{{ $page }}</span></li>
@else
<li><a href="{{ url(request()->path()) }}?page={{ $page }}" data-page="{{ $page }}">{{ $page }}</a></li>
<li><a href="{{ url(request()->path()) }}?page={{ $page }}" data-page="{{ $page }}">{{ $page }}</a></li>
@endif
@endfor
{{-- Next Page Link --}}
@if ($reviews->current_page != 1)
<li><a href="{{ url(request()->path()) }}?page={{ $reviews->current_page + 1 }}" rel="next">&raquo;</a></li>
<li><a href="{{ url(request()->path()) }}?page={{ $reviews->current_page + 1 }}" rel="next">&raquo;</a></li>
@else
<li class="disabled"><span>&raquo;</span></li>
<li class="disabled"><span>&raquo;</span></li>
@endif
</ul>
</div>
@ -65,4 +67,4 @@
@endif
@stack('pagination_end')
</div>
</div>