-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
/emails: Add option to toggle between HTML and text.
This makes the developer experience of the /emails pages significantly cleaner, since you don't have to look at both the HTML and the text for each message at the same time. Fixes #6844.
- Loading branch information
1 parent
5f8fbc5
commit 2337ed6
Showing
2 changed files
with
43 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,41 @@ | ||
{% extends "zerver/base.html" %} | ||
{% block content %} | ||
<div class="container"> | ||
<div class="alert"> | ||
All the emails sent in the Zulip development environment are logged here. You can also | ||
manually generate most of the emails by clicking <a href="/emails/generate">here</a>. | ||
To clear this log click <a href="/emails/clear">here</a> | ||
<div style="position: fixed"> | ||
<div class="alert"> | ||
All the emails sent in the Zulip development environment are logged here. You can also | ||
manually generate most of the emails by clicking <a href="/emails/generate">here</a>. | ||
To clear this log click <a href="/emails/clear">here</a> | ||
</div> | ||
<div style="text-align:right"> | ||
<label> | ||
<input type="checkbox" id="toggle"/> | ||
<strong>Show text only version</strong> | ||
</label> | ||
</div> | ||
</div> | ||
<script type="text/javascript"> | ||
$('#toggle').change(function() { | ||
if($('.email-text').css('display') == 'none') { | ||
$(".email-text").each(function() { | ||
$(this).css("display", "block"); | ||
}); | ||
$(".email-html").each(function() { | ||
$(this).css("display", "none"); | ||
}); | ||
} | ||
else { | ||
$(".email-text").each(function() { | ||
$(this).css("display", "none"); | ||
}); | ||
$(".email-html").each(function() { | ||
$(this).css("display", "block"); | ||
}); | ||
} | ||
}); | ||
</script> | ||
<div style="padding-top:100px"> | ||
{{ log |safe }} | ||
</div> | ||
{{ log |safe }} | ||
</div> | ||
{% endblock %} |