Skip to content

Commit

Permalink
Merge branch 'main' of ssh://github.com/hypy13/django-daisy
Browse files Browse the repository at this point in the history
  • Loading branch information
yaghoubi committed Dec 15, 2024
2 parents d7f309a + f2bde41 commit 9c86910
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions django_daisy/templates/admin/parts/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

{% if app.models|length == 1 %}
<li>
<a class="{% if app.models.0.admin_url in request.path|urlencode %} active{% endif %}" href="{{ app.models.0.admin_url }}">
<a class="{% if app.models.0.admin_url in request.path|urlencode %} active{% endif %}"
href="{{ app.models.0.admin_url }}">
<i class="{{ app.icon }}"></i>
{{ app.name }}
</a>
Expand All @@ -45,7 +46,8 @@
<ul>
{% for model in app.models %}
<li class="model-{{ model.object_name|lower }}">
<a class="{% if model.admin_url in request.path|urlencode %} active {% endif %}" href="{{ model.admin_url }}">
<a class="{% if model.admin_url in request.path|urlencode %} active {% endif %}"
href="{{ model.admin_url }}">
{{ model.name }}
</a>
</li>
Expand All @@ -57,8 +59,11 @@
{% endif %}
{% endfor %}
</ul>

{% if not app_list %}
<ul class="menu rounded-box w-56">
<li>{% translate 'You don’t have permission to view or edit anything.' %}</li>
</ul>
{% endif %}
</div>

{% if not app_list %}
<p>{% translate 'You don’t have permission to view or edit anything.' %}</p>
{% endif %}

0 comments on commit 9c86910

Please sign in to comment.