diff --git a/app/Http/Controllers/CategoryController.php b/app/Http/Controllers/CategoryController.php index d199e64f13..bd6c9178da 100644 --- a/app/Http/Controllers/CategoryController.php +++ b/app/Http/Controllers/CategoryController.php @@ -222,6 +222,7 @@ class CategoryController extends Controller $hideCategory = true; // used in list. $page = intval(Input::get('page')) === 0 ? 1 : intval(Input::get('page')); $pageSize = intval(Preferences::get('transactionPageSize', 50)->data); + $showAll = true; // new collector: $collector = app(JournalCollectorInterface::class); @@ -229,7 +230,7 @@ class CategoryController extends Controller $journals = $collector->getPaginatedJournals(); $journals->setPath('categories/show/' . $category->id . '/all'); - return view('categories.show', compact('category', 'journals', 'hideCategory', 'subTitle', 'subTitleIcon', 'start', 'end')); + return view('categories.show', compact('category', 'journals', 'hideCategory', 'subTitle', 'subTitleIcon', 'start', 'end', 'showAll')); } /** diff --git a/resources/views/categories/show.twig b/resources/views/categories/show.twig index 7aac600ed1..894a981e89 100644 --- a/resources/views/categories/show.twig +++ b/resources/views/categories/show.twig @@ -28,7 +28,8 @@ - {% else %} + {% endif %} + {% if not entries and not showAll %} {# single chart #}
@@ -41,6 +42,19 @@
{% endif %} + {% if not entries and showAll %} + {# all chart #} +
+
+
+

{{ 'overview'|_ }} ({{ 'all_periods'|_|lower }})

+
+
+ +
+
+
+ {% endif %}