accrete 0.0.50__py3-none-any.whl → 0.0.52__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- accrete/contrib/ui/__init__.py +1 -0
- accrete/contrib/ui/context.py +3 -2
- accrete/contrib/ui/elements.py +9 -0
- accrete/contrib/ui/static/css/accrete.css +1127 -3002
- accrete/contrib/ui/static/css/accrete.css.map +1 -1
- accrete/contrib/ui/static/css/accrete.scss +76 -14
- accrete/contrib/ui/static/js/filter.js +0 -13
- accrete/contrib/ui/templates/ui/layout.html +81 -9
- accrete/contrib/ui/templates/ui/partials/filter.html +71 -20
- accrete/contrib/ui/templates/ui/partials/header.html +1 -1
- accrete/contrib/ui/templates/ui/partials/pagination_list.html +2 -2
- accrete/contrib/ui/templates/ui/table.html +0 -1
- accrete/contrib/ui/templatetags/accrete_ui.py +1 -4
- {accrete-0.0.50.dist-info → accrete-0.0.52.dist-info}/METADATA +1 -1
- {accrete-0.0.50.dist-info → accrete-0.0.52.dist-info}/RECORD +17 -17
- {accrete-0.0.50.dist-info → accrete-0.0.52.dist-info}/WHEEL +1 -1
- {accrete-0.0.50.dist-info → accrete-0.0.52.dist-info}/licenses/LICENSE +0 -0
accrete/contrib/ui/__init__.py
CHANGED
accrete/contrib/ui/context.py
CHANGED
@@ -10,7 +10,8 @@ from django.core import paginator
|
|
10
10
|
from django.forms import Form, ModelForm
|
11
11
|
from accrete.annotation import Annotation
|
12
12
|
from .elements import (
|
13
|
-
ClientAction, BreadCrumb, TableField, TableFieldType, TableFieldAlignment
|
13
|
+
ClientAction, BreadCrumb, TableField, TableFieldType, TableFieldAlignment,
|
14
|
+
ClientActionGroup
|
14
15
|
)
|
15
16
|
from .filter import Filter
|
16
17
|
|
@@ -32,7 +33,7 @@ class Context:
|
|
32
33
|
|
33
34
|
title: str = ''
|
34
35
|
breadcrumbs: list[BreadCrumb] = field(default_factory=list)
|
35
|
-
actions: list[ClientAction] = field(default_factory=list)
|
36
|
+
actions: list[ClientAction | ClientActionGroup] = field(default_factory=list)
|
36
37
|
kwargs: dict = field(default_factory=dict)
|
37
38
|
|
38
39
|
def __post_init__(self):
|
accrete/contrib/ui/elements.py
CHANGED
@@ -25,6 +25,15 @@ class ActionMethod(Enum):
|
|
25
25
|
DELETE = 'hx-delete'
|
26
26
|
|
27
27
|
|
28
|
+
@dataclass
|
29
|
+
class ClientActionGroup:
|
30
|
+
|
31
|
+
name: str
|
32
|
+
actions: list[ActionMethod] = field(default_factory=list)
|
33
|
+
icon: Icon | type[Enum] = None
|
34
|
+
icon_only: bool = False
|
35
|
+
|
36
|
+
|
28
37
|
@dataclass
|
29
38
|
class ClientAction:
|
30
39
|
|