From b3af80b15c2907acbb221cc54875ec8a1709cc33 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Tue, 1 Oct 2019 21:44:47 -0700 Subject: [PATCH] snapshot: Use app.html instead of app-subsubmenu.html Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- .../modules/snapshot/templates/snapshot.html | 2 +- .../snapshot/templates/snapshot_manage.html | 2 +- .../templates/snapshot_not_supported.html | 2 +- plinth/modules/snapshot/views.py | 35 +++++++++++-------- 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/plinth/modules/snapshot/templates/snapshot.html b/plinth/modules/snapshot/templates/snapshot.html index e1543326c..e8f377c06 100644 --- a/plinth/modules/snapshot/templates/snapshot.html +++ b/plinth/modules/snapshot/templates/snapshot.html @@ -1,4 +1,4 @@ -{% extends "app-subsubmenu.html" %} +{% extends "app.html" %} {% comment %} # # This file is part of FreedomBox. diff --git a/plinth/modules/snapshot/templates/snapshot_manage.html b/plinth/modules/snapshot/templates/snapshot_manage.html index 4af1e3ae2..cd0a1b9a2 100644 --- a/plinth/modules/snapshot/templates/snapshot_manage.html +++ b/plinth/modules/snapshot/templates/snapshot_manage.html @@ -1,4 +1,4 @@ -{% extends "app-subsubmenu.html" %} +{% extends "app.html" %} {% comment %} # # This file is part of FreedomBox. diff --git a/plinth/modules/snapshot/templates/snapshot_not_supported.html b/plinth/modules/snapshot/templates/snapshot_not_supported.html index 5d97732ff..e65f36f9d 100644 --- a/plinth/modules/snapshot/templates/snapshot_not_supported.html +++ b/plinth/modules/snapshot/templates/snapshot_not_supported.html @@ -1,4 +1,4 @@ -{% extends "app-subsubmenu.html" %} +{% extends "app.html" %} {% comment %} # # This file is part of FreedomBox. diff --git a/plinth/modules/snapshot/views.py b/plinth/modules/snapshot/views.py index 3643f2041..cf0b11fea 100644 --- a/plinth/modules/snapshot/views.py +++ b/plinth/modules/snapshot/views.py @@ -35,19 +35,23 @@ from plinth.modules import storage from . import get_configuration from .forms import SnapshotForm -subsubmenu = [{ - 'url': reverse_lazy('snapshot:index'), - 'text': ugettext_lazy('Configure') -}, { - 'url': reverse_lazy('snapshot:manage'), - 'text': ugettext_lazy('Manage Snapshots') -}] +subsubmenu = [ + { + 'url': reverse_lazy('snapshot:index'), + 'text': ugettext_lazy('Configure') + }, + { + 'url': reverse_lazy('snapshot:manage'), + 'text': ugettext_lazy('Manage Snapshots') + }, +] def not_supported_view(request): """Show that snapshots are not supported on the system.""" template_data = { 'title': snapshot_module.name, + 'name': snapshot_module.name, 'description': snapshot_module.description, 'fs_type': storage.get_filesystem_type(), 'fs_types_supported': snapshot_module.fs_types_supported, @@ -72,13 +76,15 @@ def index(request): else: form = SnapshotForm(initial=status) - return TemplateResponse(request, 'snapshot.html', { - 'title': snapshot_module.name, - 'description': snapshot_module.description, - 'manual_page': snapshot_module.manual_page, - 'subsubmenu': subsubmenu, - 'form': form - }) + return TemplateResponse( + request, 'snapshot.html', { + 'title': snapshot_module.name, + 'name': snapshot_module.name, + 'description': snapshot_module.description, + 'manual_page': snapshot_module.manual_page, + 'subsubmenu': subsubmenu, + 'form': form + }) def manage(request): @@ -104,6 +110,7 @@ def manage(request): return TemplateResponse( request, 'snapshot_manage.html', { 'title': snapshot_module.name, + 'name': snapshot_module.name, 'description': snapshot_module.description, 'manual_page': snapshot_module.manual_page, 'snapshots': snapshots,