Skip to content

Commit f74a6c7

Browse files
committed
fix tab actions spilling over the container in Payments
1 parent 43f85fc commit f74a6c7

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

src/hope/apps/administration/static/admin/css/hope_admin.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
#result_list thead th,
23
#result_list thead th a,
34
#result_list thead th div.text,

src/hope/apps/administration/templates/admin/base.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
{% block header %}
1010
{{ block.super }}
1111
<div class="px-4">
12-
<div class="container mx-auto text-sm text-font-subtle-light dark:text-font-subtle-dark py-2 flex items-center justify-between">
13-
<div>
12+
<div class="container mx-auto text-sm text-font-subtle-light dark:text-font-subtle-dark py-2 flex flex-wrap items-center gap-2">
13+
<div class="whitespace-nowrap">
1414
{% block breadcrumbs %}
1515
<a href="{% url 'admin:index' %}" class="hover:text-primary-600">{% translate 'Home' %}</a>
1616
{% if opts %}
@@ -21,7 +21,7 @@
2121
{% endif %}
2222
{% endblock breadcrumbs %}
2323
</div>
24-
<div class="flex items-center gap-2">
24+
<div class="ml-auto min-w-0 overflow-x-auto">
2525
{% block breadcrumb_actions %}
2626
{% action_list %}
2727
{% endblock %}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{% load unfold %}
2+
3+
{% if actions_list or actions_detail or actions_items or nav_global %}
4+
<div class="flex flex-row items-center ml-auto" x-data="{ showActions: false }" x-on:click.outside="showActions = false">
5+
{% component "unfold/components/button.html" with href="#" variant="default" class="!px-0 w-[38px] lg:hidden" extra_attrs="x-on:click='showActions = !showActions'" %}
6+
<span class="material-symbols-outlined">more_horiz</span>
7+
{% endcomponent %}
8+
9+
<ul class="bg-white hidden flex-col font-medium left-0 right-0 lg:flex lg:flex-row lg:mb-0 lg:mt-0 max-lg:absolute max-lg:top-16 max-lg:container max-lg:mx-auto dark:bg-base-900" x-bind:class="{'max-lg:flex': showActions}">
10+
{% if not actions_list_hide_default and not actions_detail_hide_default %}
11+
{% if actions_items %}
12+
{{ actions_items }}
13+
{% endif %}
14+
15+
{% if nav_global %}
16+
{{ nav_global }}
17+
{% endif %}
18+
{% endif %}
19+
20+
{% for action in actions_list %}
21+
{% include "unfold/helpers/tab_action.html" with title=action.title link=action.path %}
22+
{% endfor %}
23+
24+
{% for action in actions_detail %}
25+
{% include "unfold/helpers/tab_action.html" with title=action.title link=action.path %}
26+
{% endfor %}
27+
</ul>
28+
</div>
29+
{% endif %}

0 commit comments

Comments
 (0)