django-smartbase-admin 1.0.34__py3-none-any.whl → 1.0.36__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.
@@ -64,6 +64,7 @@ class SBAdminBaseView(object):
64
64
  global_filter_data_map = None
65
65
  field_cache = None
66
66
  sbadmin_detail_actions = None
67
+ add_label = None
67
68
  delete_confirmation_template = "sb_admin/actions/delete_confirmation.html"
68
69
 
69
70
  def init_view_static(self, configuration, model, admin_site):
@@ -221,6 +222,9 @@ class SBAdminBaseView(object):
221
222
  "color_scheme_form": color_scheme_form,
222
223
  }
223
224
 
225
+ def get_add_label(self, request, object_id: int | str | None = None):
226
+ return self.add_label
227
+
224
228
  def get_global_context(
225
229
  self, request, object_id: int | str | None = None
226
230
  ) -> dict[str, Any]:
@@ -228,6 +232,7 @@ class SBAdminBaseView(object):
228
232
  "view_id": self.get_id(),
229
233
  "configuration": request.request_data.configuration,
230
234
  "request_data": request.request_data,
235
+ "add_label": self.get_add_label(request, object_id),
231
236
  "DETAIL_STRUCTURE_RIGHT_CLASS": DETAIL_STRUCTURE_RIGHT_CLASS,
232
237
  "OVERRIDE_CONTENT_OF_NOTIFICATION": OVERRIDE_CONTENT_OF_NOTIFICATION,
233
238
  "username_data": self.get_username_data(request),
@@ -1,3 +1,5 @@
1
+ from typing import Any
2
+
1
3
  from django_smartbase_admin.admin.site import sb_admin_site
2
4
 
3
5
  from django_smartbase_admin.admin.admin_base import SBAdmin
@@ -34,3 +36,8 @@ class DjangoCMSPluginSBAdmin(SBAdmin):
34
36
  # response_add from CMSPluginBase
35
37
  self.object_successfully_changed = True
36
38
  return self.render_close_frame(request, obj)
39
+
40
+ def get_change_view_context(self, request, object_id) -> dict | dict[str, Any]:
41
+ return {
42
+ "show_back_button": True,
43
+ }
@@ -88,7 +88,7 @@
88
88
  <svg class="w-20 h-20 md:mr-8">
89
89
  <use xlink:href="#Plus"></use>
90
90
  </svg>
91
- <span>{% trans 'Add' %} {{ model_name }}</span>
91
+ <span>{% trans 'Add' %}{% if add_label %} {{ add_label }}{% endif %}</span>
92
92
  </a>
93
93
  </li>
94
94
  {% endif %}
@@ -1,7 +1,7 @@
1
1
  {% load i18n %}
2
2
 
3
3
  {% if add %}
4
- {% blocktrans with name=opts.verbose_name %}Add {{ name }}{% endblocktrans %}
4
+ {% trans 'Add' %}{% if add_label %} {{ add_label }}{% endif %}
5
5
  {% else %}
6
6
  {{ original|truncatewords:"18" }}
7
7
  {% endif %}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-smartbase-admin
3
- Version: 1.0.34
3
+ Version: 1.0.36
4
4
  Summary:
5
5
  Home-page: https://smartbase-sk.github.io/django-smartbase-admin-docs/
6
6
  License: MIT
@@ -10,7 +10,7 @@ django_smartbase_admin/apps.py,sha256=heZq5O2GHlkJdhUCHbRR7Nmm0irSxnL9NMqY43_O7V
10
10
  django_smartbase_admin/compilemessages.py,sha256=-_FEFQlOvE4L8UzSuUxSxZQjgGlwL9IZtmg59fW_kIQ,342
11
11
  django_smartbase_admin/engine/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  django_smartbase_admin/engine/actions.py,sha256=vmwMmo1mxxHSLTlbNwbH6h9ulxwDVJnF3r8d-axiKPI,2084
