summaryrefslogtreecommitdiffstats
path: root/templates/repo/pulse.tmpl
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-11-04 12:30:00 +0100
committerGusted <postmaster@gusted.xyz>2024-11-10 22:23:27 +0100
commit7e1aa8a5cd6a4f2eda4cc5c86dc06a80762f9950 (patch)
tree0504519a3931da5cbf75cf54f577a3ec9f2c5125 /templates/repo/pulse.tmpl
parentMerge pull request 'chore: improve test quality' (#5904) from gusted/forgejo-... (diff)
downloadforgejo-7e1aa8a5cd6a4f2eda4cc5c86dc06a80762f9950.tar.xz
forgejo-7e1aa8a5cd6a4f2eda4cc5c86dc06a80762f9950.zip
[PORT] Refactor DateUtils and merge TimeSince (gitea#32409)
Follow #32383 and #32402 --- Conflict resolution: Magic, painful. (cherry picked from commit b068dbd40ee3b4dc7d18cdcf168f0c24cea234c0)
Diffstat (limited to 'templates/repo/pulse.tmpl')
-rw-r--r--templates/repo/pulse.tmpl14
1 files changed, 7 insertions, 7 deletions
diff --git a/templates/repo/pulse.tmpl b/templates/repo/pulse.tmpl
index a630c7c3f2..082fc8eb92 100644
--- a/templates/repo/pulse.tmpl
+++ b/templates/repo/pulse.tmpl
@@ -1,5 +1,5 @@
<h2 class="ui header activity-header">
- <span>{{ctx.DateUtils.AbsoluteLong .DateFrom}} - {{ctx.DateUtils.AbsoluteLong .DateUntil}}</span>
+ <span>{{DateUtils.AbsoluteLong .DateFrom}} - {{DateUtils.AbsoluteLong .DateUntil}}</span>
<!-- Period -->
<div class="ui floating dropdown jump filter">
<div class="ui basic compact button">
@@ -135,7 +135,7 @@
{{.TagName}}
<a class="title" href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a>
{{end}}
- {{TimeSinceUnix .CreatedUnix ctx.Locale}}
+ {{DateUtils.TimeSince .CreatedUnix}}
</p>
{{end}}
</div>
@@ -154,7 +154,7 @@
<p class="desc">
<span class="ui purple label">{{ctx.Locale.Tr "repo.activity.merged_prs_label"}}</span>
#{{.Index}} <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{RenderRefIssueTitle $.Context .Issue.Title}}</a>
- {{TimeSinceUnix .MergedUnix ctx.Locale}}
+ {{DateUtils.TimeSince .MergedUnix}}
</p>
{{end}}
</div>
@@ -173,7 +173,7 @@
<p class="desc">
<span class="ui green label">{{ctx.Locale.Tr "repo.activity.opened_prs_label"}}</span>
#{{.Index}} <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{RenderRefIssueTitle $.Context .Issue.Title}}</a>
- {{TimeSinceUnix .Issue.CreatedUnix ctx.Locale}}
+ {{DateUtils.TimeSince .Issue.CreatedUnix}}
</p>
{{end}}
</div>
@@ -192,7 +192,7 @@
<p class="desc">
<span class="ui red label">{{ctx.Locale.Tr "repo.activity.closed_issue_label"}}</span>
#{{.Index}} <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{RenderRefIssueTitle $.Context .Title}}</a>
- {{TimeSinceUnix .ClosedUnix ctx.Locale}}
+ {{DateUtils.TimeSince .ClosedUnix}}
</p>
{{end}}
</div>
@@ -211,7 +211,7 @@
<p class="desc">
<span class="ui green label">{{ctx.Locale.Tr "repo.activity.new_issue_label"}}</span>
#{{.Index}} <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{RenderRefIssueTitle $.Context .Title}}</a>
- {{TimeSinceUnix .CreatedUnix ctx.Locale}}
+ {{DateUtils.TimeSince .CreatedUnix}}
</p>
{{end}}
</div>
@@ -232,7 +232,7 @@
{{else}}
<a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{RenderRefIssueTitle $.Context .Title}}</a>
{{end}}
- {{TimeSinceUnix .UpdatedUnix ctx.Locale}}
+ {{DateUtils.TimeSince .UpdatedUnix}}
</p>
{{end}}
</div>