예제 #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)
예제 #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)
예제 #3
0
파일: views.py 프로젝트: niragInes/pootle
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)
예제 #4
0
def view(request):
    directory = Directory.objects.root
    ctx = {
        "page": "admin-permissions",
        "directory": directory,
    }
    return admin_permissions(request, directory, "admin/permissions.html", ctx)
예제 #5
0
def view(request):
    directory = Directory.objects.root
    ctx = {
        'page': 'admin-permissions',
        'directory': directory,
    }
    return admin_permissions(request, directory, "admin/permissions.html", ctx)
예제 #6
0
파일: views.py 프로젝트: sshyran/zing
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)
예제 #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)
예제 #8
0
파일: views.py 프로젝트: Chipcius/pootle
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)
예제 #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)
예제 #10
0
파일: views.py 프로젝트: JMassapina/pootle
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)
예제 #11
0
파일: views.py 프로젝트: pszabolcs89/pootle
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)
예제 #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)
예제 #13
0
파일: views.py 프로젝트: pavels/pootle
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)
예제 #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)
예제 #15
0
파일: views.py 프로젝트: atassumer/pootle
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)
예제 #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)
예제 #17
0
파일: views.py 프로젝트: Jobava/pootle
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)
예제 #18
0
파일: views.py 프로젝트: shayanb/pootle
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)
예제 #19
0
파일: views.py 프로젝트: AmesianX/pootle
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)
예제 #20
0
파일: views.py 프로젝트: NEOatNHNG/pootle
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)
예제 #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)
예제 #22
0
파일: views.py 프로젝트: julen/pootle
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)
예제 #23
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)
예제 #24
0
파일: views.py 프로젝트: oioudina/zing
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
    )
예제 #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)
예제 #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)
예제 #27
0
파일: views.py 프로젝트: AlfredWei/pootle
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)
예제 #28
0
파일: views.py 프로젝트: julen/pootle
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)
예제 #29
0
파일: views.py 프로젝트: ainslied/pootle
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)
예제 #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)