From 5b885106a7e5e27c4a85d8e9223bfd880f6851e2 Mon Sep 17 00:00:00 2001 From: Eliana Rosselli Date: Fri, 15 Dec 2023 11:37:59 +0100 Subject: [PATCH] Refs #34909 -- Made cosmetic edits to admin navigation template. --- .../admin/templates/admin/app_list.html | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/django/contrib/admin/templates/admin/app_list.html b/django/contrib/admin/templates/admin/app_list.html index 00c4178bd2..941680d89b 100644 --- a/django/contrib/admin/templates/admin/app_list.html +++ b/django/contrib/admin/templates/admin/app_list.html @@ -8,29 +8,33 @@ {{ app.name }} {% for model in app.models %} - - {% if model.admin_url %} - {{ model.name }} - {% else %} - {{ model.name }} - {% endif %} + {% with model_name=model.object_name|lower %} + + + {% if model.admin_url %} + {{ model.name }} + {% else %} + {{ model.name }} + {% endif %} + - {% if model.add_url %} - {% translate 'Add' %} - {% else %} - - {% endif %} - - {% if model.admin_url and show_changelinks %} - {% if model.view_only %} - {% translate 'View' %} + {% if model.add_url %} + {% translate 'Add' %} {% else %} - {% translate 'Change' %} + {% endif %} - {% elif show_changelinks %} - - {% endif %} - + + {% if model.admin_url and show_changelinks %} + {% if model.view_only %} + {% translate 'View' %} + {% else %} + {% translate 'Change' %} + {% endif %} + {% elif show_changelinks %} + + {% endif %} + + {% endwith %} {% endfor %}