示例#1
0
def switchfmtscore(req, colID, type, id_1, id_2, ln=CFG_SITE_LANG):
    navtrail_previous_links = wsc.getnavtrail() + """&gt; <a class="navtrail" href="%s/admin/websearch/websearchadmin.py/">WebSearch Admin</a> """ % (CFG_SITE_URL)

    try:
        uid = getUid(req)
    except:
        return error_page('Error', req)

    auth = check_user(req,'cfgwebsearch')
    if not auth[0]:
        return page(title="Edit Collection",
                body=wsc.perform_switchfmtscore(colID=colID,
                                                ln=ln,
                                                type=type,
                                                id_1=id_1,
                                                id_2=id_2),
                uid=uid,
                language=ln,
                req=req,
                navtrail = navtrail_previous_links,
                lastupdated=__lastupdated__)
    else:
        return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links)
from invenio.urlutils import wash_url_argument

def switchfmtscore(req, colID, type, id_1, id_2, ln=CFG_SITE_LANG):
    navtrail_previous_links = wsc.getnavtrail() + """&gt; <a class="navtrail" href="%s/admin/websearch/websearchadmin.py/">WebSearch Admin</a> """ % (CFG_SITE_URL)

    try:
        uid = getUid(req)
    except Error, e:
        return error_page(req)

    auth = check_user(req,'cfgwebsearch')
    if not auth[0]:
        return page(title="Edit Collection",
                body=wsc.perform_switchfmtscore(colID=colID,
                                                ln=ln,
                                                type=type,
                                                id_1=id_1,
                                                id_2=id_2),
                uid=uid,
                language=ln,
                req=req,
                navtrail = navtrail_previous_links,
                lastupdated=__lastupdated__)
    else:
        return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links)

def switchfldscore(req, colID, id_1, id_2, fmeth, ln=CFG_SITE_LANG):
    navtrail_previous_links = wsc.getnavtrail() + """&gt; <a class="navtrail" href="%s/admin/websearch/websearchadmin.py/">WebSearch Admin</a> """ % (CFG_SITE_URL)

    try:
        uid = getUid(req)
示例#3
0
from invenio.urlutils import wash_url_argument

def switchfmtscore(req, colID, type, id_1, id_2, ln=CFG_SITE_LANG):
    navtrail_previous_links = wsc.getnavtrail() + """&gt; <a class="navtrail" href="%s/admin/websearch/websearchadmin.py/">WebSearch Admin</a> """ % (CFG_SITE_URL)

    try:
        uid = getUid(req)
    except Error, e:
        return error_page(req)

    auth = check_user(req,'cfgwebsearch')
    if not auth[0]:
        return page(title="Edit Collection",
                body=wsc.perform_switchfmtscore(colID=colID,
                                                ln=ln,
                                                type=type,
                                                id_1=id_1,
                                                id_2=id_2),
                uid=uid,
                language=ln,
                req=req,
                navtrail = navtrail_previous_links,
                lastupdated=__lastupdated__)
    else:
        return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links)

def switchfldscore(req, colID, id_1, id_2, fmeth, ln=CFG_SITE_LANG):
    navtrail_previous_links = wsc.getnavtrail() + """&gt; <a class="navtrail" href="%s/admin/websearch/websearchadmin.py/">WebSearch Admin</a> """ % (CFG_SITE_URL)

    try:
        uid = getUid(req)