summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/header.tmpl4
-rw-r--r--templates/repo/settings/options.tmpl16
2 files changed, 20 insertions, 0 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index d340575353..f4eefd3fde 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -3,7 +3,11 @@
<div class="ui container">
<div class="repo-header">
<div class="ui huge breadcrumb repo-title">
+ {{if .RelAvatarLink}}
+ <img class="ui avatar image" src="{{.RelAvatarLink}}">
+ {{else}}
<i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
+ {{end}}
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
<div class="divider"> / </div>
<a href="{{$.RepoLink}}">{{.Name}}</a>
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index 25120fcb9f..c6d715acbe 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -41,6 +41,22 @@
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
</div>
</form>
+
+ <div class="ui divider"></div>
+
+ <form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
+ {{.CsrfTokenHtml}}
+ <div class="inline field">
+ <label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
+ <input name="avatar" type="file" >
+ </div>
+
+ <div class="field">
+ <button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
+ <a class="ui red button delete-post" data-request-url="{{.Link}}/avatar/delete" data-done-url="{{.Link}}">{{$.i18n.Tr "settings.delete_current_avatar"}}</a>
+ </div>
+ </form>
+
</div>
{{if .Repository.IsMirror}}