Skip to content

Firefly III: a personal finances manager

Fixed some views. [skip ci]

James Colead8a9717d1a0
diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php
index 0ac8a4e580..a1e6ac294d 100644
--- a/app/Http/Controllers/CurrencyController.php
+++ b/app/Http/Controllers/CurrencyController.php
@@ -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'));
}
/**
diff --git a/app/Http/breadcrumbs.php b/app/Http/breadcrumbs.php
index faf3f118ca..70126b332d 100644
--- a/app/Http/breadcrumbs.php
+++ b/app/Http/breadcrumbs.php
@@ -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');
diff --git a/resources/twig/categories/create.twig b/resources/twig/categories/create.twig
index 15435fe5aa..aa9b3967f5 100644
--- a/resources/twig/categories/create.twig
+++ b/resources/twig/categories/create.twig
@@ -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 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 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="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>
+ <div class="box-footer">
+ <button type="submit" class="btn pull-right btn-success">
+ Store new category
+ </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" class="btn btn-lg btn-success">
- <i class="fa fa-plus-circle"></i> Store new category
- </button>
- </p>
</div>
-</div>
-
-</form>
+ {{ Form.close|raw }}
{% endblock %}
diff --git a/resources/twig/currency/create.twig b/resources/twig/currency/create.twig
index 72575e2f4c..956febad3c 100644
--- a/resources/twig/currency/create.twig
+++ b/resources/twig/currency/create.twig
@@ -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 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 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">
- <i class="fa fa-bolt"></i> {{ 'options'|_ }}
+ <!-- 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>
- <div class="box-body">
- {{ ExpandedForm.optionsList('create','currency') }}
- </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 currency
- </button>
- </p>
- </div>
-</div>
-</form>
+ {{ Form.close|raw }}
{% endblock %}
diff --git a/resources/twig/currency/delete.twig b/resources/twig/currency/delete.twig
index 1c51ca2dec..7097eb7573 100644
--- a/resources/twig/currency/delete.twig
+++ b/resources/twig/currency/delete.twig
@@ -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 %}
diff --git a/resources/twig/currency/edit.twig b/resources/twig/currency/edit.twig
index 30538b8bc0..5444860dc2 100644
--- a/resources/twig/currency/edit.twig
+++ b/resources/twig/currency/edit.twig
@@ -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}) }}
+ <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>
- <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">
- <i class="fa fa-bolt"></i> {{ 'options'|_ }}
- </div>
- <div class="box-body">
- {{ ExpandedForm.optionsList('update','currency') }}
+ <!-- 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>
-<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 %}
diff --git a/resources/twig/currency/index.twig b/resources/twig/currency/index.twig
index b269645a11..8449d1a9fa 100644
--- a/resources/twig/currency/index.twig
+++ b/resources/twig/currency/index.twig
@@ -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>
diff --git a/resources/twig/errors/404.twig b/resources/twig/errors/404.twig
new file mode 100644
index 0000000000..00a360d391
--- /dev/null
+++ b/resources/twig/errors/404.twig
@@ -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>
\ No newline at end of file
diff --git a/resources/twig/layout/default.twig b/resources/twig/layout/default.twig
index b2ce742226..2b9c8ca942 100644
--- a/resources/twig/layout/default.twig
+++ b/resources/twig/layout/default.twig
@@ -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 %}