Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,17 +828,28 @@ def home():

@app.route("/about")
def about():
return render_template("about.html", pageTitle="About CampusPulse Access")
return render_template("about.html",
pageTitle="About CampusPulse Access",
authsession=get_logged_in_user(),
is_admin = check_for_admin_role(get_logged_in_user_id())
)


@app.route("/fmsreport")
def fmsreport():
return render_template("fmsreport.html", pageTitle="Reporting to the RIT Service Center")
return render_template("fmsreport.html",
pageTitle="Reporting to the RIT Service Center",
authsession=get_logged_in_user(),
is_admin = check_for_admin_role(get_logged_in_user_id())
)


@app.route("/map")
def map_page():
return render_template("map.html")
return render_template("map.html",
authsession=get_logged_in_user(),
is_admin = check_for_admin_role(get_logged_in_user_id())
)


@app.route("/catalog")
Expand All @@ -850,6 +861,7 @@ def catalog():
return render_template(
"catalog.html",
authsession=get_logged_in_user(),
is_admin = check_for_admin_role(get_logged_in_user_id()),
q=query,
page=1,
accessPoints=getAccessPointsPaginated(0),
Expand All @@ -860,13 +872,15 @@ def catalog():
return render_template(
"paginated.html",
authsession=get_logged_in_user(),
is_admin = check_for_admin_role(get_logged_in_user_id()),
page=(page+1),
murals=getAccessPointsPaginated(page)
)
else:
return render_template(
"filtered.html",
authsession=get_logged_in_user(),
is_admin = check_for_admin_role(get_logged_in_user_id()),
pageTitle=f"Query - {query}",
subHeading="Search Query",
q=query,
Expand Down Expand Up @@ -1419,6 +1433,8 @@ def edit(id):
def admin():
return render_template(
"admin.html",
authsession=get_logged_in_user(),
is_admin = check_for_admin_role(get_logged_in_user_id()),
tags=getAllTags(),
accessPoints=getAllAccessPoints(),
buildings=getAllBuildings(),
Expand Down
5 changes: 5 additions & 0 deletions templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,12 @@ <h4><a class="nav-link" style="font-size: 1.25rem" aria-current="page" href="/ca
</a>
{% if authsession %}
<a class="nav-link" href="/logout">
{% if is_admin %}
Logout <span style="text-decoration: underline;">{{authsession.userinfo.name}}</span>
{% else %}
Logout {{authsession.userinfo.name}}
{% endif %}

</a>
{% endif %}
</div>
Expand Down