Beispiel #1
0
def survey():
    return render_template(
        'survey.html',
        page_title="Infox Data Share",
        pages=permitted_pages(session.get("ROLE").split(",")),
        application=permitted_sub_application(session.get("ROLE").split(","), "Survey", session.get("PROJECT").split(","))
    )
Beispiel #2
0
def system_log():
    return render_template(
        'log.html',
        page_title="Infox Data Share",
        pages=permitted_pages(session.get("ROLE").split(",")),
        log_event_users=get_event_users()
    )
Beispiel #3
0
def index():
    return render_template(
        'index.html',
        page_title="Infox Data Share",
        pages=permitted_pages(session.get("ROLE").split(",")),
        application=permitted_application(session.get("ROLE").split(","), session.get("PROJECT").split(","))
    )
Beispiel #4
0
def profile():
    return render_template(
        'profile.html',
        page_title="Infox Data Share",
        pages=permitted_pages(session.get("ROLE").split(",")),
        get_country_name=get_country_name,
        get_profile_pic=get_profile_pic(session.get("UID"))
    )
Beispiel #5
0
def management():
    return render_template(
        'management.html',
        page_title="Infox Data Share",
        pages=permitted_pages(session.get("ROLE").split(",")),
        pending_count=main_handler.get_pending_account_count(),
        pending_list=main_handler.get_pending_account_list(),
        get_country_name=get_country_name,
        projects=main_handler.get_all_projects(),
        all_users=main_handler.get_all_account()
    )
Beispiel #6
0
def do_survey():
    survey_id = request.args.get("name")
    session["survey_id"] = survey_id
    p_data = main_handler.get_survey(survey_id)
    return render_template(
        'do_survey.html',
        page_title="Infox Data Share",
        pages=permitted_pages(session.get("ROLE").split(",")),
        survey_name=p_data[1],
        survey_explanation=p_data[3],
        survey_json=p_data[2],
        survey_id=survey_id
    )
Beispiel #7
0
def modify_user():
    user_id = request.args.get("name")
    user_data = get_users_table(where="ID='" + user_id + "'", column="ID,EMAIL,MAJORITY,COUNTRY,CITY,HOSPITAL,ROLE,STATUS,PROJECT")[0]
    return render_template(
        'modify_user.html',
        page_title="Infox Data Share",
        pages=permitted_pages(session.get("ROLE").split(",")),
        username="******".join(get_username(user_id)),
        user_data=user_data,
        get_country_name=get_country_name,
        get_profile_pic=get_profile_pic(user_id),
        projects=get_projects_table(where="STATUS='Active'"),
        roles=get_user_roles_table(),
        is_obj_in=is_obj_in
    )
Beispiel #8
0
def analytics():
    return render_template(
        'analytics.html',
        page_title="Infox Data Share",
        pages=permitted_pages(session.get("ROLE").split(","))
    )