You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Hydro/templates/discussion_main_or_node.html

45 lines
1.9 KiB
HTML

{% extends "layout/basic.html" %}
{% block content %}
<div class="row">
<div class="medium-9 columns">
<div class="section">
{% include "partials/discussion_list.html" %}
</div>
</div>
<div class="medium-3 columns">
{% if vnode['doc_type'] == vj4.model.document.TYPE_PROBLEM %}
{% with pdoc=vnode, owner_udoc=udict[vnode['owner_uid']], owner_dudoc=dudict[vnode['owner_uid']] if dudict %}
{% include "partials/problem_sidebar.html" %}
{% endwith %}
{% elif vnode['doc_type'] == vj4.model.document.TYPE_CONTEST %}
{% with tdoc=vnode, owner_udoc=udict[vnode['owner_uid']], owner_dudoc=dudict[vnode['owner_uid']] if dudict %}
{% include "partials/contest_sidebar.html" %}
{% endwith %}
{% elif vnode['doc_type'] == vj4.model.document.TYPE_DISCUSSION_NODE %}
<div class="section side">
{% if vnode['pic'] %}<div class="discussion-node__bg {{ vnode['pic'] }}"></div>{% endif %}
<div class="section__header">
<h1 class="section__title">{{ vnode['title'] or _('Create Discussion') }}</h1>
</div>
<div class="section__body">
{% if vnode %}
{% if handler.hasPerm(perm.PERM_CREATE_DISCUSSION) %}
<p><a href="{{ reverse_url('discussion_create', doc_id=vnode['doc_id']) }}" class="expanded primary button">{{ _('Create a Discussion') }}</a></p>
{% else %}
{% if not handler.hasPerm(perm.PERM_LOGGEDIN) %}
<p><a href="javascript:showSignInDialog();" class="expanded primary button">{{ _('Login to Create a Discussion') }}</a></p>
{% else %}
<p><a href="javascript:;" class="disabled expanded primary button">{{ _('No Permission to Create a Discussion') }}</a></p>
{% endif %}
{% endif %}
{% else %}
<p>{{ _('Select a node to create discussion.') }}</p>
{% endif %}
</div>
</div>
{% endif %}
{% include 'discussion_nodes_widget.html' %}
</div>
</div>
{% endblock %}