Basic export function for #2667

This commit is contained in:
James Cole
2019-12-27 10:59:31 +01:00
parent 77647a8597
commit c06b9d8045
10 changed files with 484 additions and 76 deletions

View File

@@ -592,46 +592,56 @@ return [
'password_changed' => 'Password changed!',
'should_change' => 'The idea is to change your password.',
'invalid_password' => 'Invalid password!',
'what_is_pw_security' => 'What is "verify password security"?',
'secure_pw_title' => 'How to choose a secure password',
'secure_pw_history' => 'Not a week goes by that you read in the news about a site losing the passwords of its users. Hackers and thieves use these passwords to try to steal your private information. This information is valuable.',
'secure_pw_ff' => 'Do you use the same password all over the internet? If one site loses your password, hackers have access to all your data. Firefly III relies on you to choose a strong and unique password to protect your financial records.',
'secure_pw_check_box' => 'To help you do that Firefly III can check if the password you want to use has been stolen in the past. If this is the case, Firefly III advises you NOT to use that password.',
'secure_pw_working_title' => 'How does it work?',
'secure_pw_working' => 'By checking the box, Firefly III will send the first five characters of the SHA1 hash of your password to <a href="https://www.troyhunt.com/introducing-306-million-freely-downloadable-pwned-passwords/">the website of Troy Hunt</a> to see if it is on the list. This will stop you from using unsafe passwords as is recommended in the latest <a href="https://pages.nist.gov/800-63-3/sp800-63b.html">NIST Special Publication</a> on this subject.',
'secure_pw_should' => 'Should I check the box?',
'secure_pw_long_password' => 'Yes. Always verify your password is safe.',
'command_line_token' => 'Command line token',
'explain_command_line_token' => 'You need this token to perform command line options, such as importing or exporting data. Without it, such sensitive commands will not work. Do not share your command line token. Nobody will ask you for this token, not even me. If you fear you lost this, or when you\'re paranoid, regenerate this token using the button.',
'regenerate_command_line_token' => 'Regenerate command line token',
'token_regenerated' => 'A new command line token was generated',
'change_your_email' => 'Change your email address',
'email_verification' => 'An email message will be sent to your old AND new email address. For security purposes, you will not be able to login until you verify your new email address. If you are unsure if your Firefly III installation is capable of sending email, please do not use this feature. If you are an administrator, you can test this in the <a href="/admin">Administration</a>.',
'email_changed_logout' => 'Until you verify your email address, you cannot login.',
'login_with_new_email' => 'You can now login with your new email address.',
'login_with_old_email' => 'You can now login with your old email address again.',
'login_provider_local_only' => 'This action is not available when authenticating through ":login_provider".',
'delete_local_info_only' => 'Because you authenticate through ":login_provider", this will only delete local Firefly III information.',
'what_is_pw_security' => 'What is "verify password security"?',
'secure_pw_title' => 'How to choose a secure password',
'secure_pw_history' => 'Not a week goes by that you read in the news about a site losing the passwords of its users. Hackers and thieves use these passwords to try to steal your private information. This information is valuable.',
'secure_pw_ff' => 'Do you use the same password all over the internet? If one site loses your password, hackers have access to all your data. Firefly III relies on you to choose a strong and unique password to protect your financial records.',
'secure_pw_check_box' => 'To help you do that Firefly III can check if the password you want to use has been stolen in the past. If this is the case, Firefly III advises you NOT to use that password.',
'secure_pw_working_title' => 'How does it work?',
'secure_pw_working' => 'By checking the box, Firefly III will send the first five characters of the SHA1 hash of your password to <a href="https://www.troyhunt.com/introducing-306-million-freely-downloadable-pwned-passwords/">the website of Troy Hunt</a> to see if it is on the list. This will stop you from using unsafe passwords as is recommended in the latest <a href="https://pages.nist.gov/800-63-3/sp800-63b.html">NIST Special Publication</a> on this subject.',
'secure_pw_should' => 'Should I check the box?',
'secure_pw_long_password' => 'Yes. Always verify your password is safe.',
'command_line_token' => 'Command line token',
'explain_command_line_token' => 'You need this token to perform command line options, such as importing or exporting data. Without it, such sensitive commands will not work. Do not share your command line token. Nobody will ask you for this token, not even me. If you fear you lost this, or when you\'re paranoid, regenerate this token using the button.',
'regenerate_command_line_token' => 'Regenerate command line token',
'token_regenerated' => 'A new command line token was generated',
'change_your_email' => 'Change your email address',
'email_verification' => 'An email message will be sent to your old AND new email address. For security purposes, you will not be able to login until you verify your new email address. If you are unsure if your Firefly III installation is capable of sending email, please do not use this feature. If you are an administrator, you can test this in the <a href="/admin">Administration</a>.',
'email_changed_logout' => 'Until you verify your email address, you cannot login.',
'login_with_new_email' => 'You can now login with your new email address.',
'login_with_old_email' => 'You can now login with your old email address again.',
'login_provider_local_only' => 'This action is not available when authenticating through ":login_provider".',
'delete_local_info_only' => 'Because you authenticate through ":login_provider", this will only delete local Firefly III information.',
// export data:
'import_and_export_menu' => 'Import and export',
'export_data_title' => 'Export data from Firefly III',
'export_data_menu' => 'Export data',
'export_data_bc' => 'Export data from Firefly III',
'export_data_main_title' => 'Export data from Firefly III',
'export_data_expl' => 'This link allows you to export all transactions from Firefly III, with all the relevant meta-data. Please refer to the help (top right (?)-icon) for more information about the process.',
'export_data_all_transactions' => 'Export all transactions',
'export_data_advanced_expl' => 'If you want to have more advanced options, consult the command line options. More information is available in the help (top right (?)-icon) or consult the console command: <code>php artisan help firefly-iii:export-data</code>',
// attachments
'nr_of_attachments' => 'One attachment|:count attachments',
'attachments' => 'Attachments',
'edit_attachment' => 'Edit attachment ":name"',
'update_attachment' => 'Update attachment',
'delete_attachment' => 'Delete attachment ":name"',
'attachment_deleted' => 'Deleted attachment ":name"',
'liabilities_deleted' => 'Deleted liability ":name"',
'attachment_updated' => 'Updated attachment ":name"',
'upload_max_file_size' => 'Maximum file size: :size',
'list_all_attachments' => 'List of all attachments',
'nr_of_attachments' => 'One attachment|:count attachments',
'attachments' => 'Attachments',
'edit_attachment' => 'Edit attachment ":name"',
'update_attachment' => 'Update attachment',
'delete_attachment' => 'Delete attachment ":name"',
'attachment_deleted' => 'Deleted attachment ":name"',
'liabilities_deleted' => 'Deleted liability ":name"',
'attachment_updated' => 'Updated attachment ":name"',
'upload_max_file_size' => 'Maximum file size: :size',
'list_all_attachments' => 'List of all attachments',
// transaction index
'title_expenses' => 'Expenses',
'title_withdrawal' => 'Expenses',
'title_revenue' => 'Revenue / income',
'title_deposit' => 'Revenue / income',
'title_transfer' => 'Transfers',
'title_transfers' => 'Transfers',
'title_expenses' => 'Expenses',
'title_withdrawal' => 'Expenses',
'title_revenue' => 'Revenue / income',
'title_deposit' => 'Revenue / income',
'title_transfer' => 'Transfers',
'title_transfers' => 'Transfers',
// convert stuff:
'convert_is_already_type_Withdrawal' => 'This transaction is already a withdrawal',

View File

@@ -0,0 +1,35 @@
{% extends "./layout/default" %}
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName) }}
{% endblock %}
{% block content %}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'export_data_main_title'|_ }}</h3>
</div>
<div class="box-body">
<p>
{{ 'export_data_expl'|_ }}
</p>
<ul>
<li><i class="fa fa-fw fa-download"></i> <a href="{{ route('export.export') }}" title="{{ 'export_data_all_transactions'|_ }}">{{ 'export_data_all_transactions'|_ }}</a></li>
</ul>
<p>
{{ 'export_data_advanced_expl'|_ }}
</p>
</div>
</div>
</div>
</div>
{% endblock %}
{% block styles %}
{% endblock %}
{% block scripts %}
{% endblock %}

