mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix order, fix bar.
This commit is contained in:
@@ -117,6 +117,8 @@ class IndexController extends Controller
|
||||
$piggyBanks[$groupOrder]['piggy_banks'][] = $array;
|
||||
}
|
||||
|
||||
ksort($piggyBanks);
|
||||
|
||||
return view('piggy-banks.index', compact('piggyBanks', 'accounts'));
|
||||
}
|
||||
|
||||
|
@@ -12,89 +12,91 @@
|
||||
</thead>
|
||||
|
||||
{% for objectGroupOrder, objectGroup in piggyBanks %}
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="5"><small>{{ objectGroup.object_group_title }}</small></td>
|
||||
</tr>
|
||||
{% for piggy in objectGroup.piggy_banks %}
|
||||
<tr class="sortable" data-id="{{ piggy.id }}" data-name="{{ piggy.name }}" data-order="{{ piggy.order }}" data-position="{{ loop.index0 }}">
|
||||
<td class="visible-xs visible-sm hidden-md hidden-lg">
|
||||
|
||||
</td>
|
||||
<td class="visible-xs visible-sm hidden-md hidden-lg">
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a href="{{ route('piggy-banks.remove-money-mobile', piggy.id) }}" class="btn btn-default btn-xs"><i class="fa fa-minus"></i></a>
|
||||
<a href="{{ route('piggy-banks.add-money-mobile', piggy.id) }}" class="btn btn-default btn-xs"><i class="fa fa-plus"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:60px;" class="hidden-sm hidden-xs">
|
||||
<i class="fa fa-fw fa-bars handle"></i>
|
||||
<i class="loadSpin"></i>
|
||||
</td>
|
||||
<td style="width:100px;" class="hidden-sm hidden-xs">
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a href="{{ route('piggy-banks.edit', piggy.id) }}" class="btn btn-default btn-xs"><i class="fa fa-pencil fa-fw"></i></a>
|
||||
<a href="{{ route('piggy-banks.delete', piggy.id) }}" class="btn btn-danger btn-xs"><i class="fa fa-trash fa-fw"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('piggy-banks.show', piggy.id) }}" title="{{ piggy.account_name }}">{{ piggy.name }}</a>
|
||||
{% if piggy.attachments.count > 0 %}
|
||||
<i class="fa fa-fw fa-paperclip"></i>
|
||||
{% endif %}
|
||||
{% if objectGroup.piggy_banks|length > 0 %}
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="8"><small>{{ objectGroup.object_group_title }}</small></td>
|
||||
</tr>
|
||||
{% for piggy in objectGroup.piggy_banks %}
|
||||
<tr class="sortable" data-id="{{ piggy.id }}" data-name="{{ piggy.name }}" data-order="{{ piggy.order }}" data-position="{{ loop.index0 }}">
|
||||
<td class="visible-xs visible-sm hidden-md hidden-lg">
|
||||
|
||||
</td>
|
||||
<td class="visible-xs visible-sm hidden-md hidden-lg">
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a href="{{ route('piggy-banks.remove-money-mobile', piggy.id) }}" class="btn btn-default btn-xs"><i class="fa fa-minus"></i></a>
|
||||
<a href="{{ route('piggy-banks.add-money-mobile', piggy.id) }}" class="btn btn-default btn-xs"><i class="fa fa-plus"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:60px;" class="hidden-sm hidden-xs">
|
||||
<i class="fa fa-fw fa-bars handle"></i>
|
||||
<i class="loadSpin"></i>
|
||||
</td>
|
||||
<td style="width:100px;" class="hidden-sm hidden-xs">
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a href="{{ route('piggy-banks.edit', piggy.id) }}" class="btn btn-default btn-xs"><i class="fa fa-pencil fa-fw"></i></a>
|
||||
<a href="{{ route('piggy-banks.delete', piggy.id) }}" class="btn btn-danger btn-xs"><i class="fa fa-trash fa-fw"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('piggy-banks.show', piggy.id) }}" title="{{ piggy.account_name }}">{{ piggy.name }}</a>
|
||||
{% if piggy.attachments.count > 0 %}
|
||||
<i class="fa fa-fw fa-paperclip"></i>
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
<td style="text-align: right;" class="piggySaved">
|
||||
</td>
|
||||
<td style="text-align: right;" class="piggySaved">
|
||||
<span title="Saved so far"
|
||||
style="text-align:right;">{{ formatAmountBySymbol(piggy.current_amount,piggy.currency_symbol,piggy.currency_decimal_places) }}</span>
|
||||
</td>
|
||||
<td class="hidden-sm hidden-xs" style="text-align:right;width:40px;">
|
||||
{% if piggy.current_amount > 0 %}
|
||||
<a href="{{ route('piggy-banks.remove-money', piggy.id) }}" class="btn btn-default btn-xs removeMoney" data-id="{{ piggy.id }}">
|
||||
<i data-id="{{ piggy.id }}" class="fa fa-minus"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</td>
|
||||
<td class="hidden-sm hidden-xs" style="text-align:right;width:40px;">
|
||||
{% if piggy.current_amount > 0 %}
|
||||
<a href="{{ route('piggy-banks.remove-money', piggy.id) }}" class="btn btn-default btn-xs removeMoney" data-id="{{ piggy.id }}">
|
||||
<i data-id="{{ piggy.id }}" class="fa fa-minus"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td class="hidden-sm hidden-xs piggyBar">
|
||||
<div class="progress progress" style="margin-bottom:0;">
|
||||
<div
|
||||
{% if piggy.percentage == 100 %}
|
||||
class="progress-bar progress-bar-success"
|
||||
{% elseif piggy.percentage == 0 %}
|
||||
class="progress-bar progress-bar-warning"
|
||||
{% else %}
|
||||
class="progress-bar progress-bar-info"
|
||||
{% endif %}
|
||||
role="progressbar" aria-valuenow="{{ piggy.percentage }}" aria-valuemin="0" aria-valuemax="100"
|
||||
style="min-width: 30px;width: {{ piggy.percentage }}%;">
|
||||
{{ piggy.percentage }}%
|
||||
<td class="hidden-sm hidden-xs piggyBar">
|
||||
<div class="progress progress" style="margin-bottom:0;">
|
||||
<div
|
||||
{% if piggy.percentage == 100 %}
|
||||
class="progress-bar progress-bar-success"
|
||||
{% elseif piggy.percentage == 0 %}
|
||||
class="progress-bar progress-bar-warning"
|
||||
{% else %}
|
||||
class="progress-bar progress-bar-info"
|
||||
{% endif %}
|
||||
role="progressbar" aria-valuenow="{{ piggy.percentage }}" aria-valuemin="0" aria-valuemax="100"
|
||||
style="min-width: 30px;width: {{ piggy.percentage }}%;">
|
||||
{{ piggy.percentage }}%
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</td>
|
||||
|
||||
|
||||
<td class="hidden-sm hidden-xs" style="width:40px;">
|
||||
{% if piggy.left_to_save > 0 %}
|
||||
<a href="{{ route('piggy-banks.add-money', piggy.id) }}" class="btn btn-default btn-xs addMoney" data-id="{{ piggy.id }}">
|
||||
<i data-id="{{ piggy.id }}" class="fa fa-plus"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="hidden-sm hidden-xs" style="text-align:right;">
|
||||
<span title="{{ 'target_amount'|_ }}">{{ formatAmountBySymbol(piggy.target_amount,piggy.currency_symbol,piggy.currency_decimal_places) }}</span>
|
||||
</td>
|
||||
<td class="hidden-sm hidden-xs" style="text-align:right;">
|
||||
{% if piggy.left_to_save > 0 %}
|
||||
<span title="{{ 'left_to_save'|_ }}">{{ formatAmountBySymbol(piggy.left_to_save,piggy.currency_symbol,piggy.currency_decimal_places) }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="hidden-sm hidden-xs" style="text-align:right;">
|
||||
{% if piggy.target_date %}
|
||||
{{ formatAmountBySymbol(piggy.save_per_month, piggy.currency_symbol, piggy.currency_decimal_places) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<td class="hidden-sm hidden-xs" style="width:40px;">
|
||||
{% if piggy.left_to_save > 0 %}
|
||||
<a href="{{ route('piggy-banks.add-money', piggy.id) }}" class="btn btn-default btn-xs addMoney" data-id="{{ piggy.id }}">
|
||||
<i data-id="{{ piggy.id }}" class="fa fa-plus"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="hidden-sm hidden-xs" style="text-align:right;">
|
||||
<span title="{{ 'target_amount'|_ }}">{{ formatAmountBySymbol(piggy.target_amount,piggy.currency_symbol,piggy.currency_decimal_places) }}</span>
|
||||
</td>
|
||||
<td class="hidden-sm hidden-xs" style="text-align:right;">
|
||||
{% if piggy.left_to_save > 0 %}
|
||||
<span title="{{ 'left_to_save'|_ }}">{{ formatAmountBySymbol(piggy.left_to_save,piggy.currency_symbol,piggy.currency_decimal_places) }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="hidden-sm hidden-xs" style="text-align:right;">
|
||||
{% if piggy.target_date %}
|
||||
{{ formatAmountBySymbol(piggy.save_per_month, piggy.currency_symbol, piggy.currency_decimal_places) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user