{% extends 'classroom/content-layout.html.twig' %}
{% set post = post|default(null) %}
{% block title %}{% if post %}{{'编辑帖子'|trans}}{% else %}{{'回复帖子'|trans}}{% endif %} - {{ parent() }}{% endblock %}

{% block main %}
  {% do load_script('thread/thread-post-form') %}
  {% include 'seajs_loader_compatible.html.twig' with {topxiawebbundle: true} %}
  
  <ul class="breadcrumb">
    <li><a href="{{ path(target.type ~ '_threads', {(target.type ~ 'Id'): target.id}) }}">{{'话题'|trans}}</a></li>
    <li><a href="{{ path(target.type ~ '_thread_show', {(target.type ~ 'Id'): target.id, threadId: thread.id}) }}">{{ thread.title|plain_text(10) }}</a></li>
    <li class="active">{{'编辑帖子'|trans}}</li>
  </ul>

  {{ render(controller('AppBundle:Thread:postUpdate', {request:app.request, target:{type:'classroom', id:classroom.id}, thread:thread, post:post})) }}



{% endblock %}
