{% extends "orgapy/layout/skeleton.html" %}
{% load static %}

{% block title %}Objectives{% endblock title %}

{% block column_main %}
<div class="card">
    <h1 class="card-header">Objectives</h1>
    <div class="card-actions">
        <form id="createObjectiveForm" action="{% url 'orgapy:objectives' %}" method="post">{% csrf_token %}<input type="hidden" name="title"><button><i class="ri-add-line"></i> Create</button></form>
    </div>
</div>
<div class="card">
    {% if objectives %}
    {% for objective in objectives %}
    <div class="line">
        <a class="link-hidden" href="{{ objective.get_absolute_url }}">{{ objective.name }}</a>
    </div>
    {% endfor %}
    {% else %}
    <div class="card-body">
        <div>Nothing found 😔</div>
    </div>
    {% endif %}
</div>
<script type="text/javascript">bindCreateForm(createObjectiveForm, "objective")</script>
{% endblock column_main %}
