def project_admin_permissions(request, project): ctx = { 'page': 'admin-permissions', 'browse_url': reverse('pootle-project-browse', kwargs={ 'project_code': project.code, 'dir_path': '', 'filename': '', }), 'translate_url': reverse('pootle-project-translate', kwargs={ 'project_code': project.code, 'dir_path': '', 'filename': '', }), 'project': project, 'directory': project.directory, } return admin_permissions(request, project.directory, 'projects/admin/permissions.html', ctx)
def view(request): directory = Directory.objects.root template_vars = { 'directory': directory, } return admin_permissions(request, directory, "admin/admin_general_permissions.html", template_vars)
def language_admin(request, language): template_vars = { "language": language, "directory": language.directory, "feed_path": '%s/' % language.code, } return admin_permissions(request, language.directory, "language/language_admin.html", template_vars)
def view(request): directory = Directory.objects.root ctx = { "page": "admin-permissions", "directory": directory, } return admin_permissions(request, directory, "admin/permissions.html", ctx)
def view(request): directory = Directory.objects.root ctx = { 'page': 'admin-permissions', 'directory': directory, } return admin_permissions(request, directory, "admin/permissions.html", ctx)
def project_admin_permissions(request, project): ctx = { "page": "admin-permissions", "browse_url": reverse( "pootle-project-browse", kwargs={ "project_code": project.code, "dir_path": "", "filename": "" }, ), "translate_url": reverse( "pootle-project-translate", kwargs={ "project_code": project.code, "dir_path": "", "filename": "" }, ), "project": project, "directory": project.directory, } return admin_permissions(request, project.directory, "projects/admin/permissions.html", ctx)
def language_admin(request, language): template_vars = { "language": language, "directory": language.directory, "feed_path": '%s/' % language.code, } return admin_permissions(request, language.directory, 'languages/admin/permissions.html', template_vars)
def project_admin_permissions(request, project): template_vars = { "project": project, "directory": project.directory, "feed_path": project.pootle_path[1:], } return admin_permissions(request, project.directory, "project/admin_permissions.html", template_vars)
def language_admin(request, language): ctx = { 'page': 'admin-permissions', 'language': language, 'directory': language.directory, } return admin_permissions(request, language.directory, 'languages/admin/permissions.html', ctx)
def project_admin_permissions(request, project): template_vars = { "project": project, "directory": project.directory, "feed_path": project.pootle_path[1:], } return admin_permissions(request, project.directory, "projects/admin/permissions.html", template_vars)
def language_admin(request, language): ctx = { "page": "admin-permissions", "language": language, "directory": language.directory, "feed_path": "%s/" % language.code, } return admin_permissions(request, language.directory, "languages/admin/permissions.html", ctx)
def language_admin(request, language): ctx = { "page": "admin-permissions", "browse_url": reverse("pootle-language-browse", kwargs={"language_code": language.code}), "translate_url": reverse("pootle-language-translate", kwargs={"language_code": language.code}), "language": language, "directory": language.directory, } return admin_permissions(request, language.directory, "languages/admin/permissions.html", ctx)
def project_admin_permissions(request, project): ctx = { 'page': 'admin-permissions', 'project': project, 'directory': project.directory, } return admin_permissions(request, project.directory, 'projects/admin/permissions.html', ctx)
def project_admin_permissions(request, project): from pootle_app.views.admin.permissions import admin_permissions ctx = { "project": project, "directory": project.directory, "feed_path": project.pootle_path[1:], } return admin_permissions(request, project.directory, "projects/admin/permissions.html", ctx)
def project_admin_permissions(request, project): from pootle_app.views.admin.permissions import admin_permissions ctx = { 'page': 'admin-permissions', 'project': project, 'directory': project.directory, 'feed_path': project.pootle_path[1:], } return admin_permissions(request, project.directory, 'projects/admin/permissions.html', ctx)
def tp_admin_permissions(request, translation_project): language = translation_project.language project = translation_project.project template_vars = { 'translation_project': translation_project, "project": project, "language": language, "directory": translation_project.directory, "feed_path": translation_project.pootle_path[1:], } return admin_permissions(request, translation_project.directory, "translation_project/tp_admin_permissions.html", template_vars)
def project_admin_permissions(request, project_code): # Check if the user can access this view project = get_object_or_404(Project, code=project_code) request.permissions = get_matching_permissions(get_profile(request.user), project.directory) if not check_permission('administrate', request): raise PermissionDenied(_("You do not have rights to administer this project.")) template_vars = { "project": project, "directory": project.directory, "feed_path": project.pootle_path[1:], } return admin_permissions(request, project.directory, "project/admin_permissions.html", template_vars)
def language_admin(request, language_code): # Check if the user can access this view language = get_object_or_404(Language, code=language_code) request.permissions = get_matching_permissions(get_profile(request.user), language.directory) if not check_permission('administrate', request): raise PermissionDenied(_("You do not have rights to administer this language.")) template_vars = { "language": language, "directory": language.directory, "feed_path": '%s/' % language.code, } return admin_permissions(request, language.directory, "language/language_admin.html", template_vars)
def language_admin(request, language): ctx = { "page": "admin-permissions", "browse_url": reverse( "pootle-language-browse", kwargs={"language_code": language.code} ), "translate_url": reverse( "pootle-language-translate", kwargs={"language_code": language.code} ), "language": language, "directory": language.directory, } return admin_permissions( request, language.directory, "languages/admin/permissions.html", ctx )
def language_admin(request, language): ctx = { 'page': 'admin-permissions', 'browse_url': reverse('pootle-language-browse', kwargs={ 'language_code': language.code, }), 'translate_url': reverse('pootle-language-translate', kwargs={ 'language_code': language.code, }), 'language': language, 'directory': language.directory, } return admin_permissions(request, language.directory, 'languages/admin/permissions.html', ctx)
def project_admin_permissions(request, project_code): # Check if the user can access this view project = get_object_or_404(Project, code=project_code) request.permissions = get_matching_permissions(get_profile(request.user), project.directory) if not check_permission('administrate', request): raise PermissionDenied( _("You do not have rights to administer this project.")) template_vars = { "project": project, "directory": project.directory, "feed_path": project.pootle_path[1:], } return admin_permissions(request, project.directory, "project/admin_permissions.html", template_vars)
def language_admin(request, language): template_vars = {"language": language, "directory": language.directory, "feed_path": "%s/" % language.code} return admin_permissions(request, language.directory, "languages/admin/permissions.html", template_vars)