Ejemplo n.º 1
0
def solicitation_detail():
    session.page.reset_files()
    if not request.args(0) or not request.args[0].isdigit():
        raise HTTP(404)
    id = int(request.args[0])

    record = db(db.solicitation.id == id).select().first()

    from h5_widgets import NicEditorWidget
    NicEditorWidget.widget_files()

    response.title = T(db.solicitation._plural)
    response.subtitle = T('Detail')
    breadcrumbs_add(title=record.subject)
    return dict(record=record)
Ejemplo n.º 2
0
def task_detail():
    if not request.args(0) or not request.args[0].isdigit():
        raise HTTP(404)
    id = int(request.args[0])
    table = db.task

    record = db(db.task.id == id).select().first()

    has_test = db((db.test.owner_table == 'task') & (db.test.owner_key == record.oplink)).count()

    response.title = T(table._plural)
    response.subtitle = T('Detail')

    from h5_widgets import NicEditorWidget
    NicEditorWidget.widget_files()

    breadcrumbs_add()
    return dict(record=record,has_test=has_test)