def icon_url(instance, y, x=None): if x is None: size = "%s" % y else: size = "%sx%s" % (x, y) filename = "%s_%s.png" % (instance.key, size) (path, mtime) = logo.path_and_mtime(instance.key) return _url.build(instance, 'instance', filename, query={'t': str(mtime)})
def logo_url(page, y, x=None): from adhocracy.lib.helpers import base_url size = "%s" % y if x is None else "%sx%s" % (x, y) filename = u"%s_%s.png" % (page.id, size) (path, mtime) = logo.path_and_mtime(page) return base_url(u'/page/%s' % filename, query_params={'t': str(mtime)})
def logo_url(instance, y, x=None): size = "%s" % y if x is None else "%sx%s" % (x, y) filename = "%s_%s.png" % (instance.key, size) (path, mtime) = logo.path_and_mtime(instance, fallback=logo.INSTANCE) return _url.build(instance, 'instance', filename, query={'t': str(mtime)})
def logo_url(user, y, x=None): from adhocracy.lib.helpers import base_url size = "%s" % y if x is None else "%sx%s" % (x, y) filename = u"%s_%s.png" % (user.user_name, size) (path, mtime) = logo.path_and_mtime(user, fallback=logo.USER) return base_url(u'/user/%s' % filename, query_params={'t': str(mtime)})
def logo_url(user, y, x=None): from adhocracy.lib.helpers import base_url size = "%s" % y if x is None else "%sx%s" % (x, y) filename = u"%s_%s.png" % (user.id, size) (path, mtime) = logo.path_and_mtime(user, fallback=logo.USER) return base_url(u'/user/%s' % filename, query_params={'t': str(mtime)})
def logo_url(category, y, x=None): from adhocracy.lib.helpers import base_url size = "%s" % y if x is None else "%sx%s" % (x, y) filename = u"%s_%s.png" % (category.id, size) (path, mtime) = logo.path_and_mtime(category) return base_url(u'/category/%s' % filename, query_params={'t': str(mtime)})