First code for #1050

This commit is contained in:
James Cole
2017-12-28 11:38:40 +01:00
parent 9ab3848755
commit b65e1e022e
14 changed files with 575 additions and 4 deletions

View File

@@ -142,6 +142,22 @@ return [
'invalid_locale_settings' => 'Firefly III is unable to format monetary amounts because your server is missing the required packages. There are <a href="https://github.com/firefly-iii/help/wiki/Missing-locale-packages">instructions how to do this</a>.',
'quickswitch' => 'Quickswitch',
// check for updates:
'update_check_title' => 'Check for updates',
'admin_update_check_title' => 'Automatically check for update',
'admin_update_check_explain' => 'Firefly III can check for updates automatically. When you enable this setting, it will contact Github to see if a new version of Firefly III is available. When it is, you will get a notification. You can test this notification using the button on the right. Please indicate below if you want Firefly III to check for updates.',
'check_for_updates_permission' => 'Firefly III can check for updates, but it needs your permission to do so. Please go to the <a href=":link">administration</a> to indicate if you would like this feature to be enabled.',
'updates_ask_me_later' => 'Ask me later',
'updates_do_not_check' => 'Do not check for updates',
'updates_enable_check' => 'Enable the check for updates',
'admin_update_check_now_title' => 'Check for updates now',
'admin_update_check_now_explain' => 'If you press the button, Firefly III will see if your current version is the latest.',
'check_for_updates_button' => 'Check now!',
'update_new_version_alert' => 'A new version is available. You are running v:your_version, the latest version is v:new_version.',
'update_current_version_alert' => 'You are running v:version, which is the latest available release.',
'update_newer_version_alert' => 'You are running v:your_version, which is newer than the latest release, v:new_version.',
'update_check_error' => 'An error occurred while checking for updates. Please view the log files.',
// search
'search' => 'Search',
'search_query' => 'Query',

View File

@@ -169,6 +169,7 @@ return [
'budget_keep_transactions' => 'The only transaction connected to this budget will not be deleted.|All :count transactions connected to this budget will spared deletion.',
'category_keep_transactions' => 'The only transaction connected to this category will not be deleted.|All :count transactions connected to this category will spared deletion.',
'tag_keep_transactions' => 'The only transaction connected to this tag will not be deleted.|All :count transactions connected to this tag will spared deletion.',
'check_for_updates' => 'Check for updates',
'email' => 'Email address',
'password' => 'Password',

View File

@@ -14,6 +14,7 @@
<ul>
<li><a href="{{ route('admin.configuration.index') }}">{{ 'firefly_instance_configuration'|_ }}</a></li>
<li><a href="{{ route('admin.links.index') }}">{{ 'journal_link_configuration'|_ }}</a></li>
<li><a href="{{ route('admin.update-check') }}">{{ 'update_check_title'|_ }}</a></li>
</ul>
</div>
</div>
@@ -55,7 +56,4 @@
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View File

@@ -0,0 +1,61 @@
{% extends "./layout/default" %}
{% block breadcrumbs %}
{{ Breadcrumbs.render }}
{% endblock %}
{% block content %}
<form action="{{ route('admin.update-check.post') }}" method="post" id="store" class="form-horizontal">
<div class="row">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
{# do update check. #}
<div class="col-lg-6 col-md-8 col-sm-12 col-xs-12">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">{{ 'admin_update_check_title'|_ }}</h3>
</div>
<div class="box-body">
<p class="text-info">
{{ 'admin_update_check_explain'|_ }}
</p>
{{ ExpandedForm.select('check_for_updates',options, selected) }}
</div>
</div>
</div>
{# check now button #}
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">{{ 'admin_update_check_now_title'|_ }}</h3>
</div>
<div class="box-body">
<p class="text-info">
{{ 'admin_update_check_now_explain'|_ }}
</p>
<p>
<a href="#" id="update" class="btn btn-info">{{ 'check_for_updates_button'|_ }}</a>
</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
<button type="submit" class="btn btn-success">
{{ ('store_configuration')|_ }}
</button>
</div>
</div>
</form>
{% endblock %}
{% block scripts %}
<script type="text/javascript">
var updateCheckUri = '{{ route('admin.update-check.manual') }}';
</script>
<script type="text/javascript" src="js/ff/admin/update/index.js?v={{ FF_VERSION }}"></script>
{% endblock %}