Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Log out user menu on Django 5.0 #512

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions djangocms_admin_style/sass/components/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,41 @@
background: $color-primary;
}
}
form {
box-shadow: none;
margin: 0;
padding: 0;
button {
fsbraun marked this conversation as resolved.
Show resolved Hide resolved
float: none;
white-space: nowrap;
line-height: 30px;
height: 30px;
padding: 0 10px 0 15px !important;
cursor: pointer;

border: none !important;
border-radius: 0 !important;
width: 100% !important;
color: $black !important;
font-size: $font-size-normal !important;
font-weight: bold;
font-family: $base-font-family !important;
text-align: left;

&:active,
&:focus {
filter: none !important;
box-shadow: none !important;
text-decoration: underline !important;
}
&:hover {
filter: none !important;
color: $white !important;
background: $color-primary !important;
text-decoration: none !important;
}
}
}
}
}
}
Expand Down

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions djangocms_admin_style/templates/admin/inc/branding.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ <h1>{{ site_header|default:_('Django Administration') }}</h1>
</li>
<li class="toolbar-item-navigation-break">-----</li>
{% endif %}
<li>
<a href="{% url 'admin:logout' %}">
<span>{% trans 'Log out' %} {% firstof user.get_short_name user.get_username %}</span>
</a>
</li>
{% if user.is_authenticated %}
<li>
<form method="POST" action="{% url 'admin:logout' %}">
{% csrf_token %}
<button type="submit">{% trans 'Log out' %} {% firstof user.get_short_name user.get_username %}</button>
</form>
</li>
{% endif %}
</ul>
</li>
</ul>
Expand Down
Loading