Example #1
0
 def get_item_value(self, resource, context, item, column):
     item_brain, item_resource = item
     if column == 'title':
         title = item_resource.get_title()
         if isinstance(item_resource, Folder):
             link = '%s/;manage_content' % context.get_link(item_resource)
             return (title, link)
         return title
     elif column == 'actions':
         link = context.get_link(item_resource)
         actions = []
         for view_name, title in self.actions_views:
             if view_name and item_resource.get_view(view_name):
                 href = '%s/;%s' % (link, view_name)
             else:
                 href = link
             actions.append({'href': self.javascript % href,
                             'title': title})
         return INFO(self.actions_template, format='stl', actions=actions)
     return Feed_View.get_item_value(self, resource, context, item, column)
Example #2
0
 def get_items(self, resource, context, *args):
     args = list(args)
     args.append(PhraseQuery('is_tagsaware', True))
     return Feed_View.get_items(self, resource, context, *args)