Files
supermarket/internal/web/templates/content.html
T
davidandClaude Opus 5.5 f275f039f9 Phase 1, part 2: Inbox, scheduled publishing and UTM tags
- Inbox: a top-level page, with a count in the menu, for everything
  waiting for approval; Content's drafts are reviewed there. /drafts
  redirects to it.
- Scheduling: publish a draft now or at a time (migration 3 adds
  publish_at). A scheduler in the app publishes due drafts every 30
  seconds. Posts more than 12 hours overdue, or refused before posting,
  go back to the Inbox with the reason. Content gets Scheduled and
  Published tabs.
- UTM tags on links to the company's own websites and product pages,
  added when publishing; drafts stay untagged.
- The container runs in the computer's time zone, so times are shown
  and read correctly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 13:17:38 -07:00

31 lines
1.2 KiB
HTML

{{define "content"}}{{with .Data}}
<nav class="tabs">
<a href="/content" aria-current="page">Sources</a>
<a href="/content/scheduled">Scheduled</a>
<a href="/content/published">Published</a>
</nav>
<h1>Content</h1>
<p class="lede">Pick an inventory entry to fetch its latest news, choose what to write about, and get a draft for each channel to review in the <a href="/inbox">Inbox</a>.</p>
{{if .Rows}}
<table class="list">
<thead><tr><th>Entry</th><th>Relationship</th><th>Sources</th><th>Waiting</th><th>Last fetched</th></tr></thead>
<tbody>
{{range .Rows}}
<tr>
<td><a href="/content/{{.Entry.ID}}">{{.Entry.Name}}</a></td>
<td><span class="badge {{.Entry.Relationship}}">{{.Entry.Relationship}}</span></td>
<td>{{if .Sources}}{{join .Sources ", "}}{{else}}<span class="muted">none: <a href="/inventory/{{.Entry.ID}}">add some</a></span>{{end}}</td>
<td>{{if .Waiting}}{{.Waiting}}{{end}}</td>
<td>{{ago .LastChecked}}</td>
</tr>
{{end}}
</tbody>
</table>
{{else}}
<section class="card empty">
<p>Add the partners and competitors you post about to the <a href="/inventory">Inventory</a> first.</p>
</section>
{{end}}
{{end}}{{end}}