changes
This commit is contained in:
10
plugins/growlog/templates/growlog/log_form.html
Normal file
10
plugins/growlog/templates/growlog/log_form.html
Normal 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 %}
|
25
plugins/growlog/templates/growlog/log_list.html
Normal file
25
plugins/growlog/templates/growlog/log_list.html
Normal 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 %}
|
Reference in New Issue
Block a user