From 25d3c5cb5a1a3d819a4d213191d6090c9ef19f26 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 23 Jul 2025 07:06:32 +0930 Subject: [PATCH] chore(base): remove ui templates ref: #873 closes #757 --- app/templates/base.html.j2 | 132 +------------------------- app/templates/content/field.html.j2 | 101 -------------------- app/templates/content/section.html.j2 | 104 -------------------- app/templates/detail.html.j2 | 47 --------- app/templates/form.html.j2 | 12 --- app/templates/home.html.j2 | 12 --- app/templates/navigation.html.j2 | 86 ----------------- app/templates/password_change.html.j2 | 13 --- 8 files changed, 2 insertions(+), 505 deletions(-) delete mode 100644 app/templates/content/field.html.j2 delete mode 100644 app/templates/content/section.html.j2 delete mode 100644 app/templates/detail.html.j2 delete mode 100644 app/templates/form.html.j2 delete mode 100644 app/templates/home.html.j2 delete mode 100644 app/templates/navigation.html.j2 delete mode 100644 app/templates/password_change.html.j2 diff --git a/app/templates/base.html.j2 b/app/templates/base.html.j2 index ac23bf63..450493c3 100644 --- a/app/templates/base.html.j2 +++ b/app/templates/base.html.j2 @@ -12,143 +12,15 @@ {% else %} - - {% block additional-stylesheet %}{% endblock additional-stylesheet %} - + {% endif %} - {% block body %} -
-

{% settings_value "SITE_TITLE" %}

- - {%if user.is_authenticated %} - - {% endif %} - -
- -
- - - - -
-

{% block title %}{{ content_title }}{% endblock %} - {% if model_delete_url %} - - {% include 'icons/delete.svg' %} - - {% endif %} - {% if model_docs_path %} - - {% include 'icons/help.svg' %} - - {% endif %} -

- {% if user.is_authenticated %} - {% if not user_default_organization %} -
You do not have a default organization set, go to user settings to set one
- {% endif %} - {% endif %} - {% block article %} -
- {% block content %}{% endblock %} -
- {% endblock article %} - - -
-
- {% endblock body %} + {% block body %}{% endblock body %} diff --git a/app/templates/content/field.html.j2 b/app/templates/content/field.html.j2 deleted file mode 100644 index 81832ae3..00000000 --- a/app/templates/content/field.html.j2 +++ /dev/null @@ -1,101 +0,0 @@ -{% load json %} -{% load markdown %} -{% load choice_ids %} - -{% block additional-stylesheet %} - {% load static %} - -{% endblock additional-stylesheet %} - -{% if field.widget_type == 'textarea' or field.label == 'Notes' %} - - {% if field.name in section.json and field.value %} - -
{{ field.value.strip | json_pretty | safe }}
- - {% elif field.name in section.markdown or field.label == 'Notes' %} - - {% if field.label == 'Notes' %} - -
- - -
- {% if field.value %} - {{ field.value | markdown | safe }} - {% else %} -   - {% endif %} -
-
- - {% else %} - - {% if field.value %} - -
{{ field.value | markdown | safe }}
- - {% else %} - -   - - {% endif %} - - {% endif %} - - {% elif not field.value %} - -   - - {% endif %} - - -{% else %} - - -
- - - {% if field.field.choices %} {# Display the selected choice text value #} - - {% if field.value %} - - {% for field_value in field.value|choice_ids %} - - {% for id, value in field.field.choices %} - - {% if field_value == id %} - - {{ value }}, - - {% endif %} - - {% endfor %} - - {% endfor %} - - {% else %} - -   - - {% endif %} - - {% else %} - - {% if field.value is not None %} - - {{ field.value }} - - {% else %} - -   - - {% endif %} - - {% endif %} - -
- -{% endif %} diff --git a/app/templates/content/section.html.j2 b/app/templates/content/section.html.j2 deleted file mode 100644 index 751ee0e0..00000000 --- a/app/templates/content/section.html.j2 +++ /dev/null @@ -1,104 +0,0 @@ -{% load json %} -{% load markdown %} - -{% if not tab.sections %} - -

{{ tab.name }}

- -{% endif %} - -{% for section in tab.sections %} - - - {% if forloop.first %} - -

- {{ tab.name }} - {% for external_link in external_links %} - {% include 'icons/external_link.html.j2' with external_link=external_link %} - {% endfor %} -

- - {% else %} - -
-

{{ section.name }}

- - {% endif %} - -
- - {% if section.layout == 'single' %} - - {% for section_field in section.fields %} - {% for field in form %} - - {% if field.name in section_field %} - - {% include 'content/field.html.j2' %} - - {% endif %} - - {% endfor %} - {% endfor %} - - {% elif section.layout == 'double' %} - - {% if section.left %} - -
- - {% for section_field in section.left %} - {% for field in form %} - - {% if field.name in section_field %} - - {% include 'content/field.html.j2' %} - - {% endif %} - - {% endfor %} - {% endfor %} - -
- - {% endif %} - - - {% if section.right %} - -
- - {% for section_field in section.right %} - {% for field in form %} - - {% if field.name in section_field %} - - {% include 'content/field.html.j2' %} - - {% endif %} - - {% endfor %} - {% endfor %} - -
- - {% endif %} - - {% endif %} - - {% if forloop.first %} - - {% if tab.edit_url %} - -
- -
- - {% endif %} - - {% endif %} - -
- -{% endfor %} diff --git a/app/templates/detail.html.j2 b/app/templates/detail.html.j2 deleted file mode 100644 index 5fa6ee92..00000000 --- a/app/templates/detail.html.j2 +++ /dev/null @@ -1,47 +0,0 @@ -{% extends 'base.html.j2' %} - -{% block content %} - -
- - - - {% for key, tab in form.tabs.items %} - - {% if forloop.first %} - - - - {% else %} - - - - {% endif %} - - {% endfor %} - -
- -{% block tabs %}{% endblock %} - -{% if open_tab %} - - - -{% else %} - - - -{% endif %} - -{% endblock %} \ No newline at end of file diff --git a/app/templates/form.html.j2 b/app/templates/form.html.j2 deleted file mode 100644 index 5343e9a7..00000000 --- a/app/templates/form.html.j2 +++ /dev/null @@ -1,12 +0,0 @@ -{% extends 'base.html.j2' %} - -{% block content %} - -
-
- {% csrf_token %} - {{ form.as_div }} - -
-
-{% endblock %} diff --git a/app/templates/home.html.j2 b/app/templates/home.html.j2 deleted file mode 100644 index a9e83059..00000000 --- a/app/templates/home.html.j2 +++ /dev/null @@ -1,12 +0,0 @@ -{% extends 'base.html.j2' %} - - -{% block content %} - -To Do List: - - - -{% endblock %} diff --git a/app/templates/navigation.html.j2 b/app/templates/navigation.html.j2 deleted file mode 100644 index b0b147a2..00000000 --- a/app/templates/navigation.html.j2 +++ /dev/null @@ -1,86 +0,0 @@ -{% block navigation %} - -{% for group in nav_items %} - - -
- -
-{% endfor %} - -{% endblock %} diff --git a/app/templates/password_change.html.j2 b/app/templates/password_change.html.j2 deleted file mode 100644 index 7d4a8ea8..00000000 --- a/app/templates/password_change.html.j2 +++ /dev/null @@ -1,13 +0,0 @@ -{% extends 'base.html.j2' %} - -{% block title %}Change Password{% endblock %} - -{% block content %} -
-
- {% csrf_token %} - {{ form }} - -
-
-{% endblock %}