1
0
mirror of https://github.com/Luzifer/mondash.git synced 2024-09-20 01:12:58 +00:00
mondash/vendor/github.com/flosch/pongo2/template_tests/complex.tpl
Knut Ahlers fd7056f82f
Switch to dep for vendoring, update libraries
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2017-11-22 21:39:52 +01:00

32 lines
827 B
Smarty

{# A more complex template using pongo2 (fully django-compatible template) #}
<!DOCTYPE html>
<html>
<head>
<title>My blog page</title>
</head>
<body>
<h1>Blogpost</h1>
<div id="content">
{{ complex.post.Text|safe }}
</div>
<h1>Comments</h1>
{% for comment in complex.comments %}
<h2>{{ forloop.Counter }}. Comment ({{ forloop.Revcounter}} comment{{ forloop.Revcounter|pluralize:"s" }} left)</h2>
<p>From: {{ comment.Author.Name }} ({{ comment.Author.Validated|yesno:"validated,not validated,unknown validation status" }})</p>
{% if complex.is_admin(comment.Author) %}
<p>This user is an admin (verify: {{ comment.Author.Is_admin }})!</p>
{% else %}
<p>This user is not admin!</p>
{% endif %}
<p>Written {{ comment.Date }}</p>
<p>{{ comment.Text|striptags }}</p>
{% endfor %}
</body>
</html>