summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLanre Adelowo <adelowomailbox@gmail.com>2019-02-08 08:53:58 +0100
committerzeripath <art27@cantab.net>2019-02-08 07:53:58 +0000
commit2e85e70e38d421c9d0b643c7dbd2b0f4c5ed0cbc (patch)
tree9418927acd9998e7cd245dba3689d52929e1afe3 /templates
parentf60b1d8fe22315f77b9eadd42ab443742f2dc213 (diff)
downloadgitea-2e85e70e38d421c9d0b643c7dbd2b0f4c5ed0cbc.tar.gz
gitea-2e85e70e38d421c9d0b643c7dbd2b0f4c5ed0cbc.zip
Enhance closed PR and Issue status in the list (#6000)
* working version * Update options/locale/locale_en-US.ini Co-Authored-By: adelowo <adelowomailbox@gmail.com> * update templates
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/list.tmpl18
1 files changed, 17 insertions, 1 deletions
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index 10925a741d..f42492455c 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -205,7 +205,23 @@
{{end}}
<p class="desc">
- {{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}
+ {{ $textToTranslate := "repo.issues.opened_by" }}
+ {{ if not .IsClosed }}
+ {{ $timeStr = TimeSinceUnix .CreatedUnix $.Lang }}
+ {{ else if and .IsClosed .IsPull }}
+ {{ $timeStr = TimeSinceUnix .ClosedUnix $.Lang }}
+ {{ if .PullRequest.HasMerged }}
+ {{ $textToTranslate = "repo.pulls.merged_by"}}
+ {{ else }}
+ {{ $textToTranslate = "repo.issues.closed_by"}}
+ {{ end }}
+ {{ else }}
+ {{ $timeStr = TimeSinceUnix .ClosedUnix $.Lang }}
+ {{ $textToTranslate = "repo.issues.closed_by"}}
+ {{ end }}
+
+ {{$.i18n.Tr $textToTranslate $timeStr .Poster.HomeLink .Poster.Name | Safe}}
+
{{$tasks := .GetTasks}}
{{if gt $tasks 0}}
{{$tasksDone := .GetTasksDone}}