Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make thumb size in folder contents listing adjustable/supressable #106

Merged
merged 4 commits into from
Jun 1, 2017

Conversation

fgrcon
Copy link
Member

@fgrcon fgrcon commented Sep 1, 2016

(uses site control panel settings: thumb_size_tables ...)
plone/Products.CMFPlone#1734

else:
item[key] = val
if key == 'getMimeIcon':
item[key] = None
if vocab_item.portal_type =='File':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like it is bound to type File only.

item[key] = None
if vocab_item.portal_type =='File':
#get mime type icon url from mimetype registry'
portal_url = api.portal.get().absolute_url()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use plone.api.portal.get_navigation_root instead

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No plone.api should be used actually...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok removed api and use naroot

portal_url = api.portal.get().absolute_url()
mtt = api.portal.get_tool(
name='mimetypes_registry')
if vocab_item.getObject().file.contentType:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we really need the mimetype as catalog metadata.

Copy link
Member Author

@fgrcon fgrcon Apr 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thats why i proposed plone/Products.CMFPlone#1995. I suggest to merge 1995 first. (upgrade changes are interdependent)

@@ -168,6 +170,7 @@ def ignored_columns(self):
'effective',
'expires',
'getIcon',
'getMimeIcon',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you mind aligning this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed( (tabs ...)

item[key] = os.path.join(
portal_url,
guess_icon_path(ctype[0]))
except:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no bare exceptions please

fgrcon and others added 2 commits April 13, 2017 17:40
  (uses site control panel settings: thumb_size_tables ...)
  clean up deprecated icon related code
  replace paperclip icon with mime type icons
  plone/Products.CMFPlone#1734
@fgrcon fgrcon closed this Apr 26, 2017
@fgrcon fgrcon reopened this Apr 27, 2017
@ebrehault ebrehault merged commit d39ccd3 into master Jun 1, 2017
@fgrcon fgrcon deleted the plip1734thumbs branch June 13, 2017 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants