diff options
author | Unknwon <u@gogs.io> | 2016-08-05 12:12:54 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-05 12:12:54 -0700 |
commit | 50422f1fc226d71fe2f5f701c7ebdd1a5f2d143e (patch) | |
tree | 649757ae8cac275b0501e684d1c7bb0a5ee2d7d9 /templates/repo | |
parent | db3d393576c716dbbea500791c5f800e52c70be5 (diff) | |
download | gitea-50422f1fc226d71fe2f5f701c7ebdd1a5f2d143e.tar.gz gitea-50422f1fc226d71fe2f5f701c7ebdd1a5f2d143e.zip |
#3348 always use relative avatar link in the template
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/commits_table.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/create.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/diff.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/forks.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/list.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/issue/new_form.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/issue/view_content.tmpl | 18 | ||||
-rw-r--r-- | templates/repo/migrate.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/pulls/fork.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/release/list.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/collaboration.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/user_cards.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/view_list.tmpl | 2 |
13 files changed, 30 insertions, 30 deletions
diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index 8b22228d07..03e8591f68 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -30,7 +30,7 @@ <tr> <td class="author"> {{if .User}} - <img class="ui avatar image" src="{{.User.AvatarLink}}" alt=""/> <a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a> + <img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/> <a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a> {{else}} <img class="ui avatar image" src="{{AvatarLink .Author.Email}}" alt=""/> {{.Author.Name}} {{end}} diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl index c203f9508c..4b5c2eee3f 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -14,18 +14,18 @@ <div class="ui selection owner dropdown"> <input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required> <span class="text"> - <img class="ui mini image" src="{{.ContextUser.AvatarLink}}"> + <img class="ui mini image" src="{{.ContextUser.RelAvatarLink}}"> {{.ContextUser.ShortName 20}} </span> <i class="dropdown icon"></i> <div class="menu"> <div class="item" data-value="{{.SignedUser.ID}}"> - <img class="ui mini image" src="{{.SignedUser.AvatarLink}}"> + <img class="ui mini image" src="{{.SignedUser.RelAvatarLink}}"> {{.SignedUser.ShortName 20}} </div> {{range .Orgs}} <div class="item" data-value="{{.ID}}"> - <img class="ui mini image" src="{{.AvatarLink}}"> + <img class="ui mini image" src="{{.RelAvatarLink}}"> {{.ShortName 20}} </div> {{end}} diff --git a/templates/repo/diff.tmpl b/templates/repo/diff.tmpl index 192d6fdd22..e9f12ab932 100644 --- a/templates/repo/diff.tmpl +++ b/templates/repo/diff.tmpl @@ -13,7 +13,7 @@ </div> <div class="ui attached info segment"> {{if .Author}} - <img class="ui avatar image" src="{{.Author.AvatarLink}}" /> + <img class="ui avatar image" src="{{.Author.RelAvatarLink}}" /> <a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}} {{else}} <img class="ui avatar image" src="{{AvatarLink .Commit.Author.Email}}" /> diff --git a/templates/repo/forks.tmpl b/templates/repo/forks.tmpl index e8b57e1af3..461ac89c89 100644 --- a/templates/repo/forks.tmpl +++ b/templates/repo/forks.tmpl @@ -8,7 +8,7 @@ <div class="ui list"> {{range .Forks}} <div class="item"> - <img class="ui avatar image" src="{{.Owner.AvatarLink}}"> + <img class="ui avatar image" src="{{.Owner.RelAvatarLink}}"> <div class="link"> <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a> / diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index eebb0b15b0..5d4ed4fe51 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -61,7 +61,7 @@ <div class="menu"> <a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}">{{.i18n.Tr "repo.issues.filter_assginee_no_select"}}</a> {{range .Assignees}} - <a class="{{if eq $.AssigneeID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{.ID}}"><img src="{{.AvatarLink}}"> {{.Name}}</a> + <a class="{{if eq $.AssigneeID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{.ID}}"><img src="{{.RelAvatarLink}}"> {{.Name}}</a> {{end}} </div> </div> @@ -121,7 +121,7 @@ {{end}} {{if .Assignee}} <a class="ui right assignee poping up" href="{{.Assignee.HomeLink}}" data-content="{{.Assignee.Name}}" data-variation="inverted" data-position="left center"> - <img class="ui avatar image" src="{{.Assignee.AvatarLink}}"> + <img class="ui avatar image" src="{{.Assignee.RelAvatarLink}}"> </a> {{end}} </p> diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl index b001e3a644..bfb97da2da 100644 --- a/templates/repo/issue/new_form.tmpl +++ b/templates/repo/issue/new_form.tmpl @@ -9,7 +9,7 @@ <div class="ui comments"> <div class="comment"> <a class="avatar" href="{{.SignedUser.HomeLink}}"> - <img src="{{.SignedUser.AvatarLink}}"> + <img src="{{.SignedUser.RelAvatarLink}}"> </a> <div class="ui segment content"> <div class="field"> @@ -104,7 +104,7 @@ <div class="menu"> <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignee"}}</div> {{range .Assignees}} - <div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?assignee={{.ID}}" data-avatar="{{.AvatarLink}}"><img src="{{.AvatarLink}}"> {{.Name}}</div> + <div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?assignee={{.ID}}" data-avatar="{{.RelAvatarLink}}"><img src="{{.RelAvatarLink}}"> {{.Name}}</div> {{end}} </div> </div> @@ -112,7 +112,7 @@ <span class="no-select item {{if .Assignee}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_assignee"}}</span> <div class="selected"> {{if .Assignee}} - <a class="item" href="{{.RepoLink}}/issues?assignee={{.Assignee.ID}}"><img class="ui avatar image" src="{{.Assignee.AvatarLink}}"> {{.Assignee.Name}}</a> + <a class="item" href="{{.RepoLink}}/issues?assignee={{.Assignee.ID}}"><img class="ui avatar image" src="{{.Assignee.RelAvatarLink}}"> {{.Assignee.Name}}</a> {{end}} </div> </div> diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index ada98d3090..b8d18205d8 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -13,7 +13,7 @@ <ui class="ui comments"> <div class="comment"> <a class="avatar" {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}> - <img src="{{.Issue.Poster.AvatarLink}}"> + <img src="{{.Issue.Poster.RelAvatarLink}}"> </a> <div class="content"> <div class="ui top attached header"> @@ -56,7 +56,7 @@ {{if eq .Type 0}} <div class="comment" id="{{.HashTag}}"> <a class="avatar" {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}> - <img src="{{.Poster.AvatarLink}}"> + <img src="{{.Poster.RelAvatarLink}}"> </a> <div class="content"> <div class="ui top attached header"> @@ -107,7 +107,7 @@ <div class="event"> <span class="octicon octicon-primitive-dot"></span> <a class="ui avatar image" href="{{.Poster.HomeLink}}"> - <img src="{{.Poster.AvatarLink}}"> + <img src="{{.Poster.RelAvatarLink}}"> </a> <span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}</span> </div> @@ -115,7 +115,7 @@ <div class="event"> <span class="octicon octicon-circle-slash"></span> <a class="ui avatar image" href="{{.Poster.HomeLink}}"> - <img src="{{.Poster.AvatarLink}}"> + <img src="{{.Poster.RelAvatarLink}}"> </a> <span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}</span> </div> @@ -123,7 +123,7 @@ <div class="event"> <span class="octicon octicon-bookmark"></span> <a class="ui avatar image" href="{{.Poster.HomeLink}}"> - <img src="{{.Poster.AvatarLink}}"> + <img src="{{.Poster.RelAvatarLink}}"> </a> <span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}</span> @@ -199,7 +199,7 @@ {{if .IsSigned}} <div class="comment form"> <a class="avatar" href="{{.SignedUser.HomeLink}}"> - <img src="{{.SignedUser.AvatarLink}}"> + <img src="{{.SignedUser.RelAvatarLink}}"> </a> <div class="content"> <form class="ui segment form" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post"> @@ -309,7 +309,7 @@ <div class="menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/assignee"> <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignee"}}</div> {{range .Assignees}} - <div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?assignee={{.ID}}" data-avatar="{{.AvatarLink}}"><img src="{{.AvatarLink}}"> {{.Name}}</div> + <div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?assignee={{.ID}}" data-avatar="{{.RelAvatarLink}}"><img src="{{.RelAvatarLink}}"> {{.Name}}</div> {{end}} </div> </div> @@ -317,7 +317,7 @@ <span class="no-select item {{if .Issue.Assignee}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_assignee"}}</span> <div class="selected"> {{if .Issue.Assignee}} - <a class="item" href="{{$.RepoLink}}/issues?assignee={{.Issue.Assignee.ID}}"><img class="ui avatar image" src="{{.Issue.Assignee.AvatarLink}}"> {{.Issue.Assignee.Name}}</a> + <a class="item" href="{{$.RepoLink}}/issues?assignee={{.Issue.Assignee.ID}}"><img class="ui avatar image" src="{{.Issue.Assignee.RelAvatarLink}}"> {{.Issue.Assignee.Name}}</a> {{end}} </div> </div> @@ -329,7 +329,7 @@ <div> {{range .Participants}} <a href="{{.HomeLink}}"> - <img class="ui avatar image poping up" src="{{.AvatarLink}}" data-content="{{.DisplayName}}" data-position="top center" data-variation="small inverted"> + <img class="ui avatar image poping up" src="{{.RelAvatarLink}}" data-content="{{.DisplayName}}" data-position="top center" data-variation="small inverted"> </a> {{end}} </div> diff --git a/templates/repo/migrate.tmpl b/templates/repo/migrate.tmpl index 30716ee6ad..2ac3915272 100644 --- a/templates/repo/migrate.tmpl +++ b/templates/repo/migrate.tmpl @@ -39,18 +39,18 @@ <div class="ui selection owner dropdown"> <input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required> <span class="text"> - <img class="ui mini image" src="{{.ContextUser.AvatarLink}}"> + <img class="ui mini image" src="{{.ContextUser.RelAvatarLink}}"> {{.ContextUser.ShortName 20}} </span> <i class="dropdown icon"></i> <div class="menu"> <div class="item" data-value="{{.SignedUser.ID}}"> - <img class="ui mini image" src="{{.SignedUser.AvatarLink}}"> + <img class="ui mini image" src="{{.SignedUser.RelAvatarLink}}"> {{.SignedUser.ShortName 20}} </div> {{range .Orgs}} <div class="item" data-value="{{.ID}}"> - <img class="ui mini image" src="{{.AvatarLink}}"> + <img class="ui mini image" src="{{.RelAvatarLink}}"> {{.ShortName 20}} </div> {{end}} diff --git a/templates/repo/pulls/fork.tmpl b/templates/repo/pulls/fork.tmpl index 9cd84b3d44..431f6df236 100644 --- a/templates/repo/pulls/fork.tmpl +++ b/templates/repo/pulls/fork.tmpl @@ -14,19 +14,19 @@ <div class="ui selection owner dropdown"> <input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required> <span class="text"> - <img class="ui mini image" src="{{.ContextUser.AvatarLink}}"> + <img class="ui mini image" src="{{.ContextUser.RelAvatarLink}}"> {{.ContextUser.ShortName 20}} </span> <i class="dropdown icon"></i> <div class="menu"> <div class="item" data-value="{{.SignedUser.ID}}"> - <img class="ui mini image" src="{{.SignedUser.AvatarLink}}"> + <img class="ui mini image" src="{{.SignedUser.RelAvatarLink}}"> {{.SignedUser.ShortName 20}} </div> {{range .Orgs}} {{if .IsOwnedBy $.SignedUser.ID}} <div class="item" data-value="{{.ID}}"> - <img class="ui mini image" src="{{.AvatarLink}}"> + <img class="ui mini image" src="{{.RelAvatarLink}}"> {{.ShortName 20}} </div> {{end}} diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index f2cdfc1ca3..b9b1b7c2f4 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -41,7 +41,7 @@ </h3> <p class="text grey"> <span class="author"> - <img class="img-10" src="{{.Publisher.AvatarLink}}"> + <img class="img-10" src="{{.Publisher.RelAvatarLink}}"> <a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.Name}}</a> </span> {{if .Created}}<span class="time">{{TimeSince .Created $.Lang}}</span>{{end}} diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl index f6daab5dae..edf269b471 100644 --- a/templates/repo/settings/collaboration.tmpl +++ b/templates/repo/settings/collaboration.tmpl @@ -14,7 +14,7 @@ <div class="item ui grid"> <div class="ui five wide column"> <a href="{{AppSubUrl}}/{{.Name}}"> - <img class="ui avatar image" src="{{.AvatarLink}}"> + <img class="ui avatar image" src="{{.RelAvatarLink}}"> {{.DisplayName}} </a> </div> diff --git a/templates/repo/user_cards.tmpl b/templates/repo/user_cards.tmpl index 82086a6fa7..b89bbc6834 100644 --- a/templates/repo/user_cards.tmpl +++ b/templates/repo/user_cards.tmpl @@ -6,7 +6,7 @@ {{range .Cards}} <li class="item ui segment"> <a href="{{.HomeLink}}"> - <img class="avatar" src="{{.AvatarLink}}"/> + <img class="avatar" src="{{.RelAvatarLink}}"/> </a> <h3 class="name"><a href="{{.HomeLink}}">{{.DisplayName}}</a></h3> diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 82fd5c92d9..4377335911 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -3,7 +3,7 @@ <tr> <th class="four wide"> {{if .LastCommitUser}} - <img class="ui avatar image img-12" src="{{.LastCommitUser.AvatarLink}}" /> + <img class="ui avatar image img-12" src="{{.LastCommitUser.RelAvatarLink}}" /> <a href="{{AppSubUrl}}/{{.LastCommitUser.Name}}"><strong>{{.LastCommit.Author.Name}}</strong></a> {{else}} <img class="ui avatar image img-12" src="{{AvatarLink .LastCommit.Author.Email}}" /> |