Skip to content

Commit

Permalink
Remove portal_type from available columns and use the translated …
Browse files Browse the repository at this point in the history
…``Type`` instead.

``portal_type`` is now available on the attributes object.
  • Loading branch information
thet committed Apr 6, 2016
1 parent c7b07b8 commit cbb6938
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions plone/app/content/browser/contents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -209,6 +208,7 @@ def get_columns(self):
'listCreators',
'meta_type',
'modified',
'portal_type',
'sync_uid'
]
# Add in extra metadata columns
Expand Down Expand Up @@ -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': {
Expand Down

0 comments on commit cbb6938

Please sign in to comment.