mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-26 13:29:12 -05:00
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.mentioning_you = Mentioning you
|
||||
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.next = Next
|
||||
issues.open_title = Open
|
||||
|
|
|
@ -108,7 +108,8 @@ func (i *Issue) IsPoster(uid int64) bool {
|
|||
func (i *Issue) GetPoster() (err error) {
|
||||
i.Poster, err = GetUserByID(i.PosterID)
|
||||
if IsErrUserNotExist(err) {
|
||||
i.Poster = &User{Name: "Someone"}
|
||||
i.PosterID = -1
|
||||
i.Poster = NewFakeUser()
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -13,7 +13,11 @@
|
|||
{{end}}
|
||||
{{ $createdStr:= TimeSince .Issue.Created $.Lang }}
|
||||
<span class="time-desc">
|
||||
{{if gt .Issue.Poster.Id 0}}
|
||||
{{$.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}}
|
||||
</span>
|
||||
|
@ -22,12 +26,12 @@
|
|||
<div class="twelve wide column comment-list">
|
||||
<ui class="ui comments">
|
||||
<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}}">
|
||||
</a>
|
||||
<div class="content">
|
||||
<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>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue