card editing, keeping order, fixes
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{% block title %}{% endblock title %} • Inventory</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="taggle.css">
|
||||
<script src="taggle.min.js"></script>
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
<link rel="stylesheet" href="/taggle.css">
|
||||
<script src="/taggle.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="top-nav">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{% import "_form_macros" as form %}
|
||||
|
||||
{% block title -%}
|
||||
Add Record
|
||||
New
|
||||
{%- endblock %}
|
||||
|
||||
{% block nav -%}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{% extends "_layout" %}
|
||||
{% import "_form_macros" as form %}
|
||||
|
||||
{% block title -%}
|
||||
Edit
|
||||
{%- endblock %}
|
||||
|
||||
{% block nav -%}
|
||||
<a href="/">Index</a>
|
||||
{%- endblock %}
|
||||
|
||||
{% block content -%}
|
||||
<form action="/edit/{{id}}" method="POST" class="Form">
|
||||
<div class="Row indented">
|
||||
<h1>Edit Record</h1>
|
||||
</div>
|
||||
{% include "_fields" %}
|
||||
<div class="Row indented">
|
||||
<button type="submit">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
{%- endblock %}
|
||||
@@ -13,6 +13,7 @@
|
||||
<table class="cards-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Actions</th>
|
||||
{%- for field in fields %}
|
||||
<th>{{ field.label }}</th>
|
||||
{%- endfor %}
|
||||
@@ -21,6 +22,7 @@
|
||||
<tbody>
|
||||
{%- for card in cards %}
|
||||
<tr>
|
||||
<td><a href="/edit/{{card.id}}">Edit</a></td>
|
||||
{%- for field in card.fields %}
|
||||
<td>
|
||||
{%- if field.kind == "bool" -%}
|
||||
|
||||
Reference in New Issue
Block a user