{% extends "forum/base.html" %}
{% load i18n staticfiles %}

{% block forumapp_styles %}
    {{ block.super }}
    <link rel="stylesheet" type="text/css" href="{% static 'js/forum/markitup/skins/simple/style.css' %}"/>
    <link rel="stylesheet" type="text/css" href="{% static 'js/forum/markitup/sets/bbcode/style.css' %}"/>
{% endblock %}

{% block forumapp_js_bottom %}
    {{ block.super }}
    <script type="text/javascript"
            src="{% static 'js/forum/markitup/jquery.markitup.js' %}"></script>
    <script type="text/javascript"
            src="{% static 'js/forum/markitup/sets/bbcode/set.js' %}"></script>
{% endblock %}

{% block forumapp_scripts %}
    {{ block.super }}

    $(document).ready(function(){
    $('.markitup').markItUp(mySettings);
    });
{% endblock %}

{% block forum_content %}
    {% include "forum/includes/breadcrumbs.html" %}

    <div class="row">
        {% if thread_form.non_field_errors %}
            <div class="error">
                {{ thread_form.non_field_errors }}
                {{ reply_form.non_field_errors }}
            </div>
        {% endif %}
        <strong>New thread for <a href="{{ forum.get_absolute_url }}">{{ forum }}</a></strong>

        <form method="post" enctype="multipart/form-data">{% csrf_token %}
            {% with thread_form as form %}
                {% include "forum/form.html" %}
            {% endwith %}

            {% with reply_form as form %}
                {% include "forum/form.html" %}
            {% endwith %}
            <input class="button tiny" type="submit" value='{% trans "Save" %}'/>
        </form>
    </div>
{% endblock %}
