mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
backups: Disable create archive when no supported apps are installed
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
parent
3681985f40
commit
616af37407
@ -39,6 +39,7 @@
|
||||
<p>{{ paragraph|safe }}</p>
|
||||
{% endfor %}
|
||||
|
||||
{% if available_apps %}
|
||||
<p>
|
||||
<a title="{% trans 'Create archive' %}"
|
||||
role="button" class="btn btn-primary"
|
||||
@ -46,6 +47,15 @@
|
||||
{% trans 'Create archive' %}
|
||||
</a>
|
||||
</p>
|
||||
{% else %}
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
No apps that support backup are currently installed. After any app
|
||||
that supports backup has been installed, then it will be possible to
|
||||
create backups.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<h3>{% trans 'Backup archives' %}</h3>
|
||||
{% if not archives %}
|
||||
|
||||
@ -29,6 +29,7 @@ from django.views.generic import FormView, TemplateView
|
||||
from urllib.parse import unquote
|
||||
|
||||
from plinth.modules import backups
|
||||
from .backups import _list_of_all_apps_for_backup
|
||||
|
||||
from .forms import CreateArchiveForm, ExportArchiveForm
|
||||
|
||||
@ -45,6 +46,8 @@ class IndexView(TemplateView):
|
||||
context['info'] = backups.get_info()
|
||||
context['archives'] = backups.list_archives()
|
||||
context['exports'] = backups.get_export_files()
|
||||
apps = _list_of_all_apps_for_backup()
|
||||
context['available_apps'] = [x[0] for x in apps]
|
||||
return context
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user