diff --git a/CHANGES.rst b/CHANGES.rst index 894ea4ba49..d7116c5df2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,10 @@ Changelog New: +- Add option to show/hide thumbs in site-controlpanel + https://github.com/plone/Products.CMFPlone/issues/1241 + [fgrcon] + - Explicitly provide id on search form and not depend on diazo magic adding the id in. [vangheem] diff --git a/Products/CMFPlone/interfaces/controlpanel.py b/Products/CMFPlone/interfaces/controlpanel.py index 077cfbef4c..7d99ae13dc 100644 --- a/Products/CMFPlone/interfaces/controlpanel.py +++ b/Products/CMFPlone/interfaces/controlpanel.py @@ -1116,7 +1116,18 @@ class ISiteSchema(Interface): SimpleTerm('authenticated', 'authenticated', _('For authenticated users only'))]), required=True) - + + thumb_visibility = schema.Choice( + title=_(u'Thumb visibility'), + description=_(u'Show thumbs in listings'), + default=u'enabled', + vocabulary=SimpleVocabulary([ + SimpleTerm('false', 'false', _(u'Never')), + SimpleTerm('enabled', 'enabled', _(u'Always')), + SimpleTerm('authenticated', 'authenticated', + _(u'For authenticated users only'))]), + required=True) + toolbar_position = schema.Choice( title=_(u'Position where the toolbar is displayed'), description=_( diff --git a/Products/CMFPlone/static/plone.less b/Products/CMFPlone/static/plone.less index 228f98dc7b..4d277bbaba 100644 --- a/Products/CMFPlone/static/plone.less +++ b/Products/CMFPlone/static/plone.less @@ -34,6 +34,14 @@ body#visual-portal-wrapper.pat-plone.icons-off .outer-wrapper [class*="contentty display:none; } +/* thumbs-off styles to hide thumbs from + site setting */ +body#visual-portal-wrapper.pat-plone.thumbs-off .outer-wrapper .image-icon { + display:none; +} +body#visual-portal-wrapper.pat-plone.thumbs-off .outer-wrapper .image-tile { + display:none; +} /* error message styles */ body.template-default_error_message #content-core p { white-space: pre;