This commit is contained in:
2025-05-18 05:21:16 -05:00
parent 132073ca19
commit c19bedc54a
65 changed files with 705 additions and 575 deletions

View File

@ -0,0 +1,10 @@
{% extends 'base.html' %}
{% block content %}
<h2>Add Log for Plant #{{ plant.id }}</h2>
<form method="POST">
{{ form.hidden_tag() }}
<p>{{ form.event_type.label }}<br>{{ form.event_type() }}</p>
<p>{{ form.note.label }}<br>{{ form.note(rows=4) }}</p>
<p>{{ form.submit() }}</p>
</form>
{% endblock %}

View File

@ -0,0 +1,25 @@
{% import 'core_ui/_media_macros.html' as media %}
{% extends 'base.html' %}
{% block content %}
<h2>Logs for Plant #{{ plant.id }}</h2>
<a href="{{ url_for('growlog.add_log', plant_id=plant.id) }}">Add New Log</a>
<ul>
{% for log in logs %}
<li>
<strong>{{ log.timestamp.strftime('%Y-%m-%d') }}:</strong> {{ log.event_type }} - {{ log.note }}
{% if log.media %}
<br><em>Images:</em>
<ul>
{% for image in log.media %}
<li>
<img src="{{ url_for('media.media_file', filename=image.file_url) }}" width="150"><br>
{{ image.caption or "No caption" }}
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
{{ media.render_media_list(log.media) }}
{% endblock %}