f5734fea10
Add an org filter select to the dashboard that allows users to narrow the triage queue to a specific organization. The filter uses HTMX to update the view without a full page reload, mirroring the pattern already used in the issues and pulls views. Closes leeworks-agents/gitea-mobile#68 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
38 lines
1.1 KiB
HTML
38 lines
1.1 KiB
HTML
{{define "content"}}
|
|
<h1>Dashboard</h1>
|
|
|
|
{{if gt (len .Orgs) 1}}
|
|
<div class="filter-bar">
|
|
<select name="org" hx-get="/" hx-trigger="change" hx-target="#main-content" hx-swap="innerHTML" hx-push-url="true">
|
|
<option value="">All orgs</option>
|
|
{{range .Orgs}}
|
|
<option value="{{.}}" {{if eq . $.SelectedOrg}}selected{{end}}>{{.}}</option>
|
|
{{end}}
|
|
</select>
|
|
</div>
|
|
{{end}}
|
|
|
|
{{if .Error}}
|
|
<p class="empty">{{.Error}}</p>
|
|
{{else if not .Items}}
|
|
<p class="empty">No items need attention. Nice work!</p>
|
|
{{else}}
|
|
<div class="card-grid">
|
|
{{range .Items}}
|
|
<div class="card" hx-get="/{{if eq .Type "pull"}}pulls{{else}}issues{{end}}/{{.RepoOwner}}/{{.RepoName}}/{{.Number}}" hx-target="#main-content" hx-swap="innerHTML" hx-push-url="true">
|
|
<div class="card-title">
|
|
{{if eq .Type "pull"}}<span class="type-badge type-pull">PR</span>{{else}}<span class="type-badge type-issue">issue</span>{{end}}
|
|
{{.Title}}
|
|
</div>
|
|
<div class="card-meta">
|
|
<span>{{.RepoOwner}}/{{.RepoName}} #{{.Number}}</span>
|
|
{{range .Labels}}
|
|
<span class="label">{{.}}</span>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|