13
- django_smartbase_admin/engine/admin_base_view.py,sha256=NNHAnVVFCEZQq1_pkmb8jZPrw0xlD7ByfeDTIAagLWo,32460
13
+ django_smartbase_admin/engine/admin_base_view.py,sha256=3gqk0TwSfgYINqzUAZYXWPEm7s-e8D9pXt0KtsOwYQY,32651
14
14
  django_smartbase_admin/engine/admin_entrypoint_view.py,sha256=jfMfcYPfdre2abHfC4KIxaP_epJFuCeTcujGhGd4Tl4,624
15
15
  django_smartbase_admin/engine/admin_view.py,sha256=9wGffahDR3IYmhL9ZbX8uitwGdXdw5DIL5GnWBawmJM,4238
16
16
  django_smartbase_admin/engine/configuration.py,sha256=DcmEh-FR3pn6H-_mNBuiml-ILi2v3KEZPC2YYPvnbFE,8752
@@ -25,7 +25,7 @@ django_smartbase_admin/engine/menu_item.py,sha256=HP5EwjxBYygAg72RsgQyde62DI9CDg
25
25
  django_smartbase_admin/engine/modal_view.py,sha256=heo9r-RaRm2MuGtPd_fhWM2jRmxtctM-L59YZQOoOvs,2308
26
26
  django_smartbase_admin/engine/request.py,sha256=jxYpsepc0SDKUFQFoCXTGLpbTP7eroJEWHO-lcRM5ec,2676
27
27
  django_smartbase_admin/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
- django_smartbase_admin/integration/django_cms.py,sha256=OuBrSxGR8Q5sV1i0W0_uWGu62H0MByWZhGaD_v0eGvo,1258
28
+ django_smartbase_admin/integration/django_cms.py,sha256=z_3g5sH3MUuzxm_eW63SPukqyicUGiFW0IvoG0qY3h8,1432
29
29
  django_smartbase_admin/locale/sk/LC_MESSAGES/django.mo,sha256=kZ8PxgEpqxP0b6b4T8vepKnD3Y-WWEbO5ix6Y_t2qVI,17027
30
30
  django_smartbase_admin/locale/sk/LC_MESSAGES/django.po,sha256=tsT1AHp82nwzPRuEA2gPfh1E3DwrUe7NWlcZpzFEIeo,19079
31
31
  django_smartbase_admin/makemessages.py,sha256=2sMMutEHGfJqNEuFtLrbCw8YjFKNuRHJR_team1kp0Y,381
@@ -566,7 +566,7 @@ django_smartbase_admin/templates/sb_admin/actions/change_password.html,sha256=Lh
566
566
  django_smartbase_admin/templates/sb_admin/actions/dashboard.html,sha256=ur4OFSKJrB71Sl8O5fF0BsV86zLq1tyiadmrDUy9aJ0,297
567
567
  django_smartbase_admin/templates/sb_admin/actions/delete_confirmation.html,sha256=4AeJLqGGPVBYXS9XQSNTnMvsT3I6QttyNLThE8gEZHE,3205
568
568
  django_smartbase_admin/templates/sb_admin/actions/delete_selected_confirmation.html,sha256=hQl8C3j22LI6fVPAMqRd4d_kXNKzcCNJDuhOzEZKBGE,3308
569
- django_smartbase_admin/templates/sb_admin/actions/list.html,sha256=SUXoRQtaqw6vpjry0bkzXTPa8KWQonXubcJlDH7-SKM,6905
569
+ django_smartbase_admin/templates/sb_admin/actions/list.html,sha256=I8AuLeE4_yo5I5HG0fQPt-8Q1u-7pap9pE4FoLJyipU,6933
570
570
  django_smartbase_admin/templates/sb_admin/actions/media.html,sha256=UYe6QzEuqCFZOj1J9vVFHFKvUZDaVBBLFOzHHI8SEyk,122
