summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMario Lubenka <mario.lubenka@googlemail.com>2019-06-02 08:40:12 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2019-06-02 14:40:12 +0800
commit8eba27c79257c6bc68cefbdffbb36d3596e6d3ee (patch)
tree3a79fd7a5beb49d212d82bf61df7d8cd9bf1a613 /templates
parent356854fc5f8d7d1a7e4d68c9e00929e9ce8aa867 (diff)
downloadgitea-8eba27c79257c6bc68cefbdffbb36d3596e6d3ee.tar.gz
gitea-8eba27c79257c6bc68cefbdffbb36d3596e6d3ee.zip
Repository avatar fallback configuration (#7087)
* 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>
Diffstat (limited to 'templates')
-rw-r--r--templates/admin/dashboard.tmpl4
-rw-r--r--templates/explore/repo_list.tmpl4
2 files changed, 7 insertions, 1 deletions
diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl
index 13c06334a5..262db04b90 100644
--- a/templates/admin/dashboard.tmpl
+++ b/templates/admin/dashboard.tmpl
@@ -53,6 +53,10 @@
<td>{{.i18n.Tr "admin.dashboard.git_fsck"}}</td>
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=9">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
</tr>
+ <tr>
+ <td>{{.i18n.Tr "admin.dashboard.delete_generated_repository_avatars"}}</td>
+ <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=10">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
+ </tr>
</tbody>
</table>
</div>
diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl
index 34aab6477a..8c7ba51a54 100644
--- a/templates/explore/repo_list.tmpl
+++ b/templates/explore/repo_list.tmpl
@@ -2,7 +2,9 @@
{{range .Repos}}
<div class="item">
<div class="ui header">
- <img class="ui avatar image" src="{{.RelAvatarLink}}">
+ {{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}}