Skip to content

Commit 4d1f0b7

Browse files
authored
1 parent bad0f7d commit 4d1f0b7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/django_twc_toolbox/crud/templates/neapolitan/object_list.html

+6-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
{% block content %}
88
<div class="sm:flex sm:items-center">
99
<h1 class="text-base font-semibold leading-6 text-gray-900 sm:flex-auto">{{ object_verbose_name_plural|capfirst }}</h1>
10-
<div class="mt-4 sm:flex-none sm:mt-0 sm:ml-16">
11-
<a class="block py-2 px-3 text-sm font-semibold text-center text-white bg-indigo-600 rounded-md shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
12-
href="{{ create_view_url }}">Add a new {{ object_verbose_name }}</a>
13-
</div>
10+
{% if create_view_url %}
11+
<div class="mt-4 sm:flex-none sm:mt-0 sm:ml-16">
12+
<a class="block py-2 px-3 text-sm font-semibold text-center text-white bg-indigo-600 rounded-md shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
13+
href="{{ create_view_url }}">Add a new {{ object_verbose_name }}</a>
14+
</div>
15+
{% endif %}
1416
</div>
1517

1618
{% partialdef object-list inline=True %}

0 commit comments

Comments
 (0)