mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Made it almost to the accounts.
This commit is contained in:
		
							
								
								
									
										61
									
								
								resources/twig/accounts/create.twig
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								resources/twig/accounts/create.twig
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,61 @@ | ||||
| {% extends "./layout/default.twig" %} | ||||
| {% block content %} | ||||
|     {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, what)  }} | ||||
|     <form action="{{ route('accounts.store') }}" method="post" id="store" class="form-horizontal"> | ||||
|         <input type="hidden" name="what" value="{{ what }}" /> | ||||
|  | ||||
| <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')  }} | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|  | ||||
|     <div class="col-lg-6 col-md-6 col-sm-12"> | ||||
|  | ||||
|         @if(what == 'asset') | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa fa-smile-o"></i> Optional fields | ||||
|             </div> | ||||
|             <div class="panel-body"> | ||||
|  | ||||
|                     {{ ExpandedForm.balance('openingBalance') }} | ||||
|                     {{ ExpandedForm.date('openingBalanceDate', date('Y-m-d')) }} | ||||
|                     {{ ExpandedForm.select('accountRole',Config.get('firefly.accountRoles'), null, {'helpText' : 'Any extra options resulting from your choice can be set later.'}) }} | ||||
|                     {{ ExpandedForm.balance('virtualBalance') }} | ||||
|  | ||||
|             </div> | ||||
|         </div> | ||||
|         @endif | ||||
|  | ||||
|         <!-- 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','account') }} | ||||
|             </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 {{ what }} account | ||||
|             </button> | ||||
|         </p> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| </form> | ||||
| --> | ||||
| {% endblock %} | ||||
							
								
								
									
										36
									
								
								resources/twig/accounts/delete.twig
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								resources/twig/accounts/delete.twig
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | ||||
| {% extends "./layout/default.twig" %} | ||||
| {% block content %} | ||||
| {!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $account) !!} | ||||
| {!! Form::open(['class' => 'form-horizontal','id' => 'destroy','url' => route('accounts.destroy',$account->id)]) !!} | ||||
| <div class="row"> | ||||
|     <div class="col-lg-6 col-md-12 col-sm-12"> | ||||
|         <div class="panel panel-red"> | ||||
|             <div class="panel-heading"> | ||||
|                 Delete account "{{{$account->name}}}" | ||||
|             </div> | ||||
|             <div class="panel-body"> | ||||
|                 <p> | ||||
|                 Are you sure that you want to delete the {{strtolower($account->accountType->type)}} "{{$account->name}}"? | ||||
|                 </p> | ||||
|  | ||||
|                 @if($account->transactions()->count() > 0) | ||||
|                     <p class="text-danger"> | ||||
|                         {{ucfirst($account->accountType->type)}} "{{{$account->name}}}" still has {{$account->transactions()->count()}} transaction(s) associated to it. These will be deleted as well. | ||||
|                     </p> | ||||
|                 @endif | ||||
|                 @if($account->piggyBanks()->count() > 0) | ||||
|                     <p class="text-danger"> | ||||
|                         {{ucfirst($account->accountType->type)}} "{{{$account->name}}}" still has {{$account->piggyBanks()->count()}} piggy bank(s) associated to it. These will be deleted as well. | ||||
|                     </p> | ||||
|                 @endif | ||||
|                 <p> | ||||
|                     <button type="submit" class="btn btn-default btn-danger">Delete permanently</button> | ||||
|                     <a href="{{URL::previous()}}" class="btn-default btn">Cancel</a > | ||||
|                 </p> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| {!! Form::close() !!} | ||||
| {% endblock %} | ||||
							
								
								
									
										72
									
								
								resources/twig/accounts/edit.twig
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								resources/twig/accounts/edit.twig
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,72 @@ | ||||
| {% extends "./layout/default.twig" %} | ||||
| {% block content %} | ||||
| {!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $account) !!} | ||||
| {!! Form::model($account, ['class' => 'form-horizontal','id' => 'update','url' => route('accounts.update',$account->id)]) !!} | ||||
|  | ||||
| <input type="hidden" name="id" value="{{$account->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') !!} | ||||
|             </div> | ||||
|         </div> | ||||
|  | ||||
|     </div> | ||||
|     <div class="col-lg-6 col-md-6 col-sm-12"> | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa fa-smile-o"></i> Optional fields | ||||
|             </div> | ||||
|             <div class="panel-body"> | ||||
|                 @if($account->accounttype->type == 'Default account' || $account->accounttype->type == 'Asset account') | ||||
|                     {!! ExpandedForm::balance('openingBalance',null, ['currency' => $openingBalance ? $openingBalance->transactionCurrency : null]) !!} | ||||
|                     {!! ExpandedForm::date('openingBalanceDate') !!} | ||||
|                     {!! ExpandedForm::select('accountRole',Config::get('firefly.accountRoles')) !!} | ||||
|                     {!! ExpandedForm::balance('virtualBalance',null) !!} | ||||
|                     {!! Form::hidden('id',$account->id) !!} | ||||
|                 @endif | ||||
|                 {!! ExpandedForm::checkbox('active','1') !!} | ||||
|             </div> | ||||
|         </div> | ||||
|  | ||||
|         <!-- panel for credit card options --> | ||||
|         @if(Session::get('preFilled')['accountRole'] == 'ccAsset') | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa fa-credit-card"></i> Credit card options | ||||
|             </div> | ||||
|             <div class="panel-body"> | ||||
|                 {!! ExpandedForm::select('ccType',Config::get('firefly.ccTypes')) !!} | ||||
|                 {!! ExpandedForm::date('ccMonthlyPaymentDate',null,['helpText' => 'Select any year and any month, it will be ignored anway. Only the day of the month is relevant.']) !!} | ||||
|             </div> | ||||
|         </div> | ||||
|         @endif | ||||
|  | ||||
|         <!-- 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','account') !!} | ||||
|             </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"> | ||||
|                 Update account | ||||
|             </button> | ||||
|         </p> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| {!! Form::close() !!} | ||||
| {% endblock %} | ||||
							
								
								
									
										46
									
								
								resources/twig/accounts/index.twig
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								resources/twig/accounts/index.twig
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| {% extends "./layout/default.twig" %} | ||||
| {% block content %} | ||||
| {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, what)  }} | ||||
| <div class="row"> | ||||
|     <div class="col-lg-12 col-md-12 col-sm-12"> | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa {{ subTitleIcon }}"></i> {{ subTitle}} | ||||
|  | ||||
|                 <!-- ACTIONS MENU --> | ||||
|                 <div class="pull-right"> | ||||
|                     <div class="btn-group"> | ||||
|                         <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"> | ||||
|                             Actions | ||||
|                             <span class="caret"></span> | ||||
|                         </button> | ||||
|                         <ul class="dropdown-menu pull-right" role="menu"> | ||||
|                             <li><a href="{{route('accounts.create', what)}}"><i class="fa fa-plus fa-fw"></i> New {{ what }} account</a></li> | ||||
|                         </ul> | ||||
|                     </div> | ||||
|                 </div> | ||||
|  | ||||
|  | ||||
|             </div> | ||||
|             {% include 'list/accounts.twig' %} | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
| {% endblock %} | ||||
|  | ||||
| {% block styles %} | ||||
|     <link rel="stylesheet" href="css/bootstrap-sortable.css" type="text/css" media="all" /> | ||||
| {% endblock %} | ||||
|  | ||||
| {% block scripts %} | ||||
| <script type="text/javascript"> | ||||
|     var what = '{{ what }}'; | ||||
| </script> | ||||
|  | ||||
| <!-- load the libraries and scripts necessary for Google Charts: --> | ||||
| <script type="text/javascript" src="https://www.google.com/jsapi"></script> | ||||
| <script type="text/javascript" src="js/gcharts.options.js"></script> | ||||
| <script type="text/javascript" src="js/gcharts.js"></script> | ||||
| <script type="text/javascript" src="js/bootstrap-sortable.js"></script> | ||||
| <script type="text/javascript" src="js/accounts.js"></script> | ||||
| {% endblock %} | ||||
							
								
								
									
										60
									
								
								resources/twig/accounts/show.twig
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								resources/twig/accounts/show.twig
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| {% extends "./layout/default.twig" %} | ||||
| {% block content %} | ||||
| {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, account) }} | ||||
|     <div class="row"> | ||||
|     <div class="col-lg-12 col-md-12 col-sm-12"> | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa fa-fw {{ subTitleIcon }} fa-fw"></i> {{ account.name }} | ||||
|  | ||||
|  | ||||
|                 <!-- ACTIONS MENU --> | ||||
|                 <div class="pull-right"> | ||||
|                     <div class="btn-group"> | ||||
|                         <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"> | ||||
|                             Actions | ||||
|                             <span class="caret"></span> | ||||
|                         </button> | ||||
|                         <ul class="dropdown-menu pull-right" role="menu"> | ||||
|                             <li><a href="{{route('accounts.edit', account.id)}}"><i class="fa fa-pencil fa-fw"></i> Edit</a></li> | ||||
|                             <li><a href="{{route('accounts.delete', account.id)}}"><i class="fa fa-trash fa-fw"></i> Delete</a></li> | ||||
|                         </ul> | ||||
|                     </div> | ||||
|                 </div> | ||||
|             </div> | ||||
|             <div class="panel-body"> | ||||
|                 <div id="overview-chart"></div> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
|  | ||||
| <div class="row"> | ||||
|     <div class="col-lg-12 col-md-12 col-sm-12"> | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa fa-repeat fa-fw"></i> Transactions | ||||
|             </div> | ||||
|             <div class="panel-body"> | ||||
|                 {% include 'list/journals.twig' with {sorting:true} %} | ||||
|             </div> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
|  | ||||
|  | ||||
| {% endblock %} | ||||
|  | ||||
| {% block scripts %} | ||||
| <script type="text/javascript"> | ||||
|     var accountID = {{ account.id }}; | ||||
| </script> | ||||
| <!-- load the libraries and scripts necessary for Google Charts: --> | ||||
| <script type="text/javascript" src="https://www.google.com/jsapi"></script> | ||||
| <script type="text/javascript" src="js/gcharts.options.js"></script> | ||||
| <script type="text/javascript" src="js/gcharts.js"></script> | ||||
| <script src="js/jquery-ui.min.js" type="text/javascript"></script> | ||||
| <script src="js/accounts.js" type="text/javascript"></script> | ||||
|  | ||||
| {% endblock %} | ||||
		Reference in New Issue
	
	Block a user