mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
New resources mostly.
This commit is contained in:
129
resources/views/index.blade.php
Normal file
129
resources/views/index.blade.php
Normal file
@@ -0,0 +1,129 @@
|
||||
@extends('layouts.default')
|
||||
@section('content')
|
||||
{{-- Breadcrumbs::renderIfExists() --}}
|
||||
@if($count == 0)
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<p class="lead">Welcome to Firefly III.</p>
|
||||
|
||||
<p>
|
||||
Create a new asset account to get started.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<h2><a href="{{route('accounts.create','asset')}}">Start from scratch</a></h2>
|
||||
</div>
|
||||
@else
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-12 col-sm-12">
|
||||
<!-- ACCOUNTS -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-credit-card fa-fw"></i> <a href="#">Your accounts</a>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="accounts-chart"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- BUDGETS -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-tasks fa-fw"></i> <a href="{{route('budgets.index')}}">Budgets and spending</a>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="budgets-chart"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- CATEGORIES -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-bar-chart fa-fw"></i> <a href="{{route('categories.index')}}">Categories</a>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="categories-chart"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-line-chart"></i> Savings
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
(todo)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-6 col-sm-12">
|
||||
<!-- time based navigation -->
|
||||
@include('partials.date_nav')
|
||||
|
||||
<!-- REMINDERS -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-calendar-o"></i> Bills
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="bills-chart"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- TRANSACTIONS -->
|
||||
@foreach($transactions as $data)
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-money fa-fw"></i>
|
||||
<a href="{{route('accounts.show',$data[1]->id)}}">{{{$data[1]->name}}}</a>
|
||||
|
||||
|
||||
<!-- 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('transactions.create','withdrawal')}}?account_id={{{$data[1]->id}}}"><i class="fa fa-long-arrow-left fa-fw"></i> New withdrawal</a></li>
|
||||
<li><a href="{{route('transactions.create','deposit')}}?account_id={{{$data[1]->id}}}"><i class="fa fa-long-arrow-right fa-fw"></i> New deposit</a></li>
|
||||
<li><a href="{{route('transactions.create','transfer')}}?account_from_id={{{$data[1]->id}}}"><i class="fa fa-arrows-h fa-fw"></i> New transfer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
@include('list.journals-tiny',['transactions' => $data[0],'account' => $data[1]])
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
@stop
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var currencyCode = '{{-- Amount::getCurrencyCode() --}}';
|
||||
</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/index.js"></script>
|
||||
@stop
|
||||
@section('styles')
|
||||
@stop
|
116
resources/views/layouts/default.blade.php
Normal file
116
resources/views/layouts/default.blade.php
Normal file
@@ -0,0 +1,116 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<?php $r = Route::getCurrentRoute()->getName();?>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<base href="{{URL::route('index')}}/">
|
||||
<title>Firefly
|
||||
@if(isset($title) && $title != 'Firefly')
|
||||
// {{{$title}}}
|
||||
@endif
|
||||
@if(isset($subTitle))
|
||||
// {{{$subTitle}}}
|
||||
@endif
|
||||
</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" />
|
||||
<link rel="stylesheet" href="css/sb.css" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto2" type="text/css" media="all" />
|
||||
@yield('styles')
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="/android-chrome-manifest.json">
|
||||
<meta name="msapplication-TileColor" content="#2b5797">
|
||||
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<!-- {{App::environment()}} -->
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
|
||||
@include('partials.menu')
|
||||
|
||||
<div id="page-wrapper">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
@if(isset($mainTitleIcon))
|
||||
<i class="fa {{{$mainTitleIcon}}}"></i>
|
||||
@endif
|
||||
{{$title or '(no title)'}}
|
||||
@if(isset($subTitle))
|
||||
<small>
|
||||
@if(isset($subTitleIcon))
|
||||
<i class="fa {{{$subTitleIcon}}}"></i>
|
||||
@endif
|
||||
{{$subTitle}}
|
||||
</small>
|
||||
@endif
|
||||
<small class="pull-right"><a href="#" id="help" data-route="{{{Route::getCurrentRoute()->getName()}}}"><i data-route="{{{Route::getCurrentRoute()->getName()}}}" class="fa fa-question-circle"></i></a></small>
|
||||
</h1>
|
||||
|
||||
</div>
|
||||
<!-- /.col-lg-12 -->
|
||||
</div>
|
||||
|
||||
@include('partials.flashes')
|
||||
@yield('content')
|
||||
|
||||
<!-- this modal will contain the help-text -->
|
||||
<div class="modal fade" id="helpModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<h4 class="modal-title" id="helpTitle">Please hold...</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="helpBody">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.modal -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- modal to relate transactions to each other -->
|
||||
<div class="modal fade" id="relationModal">
|
||||
|
||||
</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>
|
||||
<script type="text/javascript" src="js/jquery.metisMenu.min.js"></script>
|
||||
<script type="text/javascript" src="js/sb-admin-2.js"></script>
|
||||
<script type="text/javascript" src="js/help.js"></script>
|
||||
<script type="text/javascript" src="js/firefly.js"></script>
|
||||
@yield('scripts')
|
||||
</body>
|
||||
</html>
|
46
resources/views/layouts/guest.blade.php
Normal file
46
resources/views/layouts/guest.blade.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<base href="{{URL::route('index')}}/">
|
||||
<title>Firefly III</title>
|
||||
|
||||
<link rel="stylesheet" href="assets/stylesheets/bootstrap/bootstrap.min.css" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="assets/stylesheets/metisMenu/metisMenu.min.css" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="assets/stylesheets/sbadmin/sb.css" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="assets/stylesheets/fa/css/font-awesome.min.css" type="text/css" media="all" />
|
||||
|
||||
<!-- 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]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="/android-chrome-manifest.json">
|
||||
<meta name="msapplication-TileColor" content="#2b5797">
|
||||
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<!-- {{App::environment()}} -->
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
@include('partials.flashes')
|
||||
@yield('content')
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
28
resources/views/partials/date_nav.blade.php
Normal file
28
resources/views/partials/date_nav.blade.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-clock-o fa-fw"></i>
|
||||
{{{\Session::get('period')}}}
|
||||
|
||||
<!-- ACTIONS MENU -->
|
||||
<div class="pull-right">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
|
||||
Range
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
@foreach(Config::get('firefly.range_to_name') as $name => $label)
|
||||
<li><a href="{{route('rangeJump',$name)}}"><i class="fa fa-calendar fa-fw"></i> {{{ucfirst($label)}}}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="btn-group btn-group-sm btn-group-justified">
|
||||
<a class="btn btn-default" href="{{route('sessionPrev')}}"><i class="fa fa-arrow-left"></i> {{{\Session::get('prev')}}}</a>
|
||||
<a class="btn btn-default" href="{{route('sessionNext')}}">{{{\Session::get('next')}}} <i class="fa fa-arrow-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
27
resources/views/partials/flashes.blade.php
Normal file
27
resources/views/partials/flashes.blade.php
Normal file
@@ -0,0 +1,27 @@
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<strong>Success!</strong> {{{Session::get('success')}}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(Session::has('info'))
|
||||
<div class="alert alert-info alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<strong>Info:</strong> {{{Session::get('info')}}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(Session::has('warning'))
|
||||
<div class="alert alert-warning alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<strong>Warning!</strong> {{{Session::get('warning')}}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(Session::has('error'))
|
||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<strong>Error!</strong> {{{Session::get('error')}}}
|
||||
</div>
|
||||
@endif
|
190
resources/views/partials/menu.blade.php
Normal file
190
resources/views/partials/menu.blade.php
Normal file
@@ -0,0 +1,190 @@
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{{route('index')}}">Firefly</a>
|
||||
</div>
|
||||
<!-- /.navbar-header -->
|
||||
|
||||
<ul class="nav navbar-top-links navbar-right">
|
||||
|
||||
<!-- reminders -->
|
||||
@if(isset($reminders) && count($reminders) > 0)
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-bell fa-fw"></i> <i class="fa fa-caret-down"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-alerts">
|
||||
@foreach($reminders as $index => $reminder)
|
||||
<li>
|
||||
<a href="{{route('reminders.show',$reminder->id)}}">
|
||||
<div>
|
||||
<i class="fa fa-clock-o fa-fw"></i>
|
||||
<!-- may be a title, may be a name or a description -->
|
||||
@if($reminder->remindersable->title)
|
||||
{{{$reminder->remindersable->title}}}
|
||||
@endif
|
||||
@if($reminder->remindersable->name)
|
||||
{{{$reminder->remindersable->name}}}
|
||||
@endif
|
||||
<span class="pull-right text-muted small"></span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
@if($index+1 != count($reminders))
|
||||
<li class="divider"></li>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
<!-- /.dropdown-alerts -->
|
||||
</li>
|
||||
@endif
|
||||
<!-- /.dropdown -->
|
||||
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="{{route('profile')}}"><i class="fa fa-user fa-fw"></i> {{Auth::user()->email}}</a></li>
|
||||
<li><a href="{{route('preferences')}}"><i class="fa fa-gear fa-fw"></i> Preferences</a></li>
|
||||
<li><a href="{{route('currency.index')}}"><i class="fa fa-usd fa-fw"></i> Currency</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="{{route('logout')}}"><i class="fa fa-sign-out fa-fw"></i> Logout</a></li>
|
||||
</ul>
|
||||
<!-- /.dropdown-user -->
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<!-- /.dropdown -->
|
||||
</ul>
|
||||
<!-- /.navbar-top-links -->
|
||||
<div class="navbar-default sidebar" role="navigation">
|
||||
<div class="sidebar-nav navbar-collapse">
|
||||
<ul class="nav" id="side-menu">
|
||||
<li class="sidebar-search">
|
||||
<form action="{{route('search')}}" method="GET" class="form-inline">
|
||||
<div class="input-group custom-search-form">
|
||||
<input type="text" name="q" class="form-control" value="@if(Input::get('q')){{{Input::get('q')}}}@endif" placeholder="Search...">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
<!-- /input-group -->
|
||||
</li>
|
||||
<li>
|
||||
<a @if($r == 'index') class="active" @endif href="{{route('index')}}"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>
|
||||
</li>
|
||||
<?php
|
||||
$isAccounts = $r == 'accounts.index';
|
||||
$isAsset = $r == 'accounts.index' && isset($what) && $what == 'asset';
|
||||
$isExpense = $r == 'accounts.index' && isset($what) && $what == 'expense';
|
||||
$isRevenue = $r == 'accounts.index' && isset($what) && $what == 'revenue';
|
||||
?>
|
||||
<li @if($isAccounts) class="active" @endif>
|
||||
<a href="#"><i class="fa fa-credit-card fa-fw"></i> Accounts <span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
<a @if($isAsset) class="active" @endif href="{{route('accounts.index','asset')}}"><i class="fa fa-money fa-fw"></i> Asset accounts</a>
|
||||
</li>
|
||||
<li>
|
||||
<a @if($isExpense) class="active" @endif href="{{route('accounts.index','expense')}}"><i class="fa fa-shopping-cart fa-fw"></i> Expense accounts</a>
|
||||
</li>
|
||||
<li>
|
||||
<a @if($isRevenue) class="active" @endif href="{{route('accounts.index','revenue')}}"><i class="fa fa-download fa-fw"></i> Revenue accounts</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- /.nav-second-level -->
|
||||
</li>
|
||||
<li>
|
||||
<a @if(!(strpos($r,'budgets') === false)) class="active" @endif href="{{route('budgets.index')}}"><i class="fa fa-tasks fa-fw"></i> Budgets</a>
|
||||
</li>
|
||||
<li>
|
||||
<a @if($r == 'categories.index') class="active" @endif href="{{route('categories.index')}}"><i class="fa fa-bar-chart fa-fw"></i> Categories</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-tags fa-fw"></i> Tags</a>
|
||||
</li>
|
||||
<li>
|
||||
<a @if(!(strpos($r,'reports') === false)) class="active" @endif href="{{route('reports.index')}}"><i class="fa fa-line-chart fa-fw"></i> Reports</a>
|
||||
</li>
|
||||
<?php
|
||||
$isTransactions = $r == 'transactions.index';
|
||||
$isWithdrawal = $r == 'transactions.index' && isset($what) && $what == 'withdrawal';
|
||||
$isDeposit = $r == 'transactions.index' && isset($what) && $what == 'deposit';
|
||||
$isTransfer = $r == 'transactions.index' && isset($what) && $what == 'transfers';
|
||||
?>
|
||||
<li @if($isTransactions) class="active" @endif>
|
||||
<a href="#"><i class="fa fa-repeat fa-fw"></i> Transactions<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
<a @if($isWithdrawal)class="active"@endif href="{{route('transactions.index','withdrawal')}}"><i class="fa fa-long-arrow-left fa-fw"></i> Expenses</a>
|
||||
</li>
|
||||
<li>
|
||||
<a @if($isDeposit)class="active"@endif href="{{route('transactions.index','deposit')}}"><i class="fa fa-long-arrow-right fa-fw"></i> Revenue / income</a>
|
||||
</li>
|
||||
<li>
|
||||
<a @if($isTransfer)class="active"@endif href="{{route('transactions.index','transfers')}}"><i class="fa fa-arrows-h fa-fw"></i> Transfers</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
<?php
|
||||
$isMM = !(strpos($r,'piggy_banks') === false) || !(strpos($r,'bills') === false) | !(strpos($r,'repeated') === false);
|
||||
$isPiggy = !(strpos($r,'piggy_banks') === false);
|
||||
$isBill = !(strpos($r,'bills') === false) && strpos($r,'bills.create') === false;
|
||||
$isRep = !(strpos($r,'repeated') === false);
|
||||
?>
|
||||
<li @if($isMM)class="active"@endif>
|
||||
<a href="#"><i class="fa fa-euro fa-fw"></i> Money management<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
<a @if($isPiggy)class="active"@endif href="{{route('piggy_banks.index')}}"><i class="fa fa-sort-amount-asc fa-fw"></i> Piggy banks</a>
|
||||
</li>
|
||||
<li>
|
||||
<a @if($isBill)class="active"@endif href="{{route('bills.index')}}"><i class="fa fa-calendar-o fa-fw"></i> Bills</a>
|
||||
</li>
|
||||
<li>
|
||||
<a @if($isRep)class="active"@endif href="{{route('repeated.index')}}"><i class="fa fa-rotate-left fa-fw"></i> Repeated expenses</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- /.nav-second-level -->
|
||||
</li>
|
||||
<?php
|
||||
$creating = !(strpos($r,'.create') === false);
|
||||
$isWithdrawal = $r == 'transactions.create' && isset($what) && $what == 'withdrawal';
|
||||
$isDeposit = $r == 'transactions.create' && isset($what) && $what == 'deposit';
|
||||
$isTransfer = $r == 'transactions.create' && isset($what) && $what == 'transfer';
|
||||
$isBill = $r == 'bills.create';
|
||||
?>
|
||||
<li @if($creating)class="active"@endif>
|
||||
<a href="#"><i class="fa fa-plus fa-fw"></i> Create new<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
<a @if($isWithdrawal)class="active"@endif href="{{route('transactions.create','withdrawal')}}"><i class="fa fa-long-arrow-left fa-fw"></i> Withdrawal</a>
|
||||
</li>
|
||||
<li>
|
||||
<a @if($isDeposit)class="active"@endif href="{{route('transactions.create','deposit')}}"><i class="fa fa-long-arrow-right fa-fw"></i> Deposit</a>
|
||||
</li>
|
||||
<li>
|
||||
<a @if($isTransfer)class="active"@endif href="{{route('transactions.create','transfer')}}"><i class="fa fa-arrows-h fa-fw"></i> Transfer</a>
|
||||
</li>
|
||||
<li>
|
||||
<a @if($isBill)class="active"@endif href="{{route('bills.create')}}"><i class="fa fa-calendar-o fa-fw"></i> Bill</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- /.nav-second-level -->
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /.sidebar-collapse -->
|
||||
</div>
|
||||
<!-- /.navbar-static-side -->
|
||||
</nav>
|
Reference in New Issue
Block a user