From a917e4823fe401f7f2c2e87ac98172c47b9f0ac5 Mon Sep 17 00:00:00 2001 From: Ankit-lab809 Date: Fri, 24 Oct 2025 16:07:29 +0530 Subject: [PATCH 1/3] Added generate dashboard button --- iogt/templates/wagtailforms/index.html | 76 ++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 iogt/templates/wagtailforms/index.html diff --git a/iogt/templates/wagtailforms/index.html b/iogt/templates/wagtailforms/index.html new file mode 100644 index 000000000..79bd40c52 --- /dev/null +++ b/iogt/templates/wagtailforms/index.html @@ -0,0 +1,76 @@ +{% extends "wagtailadmin/generic/index.html" %} +{% load i18n wagtailadmin_tags wagtailcore_tags %} + +{% block content %} + {% trans "Forms" as page_title %} + {# Use a simple header without complex styling #} +
+

{% trans "Forms" %}

+
+ +
+ {% if form_pages %} + + + + {# Headers with explicit width (as percentages) #} + + + {# <--- NEW HEADER #} + + + + + + {% for fp in form_pages %} + + + {# Title Column #} + + + {# Parent Column #} + + + {# Origin Column (The 'fp.origin_link' is the correct property for this) #} + + + {# Status Column #} + + + {# Action Column #} + + + {% endfor %} + +
{% trans "Title" %}{% trans "Parent" %}{% trans "Origin" %}{% trans "Status" %}{% trans "Action" %}
+ + {{ fp.title }} + + + {% if fp.get_parent %} + + {{ fp.get_parent.title }} + + {% else %} + — + {% endif %} + {{ fp.content_type.name |capfirst }} ({{ fp.content_type.app_label }}.{{ fp.content_type.model }}) + {% if fp.live %} + {% trans "LIVE" %} + {% else %} + {% trans "Draft" %} + {% endif %} + + + {% trans "Generate Dashboard" %} + +
+ + {% else %} + {# Empty State #} +
+

{% trans "No forms found." %}

+
+ {% endif %} +
+{% endblock %} \ No newline at end of file From 123c4be140b083715ef25cd545bcf4c5473b2783 Mon Sep 17 00:00:00 2001 From: Ankit-lab809 Date: Mon, 3 Nov 2025 14:15:34 +0530 Subject: [PATCH 2/3] changed in index file --- iogt/templates/wagtailforms/index.html | 56 +++++++++++--------------- 1 file changed, 23 insertions(+), 33 deletions(-) diff --git a/iogt/templates/wagtailforms/index.html b/iogt/templates/wagtailforms/index.html index 79bd40c52..599087081 100644 --- a/iogt/templates/wagtailforms/index.html +++ b/iogt/templates/wagtailforms/index.html @@ -1,39 +1,31 @@ {% extends "wagtailadmin/generic/index.html" %} -{% load i18n wagtailadmin_tags wagtailcore_tags %} - +{% load i18n wagtailadmin_tags wagtailcore_tags static %} {% block content %} {% trans "Forms" as page_title %} - {# Use a simple header without complex styling #} -
-

{% trans "Forms" %}

+ - -
+
{% if form_pages %} - +
- {# Headers with explicit width (as percentages) #} - - - {# <--- NEW HEADER #} - - + + + + + {% for fp in form_pages %} - - {# Title Column #} - - - {# Parent Column #} - - - {# Origin Column (The 'fp.origin_link' is the correct property for this) #} - - - {# Status Column #} - + - - {# Action Column #} -
{% trans "Title" %}{% trans "Parent" %}{% trans "Origin" %}{% trans "Status" %}{% trans "Action" %}{% trans "Title" %}{% trans "Parent" %}{% trans "Origin" %}{% trans "Status" %}{% trans "Action" %}
+ {{ fp.title }} + {% if fp.get_parent %} {{ fp.get_parent.title }} @@ -42,21 +34,21 @@

{% trans "Forms" %}< — {% endif %}

{{ fp.content_type.name |capfirst }} ({{ fp.content_type.app_label }}.{{ fp.content_type.model }}) + + + + {{ fp.content_type.name|capfirst }} ({{ fp.content_type.app_label }}.{{ fp.content_type.model }}) + + + {% if fp.live %} {% trans "LIVE" %} {% else %} {% trans "Draft" %} {% endif %} + {% trans "Generate Dashboard" %} @@ -65,12 +57,10 @@

{% trans "Forms" %}< {% endfor %}

- {% else %} - {# Empty State #} -
+

{% trans "No forms found." %}

{% endif %}
-{% endblock %} \ No newline at end of file +{% endblock %} From c370a85b1e898798b8fbdb2d13fd7c45776f40c5 Mon Sep 17 00:00:00 2001 From: Ankit-lab809 Date: Mon, 3 Nov 2025 14:18:32 +0530 Subject: [PATCH 3/3] deleted list form file --- iogt/templates/wagtailforms/list_forms.html | 27 --------------------- 1 file changed, 27 deletions(-) delete mode 100644 iogt/templates/wagtailforms/list_forms.html diff --git a/iogt/templates/wagtailforms/list_forms.html b/iogt/templates/wagtailforms/list_forms.html deleted file mode 100644 index 42b9ec869..000000000 --- a/iogt/templates/wagtailforms/list_forms.html +++ /dev/null @@ -1,27 +0,0 @@ -{% load i18n %} - - - - - - - - - - - - {% for fp in form_pages %} - - - - - - {% endfor %} - -
{% trans "Title" %}{% trans "Origin" %}Action
- - - {{ fp.content_type.name |capfirst }} ({{ fp.content_type.app_label }}.{{ fp.content_type.model }}) - - -