-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(Transcript): render via Jinja template
- TODO(pairing): how best to make Item types available to Jinja? - TODO(pairing): consider location of Jinja Environment object and template path - TODO(pairing): reconsider test scope - TODO(research): localization
- Loading branch information
Showing
6 changed files
with
33 additions
and
61 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
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
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{% if items|length <= 0 %}No messages.{% else %} | ||
{% for item in items %} | ||
{% if item.type == "message" %} | ||
{% if loop.changed(item.sender) %} | ||
{{ item.sender }} wrote: | ||
{% endif %} | ||
{{ item.content }} | ||
{% elif item.type == "file" %} | ||
{{ item.sender }} sent: | ||
File: {{ item.filename }} | ||
{% endif %} | ||
{% if item.type is defined and not loop.last %} | ||
------ | ||
{% endif %} | ||
{% endfor %} | ||
{% endif %} |