Spaces:
Sleeping
Sleeping
Update app/templates/index.html
Browse files- app/templates/index.html +23 -33
app/templates/index.html
CHANGED
|
@@ -1,39 +1,29 @@
|
|
| 1 |
{% extends "base.html" %}
|
| 2 |
{% block body %}
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
<
|
| 8 |
-
|
| 9 |
-
</
|
| 10 |
-
|
| 11 |
-
<select name="tone">
|
| 12 |
-
{% for t in Tone %}<option value="{{ t.value }}">{{ t.value }}</option>{% endfor %}
|
| 13 |
-
</select>
|
| 14 |
-
<p class="muted">ソース(URL / PDF / テキストのいずれか)</p>
|
| 15 |
-
<input type="hidden" name="source_type" id="source_type" value="url"/>
|
| 16 |
-
<div style="display:flex;gap:8px;flex-wrap:wrap">
|
| 17 |
-
<input type="url" name="url" placeholder="https://..." style="flex:1"/>
|
| 18 |
-
<input type="file" name="file" accept="application/pdf"/>
|
| 19 |
-
</div>
|
| 20 |
-
<p><textarea name="text" placeholder="ここにテキストを貼り付け..."></textarea></p>
|
| 21 |
-
<button type="submit">ドラフト生成をキューに追加</button>
|
| 22 |
-
</form>
|
| 23 |
-
</div>
|
| 24 |
|
| 25 |
-
<div class="card">
|
| 26 |
-
<h2>最近のドラフト</h2>
|
| 27 |
-
{% for d in drafts %}
|
| 28 |
<div class="card">
|
| 29 |
-
<
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
<
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
</div>
|
| 37 |
-
{%
|
| 38 |
-
</div>
|
| 39 |
{% endblock %}
|
|
|
|
| 1 |
{% extends "base.html" %}
|
| 2 |
{% block body %}
|
| 3 |
+
{% if not d %}
|
| 4 |
+
<p>見つかりませんでした。</p>
|
| 5 |
+
{% else %}
|
| 6 |
+
<div class="card">
|
| 7 |
+
<h2>#{{ d.id }} {{ d.title }}</h2>
|
| 8 |
+
<div class="muted">status: {{ d.status.value }} / subjectA: {{ d.subject_a }} / subjectB: {{ d.subject_b }}</div>
|
| 9 |
+
<pre style="white-space:pre-wrap">{{ d.body_md }}</pre>
|
| 10 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
|
|
|
|
|
|
|
|
|
| 12 |
<div class="card">
|
| 13 |
+
<h3>承認/配信設定</h3>
|
| 14 |
+
<form method="post" action="/content/{{ d.id }}/approve">
|
| 15 |
+
<label>承認</label>
|
| 16 |
+
<select name="approve"><option value="true">承認</option><option value="false">差戻し</option></select>
|
| 17 |
+
<p>件名A <input type="text" name="subject_a" value="{{ d.subject_a or '' }}" style="width:100%"/></p>
|
| 18 |
+
<p>件名B <input type="text" name="subject_b" value="{{ d.subject_b or '' }}" style="width:100%"/></p>
|
| 19 |
+
<p>メール宛先(カンマ区切り)<input type="text" name="deliver_email_list" value="{{ d.deliver_email_list or '' }}" style="width:100%"/></p>
|
| 20 |
+
<label><input type="checkbox" name="deliver_x" {% if d.deliver_x %}checked{% endif %}/> Xにも投稿</label>
|
| 21 |
+
<label><input type="checkbox" name="deliver_note" {% if d.deliver_note %}checked{% endif %}/> noteにも投稿(Webhook)</label>
|
| 22 |
+
<p><button type="submit">保存</button></p>
|
| 23 |
+
</form>
|
| 24 |
+
<form method="post" action="/deliver/{{ d.id }}">
|
| 25 |
+
<button type="submit">今すぐ配信</button>
|
| 26 |
+
</form>
|
| 27 |
</div>
|
| 28 |
+
{% endif %}
|
|
|
|
| 29 |
{% endblock %}
|