Exemple #1
0
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)
Exemple #2
0
def view(request):

    directory = Directory.objects.root
    template_vars = {
        'directory': directory,
    }
    return admin_permissions(request, directory, "admin/admin_general_permissions.html", template_vars)
Exemple #3
0
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)
Exemple #4
0
def view(request):
    directory = Directory.objects.root
    ctx = {
        "page": "admin-permissions",
        "directory": directory,
    }
    return admin_permissions(request, directory, "admin/permissions.html", ctx)
Exemple #5
0
def view(request):
    directory = Directory.objects.root
    ctx = {
        'page': 'admin-permissions',
        'directory': directory,
    }
    return admin_permissions(request, directory, "admin/permissions.html", ctx)
Exemple #6
0
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)
Exemple #7
0
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)
Exemple #8
0
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)
Exemple #9
0
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)
Exemple #10
0
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)
Exemple #11
0
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)
Exemple #12
0
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)
Exemple #13
0
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)
Exemple #14
0
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)
Exemple #15
0
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)
Exemple #16
0
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)
Exemple #17
0
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)
Exemple #18
0
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)
Exemple #19
0
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)
Exemple #20
0
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)
Exemple #21
0
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)
Exemple #22
0
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_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)
Exemple #24
0
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
    )
Exemple #25
0
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)
Exemple #26
0
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)
Exemple #27
0
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)
Exemple #28
0
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)
Exemple #29
0
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)
Exemple #30
0
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)