{% include 'header.twig' %}
         <div class="container-fluid">
  <div class="row">
    <div class="col-sm-12">
      <div class="dark-well  ">
        <h2 class="title">{{ messageList['ticket']['subject'] }}</h2>
        
          {% if messageList %}
                {% for message in messageList %}
                  {% if message["support"] == 1 %}
                                            <div class="row ticket-message-block ticket-message-right">
                <div class="col-md-1"></div>
                <div class="col-md-11">
                  <div class="ticket-message">
                    <div class="message">{{ messageList['ticket']['ticket_id'] }}<br />
{{ message["message"] }}</div>
                                      </div>
                  <div class="info text-right">
                    <strong>{{ user["username"] }}</strong>
                    <small class="text-muted">{{ message["time"] }}</small>
                  </div>
                </div>
                <div class="col-md-1"></div>
              </div>
              
               {% elseif message["subject"] %}
                                                    {% else %}    
                                                    
                                                    
                                                <div class="row ticket-message-block ticket-message-left">
                                                    
                                                    
                <div class="col-md-11">
                  <div class="ticket-message">
                    <div class="message"><p>{{ message["message"] }} </p></div>
					                  </div>
                  <div class="info">
                    <strong>Support</strong>
                    <small class="text-muted">{{ message["time"] }}</small>
                  </div>
                </div>
                <div class="col-md-1"></div>
              </div>
                {% endif %}
{% endfor %}
              {% endif %}
              
              <!-- rahul bhai --> 
              
                       {% if messageList['ticket']['canmessage'] == 2 %}	
                                       <div class="row">
            <div class="col-md-12">
               <form  method="post" action="tickets/{{ messageList['ticket']['ticket_id'] }}" id="ticketsend">
                   
                     {% if error %}
        <div class="alert alert-dismissible alert-danger">
          <button type="button" class="close" data-dismiss="alert">&times;</button>
          {{ errorText }}
        </div>
      {% endif %}
      {% if success %}
        <div class="alert alert-dismissible alert-success">
          <button type="button" class="close" data-dismiss="alert">&times;</button>
          {{ successText }}
        </div>
      {% endif %}
      
      
                                <div class="form-group panel-border-top">
                  <label for="message" class="control-label">Message</label>
                  <textarea id="message" rows="5" class="form-control" name="message"></textarea>
                                  </div>
               
                <button id="sendTicket" type="submit" class="btn btn-primary">Submit</button>
              </form>
            </div>
              {% endif %}
          </div>
              </div>
    </div>
  </div>
</div>
        </div>
      </div>
    </div>
 
{% include 'footer.twig' %}