View File

@@ -58,12 +58,35 @@
<span>{{ 'reports'|_ }}</span>
</a>
</li>
<li class="{{ activeRoutePartial('import') }}">
<a href="{{ route('import.index') }}">
<i class="fa fa-archive fa-fw"></i>
<span>{{ 'import_transactions'|_ }}</span>
<li class="{{ activeRoutePartial('import') }} {{ activeRoutePartial('export') }} treeview" id="transaction-menu">
<a href="#">
<i class="fa fa-hdd-o fa-fw"></i>
{% if config('firefly.feature_flags.export') %}
<span>{{ 'import_and_export_menu'|_ }}</span>
{% else %}
<span>{{ 'import_transactions'|_ }}</span>
{% endif %}
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li class="{{ activeRoutePartial('import') }}">
<a href="{{ route('import.index') }}">
<i class="fa fa-archive fa-fw"></i>
<span>{{ 'import_transactions'|_ }}</span>
</a>
</li>
{% if config('firefly.feature_flags.export') %}
<li class="{{ activeRoutePartial('export') }}">
<a href="{{ route('export.index') }}">
<i class="fa fa-life-bouy fa-fw"></i>
<span>{{ 'export_data_menu'|_ }}</span>
</a>
</li>
{% endif %}
</ul>
</li>
<li class="{{ activeRoutePartial('transactions') }} treeview" id="transaction-menu">