1+ {% load static %}
2+ {% load tags %}
3+
14<!DOCTYPE html>
25< html >
36 < style >
@@ -54,53 +57,68 @@ <h1 class="title-heading-main">{{title}}</h1>
5457 < h2 class ="heading "> Situational Overview</ h2 >
5558 < div id ="situational_overview "> < p > {{situational_overview|safe}}</ p > </ div >
5659
57- < h2 class ="heading "> Graphics and Maps</ h2 >
58-
5960 {% if not map_list|length == 0 %}
60- < table >
61- < tr >
61+ < h2 class ="heading "> Graphics and Maps</ h2 >
6262 {% for map in map_list %}
63- < td > < img style ='width:100%; height:100%; ' src ="{{map.image}} " alt ="image "> < br > < p class ='caption '> {{map.caption}}</ p > </ td >
63+ < div style ='width:600px; height: 400px; '>
64+ < img style ='width:auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center center; ' src ="{{ map.image | media_full_path}} " alt ="image ">
65+ < br >
66+ {% if map.caption %}
67+ < div class ='caption '> {{map.caption}}</ div >
68+ {% endif %}
69+ </ div >
6470 {% endfor %}
65- </ tr >
66- </ table >
6771 {% endif %}
6872
69- {% if not graphic_list|length == 0 %}
70- < table >
71- < tr >
73+ {% if graphic_list|length > 0 %}
7274 {% for graphic in graphic_list %}
73- < td > < img style ='width:100%; height:100%; ' src ="{{graphic.image}} " alt ="image "> < br > < p class ='caption '> {{graphic.caption}}</ p > </ td >
75+ < div style ='width:600px; height: 400px; '>
76+ < img style ='width:auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center center; ' src ="{{ graphic.image | media_full_path}} " alt ="image ">
77+ < br >
78+ {% if graphic.caption %}
79+ < div class ='caption '> {{graphic.caption}}</ div >
80+ {% endif %}
81+ </ div >
7482 {% endfor %}
75- </ tr >
76- </ table >
7783 {% endif %}
7884
79- < h2 class ="heading "> Actions Taken</ h2 >
80-
81- {% for act_taken in actions_taken %}
82- < p class ="sub-heading "> Actions Taken by {{act_taken.organization_display}}</ p >
85+ {% if not actions_taken|length == 0 %}
86+ < h2 class ="heading "> Actions Taken</ h2 >
87+ {% for act_taken in actions_taken %}
88+ {% if not act_taken.action_details|length == 0 or act_taken.summary %}
89+ < p class ="sub-heading "> Actions Taken by {{act_taken.organization_display}}</ p >
8390
84- < p class ="sub-heading "> Descriptions</ p >
85- < span class ='desc '> {{act_taken.summary|linebreaks}}</ span >
91+ {% if act_taken.summary %}
92+ < p class ="sub-heading "> Descriptions</ p >
93+ < span class ='desc '> {{act_taken.summary|linebreaks}}</ span >
94+ {% endif %}
8695
87- < p class ="sub-heading "> Actions</ p >
88- {% for action in act_taken.action_details %}
89- < p class ="actions "> {{action.name}}</ p >
90- {%endfor%}
96+ {% if not act_taken.action_details|length == 0 %}
97+ < p class ="sub-heading "> Actions</ p >
98+ {% for action in act_taken.action_details %}
99+ < p class ="actions "> {{action.name}}</ p >
100+ {%endfor%}
101+ {% endif %}
102+ {% endif %}
91103 {% endfor %}
92104
105+ {% endif %}
106+
107+ {% if not resources|length == 0 %}
93108 < h2 class ="heading "> Resources</ h2 >
94109 {% for resource in resources %}
95110 < p class ="desc "> {{resource.date}} < br >
96- {{resource.source_description}} < br >
111+ {% if resource.source_description %}
112+ {{resource.source_description}} < br >
113+ {% endif %}
97114 {% if resource.url %}
98115 < a class ="actions "> {{resource.url}}</ a > < br >
99116 {% endif %}
100117 {% if resource.flash_file %}
101118 < a class ="actions " href ={{resource.flash_file}} > Download document</ a >
102119 {% endif %}
103120 </ p >
104- {%endfor%}
121+ {% endfor %}
122+ {% endif %}
105123 </ body >
106124</ html >
0 commit comments