diff --git a/CHANGES.rst b/CHANGES.rst index bd30c011..42d1d933 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -12,6 +12,8 @@ New: - Add ``Creator``, ``Description``, ``end``, ``start`` and ``location`` to the available columns and context attributes for folder_contents. Show attributes from ``_unsafe_metadata`` if user has "Modify Portal Content" permissions. + Remove ``portal_type`` from available columns and use the translated ``Type`` instead. + ``portal_type`` is now available on the attributes object. [thet] Fixes: diff --git a/plone/app/content/browser/contents/__init__.py b/plone/app/content/browser/contents/__init__.py index 33f7d52e..72aa372e 100644 --- a/plone/app/content/browser/contents/__init__.py +++ b/plone/app/content/browser/contents/__init__.py @@ -185,17 +185,16 @@ def get_columns(self): 'last_comment_date': translate(_('Last comment date'), context=self.request), # noqa 'location': translate(_('Location'), context=self.request), 'ModificationDate': translate(_('Last modified'), context=self.request), # noqa - 'portal_type': translate(_('Type'), context=self.request), 'review_state': translate(_('Review state'), context=self.request), # noqa 'start': translate(_('Start Date'), context=self.request), 'Subject': translate(_('Tags'), context=self.request), + 'Type': translate(_('Type'), context=self.request), 'total_comments': translate(_('Total comments'), context=self.request), # noqa } # These columns either have alternatives or are probably not useful ignored = [ 'Date', 'Title', - 'Type', 'author_name', 'cmf_uid', 'commentators', @@ -209,6 +208,7 @@ def get_columns(self): 'listCreators', 'meta_type', 'modified', + 'portal_type', 'sync_uid' ] # Add in extra metadata columns @@ -238,7 +238,7 @@ def get_options(self): 'contextInfoUrl': '%s{path}/@@fc-contextInfo' % base_url, 'setDefaultPageUrl': '%s{path}/@@fc-setDefaultPage' % base_url, 'availableColumns': columns, - 'attributes': ['Title', 'path', 'getURL', 'getIcon'] + columns.keys(), # noqa + 'attributes': ['Title', 'path', 'getURL', 'getIcon', 'portal_type'] + columns.keys(), # noqa 'buttons': self.get_actions(), 'rearrange': { 'properties': {