{% set layout = "ClarolineCoreBundle:Workspace:layout.html.twig" %}

{% if isDesktop() %}
    {% set layout = "ClarolineCoreBundle:Desktop:layout.html.twig" %}
{% endif %}

{% extends layout %}

{% block title %}{{ 'forum_category_edit'|trans({}, 'forum') ~ ' (' ~ _resource.getResourceNode().getName() ~ ')' ~ ' - ' ~ parent() | striptags | raw  }}{% endblock %}

{% block resourceBreadcrumb %}
    <li><a href="{{ path('claro_forum_categories', { 'forum': _resource.getId()}) }}">{{ _resource.getResourceNode().getName() }}</a></li>
    <li class="active">{{ 'forum_category_edit'|trans({}, 'forum') }}</li>
{% endblock %}

{% block section_content %}
    <div class="panel-heading">
        <h3 class="panel-title">{{ 'forum_category_edit'|trans({}, 'forum') }}</h3>
    </div>
    {% form_theme form 'ClarolineCoreBundle::form_theme.html.twig' %}
    <form novalidate="novalidate" action="{{ _path('claro_forum_edit_category', {'category': category.getId()}) }}" method="post" {{ form_enctype(form) }} id="subject_form">
        <div class="panel-body">
            {{ form_widget(form) }}
        </div>
        <div class="panel-footer">
            <button type="submit" class="btn btn-primary">{{ 'ok'|trans({}, 'platform') }}</button>
            <a class="btn btn-default" href="{{ _path('claro_forum_categories', { 'forum':  _resource.getId()}) }}">{{ 'cancel' | trans({}, 'platform') }}</a>
        </div>
    </form>
{% endblock %}

