diff --git a/app/Http/Controllers/ImportController.php b/app/Http/Controllers/ImportController.php new file mode 100644 index 0000000000..0319bdb87f --- /dev/null +++ b/app/Http/Controllers/ImportController.php @@ -0,0 +1,41 @@ + 'Chart\ReportController@yearInOutSummarized']); Route::get('/chart/report/net-worth/{reportType}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\ReportController@netWorth']); + /** + * IMPORT CONTROLLER + */ + Route::get('/import', ['uses' => 'ImportController@index','as' => 'import.index']); + Route::post('/import/upload', ['uses' => 'ImportController@upload','as' => 'import.upload']); /** * Help Controller diff --git a/app/Support/Twig/General.php b/app/Support/Twig/General.php index 80315ff5d1..d937f51863 100644 --- a/app/Support/Twig/General.php +++ b/app/Support/Twig/General.php @@ -87,7 +87,8 @@ class General extends Twig_Extension 'activeRoutePartial', function () : string { $args = func_get_args(); $route = $args[0]; // name of the route. - if (!(strpos(Route::getCurrentRoute()->getName(), $route) === false)) { + $name = Route::getCurrentRoute()->getName() ?? ''; + if (!(strpos($name, $route) === false)) { return 'active'; } diff --git a/resources/views/import/index.twig b/resources/views/import/index.twig new file mode 100644 index 0000000000..16ea17886e --- /dev/null +++ b/resources/views/import/index.twig @@ -0,0 +1,52 @@ +{% extends "./layout/default.twig" %} + +{% block breadcrumbs %} + {{ Breadcrumbs.renderIfExists }} +{% endblock %} +{% block content %} +
+ {{ 'import_intro_text'|_ }} +
++ +
+