app: Refactor all apps to use the Info component

- Remove the need to pass all the individual information elements to the AppView
  separately. This eliminates many issues with elements that were mistakenly not
  sent to AppView. Also reduces a lot of code duplication.

- Create App classes for power and sso for consistency.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2020-02-16 18:22:01 -05:00
1 parent 67a216ba18
commit b576a77c3d
112 files changed
+862 -1041

No files matched your search

+1 -6
View File
@@ -37,14 +37,9 @@ from .forms import CreateRepoForm, EditRepoForm
class GitwebAppView(views.AppView):
"""Serve configuration page."""
clients = gitweb.clients
name = gitweb.name
description = gitweb.description
app_id = 'gitweb'
show_status_block = False
template_name = 'gitweb_configure.html'
icon_filename = gitweb.icon_filename
manual_page = gitweb.manual_page
def get_context_data(self, *args, **kwargs):
"""Add repositories to the context data."""
@@ -163,6 +158,6 @@ def delete(request, name):
return redirect(reverse_lazy('gitweb:index'))
return TemplateResponse(request, 'gitweb_delete.html', {
'title': gitweb.name,
'title': gitweb.app.info.name,
'name': name
})