Update
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>{% block title %}Illustrations DB{% endblock %}</title>
|
||||
<style>
|
||||
|
||||
:root { --blue:#1f6cd8; --light:#f6f8fb; --panel:#ffffff; --line:#e5e9f2; --text:#1a1a1a; }
|
||||
body { margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica, Arial, sans-serif; background:var(--light); color:var(--text); }
|
||||
.topbar { display:flex; align-items:center; justify-content:space-between; padding:14px 18px; background:#fff; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:10; }
|
||||
@@ -37,8 +36,7 @@ label { font-size:14px; color:#333; display:block; margin-bottom:6px; }
|
||||
.small { font-size:12px; color:#444; }
|
||||
h1 { margin:0 0 12px 0; font-size:24px; }
|
||||
h2 { margin:0 0 12px 0; font-size:18px; }
|
||||
|
||||
</style>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
{% if request.user.is_authenticated %}
|
||||
@@ -54,9 +52,7 @@ h2 { margin:0 0 12px 0; font-size:18px; }
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="container">
|
||||
{% for message in messages %}
|
||||
<div class="flash">{{ message }}</div>
|
||||
{% endfor %}
|
||||
{% for message in messages %}<div class="flash">{{ message }}</div>{% endfor %}
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,49 +3,27 @@
|
||||
{% block content %}
|
||||
<div class="toolbar">
|
||||
<div class="small">Editing: Record {{ position }} of {{ count }}</div>
|
||||
<div>
|
||||
<a class="btn" href="/entry/{{ entry.id }}/">Cancel</a>
|
||||
</div>
|
||||
<div><a class="btn" href="/entry/{{ entry.id }}/">Cancel</a></div>
|
||||
</div>
|
||||
<form method="post">{% csrf_token %}
|
||||
<div class="panel">
|
||||
<h2 style="margin-top:0;">Edit Entry</h2>
|
||||
<div class="row">
|
||||
<div>
|
||||
<label>Talk Title</label>
|
||||
{{ form.talk_title }}
|
||||
</div>
|
||||
<div>
|
||||
<label>Talk Number</label>
|
||||
{{ form.talk_number }}
|
||||
</div>
|
||||
<div><label>Talk Title</label>{{ form.talk_title }}</div>
|
||||
<div><label>Talk Number</label>{{ form.talk_number }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div>
|
||||
<label>Source</label>
|
||||
{{ form.source }}
|
||||
</div>
|
||||
<div>
|
||||
<label>Code</label>
|
||||
{{ form.entry_code }}
|
||||
</div>
|
||||
<div><label>Source</label>{{ form.source }}</div>
|
||||
<div><label>Code</label>{{ form.entry_code }}</div>
|
||||
</div>
|
||||
<label>Subject</label>
|
||||
{{ form.subject }}
|
||||
<label>Illustration</label>
|
||||
{{ form.illustration }}
|
||||
<label>Application</label>
|
||||
{{ form.application }}
|
||||
<label>Subject</label>{{ form.subject }}
|
||||
<label>Illustration</label>{{ form.illustration }}
|
||||
<label>Application</label>{{ form.application }}
|
||||
<div class="row">
|
||||
<div><label>Scripture</label>{{ form.scripture_raw }}</div>
|
||||
<div>
|
||||
<label>Scripture</label>
|
||||
{{ form.scripture_raw }}
|
||||
</div>
|
||||
<div>
|
||||
<label>Date Added</label>
|
||||
{{ form.date_added }}
|
||||
<label>Date Edited</label>
|
||||
{{ form.date_edited }}
|
||||
<label>Date Added</label>{{ form.date_added }}
|
||||
<label>Date Edited</label>{{ form.date_edited }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top:16px; display:flex; gap:10px; justify-content:flex-end;">
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<a class="btn danger" href="/entry/{{ entry.id }}/delete/">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<h2 style="margin-top:0;">{{ entry.talk_title|default:"(untitled)" }}</h2>
|
||||
<div class="small">Code: {{ entry.entry_code }} • Source: {{ entry.source }} • Talk # {{ entry.talk_number }}</div>
|
||||
@@ -19,15 +18,11 @@
|
||||
<div class="row">
|
||||
<div>
|
||||
<label>Subject</label>
|
||||
<div class="chips">
|
||||
{% for t in entry.subject.split(',') %}{% if t.strip %}<span class="chip">{{ t.strip }}</span>{% endif %}{% endfor %}
|
||||
</div>
|
||||
<div class="chips">{% for t in entry.subject.split(',') %}{% if t.strip %}<span class="chip">{{ t.strip }}</span>{% endif %}{% endfor %}</div>
|
||||
</div>
|
||||
<div>
|
||||
<label>Scripture</label>
|
||||
<div class="chips">
|
||||
{% for t in entry.scripture_raw.split(';') %}{% if t.strip %}<span class="chip" style="background:#eef4ff;">{{ t.strip }}</span>{% endif %}{% endfor %}
|
||||
</div>
|
||||
<div class="chips">{% for t in entry.scripture_raw.split(';') %}{% if t.strip %}<span class="chip" style="background:#eef4ff;">{{ t.strip }}</span>{% endif %}{% endfor %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
|
||||
@@ -6,14 +6,8 @@
|
||||
<p>Expected headers (any order, case-insensitive): <code>Subject, Illustration, Application, Scripture, Source, Talk Title, Talk Number, Code, Date, Date Edited</code></p>
|
||||
<form method="post" enctype="multipart/form-data">{% csrf_token %}
|
||||
<div class="row">
|
||||
<div>
|
||||
<label>CSV file</label>
|
||||
{{ form.file }}
|
||||
</div>
|
||||
<div>
|
||||
<label>{{ form.dry_run.label }}</label>
|
||||
{{ form.dry_run }} <small>{{ form.dry_run.help_text }}</small>
|
||||
</div>
|
||||
<div><label>CSV file</label>{{ form.file }}</div>
|
||||
<div><label>{{ form.dry_run.label }}</label>{{ form.dry_run }} <small>{{ form.dry_run.help_text }}</small></div>
|
||||
</div>
|
||||
<div style="margin-top:16px; display:flex; gap:10px; justify-content:flex-end;">
|
||||
<a class="btn" href="/search/">Cancel</a>
|
||||
|
||||
@@ -14,18 +14,9 @@
|
||||
<div>
|
||||
<label>Fields to search</label>
|
||||
<div class="chips">
|
||||
{% for field,label,checked in [
|
||||
('subject','Subject', selected.subject),
|
||||
('illustration','Illustration', selected.illustration),
|
||||
('application','Application', selected.application),
|
||||
('scripture_raw','Scripture', selected.scripture_raw),
|
||||
('source','Source', selected.source),
|
||||
('talk_title','Talk Title', selected.talk_title),
|
||||
('talk_number','Talk Number', selected.talk_number),
|
||||
('entry_code','Code', selected.entry_code),
|
||||
] %}
|
||||
{% for opt in field_options %}
|
||||
<label class="badge">
|
||||
<input type="checkbox" name="{{ field }}" {% if checked %}checked{% endif %}/> {{ label }}
|
||||
<input type="checkbox" name="{{ opt.name }}" {% if opt.checked %}checked{% endif %}/> {{ opt.label }}
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@@ -13,12 +13,9 @@
|
||||
<div class="card">
|
||||
<div class="small">Entries per month (by Date Added)</div>
|
||||
<div style="display:flex; gap:6px; align-items:flex-end; height:120px; margin-top:8px;">
|
||||
{% with maxv=series|last|slice:":1" %}{% endwith %}
|
||||
{% with peak=series|map:'1' %}{% endwith %}
|
||||
{% for label, value in series %}
|
||||
{% with h=(value|add:0) %}
|
||||
<div title="{{ label }}: {{ value }}" style="width:24px; background:#dbe7ff; border:1px solid #c8d6ff; height: {{ (value|floatformat:0) }}px;"></div>
|
||||
{% endwith %}
|
||||
<div title="{{ label }}: {{ value }}" style="width:24px; background:#dbe7ff; border:1px solid #c8d6ff; height: {{ value|add:5 }}px;"></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="small" style="display:flex; gap:8px; flex-wrap:wrap; margin-top:6px;">
|
||||
@@ -29,10 +26,7 @@
|
||||
<h2>Top Subjects</h2>
|
||||
<div class="cards">
|
||||
{% for item in top_subjects %}
|
||||
<div class="card">
|
||||
<div style="font-weight:600;">{{ item.name }}</div>
|
||||
<div class="small">{{ item.count }} entries</div>
|
||||
</div>
|
||||
<div class="card"><div style="font-weight:600;">{{ item.name }}</div><div class="small">{{ item.count }} entries</div></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user