Skip to content

Commit

Permalink
fix Alias language filer selector UI issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
FreemanPancake committed Oct 25, 2024
1 parent abbad0d commit acd9871
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@


class AliasAdmin(OriginalAliasAdmin):

change_list_template = "monkeypatch/cms/admin/cms/grouper/change_list.html"

def get_actions_list(self) -> list:
"""Add alias manage version link"""
original_list = super().get_actions_list()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% extends "admin/change_list.html" %}{% load i18n %}
{% block search %}
<div class="language-selector" style="width: fit-content; margin-bottom: 1em;">
<label>{% trans "Language" %}:&nbsp;</label>
<select class="language-selector js-language-selector" style="min-width: 180px;">
{% for code, lang in cl.model_admin.get_language_tuple %}
<option value="{{ code }}"{% if cl.model_admin.language == code %} selected{% endif %}>{{ lang }}</option>
{% endfor %}
</select>
</div>{{ block.super }}
{% endblock %}

0 comments on commit acd9871

Please sign in to comment.