{% extends "base/page.html" %}
{% load crispy_forms_tags %}
{% load my_filters %}
{% load static %}
{% block page_title %}Collections{% endblock %}
{% block content %}
<div class="row">
    <div class="col">
        <div class="card">
           <div class="card-body">
             {% if collections %}<table id="taskTable" class="tablesorter table table-striped" width="100%">
               <thead>
                    <tr>
                       <th class="text-nowrap" width="30%">Name</th>
                       <th width="35%">Executor</th>
                   </tr>
              </thead>
              <tbody>{% for collection in collections %}
                   <tr>
                      <td>{{ collection.name }}</td>
                      <td><button class="btn btn-primary"><a href="{% url 'main:view_collection' collection.id %}">View</a></button></td>
                   </tr>
              {% endfor %}</tbody>
              </table>{% else %}
               <p>You don't have any Snakemake collections. Why don't you <a href="{% url 'main:new_collection' %}"><button class="btn btn-filled btn-sm">create one</button></a>?</p>{% endif %}
           </div>
        </div>
    </div>
</div>
{% endblock %}
{% block scripts %}
<script>
$(document).ready(function(){
});
</script>
{% endblock %}
