{% extends "core_components/site_base.html" %}

{% block tabtitle %}
Simmate
{% endblock %}

{% block banner %}
{% include "core_components/header.html"%}
{% endblock %}


{% block body %}

{% load markdown_filter %}

<!-- start page title -->
<div class="row">
  <div class="col-12">
    <div class="page-title-box">
      <div class="page-title-right">
        <ol class="breadcrumb m-0">
          <li class="breadcrumb-item"><a href="{% url 'workflows' %}">workflows</a></li>
          <li class="breadcrumb-item"><a href="{% url 'workflows_by_type' workflow.name_project %}">{{ workflow.name_project }}</a></li>
          <li class="breadcrumb-item active">{{ workflow.name_preset }}</li>
        </ol>
      </div>
      <h4 class="page-title">Workflow Results</h4>
    </div>
  </div>
</div>
<!-- end page title -->

<!-- Workflow name and descriptoin header -->
<section class="pt-5 jumbotron text-center">
  <div class="container">
    <h1 class="jumbotron-heading">{{ workflow.name }}</h1>
    <p class="lead text-muted">{{ workflow.description_doc_short }}</p>
  </div>
</section>

<div class="container px-4">
  <h2>Description:</h2>
  {{ workflow.description_doc | markdown }}
</div>

<div class="container px-4">
  <h2>Parameters:</h2>
  <ul>
    {% for parameter in workflow.parameter_names %}
    <li>{{ parameter }}</li>

    {% endfor %}
  </ul>
</div>

<!-- Buttons at top -->
<div class="container px-4">

  <h2>Extras:</h2>
  <a role="button" class="btn btn-primary btn"
    href="{% url 'workflow_submit' workflow.name_project workflow.name_preset %}">Submit New Run</a>
  {% if flow_id %}
  <a role="button" class="btn btn-primary btn" href="https://cloud.prefect.io/simmate/flow/{{ flow_id }}"
    target="_blank">Monitor Runs on Prefect ({{ nflows_submitted }})</a>
  {% endif %}
</div>

<!-- Search Form -->
{% include "core_components/search_form.html" %}

<!-- Search Results -->
{% include "workflows/search_results.html" %}

{% endblock %}