{% if topic %}
{% set replies = frappe.get_all("Discussion Reply", {"topic": topic.name},
["reply", "owner", "creation", "name"], order_by="creation")%}
{% endif %}
{% if not single_thread %}
{% endif %}
{% if topic and topic.title %}
{{ topic.title }}
{% endif %}
{% for reply in replies %}
{% set index = loop.index %}
{% include "frappe/templates/discussions/reply_card.html" %}
{% endfor %}
{% if frappe.session.user == "Guest" or (condition is defined and not condition) %}
{{ _("Want to discuss?") }}
{{ _("Post it here, our mentors will help you out.") }}
{% if frappe.session.user == "Guest" %}
{{ _("Login") }}
{% elif condition is defined and not condition %}
{{ button_name }}
{% endif %}
{% else %}
{% include "frappe/templates/discussions/comment_box.html" %}
{% endif %}