mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-29 02:11:12 -06:00
Better mostly report lists.
This commit is contained in:
parent
d98d366eea
commit
fd57086ffd
@ -99,7 +99,8 @@ class ReportHelper implements ReportHelperInterface
|
|||||||
$end = Carbon::now();
|
$end = Carbon::now();
|
||||||
$months = [];
|
$months = [];
|
||||||
while ($start <= $end) {
|
while ($start <= $end) {
|
||||||
$months[] = [
|
$year = $start->format('Y');
|
||||||
|
$months[$year][] = [
|
||||||
'formatted' => $start->format('F Y'),
|
'formatted' => $start->format('F Y'),
|
||||||
'month' => intval($start->format('m')),
|
'month' => intval($start->format('m')),
|
||||||
'year' => intval($start->format('Y')),
|
'year' => intval($start->format('Y')),
|
||||||
|
@ -23,11 +23,16 @@
|
|||||||
Monthly reports
|
Monthly reports
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<ul>
|
|
||||||
@foreach($months as $month)
|
@foreach($months as $year => $entries)
|
||||||
<li><a href="{{route('reports.month',[$month['year'],$month['month']])}}">{{$month['formatted']}}</a></li>
|
<h5>{{$year}}</h5>
|
||||||
|
<ul>
|
||||||
|
@foreach($entries as $month)
|
||||||
|
<li><a href="{{route('reports.month',[$month['year'],$month['month']])}}">{{$month['formatted']}}</a></li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -38,9 +43,13 @@
|
|||||||
Budget reports
|
Budget reports
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<ul>
|
@foreach($months as $year => $entries)
|
||||||
@foreach($months as $month)
|
<h5>{{$year}}</h5>
|
||||||
<li><a href="{{route('reports.budget',[$month['year'],$month['month']])}}">{{$month['formatted']}}</a></li>
|
<ul>
|
||||||
|
@foreach($entries as $month)
|
||||||
|
<li><a href="{{route('reports.budget',[$month['year'],$month['month']])}}">{{$month['formatted']}}</a></li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user