mirror of
https://gitee.com/gitea/gitea.git
synced 2024-12-15 18:10:50 +08:00
8eba27c792
* Only show repository avatar in list when one was selected Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adds fallback configuration option for repository avatar Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Implements repository avatar fallback Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adds admin task for deleting generated repository avatars Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Solve linting issues Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Save avatar before updating database * Linting * Update models/repo.go Co-Authored-By: zeripath <art27@cantab.net>
46 lines
1.6 KiB
Cheetah
46 lines
1.6 KiB
Cheetah
<div class="ui repository list">
|
|
{{range .Repos}}
|
|
<div class="item">
|
|
<div class="ui header">
|
|
{{if .RelAvatarLink}}
|
|
<img class="ui avatar image" src="{{.RelAvatarLink}}">
|
|
{{end}}
|
|
<a class="name" href="{{.Link}}">
|
|
{{if or $.PageIsExplore $.PageIsProfileStarList }}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}}
|
|
{{if .IsArchived}}<i class="archive icon archived-icon"></i>{{end}}
|
|
</a>
|
|
{{if .IsPrivate}}
|
|
<span class="text gold"><i class="octicon octicon-lock"></i></span>
|
|
{{else if .IsFork}}
|
|
<span><i class="octicon octicon-repo-forked"></i></span>
|
|
{{else if .IsMirror}}
|
|
<span><i class="octicon octicon-repo-clone"></i></span>
|
|
{{else if .Owner}}
|
|
{{if .Owner.Visibility.IsPrivate}}
|
|
<span class="text gold"><i class="octicon octicon-lock"></i></span>
|
|
{{end}}
|
|
{{end}}
|
|
<div class="ui right metas">
|
|
<span class="text grey"><i class="octicon octicon-star"></i> {{.NumStars}}</span>
|
|
<span class="text grey"><i class="octicon octicon-git-branch"></i> {{.NumForks}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="description">
|
|
{{if .DescriptionHTML}}<p class="has-emoji">{{.DescriptionHTML}}</p>{{end}}
|
|
{{if .Topics }}
|
|
<div class="ui tags">
|
|
{{range .Topics}}
|
|
{{if ne . "" }}<a href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1"><div class="ui small label topic">{{.}}</div></a>{{end}}
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.i18n.Lang}}</p>
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
<div>
|
|
{{$.i18n.Tr "explore.repo_no_results"}}
|
|
</div>
|
|
{{end}}
|
|
</div>
|