more on #1319
This commit is contained in:
parent
30b428bf0e
commit
a24141ec9c
4 changed files with 13 additions and 7 deletions
|
@ -400,6 +400,7 @@ issues.filter_type.assigned_to_you = Assigned to you
|
||||||
issues.filter_type.created_by_you = Created by you
|
issues.filter_type.created_by_you = Created by you
|
||||||
issues.filter_type.mentioning_you = Mentioning you
|
issues.filter_type.mentioning_you = Mentioning you
|
||||||
issues.opened_by = opened %[1]s by <a href="/%[2]s">%[2]s</a>
|
issues.opened_by = opened %[1]s by <a href="/%[2]s">%[2]s</a>
|
||||||
|
issues.opened_by_fake = opened %[1]s by %[2]s
|
||||||
issues.previous = Previous
|
issues.previous = Previous
|
||||||
issues.next = Next
|
issues.next = Next
|
||||||
issues.open_title = Open
|
issues.open_title = Open
|
||||||
|
|
|
@ -108,7 +108,8 @@ func (i *Issue) IsPoster(uid int64) bool {
|
||||||
func (i *Issue) GetPoster() (err error) {
|
func (i *Issue) GetPoster() (err error) {
|
||||||
i.Poster, err = GetUserByID(i.PosterID)
|
i.Poster, err = GetUserByID(i.PosterID)
|
||||||
if IsErrUserNotExist(err) {
|
if IsErrUserNotExist(err) {
|
||||||
i.Poster = &User{Name: "Someone"}
|
i.PosterID = -1
|
||||||
|
i.Poster = NewFakeUser()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -13,7 +13,11 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{ $createdStr:= TimeSince .Issue.Created $.Lang }}
|
{{ $createdStr:= TimeSince .Issue.Created $.Lang }}
|
||||||
<span class="time-desc">
|
<span class="time-desc">
|
||||||
|
{{if gt .Issue.Poster.Id 0}}
|
||||||
{{$.i18n.Tr "repo.issues.opened_by" $createdStr .Issue.Poster.Name | Safe}}
|
{{$.i18n.Tr "repo.issues.opened_by" $createdStr .Issue.Poster.Name | Safe}}
|
||||||
|
{{else}}
|
||||||
|
{{$.i18n.Tr "repo.issues.opened_by_fake" $createdStr .Issue.Poster.Name | Safe}}
|
||||||
|
{{end}}
|
||||||
·
|
·
|
||||||
{{$.i18n.Tr "repo.issues.num_comments" .Issue.NumComments}}
|
{{$.i18n.Tr "repo.issues.num_comments" .Issue.NumComments}}
|
||||||
</span>
|
</span>
|
||||||
|
@ -22,12 +26,12 @@
|
||||||
<div class="twelve wide column comment-list">
|
<div class="twelve wide column comment-list">
|
||||||
<ui class="ui comments">
|
<ui class="ui comments">
|
||||||
<div class="comment">
|
<div class="comment">
|
||||||
<a class="avatar" href="{{.Issue.Poster.HomeLink}}">
|
<a class="avatar" {{if gt .Issue.Poster.Id 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>
|
||||||
<img src="{{.Issue.Poster.AvatarLink}}">
|
<img src="{{.Issue.Poster.AvatarLink}}">
|
||||||
</a>
|
</a>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="ui top attached header">
|
<div class="ui top attached header">
|
||||||
<span class="text grey"><a href="{{.Issue.Poster.HomeLink}}">{{.Issue.Poster.Name}}</a> {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}}</span>
|
<span class="text grey"><a {{if gt .Issue.Poster.Id 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.Name}}</a> {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}}</span>
|
||||||
<div class="ui right actions">
|
<div class="ui right actions">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Reference in a new issue