Files
firefly-iii/resources/views/transactions/bulk/edit.twig

142 lines
7.4 KiB
Twig
Raw Normal View History

{% extends "./layout/default" %}
{% block breadcrumbs %}
2017-12-30 12:43:13 +01:00
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, journals) }}
{% endblock %}
{% block content %}
<form method="POST" action="{{ route('transactions.mass.update-bulk') }}" accept-charset="UTF-8" class="form-horizontal" id="destroy">
<input name="_token" type="hidden" value="{{ csrf_token() }}">
{% for journal in journals %}
{% if journal.transaction_count == 2 %}
<input type="hidden" name="journals[]" value="{{ journal.id }}"/>
{% endif %}
{% endfor %}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="box box-default">
<div class="box-header with-border">
2017-12-30 12:43:13 +01:00
<h3 class="box-title">{{ 'mass_bulk_journals'|_ }}</h3>
</div>
<div class="box-body">
<p>
2017-12-30 12:43:13 +01:00
{{ 'mass_bulk_journals_explain'|_ }}
</p>
2017-12-30 12:43:13 +01:00
<div class="row">
<div class="col-lg-8 col-md-12 col-sm-12 col-xs-12">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>{{ trans('list.description') }}</th>
<th>{{ trans('list.amount') }}</th>
<th>{{ trans('list.date') }}</th>
<th>{{ trans('list.category') }}</th>
<th>{{ trans('list.budget') }}</th>
<th>{{ trans('list.tags') }}</th>
</tr>
</thead>
<tbody>
{% for journal in journals %}
<tr>
<td>
<a href="{{ route('transactions.show', [journal.id]) }}">
{{ journal.description }}</a></td>
<td>{{ journal|journalTotalAmount }}</td>
<td>{{ journal.date.formatLocalized(monthAndDayFormat) }}</td>
<td>
{% set cat = journal.categories.first %}
{% if cat %}
<a href="{{ route('categories.show', [cat.id]) }}">{{ cat.name }}</a>
{% endif %}
</td>
<td>
{% set bud = journal.budgets.first %}
{% if bud %}
<a href="{{ route('budgets.show', [bud.id]) }}">{{ bud.name }}</a>
{% endif %}
</td>
2017-12-30 12:54:19 +01:00
<td>
{% for tag in journal.tags %}
<a class="label label-success" href="{{ route('tags.show', [tag.id]) }}">
<i class="fa fa-fw fa-tag"></i> {{ tag.tag }}</a>
{% endfor %}
</td>
2017-12-30 12:43:13 +01:00
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
2017-12-30 12:54:19 +01:00
<p>
{{ 'bulk_set_new_values'|_ }}
</p>
<div class="row">
<div class="col-lg-8 col-md-12 col-sm-12 col-xs-12">
<table class="table table-striped table-condensed">
<tr>
<th style="width:25%;">{{ trans('list.category') }}</th>
<td>
<input class="form-control" placeholder="" name="category" type="text" value="">
</td>
</tr>
<tr>
<th>{{ trans('list.budget') }}</th>
<td>
<select class="form-control" name="budget_id">
<option value="0">(none)</option>
</select>
</td>
</tr>
<tr>
<th>{{ trans('list.tags') }}</th>
<td>
<input class="form-control" placeholder="" name="tags" type="text" value="">
</td>
</tr>
</table>
</div>
</div>
<!--
<table class="table table-striped table-condensed">
<tr>
<th class="col-lg-2 col-md-2 col-sm-2">{{ trans('list.category') }}</th>
<th class="col-lg-2 col-md-2 col-sm-2">{{ trans('list.tags') }}</th>
</tr>
<tr>
{# category #}
<td>
2017-12-30 12:54:19 +01:00
</td>
{# tags #}
<td>
2017-12-30 12:54:19 +01:00
</td>
</tr>
</table>
2017-12-30 12:54:19 +01:00
-->
</div>
<div class="box-footer">
{% if journals.count > 0 %}
<input type="submit" name="submit" value="{{ trans('form.update_all_journals') }}" class="btn btn-success pull-right"/>
{% endif %}
<a href="{{ route('index') }}" class="btn-default btn">{{ trans('form.cancel') }}</a>
</div>
</div>
</div>
</div>
</form>
{% endblock %}
{% block scripts %}
<script type="text/javascript">
var what = "";
</script>
<script type="text/javascript" src="js/lib/bootstrap3-typeahead.min.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="js/lib/bootstrap-tagsinput.min.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="js/ff/transactions/mass/edit-bulk.js?v={{ FF_VERSION }}"></script>
{% endblock %}
{% block styles %}
<link href="css/bootstrap-tagsinput.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
{% endblock %}