{% extends 'core_ui/base.html' %}
{% block title %}{{ plant.common_name.name }} – Nature In Pots{% endblock %}

{% block content %}
<div class="container my-4">
  <div class="row">
    <div class="col-md-4">
      <img src="https://placehold.co/300x300"
           class="img-fluid rounded mb-3"
           alt="{{ plant.common_name.name }}">
    </div>
    <div class="col-md-8">
      <h1>{{ plant.common_name.name }}</h1>
      {% if plant.scientific_name %}
        <p class="text-muted"><em>{{ plant.scientific_name.name }}</em></p>
      {% endif %}
      <dl class="row">
        <dt class="col-sm-3">Date Added</dt>
        <dd class="col-sm-9">{{ plant.created_at.strftime('%Y-%m-%d') }}</dd>

        <dt class="col-sm-3">Status</dt>
        <dd class="col-sm-9">
          {{ 'Dead' if plant.is_dead else 'Active' }}
        </dd>
      </dl>

      <a href="{{ url_for('plant.index') }}" class="btn btn-secondary">
        ← Back to list
      </a>
      <a href="{{ url_for('plant.edit', plant_id=plant.id) }}"
         class="btn btn-primary">
        Edit
      </a>
    </div>
  </div>
</div>
{% endblock %}
