diff --git a/models/issues/issue_stats.go b/models/issues/issue_stats.go index 39326616f..c5c94599c 100644 --- a/models/issues/issue_stats.go +++ b/models/issues/issue_stats.go @@ -117,7 +117,13 @@ func GetIssueStats(ctx context.Context, opts *IssuesOptions) (*IssueStats, error func getIssueStatsChunk(ctx context.Context, opts *IssuesOptions, issueIDs []int64) (*IssueStats, error) { stats := &IssueStats{} - + if opts.IsDiscussion.Has() && opts.IsDiscussion.Value() { + // dummy data for open/closed + // TODO: 백엔드 연동시 수정 필요 + stats.OpenCount = 2 + stats.ClosedCount = 0 + return stats, nil + } sess := db.GetEngine(ctx). Join("INNER", "repository", "`issue`.repo_id = `repository`.id") diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index dba8cc8e1..a6c697425 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1756,6 +1756,8 @@ issues.reference_link = Reference: %s compare.compare_base = base compare.compare_head = compare +discussions.new = New Discussion + pulls.desc = Enable pull requests and code reviews. pulls.new = New Pull Request pulls.new.blocked_user = Cannot create pull request because you are blocked by the repository owner. diff --git a/options/locale/locale_ko-KR.ini b/options/locale/locale_ko-KR.ini index 3c1e76b3c..34ff042f4 100644 --- a/options/locale/locale_ko-KR.ini +++ b/options/locale/locale_ko-KR.ini @@ -836,6 +836,7 @@ issues.review.reviewers=리뷰어 issues.review.show_outdated=오래된 내역 보기 issues.review.hide_outdated=오래된 내역 숨기기 +discussions.new=새로운 토론 pulls.new=새 풀 리퀘스트 pulls.compare_changes=새 풀 리퀘스트 diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 30edf825f..dccc49e9d 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -19,9 +19,20 @@ {{template "repo/issue/search" .}} {{if not .Repository.IsArchived}} {{if .PageIsIssueList}} - {{ctx.Locale.Tr "repo.issues.new"}} - {{else}} - {{ctx.Locale.Tr "repo.pulls.new"}} + + {{ctx.Locale.Tr "repo.issues.new"}} + + {{else if .PageIsPullList}} + + {{ctx.Locale.Tr "repo.pulls.new"}} + + {{else if .PageIsDiscussionList}} + + {{ctx.Locale.Tr "repo.discussions.new"}} + {{end}} {{else}} {{if not .PageIsIssueList}}