Browse Source

Move comment labels template into templates block

Also adds the comment reply template to the user page, where it was
missed.
merge-requests/68/head
Deimos 6 years ago
parent
commit
3b98cd2d6e
  1. 3
      tildes/tildes/templates/notifications_unread.jinja2
  2. 6
      tildes/tildes/templates/topic.jinja2
  3. 11
      tildes/tildes/templates/user.jinja2

3
tildes/tildes/templates/notifications_unread.jinja2

@ -76,10 +76,9 @@
<p>No unread notifications.</p> <p>No unread notifications.</p>
<p><a href="/notifications">Go to previously read notifications</a></p> <p><a href="/notifications">Go to previously read notifications</a></p>
{% endif %} {% endif %}
{% if request.user %}{{ comment_label_options_template(comment_label_options) }}{% endif %}
{% endblock %} {% endblock %}
{% block templates %} {% block templates %}
{{ comment_label_options_template(comment_label_options) }}
{{ comment_reply_template() }} {{ comment_reply_template() }}
{% endblock %} {% endblock %}

6
tildes/tildes/templates/topic.jinja2

@ -12,7 +12,10 @@
{% block title %}{{ topic.title }} - ~{{ topic.group.path }}{% endblock %} {% block title %}{{ topic.title }} - ~{{ topic.group.path }}{% endblock %}
{% block templates %} {% block templates %}
{{ comment_reply_template() }}
{% if request.user %}
{{ comment_reply_template() }}
{{ comment_label_options_template(comment_label_options) }}
{% endif %}
{% endblock %} {% endblock %}
{% block header_context_link %} {% block header_context_link %}
@ -280,7 +283,6 @@
</article> </article>
{% if request.user %}{{ comment_label_options_template(comment_label_options) }}{% endif %}
{% endblock content %} {% endblock content %}
{% block sidebar %} {% block sidebar %}

11
tildes/tildes/templates/user.jinja2

@ -3,12 +3,19 @@
{% extends 'base_user_menu.jinja2' %} {% extends 'base_user_menu.jinja2' %}
{% from 'macros/comments.jinja2' import comment_label_options_template, render_single_comment with context %}
{% from 'macros/comments.jinja2' import comment_label_options_template, comment_reply_template, render_single_comment with context %}
{% from 'macros/links.jinja2' import group_linked, username_linked %} {% from 'macros/links.jinja2' import group_linked, username_linked %}
{% from 'macros/topics.jinja2' import render_topic_for_listing with context %} {% from 'macros/topics.jinja2' import render_topic_for_listing with context %}
{% block title %}User: {{ user.username }}{% endblock %} {% block title %}User: {{ user.username }}{% endblock %}
{% block templates %}
{% if request.user %}
{{ comment_reply_template() }}
{{ comment_label_options_template(comment_label_options) }}
{% endif %}
{% endblock %}
{% block header_context_link %} {% block header_context_link %}
<a class="site-header-context" href="/user/{{ user.username }}">{{ user.username }}</a> <a class="site-header-context" href="/user/{{ user.username }}">{{ user.username }}</a>
{% endblock %} {% endblock %}
@ -130,8 +137,6 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if request.user %}{{ comment_label_options_template(comment_label_options) }}{% endif %}
{% endblock %} {% endblock %}
{% block sidebar %} {% block sidebar %}

Loading…
Cancel
Save