Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Some layout and content updates
James Coled1cf683f5792
diff --git a/app/Http/Requests/BillFormRequest.php b/app/Http/Requests/BillFormRequest.phpindex 2c9452cccb..f66c5db1b1 100644--- a/app/Http/Requests/BillFormRequest.php+++ b/app/Http/Requests/BillFormRequest.php@@ -33,8 +33,8 @@ class BillFormRequest extends Requestpublic function rules(){$nameRule = 'required|between:1,255|uniqueForUser:bills,name';- if(intval(Input::get('id')) > 0) {- $nameRule .= ','.intval(Input::get('id'));+ if (intval(Input::get('id')) > 0) {+ $nameRule .= ',' . intval(Input::get('id'));}$rules = [diff --git a/app/Models/Account.php b/app/Models/Account.phpindex 2c6c21002e..9c91fa403d 100644--- a/app/Models/Account.php+++ b/app/Models/Account.php@@ -4,7 +4,7 @@ use Illuminate\Database\Eloquent\Builder as EloquentBuilder;use Illuminate\Database\Eloquent\Model;use Illuminate\Database\Eloquent\SoftDeletes;use Watson\Validating\ValidatingTrait;-+use Crypt;/*** Class Account*@@ -18,7 +18,7 @@ class Account extends Model= ['user_id' => 'required|exists:users,id','account_type_id' => 'required|exists:account_types,id',- 'name' => 'required|between:1,100|uniqueForUser:accounts,name',+ 'name' => 'required|between:1,1024|uniqueForUser:accounts,name','active' => 'required|boolean'];@@ -41,6 +41,22 @@ class Account extends Model}+ /**+ * @param $value+ *+ * @return string+ */+ public function getNameAttribute($value)+ {+ if ($this->encrypted) {+ return Crypt::decrypt($value);+ }++ // @codeCoverageIgnoreStart+ return $value;+ // @codeCoverageIgnoreEnd+ }+/*** @return \Illuminate\Database\Eloquent\Relations\HasMany*/diff --git a/composer.lock b/composer.lockindex 535b49e4e9..ae11fb33b9 100644--- a/composer.lock+++ b/composer.lock@@ -4,7 +4,7 @@"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file","This file is @generated automatically"],- "hash": "16fc4f36aacc020097a22c4fe7ef7687",+ "hash": "1aaed0055d07325d7f417f2a6a7739bd","packages": [{"name": "classpreloader/classpreloader",@@ -2553,6 +2553,98 @@],"time": "2014-10-13 12:58:55"},+ {+ "name": "guzzle/guzzle",+ "version": "v3.9.2",+ "source": {+ "type": "git",+ "url": "https://github.com/guzzle/guzzle3.git",+ "reference": "54991459675c1a2924122afbb0e5609ade581155"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/54991459675c1a2924122afbb0e5609ade581155",+ "reference": "54991459675c1a2924122afbb0e5609ade581155",+ "shasum": ""+ },+ "require": {+ "ext-curl": "*",+ "php": ">=5.3.3",+ "symfony/event-dispatcher": "~2.1"+ },+ "replace": {+ "guzzle/batch": "self.version",+ "guzzle/cache": "self.version",+ "guzzle/common": "self.version",+ "guzzle/http": "self.version",+ "guzzle/inflection": "self.version",+ "guzzle/iterator": "self.version",+ "guzzle/log": "self.version",+ "guzzle/parser": "self.version",+ "guzzle/plugin": "self.version",+ "guzzle/plugin-async": "self.version",+ "guzzle/plugin-backoff": "self.version",+ "guzzle/plugin-cache": "self.version",+ "guzzle/plugin-cookie": "self.version",+ "guzzle/plugin-curlauth": "self.version",+ "guzzle/plugin-error-response": "self.version",+ "guzzle/plugin-history": "self.version",+ "guzzle/plugin-log": "self.version",+ "guzzle/plugin-md5": "self.version",+ "guzzle/plugin-mock": "self.version",+ "guzzle/plugin-oauth": "self.version",+ "guzzle/service": "self.version",+ "guzzle/stream": "self.version"+ },+ "require-dev": {+ "doctrine/cache": "~1.3",+ "monolog/monolog": "~1.0",+ "phpunit/phpunit": "3.7.*",+ "psr/log": "~1.0",+ "symfony/class-loader": "~2.1",+ "zendframework/zend-cache": "2.*,<2.3",+ "zendframework/zend-log": "2.*,<2.3"+ },+ "type": "library",+ "extra": {+ "branch-alias": {+ "dev-master": "3.9-dev"+ }+ },+ "autoload": {+ "psr-0": {+ "Guzzle": "src/",+ "Guzzle\\Tests": "tests/"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "authors": [+ {+ "name": "Michael Dowling",+ "email": "[email protected]",+ "homepage": "https://github.com/mtdowling"+ },+ {+ "name": "Guzzle Community",+ "homepage": "https://github.com/guzzle/guzzle/contributors"+ }+ ],+ "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",+ "homepage": "http://guzzlephp.org/",+ "keywords": [+ "client",+ "curl",+ "framework",+ "http",+ "http client",+ "rest",+ "web service"+ ],+ "time": "2014-08-11 04:32:36"+ },{"name": "maximebf/debugbar","version": "v1.10.4",@@ -3198,6 +3290,74 @@],"time": "2014-10-03 05:12:11"},+ {+ "name": "satooshi/php-coveralls",+ "version": "v0.6.1",+ "source": {+ "type": "git",+ "url": "https://github.com/satooshi/php-coveralls.git",+ "reference": "dd0df95bd37a7cf5c5c50304dfe260ffe4b50760"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/dd0df95bd37a7cf5c5c50304dfe260ffe4b50760",+ "reference": "dd0df95bd37a7cf5c5c50304dfe260ffe4b50760",+ "shasum": ""+ },+ "require": {+ "ext-curl": "*",+ "ext-json": "*",+ "ext-simplexml": "*",+ "guzzle/guzzle": ">=3.0",+ "php": ">=5.3",+ "psr/log": "1.0.0",+ "symfony/config": ">=2.0",+ "symfony/console": ">=2.0",+ "symfony/stopwatch": ">=2.2",+ "symfony/yaml": ">=2.0"+ },+ "require-dev": {+ "apigen/apigen": "2.8.*@stable",+ "pdepend/pdepend": "dev-master",+ "phpmd/phpmd": "dev-master",+ "phpunit/php-invoker": ">=1.1.0,<1.2.0",+ "phpunit/phpunit": "3.7.*@stable",+ "sebastian/finder-facade": "dev-master",+ "sebastian/phpcpd": "1.4.*@stable",+ "squizlabs/php_codesniffer": "1.4.*@stable",+ "theseer/fdomdocument": "dev-master"+ },+ "bin": [+ "composer/bin/coveralls"+ ],+ "type": "library",+ "autoload": {+ "psr-0": {+ "Contrib\\Component": "src/",+ "Contrib\\Bundle": "src/"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "authors": [+ {+ "name": "Kitamura Satoshi",+ "email": "[email protected]",+ "homepage": "https://www.facebook.com/satooshi.jp"+ }+ ],+ "description": "PHP client library for Coveralls API",+ "homepage": "https://github.com/satooshi/php-coveralls",+ "keywords": [+ "ci",+ "coverage",+ "github",+ "test"+ ],+ "time": "2013-05-04 08:07:33"+ },{"name": "sebastian/comparator","version": "1.1.1",@@ -3619,6 +3779,101 @@"homepage": "http://symfony.com","time": "2015-01-05 14:28:40"},+ {+ "name": "symfony/config",+ "version": "v2.6.4",+ "target-dir": "Symfony/Component/Config",+ "source": {+ "type": "git",+ "url": "https://github.com/symfony/Config.git",+ "reference": "a9f781ba1221067d1f07c8cec0bc50f81b8d7408"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/symfony/Config/zipball/a9f781ba1221067d1f07c8cec0bc50f81b8d7408",+ "reference": "a9f781ba1221067d1f07c8cec0bc50f81b8d7408",+ "shasum": ""+ },+ "require": {+ "php": ">=5.3.3",+ "symfony/filesystem": "~2.3"+ },+ "type": "library",+ "extra": {+ "branch-alias": {+ "dev-master": "2.6-dev"+ }+ },+ "autoload": {+ "psr-0": {+ "Symfony\\Component\\Config\\": ""+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "authors": [+ {+ "name": "Symfony Community",+ "homepage": "http://symfony.com/contributors"+ },+ {+ "name": "Fabien Potencier",+ "email": "[email protected]"+ }+ ],+ "description": "Symfony Config Component",+ "homepage": "http://symfony.com",+ "time": "2015-01-21 20:57:55"+ },+ {+ "name": "symfony/stopwatch",+ "version": "v2.6.4",+ "target-dir": "Symfony/Component/Stopwatch",+ "source": {+ "type": "git",+ "url": "https://github.com/symfony/Stopwatch.git",+ "reference": "e8da5286132ba75ce4b4275fbf0f4cd369bfd71c"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/e8da5286132ba75ce4b4275fbf0f4cd369bfd71c",+ "reference": "e8da5286132ba75ce4b4275fbf0f4cd369bfd71c",+ "shasum": ""+ },+ "require": {+ "php": ">=5.3.3"+ },+ "type": "library",+ "extra": {+ "branch-alias": {+ "dev-master": "2.6-dev"+ }+ },+ "autoload": {+ "psr-0": {+ "Symfony\\Component\\Stopwatch\\": ""+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "authors": [+ {+ "name": "Symfony Community",+ "homepage": "http://symfony.com/contributors"+ },+ {+ "name": "Fabien Potencier",+ "email": "[email protected]"+ }+ ],+ "description": "Symfony Stopwatch Component",+ "homepage": "http://symfony.com",+ "time": "2015-01-03 08:01:59"+ },{"name": "symfony/yaml","version": "v2.6.4",diff --git a/database/migrations/2014_06_27_163259_create_accounts_table.php b/database/migrations/2014_06_27_163259_create_accounts_table.phpindex 59c3cd4682..afe4f52999 100644--- a/database/migrations/2014_06_27_163259_create_accounts_table.php+++ b/database/migrations/2014_06_27_163259_create_accounts_table.php@@ -36,7 +36,7 @@ class CreateAccountsTable extends Migration$table->softDeletes();$table->integer('user_id')->unsigned();$table->integer('account_type_id')->unsigned();- $table->string('name', 100);+ $table->string('name', 1024);$table->boolean('active');// connect accounts to usersdiff --git a/database/migrations/2015_02_27_210653_changes_for_v332.php b/database/migrations/2015_02_27_210653_changes_for_v332.phpnew file mode 100644index 0000000000..f8f464a363--- /dev/null+++ b/database/migrations/2015_02_27_210653_changes_for_v332.php@@ -0,0 +1,45 @@+<?php++use Illuminate\Database\Schema\Blueprint;+use Illuminate\Database\Migrations\Migration;++/**+ * Class ChangesForV332+ */+class ChangesForV332 extends Migration {++ /**+ * Run the migrations.+ *+ * @return void+ */+ public function up()+ {+ Schema::table(+ 'transaction_journals', function (Blueprint $table) {+ $table->boolean('encrypted');++ }+ );++ Schema::table(+ 'accounts', function (Blueprint $table) {+ $table->boolean('encrypted');++ }+ );+++ }++ /**+ * Reverse the migrations.+ *+ * @return void+ */+ public function down()+ {+ //+ }++}diff --git a/database/seeds/TestDataSeeder.php b/database/seeds/TestDataSeeder.phpindex 35bd3d8d9f..dc749f7788 100644--- a/database/seeds/TestDataSeeder.php+++ b/database/seeds/TestDataSeeder.php@@ -279,7 +279,7 @@ class TestDataSeeder extends Seeder);// and some events!PiggyBankEvent::create(['piggy_bank_id' => $newCamera->id, 'date' => $this->som, 'amount' => 100]);- PiggyBankRepetition::create(['piggy_bank_id' => $newCamera->id, 'startdate' => $this->som, 'targetdate' => null, 'currentamount' => 100]);+ //PiggyBankRepetition::create(['piggy_bank_id' => $newCamera->id, 'startdate' => $this->som, 'targetdate' => null, 'currentamount' => 100]);$newClothes = PiggyBank::create(@@ -301,7 +301,7 @@ class TestDataSeeder extends Seeder);PiggyBankEvent::create(['piggy_bank_id' => $newClothes->id, 'date' => $this->som, 'amount' => 100]);- PiggyBankRepetition::create(['piggy_bank_id' => $newClothes->id, 'startdate' => $this->som, 'targetdate' => $end, 'currentamount' => 100]);+ //PiggyBankRepetition::create(['piggy_bank_id' => $newClothes->id, 'startdate' => $this->som, 'targetdate' => $end, 'currentamount' => 100]);// weekly reminder piggy bank$weekly = PiggyBank::create(@@ -321,7 +321,7 @@ class TestDataSeeder extends Seeder'order' => 0,]);- PiggyBankRepetition::create(['piggy_bank_id' => $weekly->id, 'startdate' => $this->som, 'targetdate' => $next, 'currentamount' => 0]);+ //PiggyBankRepetition::create(['piggy_bank_id' => $weekly->id, 'startdate' => $this->som, 'targetdate' => $next, 'currentamount' => 0]);}/**diff --git a/resources/views/layouts/guest.blade.php b/resources/views/layouts/guest.blade.phpindex cdc201e0c4..38434b2a04 100644--- a/resources/views/layouts/guest.blade.php+++ b/resources/views/layouts/guest.blade.php@@ -8,8 +8,10 @@<title>Firefly III</title><link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css" media="all" />+ <!-- <link rel="stylesheet" href="css/metisMenu.min.css" type="text/css" media="all" /> -->+ <!-- new css for SB admin --><link rel="stylesheet" href="css/metisMenu.min.css" type="text/css" media="all" />- <link rel="stylesheet" href="css/sb.css" type="text/css" media="all" />+ <link rel="stylesheet" href="css/sb-admin-2.css" type="text/css" media="all" /><link rel="stylesheet" href="font-awesome/css/font-awesome.min.css" type="text/css" media="all" /><!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->@@ -44,5 +46,9 @@</div><script type="text/javascript" src="js/jquery-2.1.3.min.js"></script><script type="text/javascript" src="bootstrap/js/bootstrap.min.js"></script>+<!-- new js for sb admin -->+<script type="text/javascript" src="js/metisMenu.min.js"></script>+<script type="text/javascript" src="js/sb-admin-2.js"></script>+</body></html>diff --git a/resources/views/transactions/show.blade.php b/resources/views/transactions/show.blade.phpindex 345f9b8b0d..4007a037c3 100644--- a/resources/views/transactions/show.blade.php+++ b/resources/views/transactions/show.blade.php@@ -7,7 +7,6 @@<div class="panel-heading">Metadata</div>- <div class="panel-body"><table class="table table-striped table-bordered"><tr><td>Date</td>@@ -45,7 +44,6 @@@endforeach</table>- </div></div><!-- events, if present -->@if(count($journal->piggyBankEvents) > 0)@@ -100,7 +98,6 @@<div class="panel-heading"><a href="{{route('accounts.show',$t->account->id)}}">{{{$t->account->name}}}</a><br /><small>{{{$t->account->accounttype->description}}}</small></div>- <div class="panel-body"><table class="table table-striped table-bordered"><tr><td>Amount</td>@@ -117,7 +114,6 @@</tr>@endif</table>- </div></div>@endforeach</div>