{% include 'header.twig' %}


      {% if settings['ticket_system'] == 2 %}
      <div class="container">
  <div class="row">
    
     <div class="row clearfix">
                <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" style="
    margin-top: 2em;
">
                    <div class="card shadbox">
                        
                        <div class="body">
                            <!-- Nav tabs -->
                            <ul class="nav nav-tabs" role="tablist">
                                <li role="presentation" class="active">
                                    <a href="#home_with_icon_title" data-toggle="tab">
                                        <i class="material-icons" >create</i> Ticket
                                    </a>
                                </li>
                                <li role="presentation">
                                    <a href="#profile_with_icon_title" data-toggle="tab">
                                        <i class="material-icons">format_list_bulleted</i> Ticket Status
                                    </a>
                                </li>
                               
                               
                            </ul>

                            <!-- Tab panes -->
                            <div class="tab-content">
                                <div role="tabpanel" class="tab-pane fade in active" id="home_with_icon_title">
                                    <b></b>
									 {% if error %}
        <div class="alert alert-dismissible alert-danger {% if site['rtl'] %} rtl-alert {% endif %}">
          <button type="button" class="close" data-dismiss="alert">×</button>
          {{ errorText }}
        </div>
      {% elseif success %}
        <div class="alert alert-dismissible alert-success {% if site['rtl'] %} rtl-alert {% endif %}">
          <button type="button" class="close" data-dismiss="alert">×</button>
          {{ successText }}
        </div>
      {% endif %}

                                    <form method="post" action="tickets">
            <div class="form-group">
              <label for="subject" class="control-label">{{ lang['tickets.subject'] }}</label>
              <input type="text" class="form-control" id="subject" name="subject" value="{{ data['subject'] }}">
            </div>
            <div class="form-group">
              <label for="message" class="control-label">{{ lang['tickets.message'] }}</label>
              <textarea class="form-control" rows="7" id="message" name="message">{{ data['message'] }}</textarea>
            </div>
            <button type="submit"  style="
    margin-top: 1em;
" class="btn btn-primary">{{ lang['tickets.button'] }}</button>
          </form>
                                </div>
                                <div role="tabpanel" class="tab-pane fade" id="profile_with_icon_title">
                                    <b>                                    
                                  
            <table class="table ">
            <thead>
            <tr>
              <th>{{ lang['tickets.id'] }}</th>
              <th>{{ lang['tickets.subject'] }}</th>
              <th>{{ lang['tickets.status'] }}</th>
              <th class="nowrap">{{ lang['tickets.updated'] }}</th>
            </tr>
            </thead>
            <tbody>
              {% for ticket in ticketList %}
                <tr>
                  <td>{{ ticket['ticket_id'] }}</td>
                  {% if ticket["support_new"] == 2 %}
                    <td><a href="tickets/{{ ticket['ticket_id'] }}"><strong>{{ ticket['subject'] }}</strong></a></td>
                  {% else %}
                    <td><a href="tickets/{{ ticket['ticket_id'] }}">{{ ticket['subject'] }}</a></td>
                  {% endif %}
                  <td>{{ ticket['status'] }}</td>
                  <td><span class="nowrap">{{ ticket['lastupdate_time'] }}</span></td>
                </tr>
              {% endfor %}
            </tbody>
          </table>
		  
		  
		
                                </div>
                                
                            </div>
                        </div>
                          
                          
                    </div>
                </div>
            </div>
  </div>
  
      <div class="col-md-12">
        <div class="well shadbox">
        {{ contentText }}
        </div>
      </div>
   
  
      {% endif %}

    

{% include 'footer.twig' %}
