Ejemplo n.º 1
0
def dicteditdoc(dictID, doctype, user, dictDB, configs):
    doctypesUsed = ops.readDoctypesUsed(dictDB)
    doctypes = [configs["xema"]["root"]] + list(
        configs["subbing"].keys()) + doctypesUsed
    doctypes = list(set(doctypes))
    return template(
        "edit.tpl", **{
            "siteconfig": siteconfig,
            "user": user,
            "dictID": dictID,
            "dictTitle": configs["ident"]["title"],
            "flagging": configs["flagging"],
            "doctypes": doctypes,
            "doctype": doctype,
            "xonomyMode": configs["editing"]["xonomyMode"]
        })
Ejemplo n.º 2
0
def dicteditdoc(dictID, doctype, user, dictDB, configs, selectedID=""):
    doctypesUsed = ops.readDoctypesUsed(dictDB)
    doctypes = [configs["xema"]["root"]] + list(
        configs["subbing"].keys()) + doctypesUsed
    doctypes = list(set(doctypes))
    numberEntries = configs["titling"][
        "numberEntries"] if "numberEntries" in configs[
            "titling"] else 1000  # magic number again, still better than before, will not refactor to really fix
    return template(
        "edit.tpl", **{
            "siteconfig": siteconfig,
            "user": user,
            "dictID": dictID,
            "dictTitle": configs["ident"]["title"],
            "flagging": configs["flagging"],
            "doctypes": doctypes,
            "doctype": doctype,
            "xonomyMode": configs["editing"]["xonomyMode"],
            "numberEntries": numberEntries,
            "selectedID": selectedID
        })