Files
lifeos-dev/templates/capture.html

43 lines
2.2 KiB
HTML

{% extends "base.html" %}
{% block content %}
<div class="page-header">
<h1 class="page-title">Capture<span class="page-count">{{ items|length }}</span></h1>
</div>
<!-- Quick capture input -->
<div class="card mb-4">
<form action="/capture/add" method="post">
<label class="form-label mb-2">Quick Capture (one item per line)</label>
<textarea name="raw_text" class="form-textarea" rows="3" placeholder="Type or paste items here...&#10;Each line becomes a separate capture item"></textarea>
<div class="mt-2"><button type="submit" class="btn btn-primary">Capture</button></div>
</form>
</div>
<div class="flex items-center gap-2 mb-3">
<a href="/capture?show=unprocessed" class="btn {{ 'btn-primary' if show != 'all' else 'btn-secondary' }} btn-sm">Unprocessed</a>
<a href="/capture?show=all" class="btn {{ 'btn-primary' if show == 'all' else 'btn-secondary' }} btn-sm">All</a>
</div>
{% if items %}
{% for item in items %}
<div class="capture-item {{ 'completed' if item.processed }}">
<div class="capture-text {{ 'text-muted' if item.processed }}" style="{{ 'text-decoration:line-through' if item.processed }}">{{ item.raw_text }}</div>
{% if not item.processed %}
<div class="capture-actions">
<form action="/capture/{{ item.id }}/to-task" method="post" class="flex gap-2">
<select name="domain_id" class="filter-select" style="font-size:0.75rem;padding:3px 6px" required>
{% for d in sidebar.domain_tree %}<option value="{{ d.id }}">{{ d.name }}</option>{% endfor %}
</select>
<button type="submit" class="btn btn-ghost btn-xs" style="color:var(--green)">To Task</button>
</form>
<form action="/capture/{{ item.id }}/dismiss" method="post" style="display:inline"><button class="btn btn-ghost btn-xs">Dismiss</button></form>
<form action="/capture/{{ item.id }}/delete" method="post" style="display:inline"><button class="btn btn-ghost btn-xs" style="color:var(--red)">&times;</button></form>
</div>
{% endif %}
</div>
{% endfor %}
{% else %}
<div class="empty-state"><div class="empty-state-icon">&#128229;</div><div class="empty-state-text">Capture queue is empty</div></div>
{% endif %}
{% endblock %}