Fixed split journals views.

This commit is contained in:
James Cole
2016-05-17 16:00:27 +02:00
parent 65ecea3b1c
commit 4cbb0d9716
8 changed files with 119 additions and 24 deletions

View File

@@ -163,6 +163,8 @@ class CategoryController extends Controller
$set = $repository->journalsInPeriod(new Collection([$category]), new Collection, [], $start, $end);
$count = $set->count();
$subSet = $set->splice($offset, $pageSize);
$subTitle = $category->name;
$subTitleIcon = 'fa-bar-chart';
$journals = new LengthAwarePaginator($subSet, $count, $pageSize, $page);
$journals->setPath('categories/show/' . $category->id);
@@ -187,7 +189,7 @@ class CategoryController extends Controller
if ($cache->has()) {
$entries = $cache->get();
return view('categories.show', compact('category', 'journals', 'entries', 'hideCategory', 'subTitle'));
return view('categories.show', compact('category', 'journals', 'entries', 'subTitleIcon', 'hideCategory', 'subTitle'));
}