{{/* Search/filters come FIRST in the DOM and move to the right of the list at lg
(order-lg-last). Source order governs both the mobile stack and the tab order,
so ordering with CSS alone would leave keyboard and screen-reader users
traversing every row to reach the control that exists to avoid exactly that. */}}
{{range .Repeaters}}
{{$shareCounts := index $.ShareCounts .ID}}
{{end}}
{{end}}
{{/* sharetext renders a repeater's sharing summary as plain text: e.g.
"Shared with 3 users, 2 organizations", omitting a zero count, or
"Not shared" when both are zero. Dot is a *store.ShareCount {Users, Orgs}. */}}
{{define "sharetext"}}{{if and (eq .Users 0) (eq .Orgs 0)}}Not shared{{else}}Shared with{{if gt .Users 0}} {{.Users}} user{{if ne .Users 1}}s{{end}}{{end}}{{if and (gt .Users 0) (gt .Orgs 0)}},{{end}}{{if gt .Orgs 0}} {{.Orgs}} organization{{if ne .Orgs 1}}s{{end}}{{end}}{{end}}{{end}}