{% extends "users/base.html" %}
{% block title %}FTP Accounts{% endblock title %}
{% block content %}


 <div class="card card-default">
      <div class="card-header">
        <h2>List of ftp Accounts</h2>
		
        

      </div>
    
   <div class="card-body">
   <div class="row">
   <div class="col-xl-6">
   <a class="mb-1 btn btn-pill btn-success" href="{% url 'ftp_new' %}" role="button" style="text-transform: none;">+ Add FTP</a>
</div>
<div class="col-xl-6 d-flex justify-content-end">
    <form action="" method="post" class="form-inline mb-3">
        <div class="form-group mr-2">
            <input type="text" id="search" name="search" class="form-control" placeholder="Search for ftp...">
        </div>
        {% csrf_token %}
        <button type="submit" class="btn btn-danger">Filter</button>
    </form>
	</div>
	</div>
<div class="table-responsive">
    <table class="table table-bordered">
        <thead class="thead-light">
             <tr>
                <th>Log In</th>
				<th>Path</th>
                <th>Storage</th>
               <th>Status</th>
                <th>Actions</th>
            </tr>
        </thead>
        <tbody id="domainTable">
            {% for ftp in ftps %}
            <tr>
                <td>{{ ftp.user }}</td>
				 <td>{{ ftp.dir }}</td>
                <td>{{ ftp.QuotaSize }}</td>
				<td><h5>
    {% if ftp.status == "1" %}
        <span class="badge badge-success">Running</span>
    {% else %}
        <span class="badge badge-danger">Stopped</span>
    {% endif %}
	</h5>
</td>

                
                <td>
                    <a href="{% url 'ftp_edit' ftp.id %}" class="btn btn-primary btn-sm">Manage</a>

                    
                </td>
            </tr>
            {% empty %}
            <tr>
                <td colspan="4" class="text-center">No domains found.</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
</div>
    <!-- No Results Message -->
    <div id="noResults" class="text-center text-danger" style="display:none;">No results found.</div>

</div>
</div>



{% endblock content %}

{% include "users/footer.html" %}