mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-10 23:45:48 -06:00
Creat / edit / index [skip ci]
This commit is contained in:
parent
32c4661233
commit
356dd2c6cd
44
resources/twig/currency/create.twig
Normal file
44
resources/twig/currency/create.twig
Normal file
@ -0,0 +1,44 @@
|
||||
{% extends "./layout/default.twig" %}
|
||||
{% block content %}
|
||||
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }}
|
||||
{{ Form.open({'class' : 'form-horizontal','id' : 'store','route' : 'currency.store'}) }}
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<i class="fa {{ subTitleIcon }}"></i> Mandatory fields
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{ ExpandedForm.text('name',null,{'maxlength' : 48}) }}
|
||||
{{ ExpandedForm.text('symbol',null,{'maxlength': 8}) }}
|
||||
{{ ExpandedForm.text('code',null,{'maxlength' : 3}) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
|
||||
<!-- panel for options -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-bolt"></i> Options
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{ ExpandedForm.optionsList('create','currency') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<p>
|
||||
<button type="submit" class="btn btn-lg btn-success">
|
||||
<i class="fa fa-plus-circle"></i> Store new currency
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
45
resources/twig/currency/edit.twig
Normal file
45
resources/twig/currency/edit.twig
Normal file
@ -0,0 +1,45 @@
|
||||
{% extends "./layout/default.twig" %}
|
||||
{% block content %}
|
||||
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, currency) }}
|
||||
{{ Form.model(currency, {'class' : 'form-horizontal','id' : 'update','url' : route('currency.update',currency.id)}) }}
|
||||
|
||||
<input type="hidden" name="id" value="{{currency.id}}" />
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<i class="fa {{ subTitleIcon }}"></i> Mandatory fields
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{ ExpandedForm.text('name',null,{'maxlength' : 48}) }}
|
||||
{{ ExpandedForm.text('symbol',null,{'maxlength' : 8}) }}
|
||||
{{ ExpandedForm.text('code',null,{'maxlength' : 3}) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
|
||||
<!-- panel for options -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-bolt"></i> Options
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{ ExpandedForm.optionsList('update','currency') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<p>
|
||||
<button type="submit" class="btn btn-lg btn-success">
|
||||
<i class="fa fa-plus-circle"></i> Update currency
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
49
resources/twig/currency/index.twig
Normal file
49
resources/twig/currency/index.twig
Normal file
@ -0,0 +1,49 @@
|
||||
{% extends "./layout/default.twig" %}
|
||||
{% block content %}
|
||||
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-sm-12 col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Currencies
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p class="text-info">
|
||||
Firefly III supports various currencies which you can set and enable here.
|
||||
</p>
|
||||
<ul>
|
||||
{% if currencies|length > 0 %}
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th colspan="2">Currency</th>
|
||||
</tr>
|
||||
{% for currency in currencies %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a class="btn btn-default" href="{{route('currency.edit',currency.id)}}"><i class="fa fa-fw fa-pencil"></i></a>
|
||||
<a class="btn btn-default" href="{{route('currency.delete',currency.id)}}"><i class="fa fa-fw fa-trash"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{ currency.name }} ({{ currency.code }}) ({{ currency.symbol|raw }})</td>
|
||||
<td>
|
||||
{% if currency.id == defaultCurrency.id %}
|
||||
<span class="label label-success">default</span>
|
||||
{% else %}
|
||||
<a class="btn btn-info btn-xs" href="{{route('currency.default',currency.id)}}">make default</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
<p><a class="btn btn-success" href="{{route('currency.create')}}"><i class="fa fa-fw fa-plus-circle"></i> Add another currency</a></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user