Views must pick up on this #508

This commit is contained in:
James Cole
2016-12-30 07:39:42 +01:00
parent 497400587d
commit 13f6bd759b
5 changed files with 68 additions and 35 deletions

View File

@@ -1,7 +1,7 @@
{% extends "./layout/default" %}
{% block breadcrumbs %}
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, budget, repetition) }}
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, budget, budgetLimit) }}
{% endblock %}
{% block content %}
@@ -45,7 +45,10 @@
<div class="box">
<div class="box-header with-border">
<h3 class="box-title"><a
href="{{ route('budgets.show.repetition',[budget.id,limit.id]) }}">{{ limit.startdate.formatLocalized(monthFormat) }}</a>
href="{{ route('budgets.show.limit',[budget.id,limit.id]) }}">
{{ limit.start_date.formatLocalized(monthAndDayFormat) }} &mdash;
{{ limit.end_date.formatLocalized(monthAndDayFormat) }}
</a>
</h3>
</div>
<div class="box-body">
@@ -93,12 +96,10 @@
{% block scripts %}
<script type="text/javascript">
var budgetID = {{ budget.id }};
{% if repetition.id %}
var repetitionID = {{ repetition.id }};
var year = {{ repetition.startdate.format('Y') }};
var budgetChartUri = '{{ route('chart.budget.budget-limit', [budget.id, repetition.id] ) }}';
{% if budgetLimit.id %}
var budgetLimitID = {{ budgetLimit.id }};
var budgetChartUri = '{{ route('chart.budget.budget-limit', [budget.id, budgetLimit.id] ) }}';
{% else %}
var year = {{ Session.get('start').format('Y') }};
var budgetChartUri = '{{ route('chart.budget.budget', [budget.id] ) }}';
{% endif %}