def _member_profile_batch(context, request): community = find_interface(context, ICommunity) member_names = community.member_names profiles_path = model_path(find_profiles(context)) batch = get_catalog_batch( context, request, batch_size = 12, interfaces = [IProfile], path={'query': profiles_path, 'depth': 1}, allowed={'query': effective_principals(request), 'operator': 'or'}, name = list(member_names), sort_index='lastfirst', ) return batch
def recent_content_view(context, request): batch = get_catalog_batch(context, request, sort_index='creation_date', reverse=True, interfaces=[IContent], creator=context.__name__, allowed={'query': effective_principals(request), 'operator': 'or'}, ) recent_items = [] for item in batch['entries']: adapted = getMultiAdapter((item, request), IGridEntryInfo) recent_items.append(adapted) page_title = "Content Added Recently by %s" % context.title api = request.api api.page_title = page_title return render_template_to_response( 'templates/profile_recent_content.pt', api=api, batch_info=batch, recent_items=recent_items, )
def _callFUT(self, context, request, **kw): from opencore.views.batch import get_catalog_batch return get_catalog_batch(context, request, **kw)