mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-13 07:53:16 +00:00
Bread crumbs and fine tuning.
This commit is contained in:
@@ -65,7 +65,7 @@ class CsvController extends Controller
|
|||||||
return Redirect::route('csv.index');
|
return Redirect::route('csv.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
$subTitle = trans('firefly.csv_process');
|
$subTitle = trans('firefly.csv_define_column_roles');
|
||||||
$firstRow = $this->data->getReader()->fetchOne();
|
$firstRow = $this->data->getReader()->fetchOne();
|
||||||
$count = count($firstRow);
|
$count = count($firstRow);
|
||||||
$headers = [];
|
$headers = [];
|
||||||
@@ -131,7 +131,9 @@ class CsvController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function downloadConfigPage()
|
public function downloadConfigPage()
|
||||||
{
|
{
|
||||||
return view('csv.download-config');
|
$subTitle = trans('firefly.csv_download_config_title');
|
||||||
|
|
||||||
|
return view('csv.download-config', compact('subTitle'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -277,8 +279,9 @@ class CsvController extends Controller
|
|||||||
$values = $this->wizard->getMappableValues($reader, $map, $hasHeaders);
|
$values = $this->wizard->getMappableValues($reader, $map, $hasHeaders);
|
||||||
$map = $this->data->getMap();
|
$map = $this->data->getMap();
|
||||||
$mapped = $this->data->getMapped();
|
$mapped = $this->data->getMapped();
|
||||||
|
$subTitle = trans('firefly.csv_map_values');
|
||||||
|
|
||||||
return view('csv.map', compact('map', 'options', 'values', 'mapped'));
|
return view('csv.map', compact('map', 'options', 'values', 'mapped', 'subTitle'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -316,7 +319,9 @@ class CsvController extends Controller
|
|||||||
|
|
||||||
Preferences::mark();
|
Preferences::mark();
|
||||||
|
|
||||||
return view('csv.process', compact('rows', 'errors', 'imported'));
|
$subTitle = trans('firefly.csv_process_title');
|
||||||
|
|
||||||
|
return view('csv.process', compact('rows', 'errors', 'imported', 'subTitle'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -348,7 +353,9 @@ class CsvController extends Controller
|
|||||||
foreach (Input::get('mapping') as $index => $data) {
|
foreach (Input::get('mapping') as $index => $data) {
|
||||||
$mapped[$index] = [];
|
$mapped[$index] = [];
|
||||||
foreach ($data as $value => $mapping) {
|
foreach ($data as $value => $mapping) {
|
||||||
$mapped[$index][$value] = $mapping;
|
if (intval($mapping) !== 0) {
|
||||||
|
$mapped[$index][$value] = $mapping;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Session::put('csv-mapped', $mapped);
|
Session::put('csv-mapped', $mapped);
|
||||||
|
@@ -161,6 +161,43 @@ Breadcrumbs::register(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// CSV:
|
||||||
|
Breadcrumbs::register(
|
||||||
|
'csv.index', function (Generator $breadcrumbs) {
|
||||||
|
$breadcrumbs->parent('home');
|
||||||
|
$breadcrumbs->push(trans('firefly.csv_index_title'), route('csv.index'));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
Breadcrumbs::register(
|
||||||
|
'csv.column-roles', function (Generator $breadcrumbs) {
|
||||||
|
$breadcrumbs->parent('csv.index');
|
||||||
|
$breadcrumbs->push(trans('firefly.csv_define_column_roles'), route('csv.column-roles'));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
Breadcrumbs::register(
|
||||||
|
'csv.map', function (Generator $breadcrumbs) {
|
||||||
|
$breadcrumbs->parent('csv.index');
|
||||||
|
$breadcrumbs->push(trans('firefly.csv_map_values'), route('csv.map'));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
Breadcrumbs::register(
|
||||||
|
'csv.download-config-page', function (Generator $breadcrumbs) {
|
||||||
|
$breadcrumbs->parent('csv.index');
|
||||||
|
$breadcrumbs->push(trans('firefly.csv_download_config'), route('csv.download-config-page'));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
Breadcrumbs::register(
|
||||||
|
'csv.process', function (Generator $breadcrumbs) {
|
||||||
|
$breadcrumbs->parent('csv.index');
|
||||||
|
$breadcrumbs->push(trans('firefly.csv_process_title'), route('csv.process'));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// currencies.
|
// currencies.
|
||||||
Breadcrumbs::register(
|
Breadcrumbs::register(
|
||||||
'currency.index', function (Generator $breadcrumbs) {
|
'currency.index', function (Generator $breadcrumbs) {
|
||||||
|
@@ -23,6 +23,9 @@ return [
|
|||||||
'csv_import' => 'Import CSV file',
|
'csv_import' => 'Import CSV file',
|
||||||
'csv' => 'CSV',
|
'csv' => 'CSV',
|
||||||
'csv_index_title' => 'Upload and import a CSV file',
|
'csv_index_title' => 'Upload and import a CSV file',
|
||||||
|
'csv_define_column_roles' => 'Define column roles',
|
||||||
|
'csv_map_values' => 'Map found values to existing values',
|
||||||
|
'csv_download_config' => 'Download CSV configuration file.',
|
||||||
'csv_index_text' =>
|
'csv_index_text' =>
|
||||||
'This form allows you to import a CSV file with transactions into Firefly. It is based on the excellent CSV importer made by' .
|
'This form allows you to import a CSV file with transactions into Firefly. It is based on the excellent CSV importer made by' .
|
||||||
' the folks at <a href="https://www.atlassian.com/">Atlassian</a>. Simply upload your CSV file and follow the instructions.' .
|
' the folks at <a href="https://www.atlassian.com/">Atlassian</a>. Simply upload your CSV file and follow the instructions.' .
|
||||||
@@ -56,7 +59,8 @@ return [
|
|||||||
'csv_field_mapped_to' => 'Must be mapped to...',
|
'csv_field_mapped_to' => 'Must be mapped to...',
|
||||||
'csv_download_config_title' => 'Download CSV configuration',
|
'csv_download_config_title' => 'Download CSV configuration',
|
||||||
'csv_download_config_text' => 'Everything you\'ve just set up can be downloaded as a configuration file. Click the button to do so.',
|
'csv_download_config_text' => 'Everything you\'ve just set up can be downloaded as a configuration file. Click the button to do so.',
|
||||||
'csv_more_information_text' => 'If the import fails, you can use this configuration file so you don\'t have to start all over again.',
|
'csv_more_information_text' => 'If the import fails, you can use this configuration file so you don\'t have to start all over again.'
|
||||||
|
. ' But, if the import succeeds, it will be easier to upload similar CSV files.',
|
||||||
'csv_do_download_config' => 'Download configuration file.',
|
'csv_do_download_config' => 'Download configuration file.',
|
||||||
'csv_empty_description' => '(empty description)',
|
'csv_empty_description' => '(empty description)',
|
||||||
'csv_upload_form' => 'CSV upload form',
|
'csv_upload_form' => 'CSV upload form',
|
||||||
@@ -64,7 +68,7 @@ return [
|
|||||||
'csv_unsupported_map' => 'The importer cannot map the column ":columnRole" to existing values in the database.',
|
'csv_unsupported_map' => 'The importer cannot map the column ":columnRole" to existing values in the database.',
|
||||||
'csv_unsupported_value' => 'The importer does not know how to handle values in columns marked as ":columnRole".',
|
'csv_unsupported_value' => 'The importer does not know how to handle values in columns marked as ":columnRole".',
|
||||||
'csv_cannot_store_value' => 'The importer has not reserved space for columns marked ":columnRole" and will be incapable of processing them.',
|
'csv_cannot_store_value' => 'The importer has not reserved space for columns marked ":columnRole" and will be incapable of processing them.',
|
||||||
'csv_process_title' => 'CVS import finished',
|
'csv_process_title' => 'CVS import finished!',
|
||||||
'csv_process_text' => 'The CVS importer has finished and has imported :rows rows',
|
'csv_process_text' => 'The CVS importer has finished and has imported :rows rows',
|
||||||
'csv_row' => 'Row',
|
'csv_row' => 'Row',
|
||||||
'csv_import_with_errors' => 'There was one error.|There were :errors errors.',
|
'csv_import_with_errors' => 'There was one error.|There were :errors errors.',
|
||||||
|
@@ -39,6 +39,7 @@
|
|||||||
<p>
|
<p>
|
||||||
<a href="{{ route('csv.index') }}" class="btn btn-warning">{{ 'csv_start_over'|_ }}</a>
|
<a href="{{ route('csv.index') }}" class="btn btn-warning">{{ 'csv_start_over'|_ }}</a>
|
||||||
<a href="{{ route('index') }}" class="btn btn-success">{{ 'csv_to_index'|_ }}</a>
|
<a href="{{ route('index') }}" class="btn btn-success">{{ 'csv_to_index'|_ }}</a>
|
||||||
|
<a href="{{ route('csv.download-config') }}" class="btn btn-info"><i class="fa fa-download"></i> {{ 'csv_do_download_config'|_ }}</a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user