Skip to content

Commit 23accea

Browse files
Change text size for situational overview in pdf
- Solve link to ifrc-go in email
1 parent ad4154f commit 23accea

File tree

5 files changed

+22
-15
lines changed

5 files changed

+22
-15
lines changed

flash_update/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from xhtml2pdf import pisa
77

8-
from main.frontend import get_project_url
8+
from main.frontend import get_flash_update_url
99

1010
from flash_update.models import FlashGraphicMap
1111

@@ -49,7 +49,7 @@ def get_email_context(instance):
4949
actions_taken = [dict(action_taken) for action_taken in flash_update_data['actions_taken']]
5050
resources = [dict(refrence) for refrence in flash_update_data['references']]
5151
email_context = {
52-
'resource_url': get_project_url(instance.id),
52+
'resource_url': get_flash_update_url(instance.id),
5353
'title': flash_update_data['title'],
5454
'situational_overview': flash_update_data['situational_overview'],
5555
'map_list': map_list,

main/frontend.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33

44
def get_project_url(id):
55
return f'https://{settings.FRONTEND_URL}/three-w/{id}/'
6+
7+
8+
def get_flash_update_url(id):
9+
return f'{settings.FRONTEND_URL}/flash-update/{id}/'

notifications/templates/email/flash_update/flash_pdf.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@
2727
font-weight: bold;
2828
padding-left: 20px;
2929
}
30-
.img-flash {
31-
width: 120px;
32-
height: 120px;
30+
.flash-image {
31+
width: 200px;
32+
height: 200px;
3333
}
34+
#situational_overview{
35+
font-size: 15px;
36+
}
3437

3538
</style>
3639

@@ -40,17 +43,17 @@
4043
</div>
4144
<h1 class="title-heading-main">{{title}}</h1>
4245
<h2 class="heading">Situational Overview</h2>
43-
<p class="desc"> {{situational_overview|safe}}</p>
46+
<div id="situational_overview"><p> {{situational_overview|safe}}</p></div>
4447

4548
<h2 class="heading">Graphics</h2>
4649
<div class="d-flex p-2">
4750
{% for map in map_list %}
48-
<img class = 'img-flash' src="{{map.image}}" alt="image">
51+
<img class = 'flash-image' src="{{map.image}}" alt="image">
4952
{% endfor %}
5053
</div><br>
5154
<div class="d-flex p-2">
5255
{% for graphic in graphic_list %}
53-
<img class = 'img-flash' src="{{graphic.image}}" alt="image">
56+
<img class = 'flash-image' src="{{graphic.image}}" alt="image">
5457
{% endfor %}
5558
</div>
5659

notifications/templates/email/flash_update/flash_update.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
<tr>
2727
<td class="text-default text-light pb-40" style="padding-bottom: 40px;font-weight: 300;">
2828
{% for map in map_list %}
29-
<img class = 'img-flash' src="{{map.image}}" alt="image">
29+
<img class = 'flash-image' src="{{map.image}}" alt="image">
3030
{% endfor %}
3131

3232
{% for graphic in graphic_list %}
33-
<img class = 'img-flash' src="{{graphic.image}}" alt="image">
33+
<img class = 'flash-image' src="{{graphic.image}}" alt="image">
3434
{% endfor %}
3535
</td>
3636
</tr>

notifications/templates/email/flash_update/head.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,10 @@
289289
background-repeat: no-repeat;
290290
margin: auto !important;
291291
}
292-
.img-flash {
293-
width: 120px;
294-
height: 120px;
295-
}
292+
.flash-image {
293+
width: 200px;
294+
height: 200px;
295+
}
296296
.img-dref {
297297
background-image: url("./images/rc.svg");
298298
}
@@ -418,7 +418,7 @@
418418
<tr>
419419

420420
<td class="text-header text-default text-right" style="text-align: right;color: #000000;font-family:'Lato', Arial, sans-serif;">
421-
<a href="https://{{ resource_url }}" target="_blank" class="link" style="font-family: 'Lato', Arial, sans-serif;text-decoration: underline;color: #000;">Open in GO</a>
421+
<a href="{{ resource_url }}" target="_blank" class="link" style="font-family: 'Lato', Arial, sans-serif;text-decoration: underline;color: #000;">Open in GO</a>
422422
</td>
423423

424424
</tr>

0 commit comments

Comments
 (0)