Skip to content

Commit

Permalink
remove refs to bootstrap3 template folder
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Jan 20, 2025
1 parent ee7c6d4 commit 596ec1b
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 16 deletions.
5 changes: 2 additions & 3 deletions edc_model_admin/admin_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from django.contrib.sites.shortcuts import get_current_site
from django.template.response import TemplateResponse
from django.urls import NoReverseMatch, reverse
from edc_dashboard.utils import get_bootstrap_version
from edc_protocol.research_protocol_config import ResearchProtocolConfig

admin.site.enable_nav_sidebar = False
Expand Down Expand Up @@ -41,8 +40,8 @@ class EdcAdminSite(DjangoAdminSite):

index_template = "edc_model_admin/admin/index.html"
app_index_template = "edc_model_admin/admin/app_index.html"
login_template = f"edc_auth/bootstrap{get_bootstrap_version()}/login.html"
logout_template = f"edc_auth/bootstrap{get_bootstrap_version()}/login.html"
login_template = "edc_auth/login.html"
logout_template = "edc_auth/login.html"
enable_nav_sidebar = False
final_catch_all_view = True
site_url = "/administration/"
Expand Down
File renamed without changes.
19 changes: 10 additions & 9 deletions edc_model_admin/templatetags/edc_admin_modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def get_cancel_url(context, cancel_attr=None):
return cancel_url


@register.inclusion_tag("edc_submit_line.html", takes_context=True)
@register.inclusion_tag("edc_model_admin/edc_submit_line.html", takes_context=True)
def edc_submit_row(
context,
cancel_url: str | None = None,
Expand Down Expand Up @@ -123,7 +123,7 @@ def edc_submit_row(
return django_submit_row(context)


@register.inclusion_tag("logout_row.html", takes_context=True)
@register.inclusion_tag("edc_model_admin/logout_row.html", takes_context=True)
def logout_row(context):
return dict(
perms=context.get("perms"),
Expand All @@ -133,7 +133,7 @@ def logout_row(context):
)


@register.inclusion_tag("edc_revision_line.html", takes_context=True)
@register.inclusion_tag("edc_model_admin/edc_revision_line.html", takes_context=True)
def revision_row(context):
return dict(
copyright=context.get("copyright") or ResearchProtocolConfig().copyright,
Expand All @@ -143,12 +143,12 @@ def revision_row(context):
)


@register.inclusion_tag("edc_instructions.html", takes_context=True)
@register.inclusion_tag("edc_model_admin/edc_instructions.html", takes_context=True)
def instructions(context):
return {"instructions": context.get("instructions")}


@register.inclusion_tag("edc_additional_instructions.html", takes_context=True)
@register.inclusion_tag("edc_model_admin/edc_additional_instructions.html", takes_context=True)
def additional_instructions(context):
return {
"additional_instructions": context.get("additional_instructions"),
Expand All @@ -166,7 +166,7 @@ def get_label_lower(model) -> str:
return ""


@register.inclusion_tag("yes_no_coloring.html", takes_context=False)
@register.inclusion_tag("edc_model_admin/yes_no_coloring.html", takes_context=False)
def yes_no_coloring(value) -> dict:
context = dict(value=value)
if value == YES:
Expand All @@ -176,12 +176,13 @@ def yes_no_coloring(value) -> dict:
return context


@register.inclusion_tag("navbar_for_admin_templates.html", takes_context=True)
@register.inclusion_tag("edc_model_admin/navbar_for_admin_templates.html", takes_context=True)
def show_navbar_for_admin_templates(context):
"""bootstrap 5"""
return context


@register.inclusion_tag("navbar_for_admin_templates_b3.html", takes_context=True)
@register.inclusion_tag(
"edc_model_admin/navbar_for_admin_templates_b3.html", takes_context=True
)
def show_navbar_for_admin_templates_b3(context):
return context
2 changes: 1 addition & 1 deletion edc_model_admin/tests/templates/crfmodel_list.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'edc_dashboard/bootstrap3/base.html' %}
{% extends 'edc_dashboard/base.html' %}
{% load static %}

{% block main %}
Expand Down
2 changes: 1 addition & 1 deletion edc_model_admin/tests/templates/dashboard.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'edc_dashboard/bootstrap3/base.html' %}
{% extends 'edc_dashboard/base.html' %}
{% load static %}
{% load i18n %}

Expand Down
2 changes: 1 addition & 1 deletion edc_model_admin/tests/templates/dashboard2.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'edc_dashboard/bootstrap3/base.html' %}
{% extends 'edc_dashboard/base.html' %}
{% load static %}

{% block main %}
Expand Down
2 changes: 1 addition & 1 deletion edc_model_admin/tests/templates/home.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'edc_dashboard/bootstrap3/base.html' %}
{% extends 'edc_dashboard/base.html' %}
{% load static %}

{% block main %}
Expand Down

0 comments on commit 596ec1b

Please sign in to comment.