{% extends "core/site-base.html" %}

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

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


{% block body %}

<div class="container p-4 bg-light border" id="search-results">

  <!-- Breadcrumb links -->
  <nav aria-label="breadcrumb">
    <ol class="breadcrumb">
      <li class="breadcrumb-item"><a href="{% url 'workflows' %}">workflows</a></li>
      <li class="breadcrumb-item"><a href="{% url 'workflows_by_type' workflow.type %}">{{ workflow.type }}</a></li>
      <li class="breadcrumb-item active">{{ workflow.name_short }}</li>
    </ol>
  </nav>

  <!-- 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 }}</p>
    </div>
  </section>

  <!-- Buttons at top -->
  <div class="container p-4">
    <h2>Extras:</h2>
    <a role="button" class="btn btn-primary btn"
      href="{% url 'workflow_submit' workflow.type workflow.name_short %}">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" %}
  
</div>
{% endblock %}