{% extends "base.html" %}

{% block content %}

<div class="page-header">
  <h1>Project: {{ project.name }}</h1>
</div>

<ol class="breadcrumb">
  <li><a href="{% url 'service-list' %}">Home</a></li>
  <li><a href="{% url 'service-detail' project.service.id %}">{{ project.service.name }}</a></li>
  <li><a href="{% url 'project-detail' project.id %}">{{ project.name }}</a></li>
  <li class="active">Link Farm {{ source }}</li>
</ol>

<div class="panel panel-default">
  <div class="panel-heading">
    <input class="form-control" data-filter="div.auto-grid div" placeholder="Type to filter">
  </div>
  <div class="panel-body">
    <div class="auto-grid">
      {% for farm in farm_list %}
      <div>
        <form action="{% url 'farm-link' project.id source %}" method="post">
          {% csrf_token %}
          <input type="hidden" name="farm" value="{{ farm }}" />
          <button type="submit" class="btn btn-danger btn-block" />{{ farm }}</button>
        </form>
      </div>
      {% endfor %}
    </div>
  </div>
</div>

{% endblock %}
