From 19a8ecb55a9185c67da1ded0dbb1a75983b527ef Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 10 Dec 2018 10:50:19 +0100 Subject: [PATCH] core: show applications on overview page --- .../administration/application/list.html | 2 +- passbook/admin/templates/blocks/form.html | 11 ++-- passbook/core/templates/overview/index.html | 60 +++++-------------- passbook/core/views/overview.py | 2 + 4 files changed, 24 insertions(+), 51 deletions(-) diff --git a/passbook/admin/templates/administration/application/list.html b/passbook/admin/templates/administration/application/list.html index 8c75c505bf..7ddc93d3da 100644 --- a/passbook/admin/templates/administration/application/list.html +++ b/passbook/admin/templates/administration/application/list.html @@ -36,4 +36,4 @@ -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/passbook/admin/templates/blocks/form.html b/passbook/admin/templates/blocks/form.html index 6f34c49c37..ed9a6cbd88 100644 --- a/passbook/admin/templates/blocks/form.html +++ b/passbook/admin/templates/blocks/form.html @@ -2,11 +2,6 @@ {% csrf_token %} {% for field in form %} -{% if field.help_text %} - - {{ field.help_text }} - -{% endif %}
{% if field.field.widget|fieldtype == 'RadioSelect' %}
{{ field|css_class:'form-control' }} + {% if field.help_text %} + + {{ field.help_text }} + + {% endif %}
{% endif %} {% for error in field.errors %} + {{error }}
diff --git a/passbook/core/templates/overview/index.html b/passbook/core/templates/overview/index.html index 35459b1956..ba49720f57 100644 --- a/passbook/core/templates/overview/index.html +++ b/passbook/core/templates/overview/index.html @@ -1,63 +1,33 @@ {% extends "overview/base.html" %} +{% load i18n %} + {% block content %}
+ {% for app in applications %}

- 0 Ipsum + {{ app.name }}

- -

-
-
- -
-
-
-

- 20 Amet -

-
-

- 4 - 1 -

-
-
- -
-
-
-

- 9 - Adipiscing -

-
-

- -

-
-
- -
- + {% endfor %}
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/passbook/core/views/overview.py b/passbook/core/views/overview.py index c857ad6ecd..07b55ace8c 100644 --- a/passbook/core/views/overview.py +++ b/passbook/core/views/overview.py @@ -2,8 +2,10 @@ from django.contrib.auth.mixins import LoginRequiredMixin from django.views.generic import TemplateView + from passbook.core.models import Application + class OverviewView(LoginRequiredMixin, TemplateView): """Overview for logged in user, incase user opens passbook directly and is not being forwarded"""