<!DOCTYPE html>
<html lang="en">
  <head>
    <title>[admin] Recipe {{ recipe.recipe_id }} @ Proxy</title>
    {% include "includes/headers.html" %}
  </head>
  <body class="container-fluid">
    {% include "includes/navbar.html" %}
    <header>
      <nav aria-label="breadcrumb">
        <ul class="breadcrumb">
          <li class="breadcrumb-item"><a href="/admin/">[admin]</a></li>
          <li class="breadcrumb-item"><a href="/admin/recipes/">Recipes</a></li>
          <li class="breadcrumb-item active" aria-current="page">{{ recipe.recipe_id }}</li>
        </ul>
      </nav>
      <h1>[admin] Recipe {{ recipe.recipe_id }}</h1>
    </header>
    <main>
      {% include "includes/admin-alert.html" %}
      <a href="edit.html" class="btn btn-primary">Edit</a>
      <a href="delete.html" class="btn btn-danger">Delete</a>
      <table class="table table-striped">
        <tbody>
          <tr>
            <th>Recipe ID</th>
            <td>{{ recipe.recipe_id }}</td>
          </tr>
          <tr>
            <th>Name</th>
            <td>{{ recipe.name }}</td>
          </tr>
          <tr>
            <th>Description</th>
            <td>{{ recipe.description|nonone }}</td>
          </tr>
          <tr>
            <th>Is cloneable?</th>
            <td>{% if recipe.cloneable %}yes{% else %}no{% endif %}</td>
          </tr>
          <tr>
            <th>Download filename stub</th>
            <td>{{ recipe.stub|nonone }}</td>
          </tr>
          <tr>
            <th>Date created</th>
            <td>{{ recipe.date_created }}</td>
          </tr>
          <tr>
            <th>Date modified</th>
            <td>{{ recipe.date_modified }}</td>
          </tr>
          <tr>
            <th>Args</th>
            <td>
              <table class="table">
                {% for key in recipe.args %}
                <tr>
                  <th>{{ key }}</th>
                  <td>
                    {% if key=='url' %}
                    <a href="{{ recipe.args[key] }}">{{ recipe.args[key] }}</a>
                    {% else %}
                    {{ recipe.args[key] }}
                    {% endif %}
                  </td>
                </tr>
                {% endfor %}
              </table>
            </td>
          </tr>
          {% if clone_url %}
          <tr>
            <th>Clone URL</th>
            <td><a href="{{ clone_url }}">{{ clone_url }}</a></td>
          </tr>
          {% endif %}
        </tbody>
      </table>
    </main>
    {% include "includes/scripts.html" %}
  </body>
</html>

