mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Table is sortable, #697
This commit is contained in:
@@ -131,14 +131,14 @@
|
|||||||
<h3 class="box-title">Budget stuff</h3>
|
<h3 class="box-title">Budget stuff</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-body no-padding">
|
<div class="box-body no-padding">
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped sortable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="hidden-sm hidden-xs" style="width:10%;"> </th>
|
<th data-defaultsort="disabled" class="hidden-sm hidden-xs" style="width:10%;"> </th>
|
||||||
<th>{{ 'budget'|_ }}</th>
|
<th data-defaultsign="az">{{ 'budget'|_ }}</th>
|
||||||
<th style="width:25%;">{{ 'budgeted'|_ }}</th>
|
<th data-defaultsign="_19" style="width:25%;">{{ 'budgeted'|_ }}</th>
|
||||||
<th class="hidden-sm hidden-xs">{{ 'spent'|_ }}</th>
|
<th data-defaultsign="_19" class="hidden-sm hidden-xs">{{ 'spent'|_ }}</th>
|
||||||
<th class="hidden-sm hidden-xs">{{ 'left'|_ }}</th>
|
<th data-defaultsign="_19" class="hidden-sm hidden-xs">{{ 'left'|_ }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
<a href="{{ route('budgets.delete',budget.id) }}" class="btn btn-xs btn-danger"><i class="fa fa-fw fa-trash-o"></i></a>
|
<a href="{{ route('budgets.delete',budget.id) }}" class="btn btn-xs btn-danger"><i class="fa fa-fw fa-trash-o"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td data-value="{{ budget.name }}">
|
||||||
{% if budgetInformation[budget.id]['currentLimit'] %}
|
{% if budgetInformation[budget.id]['currentLimit'] %}
|
||||||
<a href="{{ route('budgets.show.limit', [budget.id, budgetInformation[budget.id]['currentLimit'].id]) }}"
|
<a href="{{ route('budgets.show.limit', [budget.id, budgetInformation[budget.id]['currentLimit'].id]) }}"
|
||||||
class="budget-link"
|
class="budget-link"
|
||||||
@@ -160,24 +160,27 @@
|
|||||||
<a href="{{ route('budgets.show',budget.id) }}" class="budget-link" data-id="{{ budget.id }}">{{ budget.name }}</a>
|
<a href="{{ route('budgets.show',budget.id) }}" class="budget-link" data-id="{{ budget.id }}">{{ budget.name }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-addon">{{ defaultCurrency.symbol|raw }}</div>
|
|
||||||
<input type="hidden" name="balance_currency_id" value="{{ defaultCurrency.id }}"/>
|
|
||||||
{% if budgetInformation[budget.id]['currentLimit'] %}
|
{% if budgetInformation[budget.id]['currentLimit'] %}
|
||||||
{% set repAmount = budgetInformation[budget.id]['currentLimit'].amount %}
|
{% set repAmount = budgetInformation[budget.id]['currentLimit'].amount %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set repAmount = '0' %}
|
{% set repAmount = '0' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<td data-value="{{ repAmount }}">
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-addon">{{ defaultCurrency.symbol|raw }}</div>
|
||||||
|
<input type="hidden" name="balance_currency_id" value="{{ defaultCurrency.id }}"/>
|
||||||
<input class="form-control budgetAmount" data-original="{{ repAmount }}"
|
<input class="form-control budgetAmount" data-original="{{ repAmount }}"
|
||||||
data-id="{{ budget.id }}" value="{{ repAmount|round }}" autocomplete="off"
|
data-id="{{ budget.id }}" value="{{ repAmount|round }}" autocomplete="off"
|
||||||
step="1" min="0" name="amount" type="number">
|
step="1" min="0" name="amount" type="number">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="hidden-sm hidden-xs spent" data-id="{{ budget.id }}" data-spent="{{ budgetInformation[budget.id]['spent'] }}">
|
<td class="hidden-sm hidden-xs spent" data-id="{{ budget.id }}" data-spent="{{ budgetInformation[budget.id]['spent'] }}"
|
||||||
|
data-value="{{ budgetInformation[budget.id]['spent'] }}">
|
||||||
{{ budgetInformation[budget.id]['spent']|formatAmount }}
|
{{ budgetInformation[budget.id]['spent']|formatAmount }}
|
||||||
</td>
|
</td>
|
||||||
<td class="hidden-sm hidden-xs left" data-id="{{ budget.id }}">
|
<td class="hidden-sm hidden-xs left" data-id="{{ budget.id }}"
|
||||||
|
data-value="{{ (repAmount + budgetInformation[budget.id]['spent']) }}">
|
||||||
{{ (repAmount + budgetInformation[budget.id]['spent'])|formatAmount }}
|
{{ (repAmount + budgetInformation[budget.id]['spent'])|formatAmount }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -210,6 +213,11 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
<link href="css/bootstrap-sortable.css" type="text/css" rel="stylesheet" media="all">
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// actually spent bar data:
|
// actually spent bar data:
|
||||||
@@ -221,6 +229,6 @@
|
|||||||
var available = {{ available }};
|
var available = {{ available }};
|
||||||
var budgetIndexURI = "{{ route('budgets.index','REPLACE') }}";
|
var budgetIndexURI = "{{ route('budgets.index','REPLACE') }}";
|
||||||
</script>
|
</script>
|
||||||
|
<script type="text/javascript" src="js/lib/bootstrap-sortable.js"></script>
|
||||||
<script type="text/javascript" src="js/ff/budgets/index.js"></script>
|
<script type="text/javascript" src="js/ff/budgets/index.js"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Reference in New Issue
Block a user