django-smartbase-admin 0.2.86__py3-none-any.whl → 0.2.88__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.
- django_smartbase_admin/admin/admin_base.py +16 -0
- django_smartbase_admin/engine/const.py +1 -0
- django_smartbase_admin/engine/modal_view.py +1 -1
- django_smartbase_admin/static/sb_admin/dist/main_style.css +1 -1
- django_smartbase_admin/static/sb_admin/dist/table.js +1 -1
- django_smartbase_admin/static/sb_admin/images/flags/de-at.png +0 -0
- django_smartbase_admin/static/sb_admin/images/flags/de-ch.png +0 -0
- django_smartbase_admin/static/sb_admin/src/css/_components.css +26 -0
- django_smartbase_admin/static/sb_admin/src/css/_inlines.css +1 -0
- django_smartbase_admin/static/sb_admin/src/js/table_modules/selection_module.js +1 -1
- django_smartbase_admin/templates/sb_admin/includes/table_inline_delete_button.html +4 -5
- django_smartbase_admin/templates/sb_admin/inlines/table_inline.html +24 -6
- django_smartbase_admin/templatetags/sb_admin_tags.py +19 -0
- django_smartbase_admin/views/translations_view.py +1 -1
- {django_smartbase_admin-0.2.86.dist-info → django_smartbase_admin-0.2.88.dist-info}/METADATA +1 -1
- {django_smartbase_admin-0.2.86.dist-info → django_smartbase_admin-0.2.88.dist-info}/RECORD +18 -16
- {django_smartbase_admin-0.2.86.dist-info → django_smartbase_admin-0.2.88.dist-info}/LICENSE.md +0 -0
- {django_smartbase_admin-0.2.86.dist-info → django_smartbase_admin-0.2.88.dist-info}/WHEEL +0 -0
|
@@ -121,6 +121,7 @@ from django_smartbase_admin.engine.admin_base_view import (
|
|
|
121
121
|
from django_smartbase_admin.engine.const import (
|
|
122
122
|
OBJECT_ID_PLACEHOLDER,
|
|
123
123
|
TRANSLATIONS_SELECTED_LANGUAGES,
|
|
124
|
+
ROW_CLASS_FIELD,
|
|
124
125
|
)
|
|
125
126
|
from django_smartbase_admin.services.translations import SBAdminTranslationsService
|
|
126
127
|
from django_smartbase_admin.services.views import SBAdminViewService
|
|
@@ -909,6 +910,21 @@ class SBAdminInline(
|
|
|
909
910
|
ordering = None
|
|
910
911
|
all_base_fields_form = None
|
|
911
912
|
|
|
913
|
+
def get_readonly_fields(self, request, obj=None):
|
|
914
|
+
readonly_fields = super().get_readonly_fields(request, obj)
|
|
915
|
+
if ROW_CLASS_FIELD not in readonly_fields:
|
|
916
|
+
readonly_fields += (ROW_CLASS_FIELD,)
|
|
917
|
+
return readonly_fields
|
|
918
|
+
|
|
919
|
+
def get_fields(self, request, obj=None):
|
|
920
|
+
fields = super().get_fields(request, obj)
|
|
921
|
+
if ROW_CLASS_FIELD not in fields:
|
|
922
|
+
fields += (ROW_CLASS_FIELD,)
|
|
923
|
+
return fields
|
|
924
|
+
|
|
925
|
+
def get_sbadmin_row_class(self, obj):
|
|
926
|
+
return ""
|
|
927
|
+
|
|
912
928
|
def get_ordering(self, request) -> tuple[str]:
|
|
913
929
|
"""
|
|
914
930
|
Hook for specifying field ordering.
|
|
@@ -72,3 +72,4 @@ DETAIL_STRUCTURE_RIGHT_CLASS = "detail-structure-right"
|
|
|
72
72
|
TRANSLATIONS_SELECTED_LANGUAGES = "translation_selected_languages"
|
|
73
73
|
OVERRIDE_CONTENT_OF_NOTIFICATION = "override_notification_content"
|
|
74
74
|
FIELDSET_HIDE_HEADER_CLASS = "hide-header"
|
|
75
|
+
ROW_CLASS_FIELD = "get_sbadmin_row_class"
|
|
@@ -64,7 +64,7 @@ class ListActionModalView(ActionModalView):
|
|
|
64
64
|
return response
|
|
65
65
|
|
|
66
66
|
def get_selection_queryset(self, request, form):
|
|
67
|
-
list_action =
|
|
67
|
+
list_action = self.view.sbadmin_list_action_class(self.view, request)
|
|
68
68
|
return list_action.get_data_queryset().filter(
|
|
69
69
|
list_action.get_selection_queryset()
|
|
70
70
|
)
|