From ce25881c880d9711f211be05f92a809304a436e3 Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Sat, 22 Oct 2022 20:01:38 +0800 Subject: refactor(db): move some methods off `user.go` (#7199) --- templates/repo/issue/list.tmpl | 8 +++---- templates/repo/issue/new_form.tmpl | 8 +++---- templates/repo/issue/view_content.tmpl | 42 +++++++++++++++++----------------- templates/repo/issue/view_title.tmpl | 6 ++--- 4 files changed, 32 insertions(+), 32 deletions(-) (limited to 'templates/repo/issue') diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 13a44806..1eb36c47 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -61,7 +61,7 @@ @@ -113,15 +113,15 @@ {{end}}

- {{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.DisplayName | Sanitize | Safe}} + {{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeURLPath .Poster.DisplayName | Sanitize | Safe}} {{if .Milestone}} {{.Milestone.Name | Sanitize}} {{end}} {{if .Assignee}} - - + + {{end}}

diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl index c2f215e2..1a3843e2 100644 --- a/templates/repo/issue/new_form.tmpl +++ b/templates/repo/issue/new_form.tmpl @@ -8,8 +8,8 @@
- - + +
@@ -104,7 +104,7 @@
@@ -112,7 +112,7 @@ {{.i18n.Tr "repo.issues.new.no_assignee"}}
{{if .Assignee}} - {{.Assignee.Name}} + {{.Assignee.Name}} {{end}}
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 943f0767..b83b11d0 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -12,12 +12,12 @@
- - + +
- {{.Issue.Poster.DisplayName}} {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}} + {{.Issue.Poster.DisplayName}} {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}}
{{if .IsIssueOwner}}
@@ -61,12 +61,12 @@ {{if eq .Type 0}}
- - + +
- {{.Poster.DisplayName}} {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}} + {{.Poster.DisplayName}} {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}
{{if gt .ShowTag 0}}
@@ -118,26 +118,26 @@ {{else if eq .Type 1}}
- - + + - {{.Poster.Name}} {{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}} + {{.Poster.Name}} {{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}
{{else if eq .Type 2}}
- - + + - {{.Poster.Name}} {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}} + {{.Poster.Name}} {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}
{{else if eq .Type 4}}
- - + + - {{.Poster.DisplayName}} {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}} + {{.Poster.DisplayName}} {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}
{{.Content | Str2HTML}} @@ -237,8 +237,8 @@ {{if .IsLogged}}
- - + +
@@ -347,7 +347,7 @@
@@ -355,7 +355,7 @@ {{.i18n.Tr "repo.issues.new.no_assignee"}}
@@ -366,8 +366,8 @@ {{.i18n.Tr "repo.issues.num_participants" .NumParticipants}}
{{range .Participants}} - - + + {{end}}
diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl index 6c5a83f5..a0470505 100644 --- a/templates/repo/issue/view_title.tmpl +++ b/templates/repo/issue/view_title.tmpl @@ -27,17 +27,17 @@ {{if .Issue.IsPull}} {{if .Issue.PullRequest.HasMerged}} {{ $mergedStr:= TimeSince .Issue.PullRequest.Merged $.Lang }} - {{.Issue.PullRequest.Merger.Name}} + {{.Issue.PullRequest.Merger.Name}} {{$.i18n.Tr "repo.pulls.merged_title_desc" .NumCommits .HeadTarget .BaseTarget $mergedStr | Str2HTML}} {{else}} - {{.Issue.Poster.Name}} + {{.Issue.Poster.Name}} {{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2HTML}} {{end}} {{else}} {{ $createdStr:= TimeSince .Issue.Created $.Lang }} {{if gt .Issue.Poster.ID 0}} - {{$.i18n.Tr "repo.issues.opened_by" $createdStr .Issue.Poster.HomeLink .Issue.Poster.Name | Safe}} + {{$.i18n.Tr "repo.issues.opened_by" $createdStr .Issue.Poster.HomeURLPath .Issue.Poster.Name | Safe}} {{else}} {{$.i18n.Tr "repo.issues.opened_by_fake" $createdStr .Issue.Poster.Name | Safe}} {{end}} -- cgit v1.2.3