{% extends 'dashboard/dashboard_base.html' %}
{% block stage %}
<style type="text/css">
  .sub_item_block{
  display: none;
  }
</style>

<div class="content">
<section id='job_detail'>
  <div class="job_description_wrap">
    <div class="job_details">
      <!-- post details -->
      <div class="profile_individual">
        <div class="title_profile">
          <h4>Topic Details</h4>
        </div>
        <div class='specific_detail'>
          <div class="left_div">
            <div class="tile_each">
              <label>Title: </label>
              <span class="description">
              <span>{{ topic.title }}</span>
              </span>
              <div class="clearfix"></div>
            </div>
            <div class="tile_each">
              <label>Tags: </label>
              <span class="description">
              <span>{% for tag in topic.tags.all %}{{ tag.title }}{% if forloop.last %}{% else %}, {% endif %}{% endfor %}</span>
              </span>
              <div class="clearfix"></div>
            </div>
            <div class="tile_each">
              <label>Created By: </label>
              <span class="description">
              <span>{{ topic.created_by.username }}</span>
              </span>
              <div class="clearfix"></div>
            </div>
          </div>
          <div class="right_div">
            <div class="tile_each">
              <label>Category: </label>
              <span class="description">
              <span> {{ topic.category.title }}</span>
              </span>
              <div class="clearfix"></div>
            </div>
            <div class="tile_each">
              <label>Status: </label>
              <span class="description">
              <span>{{ topic.status }}</span>
              </span>
              <div class="clearfix"></div>
            </div>
          </div>
          <div class="tile_each">
              <label>description: </label>
              <span class="description">
              <span> {{ topic.description|safe }}</span>
              </span>
              <div class="clearfix"></div>
            </div>
          <div class="clearfix"></div>
        </div>
      </div>
      <div class="list items">
      {% if topic.topic_comments.all %}
        <h4>Comments({{topic.topic_comments.all|length}})</h4>
        <div class="profile_individual">
        <div class="title_profile">
          <h4>Comment Details</h4>
          <h4 class="pull-right">New Comment</h4>
        </div>
        {% for comment in topic.topic_comments.all %}
        <div class='specific_detail'>
          <div class="left_div">
            <div class="tile_each">
              <label>Title: </label>
              <span class="description">
              <span>{{ comment.comment|safe }}</span>
              </span>
              <div class="clearfix"></div>
            </div>
            <div class="tile_each">
              <label>Commented By: </label>
              <span class="description">
              <span>{{ comment.commented_by.username }}</span>
              </span>
              <div class="clearfix"></div>
            </div>
            <div class="tile_each">
              <label>Commented on: </label>
              <span class="description">
              <span>{{ comment.updated_on }}</span>
              </span>
              <div class="clearfix"></div>
            </div>

          </div>
          <div class="clearfix"></div>
        </div>
        {% endfor %}
      </div>
      {% else %}
        <h4>No Comments Available for record</h4>
      {% endif %}
      </div>
      <!--/ post details -->
    </div>
  </div>
</section>
{% endblock %}
{% block extra_js %}
<script type="text/javascript">

</script>
{% endblock %}