mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-23 03:31:25 +00:00
Make CSV import a feature that can be turned on / off.
This commit is contained in:
@@ -43,6 +43,10 @@ class CsvController extends Controller
|
|||||||
View::share('title', trans('firefly.csv'));
|
View::share('title', trans('firefly.csv'));
|
||||||
View::share('mainTitleIcon', 'fa-file-text-o');
|
View::share('mainTitleIcon', 'fa-file-text-o');
|
||||||
|
|
||||||
|
if (Config::get('firefly.csv_import_enabled') === false) {
|
||||||
|
throw new FireflyException('CSV Import is not enabled.');
|
||||||
|
}
|
||||||
|
|
||||||
$this->wizard = App::make('FireflyIII\Helpers\Csv\WizardInterface');
|
$this->wizard = App::make('FireflyIII\Helpers\Csv\WizardInterface');
|
||||||
$this->data = App::make('FireflyIII\Helpers\Csv\Data');
|
$this->data = App::make('FireflyIII\Helpers\Csv\Data');
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ return [
|
|||||||
'version' => '3.4.6',
|
'version' => '3.4.6',
|
||||||
'index_periods' => ['1D', '1W', '1M', '3M', '6M', '1Y', 'custom'],
|
'index_periods' => ['1D', '1W', '1M', '3M', '6M', '1Y', 'custom'],
|
||||||
'budget_periods' => ['daily', 'weekly', 'monthly', 'quarterly', 'half-year', 'yearly'],
|
'budget_periods' => ['daily', 'weekly', 'monthly', 'quarterly', 'half-year', 'yearly'],
|
||||||
|
'csv_import_enabled' => false,
|
||||||
'piggy_bank_periods' => [
|
'piggy_bank_periods' => [
|
||||||
'week' => 'Week',
|
'week' => 'Week',
|
||||||
'month' => 'Month',
|
'month' => 'Month',
|
||||||
|
|||||||
@@ -123,9 +123,11 @@
|
|||||||
<li class="{{ activeRoutePartial('currency') }}">
|
<li class="{{ activeRoutePartial('currency') }}">
|
||||||
<a class="{{ activeRoutePartial('currency') }}" href="{{ route('currency.index') }}"><i class="fa fa-usd fa-fw"></i> {{ 'currencies'|_ }}</a>
|
<a class="{{ activeRoutePartial('currency') }}" href="{{ route('currency.index') }}"><i class="fa fa-usd fa-fw"></i> {{ 'currencies'|_ }}</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% if Config.get('firefly.csv_import_enabled') %}
|
||||||
<li class="{{ activeRoutePartial('csv') }}">
|
<li class="{{ activeRoutePartial('csv') }}">
|
||||||
<a href="{{ route('csv.index') }}"><i class="fa fa-file-text-o fa-fw"></i> {{ 'csv_import'|_ }}</a>
|
<a href="{{ route('csv.index') }}"><i class="fa fa-file-text-o fa-fw"></i> {{ 'csv_import'|_ }}</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user