Skip to content

Commit

Permalink
Add option to show/hide thumbs in site-controlpanel
Browse files Browse the repository at this point in the history
  • Loading branch information
fgrcon committed Nov 16, 2015
1 parent 06d4468 commit d08e53d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
13 changes: 12 additions & 1 deletion Products/CMFPlone/interfaces/controlpanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=_(
Expand Down
8 changes: 8 additions & 0 deletions Products/CMFPlone/static/plone.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d08e53d

Please sign in to comment.