diff --git a/resources/views/csv/column-roles.twig b/resources/views/csv/column-roles.twig new file mode 100644 index 0000000000..f25a0a2ea7 --- /dev/null +++ b/resources/views/csv/column-roles.twig @@ -0,0 +1,77 @@ +{% extends "./layout/default.twig" %} + +{% block breadcrumbs %} + {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} +{% endblock %} + +{% block content %} + + +
+
+
+
+

{{ 'csv_column_roles_title'|_ }}

+
+
+

{{ 'csv_column_roles_text'|_ }}

+
+
+ +
+
+
+ + +
+
+
+
+

{{ 'csv_column_roles_table'|_ }}

+
+
+ + + + + + + + + + + {% for index,header in headers %} + + + + + + + + {% endfor %} +
{{ 'csv_column_name'|_ }}{{ 'csv_column_example'|_ }}{{ 'csv_column_role'|_ }}{{ 'csv_do_map_value'|_ }}
{{ header }}{{ example[index] }} + {{ Form.select(('role['~index~']'), availableRoles,roles[index],{class: 'form-control'}) }} + + {{ Form.checkbox(('map['~index~']'),1,map[index]) }} +
+ + +
+
+
+
+ +
+
+
+
+ {{ 'csv_go_back'|_ }} + +
+
+
+
+
+{% endblock %} diff --git a/resources/views/csv/download-config.twig b/resources/views/csv/download-config.twig new file mode 100644 index 0000000000..bd317bea7c --- /dev/null +++ b/resources/views/csv/download-config.twig @@ -0,0 +1,44 @@ +{% extends "./layout/default.twig" %} + +{% block breadcrumbs %} + {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} +{% endblock %} + +{% block content %} + + +
+
+
+
+

{{ 'csv_download_config_title'|_ }}

+
+
+

+ {{ 'csv_download_config_text'|_ }} +

+ +

+ {{ 'csv_do_download_config'|_ }} +

+ +

+ {{ 'csv_more_information_text'|_ }} +

+
+
+
+
+ +
+
+ +
+
+ +{% endblock %} diff --git a/resources/views/csv/index.twig b/resources/views/csv/index.twig new file mode 100644 index 0000000000..cfa3f6450a --- /dev/null +++ b/resources/views/csv/index.twig @@ -0,0 +1,96 @@ +{% extends "./layout/default.twig" %} + +{% block breadcrumbs %} + {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} +{% endblock %} + +{% block content %} + + +
+
+
+
+

{{ 'csv_index_title'|_ }}

+
+
+ {{ 'csv_index_text'|_ }} +

{{ 'csv_index_beta_warning'|_ }}

+ {% if unsupported|length > 0 %} +

{{ 'csv_index_unsupported_warning'|_ }}

+
    + {% for message in unsupported %} +
  • {{ message }}
  • + {% endfor %} +
+ {% endif %} +
+
+ +
+
+ +
+ + +
+
+
+
+

{{ 'csv_upload_form'|_ }}

+
+
+ + + {{ ExpandedForm.checkbox('has_headers',1,null,{helpText: 'csv_header_help'|_}) }} + {{ ExpandedForm.text('date_format','Ymd',{helpText: trans('firefly.csv_date_help', {dateExample: phpdate('Ymd')}) }) }} + + {{ ExpandedForm.file('csv',{helpText: 'csv_csv_file_help'|_}) }} + + {{ ExpandedForm.select('csv_delimiter', delimiters, 0, {helpText: 'csv_delimiter_help'|_} ) }} + + {{ ExpandedForm.file('csv_config',{helpText: 'csv_csv_config_file_help'|_}) }} + + {{ ExpandedForm.select('csv_import_account', accounts, 0, {helpText: 'csv_import_account_help'|_} ) }} + + {{ ExpandedForm.multiCheckbox('specifix', specifix) }} + + + + {% if not uploadPossible %} +
+
+   +
+ +
+
{{ path }}
+

+ {{ 'csv_upload_not_writeable'|_ }} +

+
+
+ {% endif %} + +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+ + + + +{% endblock %} diff --git a/resources/views/csv/map.twig b/resources/views/csv/map.twig new file mode 100644 index 0000000000..f8562205bd --- /dev/null +++ b/resources/views/csv/map.twig @@ -0,0 +1,82 @@ +{% extends "./layout/default.twig" %} + +{% block breadcrumbs %} + {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} +{% endblock %} + +{% block content %} + + +
+
+
+
+

{{ 'csv_map_title'|_ }}

+
+
+

+ {{ 'csv_map_text'|_ }} +

+
+
+ +
+
+
+ + + {% for index,columnName in map %} + +
+
+
+
+

{{ Config.get('csv.roles.'~columnName~'.name') }}

+
+
+ + + + + + + + + {% for value in values[index] %} + + + + + {% endfor %} + + + +
{{ 'csv_field_value'|_ }}{{ 'csv_field_mapped_to'|_ }}
{{ value }} + {{ Form.select('mapping['~index~']['~value~']',options[index], mapped[index][value], {class: 'form-control'}) }} +
+ + +
+
+
+
+ {% endfor %} + + +
+
+
+
+ {{ 'csv_go_back'|_ }} + +
+
+
+
+ +
+ + +{% endblock %} diff --git a/resources/views/csv/process.twig b/resources/views/csv/process.twig new file mode 100644 index 0000000000..8ca39b64c9 --- /dev/null +++ b/resources/views/csv/process.twig @@ -0,0 +1,58 @@ +{% extends "./layout/default.twig" %} + +{% block breadcrumbs %} + {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} +{% endblock %} + +{% block content %} + + +
+
+
+
+

{{ 'csv_process_title'|_ }}

+
+
+

+ + {{ trans('firefly.csv_process_text',{rows: rows}) }} +

+ + {% if errors|length > 0 %} +

{{ Lang.choice('firefly.csv_import_with_errors',errors|length,{errors: errors|length}) }}

+
    + {% for index,err in errors %} +
  • {{ 'csv_row'|_ }} #{{ index }}: {{ err }}
  • + {% endfor %} +
+

+ {{ trans('firefly.csv_error_see_logs') }} +

+ {% endif %} + +

+ + {{ trans('firefly.csv_process_new_entries',{imported: imported}) }} +

+ + {% if journals|length > 0 %} + + {% endif %} + +

+ {{ 'csv_start_over'|_ }} + {{ 'csv_to_index'|_ }} + {{ 'csv_do_download_config'|_ }} + +

+
+
+ +
+
+{% endblock %} diff --git a/resources/views/partials/menu-sidebar.twig b/resources/views/partials/menu-sidebar.twig index 47dfbba00b..54de5a7a93 100644 --- a/resources/views/partials/menu-sidebar.twig +++ b/resources/views/partials/menu-sidebar.twig @@ -110,7 +110,8 @@ -
  • +
  • + @@ -119,6 +120,12 @@