コード例 #1
0
def pub_view(request, configuration, docid):
    """The initial viewer, does not provide the document content yet"""
    return initdoc(request,
                   'pub',
                   docid,
                   'viewer',
                   'viewer.html',
                   configuration=configuration)
コード例 #2
0
def pub_view(request, docid, configuration):
    """The initial view, does not provide the document content yet"""
    if 'autodeclare' in settings.CONFIGURATIONS[configuration]:
        for annotationtype, set in settings.CONFIGURATIONS['configuration']['autodeclare']:
            try:
                r = flat.comm.query(request, "USE pub/" + docid + " DECLARE " + annotationtype + " OF " + set)
            except Exception as e:
                return fatalerror(request,e)

    return initdoc(request, 'pub',docid, 'editor', 'editor.html', configuration=configuration)
コード例 #3
0
ファイル: views.py プロジェクト: proycon/flat
def pub_view(request, docid, configuration):
    """The initial view, does not provide the document content yet"""
    if "autodeclare" in settings.CONFIGURATIONS[configuration]:
        for annotationtype, set in settings.CONFIGURATIONS["configuration"]["autodeclare"]:
            try:
                r = flat.comm.query(request, "USE pub/" + docid + " DECLARE " + annotationtype + " OF " + set)
            except Exception as e:
                return fatalerror(request, e)

    return initdoc(request, "pub", docid, "editor", "editor.html")
コード例 #4
0
def view(request, namespace, docid):
    """The initial view, does not provide the document content yet"""
    if flat.users.models.hasreadpermission(request.user.username, namespace, request):
        if 'autodeclare' in settings.CONFIGURATIONS[request.session['configuration']]:
            if flat.users.models.haswritepermission(request.user.username, namespace, request):
                for annotationtype, set in settings.CONFIGURATIONS[request.session['configuration']]['autodeclare']:
                    try:
                        r = flat.comm.query(request, "USE " + namespace + "/" + docid + " DECLARE " + annotationtype + " OF " + set)
                    except Exception as e:
                        return fatalerror(request,e)

        return initdoc(request, namespace,docid, 'editor', 'editor.html')
    else:
        return fatalerror(request,"Permission denied")
コード例 #5
0
ファイル: views.py プロジェクト: anukat2015/flat
def view(request, namespace, docid):
    """The initial viewer, does not provide the document content yet"""
    return initdoc(request, namespace,docid, 'viewer', 'viewer.html')
コード例 #6
0
def view(request, namespace, docid):
    """The initial viewer, does not provide the document content yet"""
    return initdoc(request, namespace, docid, 'viewer', 'viewer.html')
コード例 #7
0
def pub_view(request, configuration, docid):
    """The initial viewer, does not provide the document content yet"""
    return initdoc(request, 'pub',docid, 'viewer', 'viewer.html', configuration=configuration)