Skip to content

Commit

Permalink
flake
Browse files Browse the repository at this point in the history
  • Loading branch information
pilz committed Mar 3, 2015
1 parent 7289854 commit f94fc33
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 129 deletions.
1 change: 0 additions & 1 deletion src/ploneintranet/workspace/browser/tiles/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
class=".workspace_tabs.WorkspaceTabsTile"
permission="zope2.View"
for="*"
layer="ploneintranet.theme.interfaces.IThemeSpecific"
/>

<plone:tile
Expand Down
127 changes: 0 additions & 127 deletions src/ploneintranet/workspace/browser/tiles/sidebar.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# from plone import api
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from plone.tiles import Tile
from ploneintranet.workspace.utils import TYPE_MAP
from ploneintranet.workspace.utils import parent_workspace
from zope.publisher.browser import BrowserView
Expand Down Expand Up @@ -151,129 +150,3 @@ def children(self):
'mime-type': mime_type,
'dpi': dpi})
return items

### Events

# Nothing yet

### Tasks

# Nothing yet










# class EventsTile(BrowserView):

# """ A view for workspace events
# """

# index = ViewPageTemplateFile("templates/sidebar-events.pt")

# def render(self):
# return self.index()

# def __call__(self):
# return self.render()

# class TasksTile(BrowserView):

# """ A view for workspace tasks
# """

# index = ViewPageTemplateFile("templates/sidebar-tasks.pt")

# def render(self):
# return self.index()

# def __call__(self):
# return self.render()


# class InfoTile(Tile):



# class ContentItemsTile(Tile):

# index = ViewPageTemplateFile("templates/sidebar-contentitems.pt")

# def render(self):
# return self.index()

# def __call__(self):
# return self.render()

# def parent(self):
# if self.context.portal_type == \
# "ploneintranet.workspace.workspacefolder":
# return None
# parent = self.context.aq_parent
# return {'id': parent.getId(),
# 'title': parent.Title(),
# 'url': parent.absolute_url() + '/@@sidebar.default'}

# def children(self):
# """ returns a list of dicts of items in the current context
# """
# items = []
# catalog = self.context.portal_catalog
# current_path = '/'.join(self.context.getPhysicalPath())

# sidebar_search = self.request.get('sidebar-search', None)
# if sidebar_search:
# st = '%s*' % sidebar_search # XXX plone only allows * as postfix.
# # With solr we might want to do real substr
# results = catalog.searchResults(SearchableText=st,
# path=current_path)
# else:
# results = self.context.getFolderContents()

# for item in results:
# # Do some checks to set the right classes for icons and candy
# desc = (
# item['Description']
# and 'has-description'
# or 'has-no-description'
# )

# content_type = TYPE_MAP.get(item['portal_type'], 'none')

# mime_type = '' # XXX: will be needed later for grouping by mimetyp
# # typ can be user, folder, date and mime typish
# typ = 'folder' # XXX: This needs to get dynamic later

# if content_type in FOLDERISH_TYPES:
# dpi = (
# "source: #items; target: #items && "
# "source: #selector-contextual-functions; "
# "target: #selector-contextual-functions && "
# "source: #context-title; target: #context-title && "
# "source: #sidebar-search-form; "
# "target: #sidebar-search-form"
# )
# url = item.getURL() + '/@@sidebar.default#items'
# content_type = 'group'
# else:
# dpi = "target: #document-body"
# url = item.getURL() + "#document-body"
# content_type = 'document'

# cls = 'item %s type-%s %s' % (content_type, typ, desc)

# items.append({
# 'id': item['getId'],
# 'cls': cls,
# 'title': item['Title'],
# 'description': item['Description'],
# 'url': url,
# 'type': TYPE_MAP.get(item['portal_type'], 'none'),
# 'mime-type': mime_type,
# 'dpi': dpi})
# return items
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from plone.memoize.view import memoize
from ...utils import parent_workspace


class WorkspaceTabsTile(Tile):

index = ViewPageTemplateFile("templates/workspace-tabs-tile.pt")
Expand All @@ -17,4 +18,3 @@ def render(self):

def __call__(self):
return self.render()

0 comments on commit f94fc33

Please sign in to comment.