
{% extends "base.html" %}
{% load static %}
{% block style-discussion-topics %}<link rel="stylesheet" href="{% static 'css/discussion_topics.css' %}">{% endblock %}
{% block nav-home %}<li><a href="/">Home</a></li>{% endblock %}
          
{% block nav-subjects %}<li class="active"><a href="/subjects">My Subjects</a></li>{% endblock %}

{% block nav-pending-subjects %}<li ><a href="/pending_subjects">Pending Requests</a></li>{% endblock %}
{% block body%}
<div class="container message-wrap " style="margin-top:50px">
  <p>
    <h3>
      Topics in {{sub_code}}
    </h3>
  </p>
  <div class="list-view">
    <div class="list-group">

      {% for topic in topics %} 
        <a href="/threads/{{topic.id}}" class="list-group-item">
          <!-- <div class="time">
            <div ><i class="fa fa-calendar"></i> Saturday</div>
            <div >12/12/19</div>
            <div ><i class="fa fa-clock-o"></i> 12.10pm</div>
          </div> -->
          <div class="topic-body">
            <table style="width:100%;border: solid grey 0px;">
              <tr>
                <td>
                  <h4 class="list-group-item-heading">{{topic.title}}</h4>
                </td>
                <td >
                  {% if topic.is_prof_included  %}
                    <p  style="color:MediumSeaGreen;text-align: right">{{"Professor &#10004"}}</p>
                  {% else %}
                    <p  style="color:Tomato;text-align: right">{{"Professor &#x2718"}}</p>
                  {% endif %}
                </td>
                  
                  
              </tr>
            </table>
              
            <!-- <p class="list-group-item-text">List Group Item Text List Group Item Text List Group Item Text List Group Item Text</p> -->
          </div>        
        </a>
         
      {% endfor %} 


      <!-- <a href="#" class="list-group-item">
        <div class="time">
          <div ><i class="fa fa-calendar"></i> Saturday</div>
          <div >12/12/19</div>
          <div ><i class="fa fa-clock-o"></i> 12.10pm</div>
        </div>
        <div class="topic-body">
          <h4 class="list-group-item-heading">First List Group Item Heading</h4>
          <p class="list-group-item-text">List Group Item Text List Group Item Text List Group Item Text List Group Item Text</p>
        </div>
        
      </a>
      <a href="#" class="list-group-item">
        <div class="time">
          <div ><i class="fa fa-calendar"></i> Saturday</div>
          <div >12/12/19</div>
          <div ><i class="fa fa-clock-o"></i> 12.10pm</div>
        </div>
        <div class="topic-body">
          <h4 class="list-group-item-heading">First List Group Item Heading</h4>
          <p class="list-group-item-text">List Group Item Text List Group Item Text List Group Item Text List Group Item Text</p>
        </div>
        
      </a>
      <a href="#" class="list-group-item">
        <div class="time">
          <div ><i class="fa fa-calendar"></i> Saturday</div>
          <div >12/12/19</div>
          <div ><i class="fa fa-clock-o"></i> 12.10pm</div>
        </div>
        <div class="topic-body">
          <h4 class="list-group-item-heading">First List Group Item Heading</h4>
          <p class="list-group-item-text">List Group Item Text List Group Item Text List Group Item Text List Group Item Text</p>
        </div>        
      </a> -->

        <div class="send-wrap ">
            <form method="POST" class="post-form" action="/topics/{{sub_code}}">
                {% csrf_token %}
            <br>
            <p class="add-new-topic">Add New Topic</p>
            <div>
                {{form.title}}
            </div>
            {% if is_prof == False %}
              <div>
                  <span>Include Prof {{form.is_prof_included}}</span>
              </div>
            {% endif %}
        </div>
        <div>
            <button type="submit" class=" col-sm-4 btn   send-message-btn" role="button"><i class="fa fa-plus"></i> Add Topic</a>
        </div>               
    </div>
  </div> 
</div> 
{% endblock %}

  