{% extends 'base.html' %}
{% load crispy_forms_tags %}

{% block breadcrumb %}
    <ol class="breadcrumb">
        <li><a href="{% url 'projects_project_list' %}">Projects</a></li>
        <li><a href="{% url 'projects_project_view' stage.project.pk %}">{{ stage.project.name }}</a></li>
        <li><a href="{% url 'projects_stage_view' stage.project.pk stage.pk %}">{{ stage.name }}</a></li>
        <li class="active">New Deployment</li>
    </ol>
{% endblock breadcrumb %}

{% block content %}
    <h1>Deploy</h1><br/>
    <div class="row">
        <div class="col-md-6">
            {% crispy form %}
        </div>
        <div class="col-md-6">
            <div class="well">
                <legend>Stats</legend>
                <dl class="dl-horizontal">
                    <dt>Project</dt>
                    <dd>{{ stage.project.name }}</dd>
                    <dt>Stage</dt>
                    <dd>{{ stage.name }}</dd>
                    <dt>Task</dt>
                    <dd>{{ task_name }}</dd>
                    <dt>Task Description</dt>
                    <dd>{{ task_description }}</dd>
                </dl>
            </div>

            <div class="well">
                <legend>Configurations (env)</legend>
                <dl class="dl-horizontal">
                    {% for config in configs %}
                        <dt>{{ config.key }}</dt>
                        <dd>{{ config.get_display_value }}</dd>
                    {% empty %}
                        <dt>Configs</dt>
                        <dd>None Set</dd>
                    {% endfor %}
                </dl>
            </div>
        </div>
    </div>

{% endblock content %}