1
+ {% load static %}
2
+ {% load tags %}
3
+
1
4
<!DOCTYPE html>
2
5
< html >
3
6
< style >
36
39
padding-left : 20px ;
37
40
text-decoration : none;
38
41
}
42
+ .figure {
43
+ display : block;
44
+ margin : 0 ;
45
+ padding : 0 ;
46
+ text-align : center;
47
+ }
39
48
.caption {
40
49
font-size : 13px ;
41
- padding-left : 6px ;
50
+ display : block;
51
+ text-align : center;
52
+ }
53
+ .image {
54
+ max-width : 100% ;
55
+ height : 300px ;
56
+ width : auto;
57
+ margin : 0 auto;
42
58
}
43
59
# situational_overview {
44
60
font-size : 15px ;
@@ -54,53 +70,66 @@ <h1 class="title-heading-main">{{title}}</h1>
54
70
< h2 class ="heading "> Situational Overview</ h2 >
55
71
< div id ="situational_overview "> < p > {{situational_overview|safe}}</ p > </ div >
56
72
57
- < h2 class ="heading "> Graphics and Maps</ h2 >
58
-
59
73
{% if not map_list|length == 0 %}
60
- < table >
61
- < tr >
74
+ < h2 class ="heading "> Graphics and Maps</ h2 >
62
75
{% 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 >
76
+ < figure class ='figure '>
77
+ < img class ='image ' src ="{{ map.image | media_full_path }} " alt ="image " />
78
+ {% if map.caption %}
79
+ < figcaption class ='caption '> {{map.caption}}</ figcaption >
80
+ {% endif %}
81
+ </ figure >
64
82
{% endfor %}
65
- </ tr >
66
- </ table >
67
83
{% endif %}
68
84
69
- {% if not graphic_list|length == 0 %}
70
- < table >
71
- < tr >
85
+ {% if graphic_list|length > 0 %}
72
86
{% 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 >
87
+ < figure class ="figure ">
88
+ < img class ='image ' src ="{{ graphic.image | media_full_path}} " alt ="image " />
89
+ {% if graphic.caption %}
90
+ < figcaption class ='caption '> {{graphic.caption}}</ figcaption >
91
+ {% endif %}
92
+ </ figure >
74
93
{% endfor %}
75
- </ tr >
76
- </ table >
77
94
{% endif %}
78
95
79
- < h2 class ="heading "> Actions Taken</ h2 >
96
+ {% if not actions_taken|length == 0 %}
97
+ < h2 class ="heading "> Actions Taken</ h2 >
98
+ {% for act_taken in actions_taken %}
99
+ {% if not act_taken.action_details|length == 0 or act_taken.summary %}
100
+ < p class ="sub-heading "> Actions Taken by {{act_taken.organization_display}}</ p >
80
101
81
- {% for act_taken in actions_taken %}
82
- < p class ="sub-heading "> Actions Taken by {{act_taken.organization_display}}</ p >
102
+ {% if act_taken.summary %}
103
+ < p class ="sub-heading "> Descriptions</ p >
104
+ < span class ='desc '> {{act_taken.summary|linebreaks}}</ span >
105
+ {% endif %}
83
106
84
- < p class =" sub-heading " > Descriptions </ p >
85
- < span class =' desc ' > {{act_taken.summary|linebreaks}} </ span >
86
-
87
- < p class ="sub-heading " > Actions </ p >
88
- {% for action in act_taken.action_details %}
89
- < p class =" actions " > {{action.name}} </ p >
90
- {%endfor %}
107
+ {% if not act_taken.action_details|length == 0 %}
108
+ < p class =" sub-heading " > Actions </ p >
109
+ {% for action in act_taken.action_details %}
110
+ < p class ="actions " > {{action.name}} </ p >
111
+ {%endfor %}
112
+ {% endif %}
113
+ {% endif %}
91
114
{% endfor %}
92
115
116
+ {% endif %}
117
+
118
+ {% if not resources|length == 0 %}
93
119
< h2 class ="heading "> Resources</ h2 >
94
120
{% for resource in resources %}
95
121
< p class ="desc "> {{resource.date}} < br >
96
- {{resource.source_description}} < br >
122
+ {% if resource.source_description %}
123
+ {{resource.source_description}} < br >
124
+ {% endif %}
97
125
{% if resource.url %}
98
126
< a class ="actions "> {{resource.url}}</ a > < br >
99
127
{% endif %}
100
128
{% if resource.flash_file %}
101
129
< a class ="actions " href ={{resource.flash_file}} > Download document</ a >
102
130
{% endif %}
103
131
</ p >
104
- {%endfor%}
132
+ {% endfor %}
133
+ {% endif %}
105
134
</ body >
106
135
</ html >
0 commit comments