def get_items(self, resource, context, *args): items = ImagesView_View.get_items(self, resource, context, *args) # FIXME BoxView API allowed_to_edit = self.is_admin(resource, context) if allowed_to_edit is False and len(items) == 0: self.set_view_is_empty(True) return items
def get_namespace(self, resource, context): namespace = ImagesView_View.get_namespace(self, resource, context) # Tweak some properties for key in ('title', 'display_thumb_title', 'display_title'): namespace[key] = resource.get_property(key) return namespace
def _get_query_value(self, resource, context, name): if name in ('batch_size', 'reverse', 'sort_by'): conf = self._get_configuration_file(resource) return conf.get_property('view_%s' % name) return ImagesView_View._get_query_value(self, resource, context, name)