mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +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>
|
<p>{{ paragraph|safe }}</p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
{% if available_apps %}
|
||||||
<p>
|
<p>
|
||||||
<a title="{% trans 'Create archive' %}"
|
<a title="{% trans 'Create archive' %}"
|
||||||
role="button" class="btn btn-primary"
|
role="button" class="btn btn-primary"
|
||||||
@ -46,6 +47,15 @@
|
|||||||
{% trans 'Create archive' %}
|
{% trans 'Create archive' %}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</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>
|
<h3>{% trans 'Backup archives' %}</h3>
|
||||||
{% if not archives %}
|
{% if not archives %}
|
||||||
|
|||||||
@ -29,6 +29,7 @@ from django.views.generic import FormView, TemplateView
|
|||||||
from urllib.parse import unquote
|
from urllib.parse import unquote
|
||||||
|
|
||||||
from plinth.modules import backups
|
from plinth.modules import backups
|
||||||
|
from .backups import _list_of_all_apps_for_backup
|
||||||
|
|
||||||
from .forms import CreateArchiveForm, ExportArchiveForm
|
from .forms import CreateArchiveForm, ExportArchiveForm
|
||||||
|
|
||||||
@ -45,6 +46,8 @@ class IndexView(TemplateView):
|
|||||||
context['info'] = backups.get_info()
|
context['info'] = backups.get_info()
|
||||||
context['archives'] = backups.list_archives()
|
context['archives'] = backups.list_archives()
|
||||||
context['exports'] = backups.get_export_files()
|
context['exports'] = backups.get_export_files()
|
||||||
|
apps = _list_of_all_apps_for_backup()
|
||||||
|
context['available_apps'] = [x[0] for x in apps]
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user