@@ -6,6 +6,10 @@ <h3>Links</h3>
66 {% for link in list %}
77 < li class ="list-group-item ">
88 < a href ="{{ link.url }} " rel ="noopener noreferrer " target ="_blank "> {{ link.title or link.url }}</ a >
9+ {% if link.has_content_warning %}
10+ < span class ="label label-danger "
11+ title ="The linked page may be disturbing for some viewers "> Content Warning</ span >
12+ {% endif %}
913 {% if officer and (is_admin_or_coordinator or link.created_by == current_user.id) %}
1014 < a href ="{{ url_for('main.link_api_edit', officer_id=officer.id, obj_id=link.id) }} ">
1115 < span class ="sr-only "> Edit</ span >
@@ -30,10 +34,6 @@ <h3>Links</h3>
3034 </ ul >
3135 {% endif %}
3236 {% endfor %}
33- {% if officer and (current_user.is_admin_or_coordinator(officer.department)) %}
34- < a href ="{{ url_for( "main.link_api_new ", officer_id=officer.id) }} "
35- class="btn btn-primary "> New Link/Video</ a >
36- {% endif %}
3737 {% for type, list in obj.links | groupby("link_type") %}
3838 {% if type == "video" %}
3939 < h3 > Videos</ h3 >
@@ -53,7 +53,8 @@ <h3>Videos</h3>
5353 < i class ="fa-solid fa-trash-can " aria-hidden ="true "> </ i >
5454 </ a >
5555 {% endif %}
56- < div class ="video-container ">
56+ < div class ="video-container "
57+ data-has-content-warning ="{{ link.has_content_warning | lower }} ">
5758 < iframe width ="560 "
5859 height ="315 "
5960 src ="https://www.youtube.com/embed/{{ link_url }} "
@@ -81,6 +82,10 @@ <h3>Other videos</h3>
8182 {% for link in list %}
8283 < li class ="list-group-item ">
8384 < a href ="{{ link.url }} " target ="_blank " rel ="noopener noreferrer "> {{ link.title or link.url }}</ a >
85+ {% if link.has_content_warning %}
86+ < span class ="label label-danger "
87+ title ="The linked video may be disturbing for some viewers "> Content Warning</ span >
88+ {% endif %}
8489 {% if officer and (current_user.is_admin_or_coordinator(officer.department)
8590 or link.created_by == current_user.id) %}
8691 < a href ="{{ url_for('main.link_api_edit', officer_id=officer.id, obj_id=link.id) }} ">
@@ -106,4 +111,8 @@ <h3>Other videos</h3>
106111 </ ul >
107112 {% endif %}
108113 {% endfor %}
114+ {% if officer and (current_user.is_admin_or_coordinator(officer.department)) %}
115+ < a href ="{{ url_for( "main.link_api_new ", officer_id=officer.id) }} "
116+ class="btn btn-primary "> New Link/Video</ a >
117+ {% endif %}
109118{% endif %}
0 commit comments