Only preview notification text for valid media types

This commit is contained in:
JonnyWong16 2016-11-04 23:30:30 -07:00
parent 580595e5fa
commit 0ab9cdf97c
4 changed files with 39 additions and 20 deletions

View file

@ -1,4 +1,3 @@
% if text:
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
@ -6,6 +5,7 @@
<h4 class="modal-title">Notification Text Preview</h4>
</div>
<div class="modal-body">
% if text:
% for item in text:
<div style="padding-bottom: 10px;">
<h4>${item['media_type'].capitalize()}</h4>
@ -15,9 +15,11 @@
% endif
</div>
% endfor
% else:
<div style="text-align: center;"><i class="fa fa-exclamation-circle"></i> Failed to generate preview.</div>
% endif
</div>
<div class="modal-footer">
</div>
</div>
</div>
% endif
</div>