forked from Github-Mirrors/canaille
fix: better consistency of admin dropdown menu
The dropdown was not always displayed due to lack of 'menuitem' parameter on some calls. The 'active' and 'dropdown' classes from fomanticUI clash so the dropdown is not displayed when both are added to the `div` tag. As workaround, 'active' class is replaced by a custom 'dropdown-active' class.
This commit is contained in:
parent
b4544ebc54
commit
803fadd0e9
4 changed files with 9 additions and 3 deletions
|
@ -43,7 +43,7 @@ def mail_index(user):
|
|||
else:
|
||||
flash(_("The test invitation mail has been sent correctly"), "error")
|
||||
|
||||
return render_template("mail/admin.html", form=form)
|
||||
return render_template("mail/admin.html", form=form, menuitem="admin")
|
||||
|
||||
|
||||
@bp.route("/mail/password-init.html")
|
||||
|
|
|
@ -12,7 +12,9 @@ bp = Blueprint("authorizations", __name__, url_prefix="/admin/authorization")
|
|||
def index(user):
|
||||
authorizations = AuthorizationCode.filter()
|
||||
return render_template(
|
||||
"oidc/admin/authorization_list.html", authorizations=authorizations
|
||||
"oidc/admin/authorization_list.html",
|
||||
authorizations=authorizations,
|
||||
menuitem="admin",
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -64,3 +64,7 @@ i.massive.massive.massive.portrait.icon, i.massive.massive.massive.portrait.icon
|
|||
.profile-form label i{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dropdown-active {
|
||||
background: rgba(0,0,0,.05) !important;
|
||||
}
|
|
@ -60,7 +60,7 @@
|
|||
</a>
|
||||
{% endif %}
|
||||
{% if user.can_manage_oidc %}
|
||||
<div class="ui dropdown item {% if menuitem == "admin" %}active{% endif %}">
|
||||
<div class="ui dropdown item {% if menuitem == "admin" %}dropdown-active{% endif %}">
|
||||
<i class="settings icon"></i>
|
||||
Admin
|
||||
<div class="menu">
|
||||
|
|
Loading…
Reference in a new issue