mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-15 18:56:59 +00:00
feat(ui): messages for empty usercards (#7947)
Show a message about list being empty, so the page doesn't look broken-ish empty. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7947 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Reviewed-by: Otto <otto@codeberg.org> Co-authored-by: 0ko <0ko@noreply.codeberg.org> Co-committed-by: 0ko <0ko@noreply.codeberg.org>
This commit is contained in:
parent
2b30c83a0c
commit
765e7bd1b6
6 changed files with 74 additions and 30 deletions
|
@ -4,29 +4,33 @@
|
|||
{{.CardsTitle}}
|
||||
</h2>
|
||||
{{end}}
|
||||
<ul class="list">
|
||||
{{range .Cards}}
|
||||
<li class="card">
|
||||
<a href="{{.HomeLink}}">
|
||||
{{ctx.AvatarUtils.Avatar .}}
|
||||
</a>
|
||||
<div>
|
||||
<h3 class="name">
|
||||
<a href="{{.HomeLink}}">{{.DisplayName}}</a>
|
||||
</h3>
|
||||
<div class="meta">
|
||||
{{if .Website}}
|
||||
{{svg "octicon-link"}} <a href="{{.Website}}" target="_blank" rel="noopener noreferrer">{{.Website}}</a>
|
||||
{{else if .Location}}
|
||||
{{svg "octicon-location"}} {{.Location}}
|
||||
{{else}}
|
||||
{{svg "octicon-calendar"}} {{ctx.Locale.Tr "user.joined_on" (DateUtils.AbsoluteShort .CreatedUnix)}}
|
||||
{{end}}
|
||||
{{if .Cards}}
|
||||
<ul class="list">
|
||||
{{range .Cards}}
|
||||
<li class="card">
|
||||
<a href="{{.HomeLink}}">
|
||||
{{ctx.AvatarUtils.Avatar .}}
|
||||
</a>
|
||||
<div>
|
||||
<h3 class="name">
|
||||
<a href="{{.HomeLink}}">{{.DisplayName}}</a>
|
||||
</h3>
|
||||
<div class="meta">
|
||||
{{if .Website}}
|
||||
{{svg "octicon-link"}} <a href="{{.Website}}" target="_blank" rel="noopener noreferrer">{{.Website}}</a>
|
||||
{{else if .Location}}
|
||||
{{svg "octicon-location"}} {{.Location}}
|
||||
{{else}}
|
||||
{{svg "octicon-calendar"}} {{ctx.Locale.Tr "user.joined_on" (DateUtils.AbsoluteShort .CreatedUnix)}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
{{else if .CardsNoneMsg}}
|
||||
<div>{{.CardsNoneMsg}}</div>
|
||||
{{end}}
|
||||
|
||||
{{template "base/paginate" .}}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue