Updated stuff from the control list.

This commit is contained in:
James Cole 2015-06-20 21:55:55 +02:00
parent 4aff9d6e73
commit 526f565ea7
9 changed files with 58 additions and 66 deletions

View File

@ -53,7 +53,7 @@ function updateLayout() {
$('#subTitle').text(title[what]);
$('.breadcrumb .active').text(breadcrumbs[what]);
$('.breadcrumb li:nth-child(2)').html('<a href="' + middleCrumbUrl[what] + '">' + middleCrumbName[what] + '</a>');
$('#transaction-btn').html('<i class="fa fa-plus-circle"></i> ' + button[what]);
$('#transaction-btn').text(button[what]);
}
function updateForm() {

View File

@ -27,6 +27,8 @@
<link href="css/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<link href="css/firefly.css" rel="stylesheet" type="text/css" />
{% block styles %}{% endblock %}
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>

View File

@ -1,6 +1,6 @@
{{ journals.render|raw }}
<table class="table table-striped table-bordered sortable-table">
<table class="table table-hover sortable">
<tr class="ignore">
<th class="hidden-xs" colspan="2">&nbsp;</th>
<th>{{ trans('list.description') }}</th>

View File

@ -8,7 +8,7 @@
<h3 class="control-sidebar-heading">Create new stuff</h3>
<ul class='control-sidebar-menu'>
<li>
<a href="javascript::;">
<a href="{{ route('transactions.create', 'withdrawal') }}">
<i class="menu-icon fa fa-long-arrow-left bg-red"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">New withdrawal</h4>
@ -16,7 +16,7 @@
</a>
</li>
<li>
<a href="javascript::;">
<a href="{{ route('transactions.create', 'deposit') }}">
<i class="menu-icon fa fa-long-arrow-right bg-green"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">New deposit</h4>
@ -24,7 +24,7 @@
</a>
</li>
<li>
<a href="javascript::;">
<a href="{{ route('transactions.create', 'transfer') }}">
<i class="menu-icon fa fa-exchange bg-blue"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">New transfer</h4>

View File

@ -72,6 +72,7 @@
<!-- RELATE THIS TRANSFER TO A PIGGY BANK -->
{{ ExpandedForm.select('piggy_bank_id',piggies) }}
</div>
</div>
<!-- panel for options -->
@ -82,19 +83,15 @@
<div class="box-body">
{{ ExpandedForm.optionsList('create','transaction') }}
</div>
<div class="box-footer">
<button type="submit" id="transaction-btn" class="btn btn-success pull-right">
{{ trans('form.store_new_'~what) }}
</button>
</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" id="transaction-btn" class="btn btn-lg btn-success">
<i class="fa fa-plus-circle"></i> {{ trans('form.store_new_'~what) }}
</button>
</p>
</div>
</div>
</form>
{{ Form.close|raw }}
{% endblock %}
{% block scripts %}

View File

@ -21,23 +21,22 @@
<p>
{{ trans('form.journal_areYouSure', {'description': journal.description}) }}
</p>
<p>
<input type="submit" name="submit" value="{{ trans('form.deletePermanently') }}" class="btn btn-danger" />
{% if journal.transactiontype.type == 'Withdrawal' %}
<a href="{{route('transactions.index','withdrawal')}}" class="btn-default btn">{{ trans('form.cancel') }}</a>
{% endif %}
{% if journal.transactiontype.type == 'Deposit' %}
<a href="{{route('transactions.index','deposit')}}" class="btn-default btn">{{ trans('form.cancel') }}</a>
{% endif %}
{% if journal.transactiontype.type == 'Transfer' %}
<a href="{{route('transactions.index','transfers')}}" class="btn-default btn">{{ trans('form.cancel') }}</a>
{% endif %}
</p>
</div>
<div class="box-footer">
<input type="submit" name="submit" value="{{ trans('form.deletePermanently') }}" class="btn btn-danger pull-right" />
{% if journal.transactiontype.type == 'Withdrawal' %}
<a href="{{route('transactions.index','withdrawal')}}" class="btn-default btn">{{ trans('form.cancel') }}</a>
{% endif %}
{% if journal.transactiontype.type == 'Deposit' %}
<a href="{{route('transactions.index','deposit')}}" class="btn-default btn">{{ trans('form.cancel') }}</a>
{% endif %}
{% if journal.transactiontype.type == 'Transfer' %}
<a href="{{route('transactions.index','transfers')}}" class="btn-default btn">{{ trans('form.cancel') }}</a>
{% endif %}
</div>
</div>
</div>
</div>
</form>
{{ Form.close|raw }}
{% endblock %}

View File

@ -14,7 +14,7 @@
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<i class="fa fa-exclamation-circle"></i> {{ 'mandatoryFields'|_ }}
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
<!-- ALWAYS AVAILABLE -->
@ -53,7 +53,7 @@
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="box">
<div class="box-header with-border">
<i class="fa fa-smile-o"></i> {{ 'optionalFields'|_ }}
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
<!-- BUDGET ONLY WHEN CREATING A WITHDRAWAL -->
@ -78,11 +78,14 @@
<!-- panel for options -->
<div class="box">
<div class="box-header with-border">
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','transaction') }}
</div>
<div class="box-footer">
<button type="submit" class="pull-right btn btn-success">{{ ('update_' ~ what)|_ }}</button>
</div>
</div>
</div>
</div>
@ -90,9 +93,7 @@
<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-pencil"></i> {{ ('update_' ~ what)|_ }}
</button>
</p>
</div>
</div>

View File

@ -9,9 +9,11 @@
<div class="col-lg-12 col-sm-12 col-md-12">
<div class="box">
<div class="box-header with-border">
<i class="fa {{ subTitleIcon }}"></i> {{ subTitle }}
<h3 class="box-title">{{ subTitle }}</h3>
</div>
<div class="box-body table-responsive no-padding">
{% include 'list.journals' %}
</div>
{% include 'list.journals' %}
</div>
</div>
</div>

View File

@ -9,10 +9,10 @@
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="box">
<div class="box-header with-border">
<i class="fa fa-info-circle fa-fw"></i>
Metadata
<h3 class="box-title">Metadata</h3>
</div>
<table class="table table-striped table-bordered">
<div class="box-body table-responsive no-padding">
<table class="table table-hover sortable">
<tr>
<td>{{ trans('list.date') }}</td>
<td>{{ journal.date.formatLocalized(monthAndDayFormat) }}</td>
@ -66,6 +66,13 @@
</tr>
{% endif %}
</table>
</div>
<div class="box-footer">
<div class="pull-right">
<a class="btn btn-default" href="{{route('transactions.edit',journal.id)}}">{{ 'edit'|_ }}</a>
<a href="{{route('transactions.delete',journal.id)}}" class="btn btn-danger">{{ 'delete'|_ }}</a>
</div>
</div>
</div>
<!-- events, if present -->
{% if journal.piggyBankEvents|length > 0 %}
@ -84,25 +91,17 @@
{% for t in journal.transactions %}
<div class="box">
<div class="box-header with-border">
{% if t.account.accounttype.type == 'Asset account' %}
<i class="fa fa-money fa-fw"></i>
{% endif %}
{% if t.account.accounttype.type == 'Default account' %}
<i class="fa fa-money fa-fw"></i>
{% endif %}
{% if t.account.accounttype.type == 'Expense account' %}
<i class="fa fa-shopping-cart fa-fw"></i>
{% endif %}
{% if t.account.accounttype.type == 'Beneficiary account' %}
<i class="fa fa-shopping-cart fa-fw"></i>
{% endif %}
{% if t.account.accounttype.type == 'Revenue account' %}
<i class="fa fa-download fa-fw"></i>
{% endif %}
<a href="{{route('accounts.show',t.account.id)}}">{{ t.account.name }}</a> <small>({{ t.account.accounttype.type|_ }})</small>
<h3 class="box-title">{{ t.account.name }}</h3>
</div>
<table class="table table-striped table-bordered">
<table class="table table-hover sortable">
<tr>
<td>{{ 'account'|_ }}</td>
<td><a href="{{route('accounts.show',t.account.id)}}">{{ t.account.name }}</a></td>
</tr>
<tr>
<td>{{ 'account_type'|_ }}</td>
<td>{{ t.account.accounttype.type|_ }}</td>
</tr>
<tr>
<td>{{ 'amount'|_ }}</td>
<td>{{ t|formatTransaction }}</td>
@ -123,14 +122,6 @@
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="btn-group">
<a class="btn btn-default" href="{{route('transactions.edit',journal.id)}}"><i class="fa fa-fw fa-pencil"></i> {{ 'edit'|_ }}</a> <a href="{{route('transactions.delete',journal.id)}}" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> {{ 'delete'|_ }}</a>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="js/transactions.js"></script>