def zip_link(request, path_obj): if check_permission('archive', request): text = _('ZIP of directory') link = dispatch.download_zip(request, path_obj) return { 'href': link, 'text': text, }
def download_zip(request, path_obj, **kwargs): if check_permission('archive', request): text = _('Download (.zip)') link = dispatch.download_zip(path_obj) return { 'icon': 'icon-download', 'href': link, 'text': text, }