Skip to content

Firefly III: a personal finances manager

This fixes #604

James Cole9365f9ab6084
diff --git a/resources/views/reports/partials/budget-period.twig b/resources/views/reports/partials/budget-period.twig
index e5586d17b0..f70e5c9c71 100644
--- a/resources/views/reports/partials/budget-period.twig
+++ b/resources/views/reports/partials/budget-period.twig
@@ -12,7 +12,11 @@
{% for id, info in report %}
<tr>
<td>
- <a class="btn btn-default btn-xs" href="{{ route('budgets.show', [id]) }}"><i class="fa fa-external-link" aria-hidden="true"></i></a>
+ {% if id != 0 %}
+ <a class="btn btn-default btn-xs" href="{{ route('budgets.show', [id]) }}"><i class="fa fa-external-link" aria-hidden="true"></i></a>
+ {% else %}
+ <a class="btn btn-default btn-xs" href="{{ route('budgets.no-budget') }}"><i class="fa fa-external-link" aria-hidden="true"></i></a>
+ {% endif %}
</td>
<td data-value="{{ info.name }}">
<a title="{{ info.name }}" href="#" data-budget="{{ id }}" class="budget-chart-activate">{{ info.name }}</a>
diff --git a/resources/views/reports/partials/category-period.twig b/resources/views/reports/partials/category-period.twig
index 8228327b64..2a9a6555ab 100644
--- a/resources/views/reports/partials/category-period.twig
+++ b/resources/views/reports/partials/category-period.twig
@@ -12,7 +12,11 @@
{% for id, info in report %}
<tr>
<td>
+ {% if id != 0 %}
<a class="btn btn-default btn-xs" href="{{ route('categories.show', [id]) }}"><i class="fa fa-external-link" aria-hidden="true"></i></a>
+ {% else %}
+ <a class="btn btn-default btn-xs" href="{{ route('categories.no-category') }}"><i class="fa fa-external-link" aria-hidden="true"></i></a>
+ {% endif %}
</td>
<td data-value="{{ info.name }}">
<a title="{{ info.name }}" href="#" data-category="{{ id }}" class="category-chart-activate">{{ info.name }}</a>