changes
This commit is contained in:
9
plugins/plant/templates/plant/detail.html
Normal file
9
plugins/plant/templates/plant/detail.html
Normal file
@ -0,0 +1,9 @@
|
||||
{% extends 'core_ui/base.html' %}
|
||||
{% block content %}
|
||||
<h1>{{ plant.name }}</h1>
|
||||
<p>Type: {{ plant.type }}</p>
|
||||
<p>{{ plant.notes }}</p>
|
||||
<p>Status: {% if plant.is_active %}Active{% else %}Inactive{% endif %}</p>
|
||||
<a href="{{ url_for('plant.edit', plant_id=plant.id) }}">Edit</a>
|
||||
<a href="{{ url_for('plant.index') }}">Back to list</a>
|
||||
{% endblock %}
|
12
plugins/plant/templates/plant/form.html
Normal file
12
plugins/plant/templates/plant/form.html
Normal file
@ -0,0 +1,12 @@
|
||||
{% extends 'core_ui/base.html' %}
|
||||
{% block content %}
|
||||
<h1>{% if plant %}Edit{% else %}New{% endif %} Plant</h1>
|
||||
<form method="POST">
|
||||
{{ form.hidden_tag() }}
|
||||
<p>{{ form.name.label }}<br>{{ form.name(size=40) }}</p>
|
||||
<p>{{ form.type.label }}<br>{{ form.type(size=40) }}</p>
|
||||
<p>{{ form.notes.label }}<br>{{ form.notes(rows=5, cols=40) }}</p>
|
||||
<p>{{ form.is_active() }} {{ form.is_active.label }}</p>
|
||||
<p>{{ form.submit() }}</p>
|
||||
</form>
|
||||
{% endblock %}
|
10
plugins/plant/templates/plant/index.html
Normal file
10
plugins/plant/templates/plant/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
{% extends 'core_ui/base.html' %}
|
||||
{% block content %}
|
||||
<h1>Plant List</h1>
|
||||
<ul>
|
||||
{% for plant in plants %}
|
||||
<li><a href="{{ url_for('plant.detail', plant_id=plant.id) }}">{{ plant.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<a href="{{ url_for('plant.create') }}">Add New Plant</a>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user