571
571
  django_smartbase_admin/templates/sb_admin/actions/object_history.html,sha256=7EdXW3oa3kFfWb2ICyKDJmTlTWmjAA3SgONd26QFDzA,1949
572
572
  django_smartbase_admin/templates/sb_admin/actions/partials/action_link.html,sha256=k8ygmP8zPzazUQn7cabdNGQ9Kla_zrIlCDUHuRKILKs,684
@@ -624,7 +624,7 @@ django_smartbase_admin/templates/sb_admin/filter_widgets/string_field.html,sha25
624
624
  django_smartbase_admin/templates/sb_admin/filter_widgets/tree_select_filter.html,sha256=6-jUnM9-UW4xKTilF8UgjT0zkafZh2xsR0M1N0obNj8,1243
625
625
  django_smartbase_admin/templates/sb_admin/fonts.html,sha256=TX6dIrqFKTnPL3Gsi8wAIWIW1szze1IhBEAHeRz9wOU,1121
626
626
  django_smartbase_admin/templates/sb_admin/includes/attrs.html,sha256=UFPgCXXCAkbumxZE1NM-aJVE4VCe2RjCrHLNseibv3I,165
627
- django_smartbase_admin/templates/sb_admin/includes/change_form_title.html,sha256=cfhZmKFfIt47iEGz3X3TcB1BOMRr1rsUlEaY2Oja3Vo,172
627
+ django_smartbase_admin/templates/sb_admin/includes/change_form_title.html,sha256=tesNery1Kqz79MOLAhRFEXUrLhtsKFImKdXSTT8oOi4,157
628
628
  django_smartbase_admin/templates/sb_admin/includes/components.html,sha256=ixhN__EcMbCfjXQXdCElda18sqWZYj9scV3nsR9nXts,18822
629
629
  django_smartbase_admin/templates/sb_admin/includes/confirmation.html,sha256=F2lgUPCIF6pveCSyS7L4k8ifZxa_DoJp-NZb4uwmtyI,1844
630
630
  django_smartbase_admin/templates/sb_admin/includes/fieldset.html,sha256=cSaqkdB2OOMXW4UFysoDQP4x-Wm4fgMtClPHqHepv1o,280
@@ -715,7 +715,7 @@ django_smartbase_admin/views/global_filter_view.py,sha256=eYo1moJGyi7jc2cPDA5ZBi
715
715
  django_smartbase_admin/views/media_view.py,sha256=5BLWXuzynF7nM34t-mf2BQSRN5ojY8HxpLIqt7Jiq9g,292
716
716
  django_smartbase_admin/views/translations_view.py,sha256=hktmkJIZ0EJxgnzjHLIoRDY0ckFa5wkbaoFZg32UWYw,20441
717
717
  django_smartbase_admin/views/user_config_view.py,sha256=hUSmwxgGXJog7vhiD-zGpm6smo31sLNzW2VoXapHIjc,1865
718
- django_smartbase_admin-1.0.34.dist-info/LICENSE.md,sha256=okRGMBOYvyhprt2eTpX_QXqpzC0MODF-U7zX-4fKPjQ,1078
719
- django_smartbase_admin-1.0.34.dist-info/METADATA,sha256=EnA4uc7_I7-AsdkPsPtLFFv_IcnsH1skYaOWv2tYIok,6573
720
- django_smartbase_admin-1.0.34.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
721
- django_smartbase_admin-1.0.34.dist-info/RECORD,,
718
+ django_smartbase_admin-1.0.36.dist-info/LICENSE.md,sha256=okRGMBOYvyhprt2eTpX_QXqpzC0MODF-U7zX-4fKPjQ,1078
719
+ django_smartbase_admin-1.0.36.dist-info/METADATA,sha256=u9-9avji8Le7JNlvDlZh_bzUFrc7qELfntPi2jcH-44,6573
720
+ django_smartbase_admin-1.0.36.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
721
+ django_smartbase_admin-1.0.36.dist-info/RECORD,,