django-smartbase-admin 1.0.25__py3-none-any.whl → 1.0.27__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.
@@ -1147,13 +1147,36 @@ class SBAdminGenericTableInlinePaginated(SBAdminGenericTableInline):
1147
1147
  per_page = 50
1148
1148
 
1149
1149
 
1150
- class SBAdminStackedInline(SBAdminInline, NestedStackedInline):
1150
+ class SBAdminStackedInlineBase(SBAdminInline):
1151
+ default_collapsed = False
1152
+
1153
+ def get_sbadmin_default_collapsed(self, request):
1154
+ return self.default_collapsed
1155
+
1156
+ def get_context_data(self, request) -> dict[str, Any]:
1157
+ context_data = super().get_context_data(request)
1158
+ context_data["default_collapsed"] = self.get_sbadmin_default_collapsed(request)
1159
+ return context_data
1160
+
1161
+ def get_sbadmin_inline_list_actions(self, request) -> list:
1162
+ actions = super().get_sbadmin_inline_list_actions(request)
1163
+ actions.append(
1164
+ SBAdminCustomAction(
1165
+ title="Collapse",
1166
+ css_class=f"collapse-all-stacked-inlines {'collapsed' if self.get_sbadmin_default_collapsed(request) else ''}",
1167
+ url=request.get_full_path(),
1168
+ )
1169
+ )
1170
+ return actions
1171
+
1172
+
1173
+ class SBAdminStackedInline(SBAdminStackedInlineBase, NestedStackedInline):
1151
1174
  template = "sb_admin/inlines/stacked_inline.html"
1152
1175
  fieldset_template = "sb_admin/includes/inline_fieldset.html"
1153
1176
  formset = SBAdminNestedInlineFormSet
1154
1177
 
1155
1178
 
1156
- class SBAdminGenericStackedInline(SBAdminInline, NestedGenericStackedInline):
1179
+ class SBAdminGenericStackedInline(SBAdminStackedInlineBase, NestedGenericStackedInline):
1157
1180
  template = "sb_admin/inlines/stacked_inline.html"
1158
1181
  fieldset_template = "sb_admin/includes/inline_fieldset.html"
1159
1182
  formset = SBAdminGenericInlineFormSet
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: \n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2025-07-29 12:46+0200\n"
10
+ "POT-Creation-Date: 2025-09-11 16:32+0200\n"
11
11
  "PO-Revision-Date: 2023-11-15 15:21+0100\n"
12
12
  "Last-Translator: \n"
13
13
  "Language-Team: \n"
@@ -481,6 +481,9 @@ msgstr "alebo uložiť ako"
481
481
  msgid "Cancel"
482
482
  msgstr "Zrušiť"
483
483
 
484
+ msgid "Calendar"
485
+ msgstr "Kalendár"
486
+
484
487
  msgid "Yes"
485
488
  msgstr "Áno"
486
489
 
@@ -731,6 +734,12 @@ msgstr "Posunúť nižšie"
731
734
  msgid "Reorder"
732
735
  msgstr "Preusporiadať"
733
736
 
737
+ msgid "Expand"
738
+ msgstr "Rozbaliť"
739
+
740
+ msgid "Collapse"
741
+ msgstr "Zbaliť"
742
+
734
743
  #, python-brace-format
735
744
  msgid "<strong>${from} - ${to}</strong> of <strong>${total}</strong><span class=\"max-xs:hidden\"> items</span>"
736
745
  msgstr "<strong>${from} - ${to}</strong> z <strong>${total}</strong><span class=\"max-xs:hidden\"> položiek</span>"