mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Lots of new code for new importer routine.
This commit is contained in:
@@ -10,11 +10,11 @@
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('csv.import_configure_title') }}</h3>
|
||||
<h3 class="box-title">{{ trans('csv.initial_config_title') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>
|
||||
{{ trans('csv.import_configure_intro') }}
|
||||
{{ trans('csv.initial_config_text') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -29,16 +29,16 @@
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('csv.import_configure_form') }}</h3>
|
||||
<h3 class="box-title">{{ trans('csv.initial_config_box') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
|
||||
{{ ExpandedForm.checkbox('has_headers',1,job.configuration['has-headers'],{helpText: trans('csv.header_help')}) }}
|
||||
{{ ExpandedForm.text('date_format',job.configuration['date-format'],{helpText: trans('csv.date_help', {dateExample: phpdate('Ymd')}) }) }}
|
||||
{{ ExpandedForm.select('csv_delimiter', data.delimiters, job.configuration['delimiter'], {helpText: trans('csv.delimiter_help') } ) }}
|
||||
{{ ExpandedForm.select('csv_import_account', data.accounts, job.configuration['import-account'], {helpText: trans('csv.import_account_help')} ) }}
|
||||
{{ ExpandedForm.checkbox('has_headers',1,job.configuration['has-headers'],{helpText: trans('csv.initial_header_help')}) }}
|
||||
{{ ExpandedForm.text('date_format',job.configuration['date-format'],{helpText: trans('csv.initial_date_help', {dateExample: phpdate('Ymd')}) }) }}
|
||||
{{ ExpandedForm.select('csv_delimiter', data.delimiters, job.configuration['delimiter'], {helpText: trans('csv.initial_delimiter_help') } ) }}
|
||||
{{ ExpandedForm.select('csv_import_account', data.accounts, job.configuration['import-account'], {helpText: trans('csv.initial_import_account_help')} ) }}
|
||||
|
||||
{% for type, specific in data.specifics %}
|
||||
<div class="form-group">
|
||||
@@ -56,40 +56,23 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if not data.is_upload_possible %}
|
||||
<div class="form-group" id="csv_holder">
|
||||
<div class="col-sm-4">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<pre>{{ data.upload_path }}</pre>
|
||||
<p class="text-danger">
|
||||
{{ trans('csv.upload_not_writeable') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if data.is_upload_possible %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<button type="submit" class="pull-right btn btn-success">
|
||||
{{ 'import_finish_configuration'|_ }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<button type="submit" class="pull-right btn btn-success">
|
||||
{{ 'import_finish_configuration'|_ }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }}
|
||||
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, job) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -22,9 +22,8 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<form action="{{ route('import.post-settings', job.key) }}" method="post">
|
||||
<form action="{{ route('import.process-configuration', job.key) }}" method="post">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
||||
<input type="hidden" name="settings" value="map"/>
|
||||
|
||||
{% for field in data %}
|
||||
<div class="row">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }}
|
||||
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, job) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -10,18 +10,18 @@
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('csv.column_roles_title') }}</h3>
|
||||
<h3 class="box-title">{{ trans('csv.roles_title') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>
|
||||
{{ 'see_help_top_right'|_ }}
|
||||
{{ trans('csv.roles_text') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<form action="{{ route('import.post-settings', job.key) }}" method="post">
|
||||
<form action="{{ route('import.process-configuration', job.key) }}" method="post">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
||||
<input type="hidden" name="settings" value="roles"/>
|
||||
|
||||
@@ -29,41 +29,41 @@
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('csv.column_roles_table') }}</h3>
|
||||
<h3 class="box-title">{{ trans('csv.roles_table') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:20%;">{{ trans('csv.column_name') }}</th>
|
||||
<th style="width:40%;">{{ trans('csv.column_example') }}</th>
|
||||
<th style="width:30%;">{{ trans('csv.column_role') }}</th>
|
||||
<th style="width:10%;">{{ trans('csv.do_map_value') }}</th>
|
||||
<th style="width:20%;">{{ trans('csv.roles_column_name') }}</th>
|
||||
<th style="width:40%;">{{ trans('csv.roles_column_example') }}</th>
|
||||
<th style="width:30%;">{{ trans('csv.roles_column_role') }}</th>
|
||||
<th style="width:10%;">{{ trans('csv.roles_do_map_value') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for i in 0..(data.columnCount-1) %}
|
||||
{% for i in 0..(data.total -1) %}
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
{% if data.columnHeaders[i] == '' %}
|
||||
{{ trans('csv.column') }} #{{ loop.index }}
|
||||
{% if data.headers[i] == '' %}
|
||||
{{ trans('csv.roles_column') }} #{{ loop.index }}
|
||||
{% else %}
|
||||
{{ data.columnHeaders[i] }}
|
||||
{{ data.headers[i] }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if data.columns[i]|length == 0 %}
|
||||
<em>{{ trans('csv.no_example_data') }}</em>
|
||||
{% if data.examples[i]|length == 0 %}
|
||||
<em>{{ trans('csv.roles_no_example_data') }}</em>
|
||||
{% else %}
|
||||
{% for example in data.columns[i] %}
|
||||
{% for example in data.examples[i] %}
|
||||
<code>{{ example }}</code><br/>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<td>
|
||||
{{ Form.select(('role['~loop.index0~']'),
|
||||
data.available_roles,
|
||||
data.roles,
|
||||
job.configuration['column-roles'][loop.index0],
|
||||
{class: 'form-control'}) }}
|
||||
</td>
|
||||
@@ -91,7 +91,7 @@
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<button type="submit" class="btn btn-success pull-right">
|
||||
{{ trans('csv.store_column_roles') }} <i class="fa fa-arrow-right"></i>
|
||||
{{ trans('csv.roles_store') }} <i class="fa fa-arrow-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,20 +23,19 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<form method="POST" action="{{ route('import.upload') }}" accept-charset="UTF-8" class="form-horizontal" id="update"
|
||||
<form method="POST" action="{{ route('import.initialize') }}" accept-charset="UTF-8" class="form-horizontal" id="initialize"
|
||||
enctype="multipart/form-data">
|
||||
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
|
||||
<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
|
||||
|
||||
{{ ExpandedForm.file('import_file', {helpText: 'import_file_help'|_}) }}
|
||||
{{ ExpandedForm.file('configuration_file', {helpText: 'configuration_file_help'|_|raw}) }}
|
||||
|
||||
{{ ExpandedForm.select('import_file_type', importFileTypes, defaultImportType, {'helpText' : 'import_file_type_help'|_}) }}
|
||||
|
||||
<div class="form-group" id="import_file_holder">
|
||||
<label for="ffInput_submit" class="col-sm-4 control-label"> </label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<button type="submit" class="btn pull-right btn-success">
|
||||
{{ ('import_start')|_ }}
|
||||
|
||||
@@ -4,6 +4,59 @@
|
||||
{{ Breadcrumbs.renderIfExists }}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
{# Initial display. Will refresh (and disappear almost immediately. #}
|
||||
|
||||
<div class="row status_initial">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Nothing to see here...</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>This box will be replaced in a moment with the status of your import.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row status_configured">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'import_complete'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>
|
||||
{{ 'import_complete_text'|_ }}
|
||||
</p>
|
||||
<p>
|
||||
<code>php artisan firefly:start-import {{ job.key }}</code>
|
||||
</p>
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<a href="{{ route('import.download', [job.key]) }}" class="btn btn-default"><i
|
||||
class="fa fa-fw fa-download"></i> {{ 'import_download_config'|_ }}</a>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<a href="#" class="btn btn-success start-job"><i
|
||||
class="fa fa-fw fa-gears"></i> {{ 'import_start_import'|_ }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<p class="text-info">
|
||||
{{ 'import_share_configuration'|_ }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{#
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
|
||||
<div class="box box-primary">
|
||||
@@ -54,7 +107,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
#}
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript">
|
||||
|
||||
Reference in New Issue
Block a user