File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 3737
3838VERSIONING_MENU_IDENTIFIER = "version"
3939CMS_SUPPORTS_DELETING_TRANSLATIONS = version .Version (cms_version ) > version .Version ("4.1.4" )
40+ CMS_ADDS_PREVIEW_BUTTON = version .Version (cms_version ) >= version .Version ("4.2" )
4041
4142
4243class VersioningToolbar (PlaceholderToolbar ):
@@ -270,7 +271,7 @@ def _add_view_published_button(self):
270271 def _add_preview_button (self ):
271272 """Helper method to add a preview button to the toolbar when not in preview mode"""
272273 # Check if object is registered with versioning otherwise don't add
273- if not self ._is_versioned ():
274+ if not self ._is_versioned () or CMS_ADDS_PREVIEW_BUTTON :
274275 return
275276
276277 if not self .toolbar .preview_mode_active and not self .toolbar .edit_mode_active :
You can’t perform that action at this time.
0 commit comments