Fixed some views. [skip ci]

This commit is contained in:
James Cole 2015-06-21 15:09:10 +02:00
parent 9d6ea6b2f6
commit ad8a9717d1
9 changed files with 205 additions and 134 deletions

View File

@ -88,9 +88,10 @@ class CurrencyController extends Controller
Session::put('currency.delete.url', URL::previous());
Session::flash('gaEventCategory', 'currency');
Session::flash('gaEventAction', 'delete');
$subTitle = trans('form.delete_currency', ['name' => $currency->name]);
return view('currency.delete', compact('currency'));
return view('currency.delete', compact('currency', 'subTitle'));
}
/**

View File

@ -170,6 +170,13 @@ Breadcrumbs::register(
}
);
Breadcrumbs::register(
'currency.create', function (Generator $breadcrumbs) {
$breadcrumbs->parent('currency.index');
$breadcrumbs->push(trans('firefly.create_currency'), route('currency.create'));
}
);
Breadcrumbs::register(
'currency.edit', function (Generator $breadcrumbs, TransactionCurrency $currency) {
$breadcrumbs->parent('currency.index');

View File

@ -7,43 +7,37 @@
{% block content %}
{{ Form.open({'class' : 'form-horizontal','id' : 'store','url' : route('categories.store')}) }}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('name') }}
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12">
<!-- panel for options -->
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('create','category') }}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('name') }}
</div>
</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 category
</button>
</p>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12">
</form>
<!-- panel for options -->
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('create','category') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
Store new category
</button>
</div>
</div>
</div>
</div>
{{ Form.close|raw }}
{% endblock %}

View File

@ -6,43 +6,39 @@
{% block content %}
{{ 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="box box-primary">
<div class="box-header with-border">
<i class="fa {{ subTitleIcon }}"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="box-body">
{{ ExpandedForm.text('name',null,{'maxlength' : 48}) }}
{{ ExpandedForm.text('symbol',null,{'maxlength': 8}) }}
{{ ExpandedForm.text('code',null,{'maxlength' : 3}) }}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.text('name',null,{'maxlength' : 48}) }}
{{ ExpandedForm.text('symbol',null,{'maxlength': 8}) }}
{{ ExpandedForm.text('code',null,{'maxlength' : 3}) }}
</div>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="col-lg-6 col-md-6 col-sm-12">
<!-- panel for options -->
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('create','currency') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
Store new currency
</button>
</div>
</div>
<!-- panel for options -->
<div class="box">
<div class="box-header with-border">
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="box-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>
{{ Form.close|raw }}
{% endblock %}

View File

@ -11,8 +11,7 @@
<div class="col-lg-6 col-lg-offset-3 col-md-12 col-sm-12">
<div class="box box-danger">
<div class="box-header with-border">
<i class="fa fa-exclamation-circle"></i>
{{ trans('form.delete_currency', {'name': currency.name}) }}
<h3 class="box-title">{{ trans('form.delete_currency', {'name': currency.name}) }}</h3>
</div>
<div class="box-body">
<p class="text-danger">
@ -21,15 +20,15 @@
<p>
{{ trans('form.currency_areYouSure', {'name': currency.name}) }}
</p>
<p>
<input type="submit" name="submit" value="{{ trans('form.deletePermanently') }}" class="btn btn-danger" />
<a href="{{ URL.previous }}" class="btn-default btn">{{ trans('form.cancel') }}</a >
</p>
</div>
<div class="box-footer">
<input type="submit" name="submit" value="{{ trans('form.deletePermanently') }}" class="btn btn-danger pull-right" />
<a href="{{ URL.previous }}" class="btn-default btn">{{ trans('form.cancel') }}</a >
</div>
</div>
</div>
</div>
</form>
{{ Form.close|raw }}
{% endblock %}

View File

@ -7,43 +7,39 @@
{% block content %}
{{ 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="box box-primary">
<div class="box-header with-border">
<i class="fa {{ subTitleIcon }}"></i> {{ 'mandatoryFields'|_ }}
</div>
<div class="box-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="box">
<div class="box-header with-border">
<i class="fa fa-bolt"></i> {{ 'options'|_ }}
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','currency') }}
<input type="hidden" name="id" value="{{ currency.id }}"/>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-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="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','currency') }}
</div>
<div class="box-footer">
<button type="submit" class="btn btn-success pull-right">
Update currency
</button>
</div>
</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>
{{ Form.close|raw }}
{% endblock %}

View File

@ -9,42 +9,45 @@
<div class="col-lg-12 col-sm-12 col-md-12">
<div class="box">
<div class="box-header with-border">
Currencies
<h3 class="box-title">Currencies</h3>
</div>
<div class="box-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">
{% if currencies|length > 0 %}
<table class="table table-hover">
<thead>
<tr>
<th>&nbsp;</th>
<th colspan="2">Currency</th>
</tr>
</thead>
<tbody>
{% for currency in currencies %}
<tr>
<th>&nbsp;</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>
<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-danger" 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>
<a class="btn btn-info btn-xs" href="{{ route('currency.default',currency.id) }}">make default</a>
{% endif %}
</td>
</tr>
</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>
</tbody>
</table>
{% endif %}
</div>
<div class="box-footer">
<a class="btn btn-success pull-right" href="{{ route('currency.create') }}">Add another currency</a>
</div>
</div>
</div>

View File

@ -0,0 +1,74 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="robots" content="noindex,nofollow" />
<style>
/* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html */
html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}
html { background: #eee; padding: 10px }
img { border: 0; }
#sf-resetcontent { width:970px; margin:0 auto; }
.sf-reset { font: 11px Verdana, Arial, sans-serif; color: #333 }
.sf-reset .clear { clear:both; height:0; font-size:0; line-height:0; }
.sf-reset .clear_fix:after { display:block; height:0; clear:both; visibility:hidden; }
.sf-reset .clear_fix { display:inline-block; }
.sf-reset * html .clear_fix { height:1%; }
.sf-reset .clear_fix { display:block; }
.sf-reset, .sf-reset .block { margin: auto }
.sf-reset abbr { border-bottom: 1px dotted #000; cursor: help; }
.sf-reset p { font-size:14px; line-height:20px; color:#868686; padding-bottom:20px }
.sf-reset strong { font-weight:bold; }
.sf-reset a { color:#6c6159; cursor: default; }
.sf-reset a img { border:none; }
.sf-reset a:hover { text-decoration:underline; }
.sf-reset em { font-style:italic; }
.sf-reset h1, .sf-reset h2 { font: 20px Georgia, "Times New Roman", Times, serif }
.sf-reset .exception_counter { background-color: #fff; color: #333; padding: 6px; float: left; margin-right: 10px; float: left; display: block; }
.sf-reset .exception_title { margin-left: 3em; margin-bottom: 0.7em; display: block; }
.sf-reset .exception_message { margin-left: 3em; display: block; }
.sf-reset .traces li { font-size:12px; padding: 2px 4px; list-style-type:decimal; margin-left:20px; }
.sf-reset .block { background-color:#FFFFFF; padding:10px 28px; margin-bottom:20px;
-webkit-border-bottom-right-radius: 16px;
-webkit-border-bottom-left-radius: 16px;
-moz-border-radius-bottomright: 16px;
-moz-border-radius-bottomleft: 16px;
border-bottom-right-radius: 16px;
border-bottom-left-radius: 16px;
border-bottom:1px solid #ccc;
border-right:1px solid #ccc;
border-left:1px solid #ccc;
}
.sf-reset .block_exception { background-color:#ddd; color: #333; padding:20px;
-webkit-border-top-left-radius: 16px;
-webkit-border-top-right-radius: 16px;
-moz-border-radius-topleft: 16px;
-moz-border-radius-topright: 16px;
border-top-left-radius: 16px;
border-top-right-radius: 16px;
border-top:1px solid #ccc;
border-right:1px solid #ccc;
border-left:1px solid #ccc;
overflow: hidden;
word-wrap: break-word;
}
.sf-reset a { background:none; color:#868686; text-decoration:none; }
.sf-reset a:hover { background:none; color:#313131; text-decoration:underline; }
.sf-reset ol { padding: 10px 0; }
.sf-reset h1 { background-color:#FFFFFF; padding: 15px 28px; margin-bottom: 20px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
border: 1px solid #ccc;
}
</style>
</head>
<body>
<div id="sf-resetcontent" class="sf-reset">
<h1>Sorry, the page you are looking for could not be found.</h1>
</div>
</body>
</html>

View File

@ -106,11 +106,12 @@
<section class="content-header">
{% include('partials/page-header.twig') %}
{% block breadcrumbs %}{% endblock %}
</section>
<!-- Main content -->
<section class="content">
{% include('partials/flashes.twig') %}
<!-- actual content -->
{% block content %}{% endblock %}