Skip to content

Firefly III: a personal finances manager

Initial commit for CSV import.

James Cole86011d4ea21d
diff --git a/app/Http/Controllers/CsvController.php b/app/Http/Controllers/CsvController.php
new file mode 100644
index 0000000000..723b1a33e1
--- /dev/null
+++ b/app/Http/Controllers/CsvController.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: sander
+ * Date: 03/07/15
+ * Time: 10:37
+ */
+
+namespace FireflyIII\Http\Controllers;
+use View;
+
+/**
+ * Class CsvController
+ *
+ * @package FireflyIII\Http\Controllers
+ */
+class CsvController extends Controller
+{
+
+ /**
+ *
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ View::share('title', 'CSV');
+ View::share('mainTitleIcon', 'fa-file-text-o');
+
+ }
+
+ public function index()
+ {
+ return view('csv.index');
+ }
+}
\ No newline at end of file
diff --git a/app/Http/routes.php b/app/Http/routes.php
index 3538bbf428..0c5d9174ee 100644
--- a/app/Http/routes.php
+++ b/app/Http/routes.php
@@ -219,6 +219,12 @@ Route::group(
Route::post('/categories/update/{category}', ['uses' => 'CategoryController@update', 'as' => 'categories.update']);
Route::post('/categories/destroy/{category}', ['uses' => 'CategoryController@destroy', 'as' => 'categories.destroy']);
+
+ /**
+ * CSV controller
+ */
+ Route::get('/csv', ['uses' => 'CsvController@index', 'as' => 'csv.index']);
+
/**
* Currency Controller
*/
diff --git a/resources/lang/en/firefly.php b/resources/lang/en/firefly.php
index d6feb0f661..f7d834653a 100644
--- a/resources/lang/en/firefly.php
+++ b/resources/lang/en/firefly.php
@@ -19,6 +19,9 @@ return [
'never' => 'Never',
'search_results_for' => 'Search results for ":query"',
+ // csv import:
+ 'csv_import' => 'Import CSV file',
+
// create new stuff:
'create_new_withdrawal' => 'Create new withdrawal',
'create_new_deposit' => 'Create new deposit',
diff --git a/resources/lang/nl/firefly.php b/resources/lang/nl/firefly.php
index bdab21f817..6c03404832 100644
--- a/resources/lang/nl/firefly.php
+++ b/resources/lang/nl/firefly.php
@@ -19,6 +19,9 @@ return [
'never' => 'Nooit',
'search_results_for' => 'Zoekresultaten voor ":query"',
+ // csv import:
+ 'csv_import' => 'Import CSV file',
+
// create new stuff:
'create_new_withdrawal' => 'Nieuwe uitgave',
'create_new_deposit' => 'Nieuwe inkomsten',
diff --git a/resources/twig/csv/index.twig b/resources/twig/csv/index.twig
new file mode 100644
index 0000000000..5dd98e4135
--- /dev/null
+++ b/resources/twig/csv/index.twig
@@ -0,0 +1,12 @@
+{% extends "./layout/default.twig" %}
+
+{% block breadcrumbs %}
+ {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }}
+{% endblock %}
+
+{% block content %}
+
+
+ Bla bla.
+
+{% endblock %}
diff --git a/resources/twig/partials/menu-sidebar.twig b/resources/twig/partials/menu-sidebar.twig
index ba080666f2..76bc4f4cfb 100644
--- a/resources/twig/partials/menu-sidebar.twig
+++ b/resources/twig/partials/menu-sidebar.twig
@@ -123,6 +123,9 @@
<li class="{{ activeRoutePartial('currency') }}">
<a class="{{ activeRoutePartial('currency') }}" href="{{ route('currency.index') }}"><i class="fa fa-usd fa-fw"></i> {{ 'currencies'|_ }}</a>
</li>
+ <li class="{{ activeRoutePartial('csv') }}">
+ <a href="{{ route('csv.index') }}"><i class="fa fa-file-text-o fa-fw"></i> {{ 'csv_import'|_ }}</a>
+ </li>
</ul>