oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1{{define "content"}}
2<div equipo-team-page data-work-live data-work-region id="team-page">{{template "team-panel" .Team}}</div>
3{{end}}
4{{/* One specialist's drawer: GET /team/{specialist} renders it as a page
5 (no script, the phone's index), and team-panel.js lifts the same
6 section into a drawer over the page the person is on. */}}
7{{define "team-panel"}}<section equipo-team data-team="{{.Key}}" data-state="{{if .Task}}working{{else}}idle{{end}}" aria-labelledby="team-title">
8<header equipo-team-head>
9<span equipo-team-icon aria-hidden="true">{{icon .Icon}}</span>
10<h1 id="team-title">{{copy .CopyKey}}</h1>
11<p equipo-team-state>{{if .Task}}<span data-spec-star>{{template "mark" "s"}}</span>{{with .Step}}{{template "elapsed" .StartedAt}}{{end}}{{else}}{{copy "nav.idle"}}{{end}}</p>
12<button type="button" equipo-team-close data-team-close hidden aria-label="{{copy "team.close"}}" title="{{copy "team.close"}}">{{icon "x"}}</button>
13</header>
14{{with .Task}}<section equipo-team-sec equipo-team-now>
15<h2>{{copy "team.working_on"}}</h2>
16<a equipo-team-task href="/tasks/{{.ID}}">{{.Title}}</a>
17<p equipo-team-where><span>{{.Project}}</span><span>{{$.Stage}}</span>{{with $.Step}}{{if gt .Attempt 1}}<span>{{printf (copy "nav.attempt") .Attempt}}</span>{{end}}{{end}}{{if $.More}}<span>{{printf (copy "nav.more") $.More}}</span>{{end}}</p>
18</section>
19<section equipo-team-sec>
20<h2>{{copy "team.activity"}}</h2>
21<ol equipo-team-tl>{{range $i, $l := $.Lines}}<li{{if eq $i 0}} data-now{{end}}><span equipo-team-dot aria-hidden="true"></span><div><p><span>{{.Text}}</span> <span equipo-ago{{agoData .At ""}}>{{.Ago}}</span></p>{{with .Command}}<details equipo-team-raw><summary>{{icon "chevron-right"}}{{copy "team.command"}}</summary><code>{{.}}</code></details>{{end}}</div></li>{{else}}<li data-now><span equipo-team-dot aria-hidden="true"></span><div><p><span>{{copy "work.activity.working"}}</span></p></div></li>{{end}}</ol>
22</section>
23{{with $.Files}}<section equipo-team-sec>
24<h2>{{copy "team.files"}}</h2>
25<ul equipo-team-files>{{range .}}<li title="{{.Path}}">{{icon "file-text"}}<span>{{.Name}}</span>{{if .Edited}}<small>{{copy "team.edited"}}</small>{{end}}</li>{{end}}</ul>
26</section>{{end}}
27<section equipo-team-sec>
28<h2>{{copy "team.runs_on"}}</h2>
29<dl equipo-team-runs>{{if $.Provider}}<div><dt>{{copy "team.connection"}}</dt><dd>{{with $.Connection}}{{template "conn-label" .}}{{else}}{{$.Provider}}{{end}}</dd></div>{{end}}<div><dt>{{copy "team.model"}}</dt><dd>{{if $.Model}}{{$.Model}}{{else}}<span equipo-team-quiet>{{copy "team.model_pending"}}</span>{{end}}</dd></div></dl>
30</section>{{end}}
31{{with .Ask}}<section equipo-team-sec equipo-team-ask data-ask-task="{{.TaskID}}">
32<h2>{{printf (copy "team.ask") .Name}}</h2>
33<p equipo-team-about>{{printf (copy "team.ask_about") ""}}<a href="/tasks/{{.TaskID}}">{{.Title}}</a></p>
34{{if .Waits}}<p equipo-team-quiet>{{printf (copy "team.ask_waits") .Name}}</p>{{end}}
35{{with .Questions}}<ol equipo-team-qs>{{range .}}<li data-question="{{.ID}}"><p equipo-team-q>{{.Text}}</p>{{if .Answered}}<div equipo-markdown equipo-md>{{chatMarkdown .Answer}}</div>{{else if .Waiting}}<p equipo-team-quiet>{{.Waiting}}</p>{{else}}<p equipo-team-quiet>{{.Ended}}</p>{{end}}</li>{{end}}</ol>{{end}}
36<form equipo-team-ask-form data-team-ask method="post" action="/tasks/{{.TaskID}}/ask">
37<input type="hidden" name="request_id" value="{{.RequestID}}">
38<input type="hidden" name="specialist" value="{{.Specialist}}">
39<textarea rst-input name="body" required maxlength="4000" rows="2" aria-label="{{printf (copy "work.ask.placeholder") .Name}}" placeholder="{{printf (copy "work.ask.placeholder") .Name}}"></textarea>
40<div equipo-team-ask-foot><p data-ask-error role="alert" hidden>{{copy "team.ask_failed"}}</p><button rst-btn="primary" type="submit">{{copy "team.ask_send"}}</button></div>
41</form>
42</section>{{end}}
43{{with .Queue}}<section equipo-team-sec>
44<p equipo-team-quiet>{{printf (copy "nav.queue") (len .)}} <a href="/tasks/{{(index . 0).ID}}">{{(index . 0).Title}}</a></p>
45</section>{{end}}
46<section equipo-team-sec>
47<h2>{{copy "team.recent"}}</h2>
48{{with .Recent}}<ul equipo-team-recent>{{range .}}<li><a href="/tasks/{{.TaskID}}">{{.Title}}</a>{{with .Headline}}<p>{{.}}</p>{{end}}<small><span>{{.Project}}</span><span equipo-ago{{agoData .At ""}}>{{.Ago}}</span></small></li>{{end}}</ul>{{else}}<p equipo-team-quiet>{{copy "team.recent_empty"}}</p>{{end}}
49</section>
50</section>{{end}}
51