{% extends "layout/basic.html" %} {% block content %}
{% include "partials/discussion_list.html" %}
{% if vnode.type == model.document.TYPE_PROBLEM %} {% set pdoc = vnode %} {% set owner_udoc = udict[vnode.owner] %} {% include "partials/problem_sidebar.html" %} {% elif vnode.type == model.document.TYPE_CONTEST %} {% set tdoc = vnode %} {% set owner_udoc = udict[vnode.owner] %} {% include "partials/contest_sidebar.html" %} {% else %}
{% if vnode.pic %}
{% endif %}

{{ vnode['title'] or _('Create Discussion') }}

{% if vnode._id %} {% if handler.user.hasPerm(perm.PERM_CREATE_DISCUSSION) %}

{{ _('Create a Discussion') }}

{% else %} {% if not handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}

{{ _('Login to Create a Discussion') }}

{% else %}

{{ _('No Permission to Create a Discussion') }}

{% endif %} {% endif %} {% else %}

{{ _('Select a node to create discussion.') }}

{% endif %}
{% endif %} {% include 'partials/discussion_nodes_widget.html' %}
{% endblock %}