diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-12-28 18:09:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-28 10:09:57 +0000 |
commit | e743570f65b533552337d9606ac1d906ec054127 (patch) | |
tree | 55042505c0618b567e7f30e7334ec6d66db86230 /templates | |
parent | f3999888c0b765380003f814f9c3d5cf80128167 (diff) | |
download | gitea-e743570f65b533552337d9606ac1d906ec054127.tar.gz gitea-e743570f65b533552337d9606ac1d906ec054127.zip |
Refactor timeutil package (#28623)
1. make names more readable
2. remove unused FormatLong/FormatShort
3. use `FormatDate` instead of `Format "2006-01-02"`
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/issue/view_content/sidebar.tmpl | 2 | ||||
-rw-r--r-- | templates/shared/issuelist.tmpl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index c81cc5c10a..4334e4bcbd 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -392,7 +392,7 @@ <div {{if ne .Issue.DeadlineUnix 0}} class="gt-hidden"{{end}} id="deadlineForm"> <form class="ui fluid action input issue-due-form" action="{{AppSubUrl}}/{{PathEscape .Repository.Owner.Name}}/{{PathEscape .Repository.Name}}/issues/{{.Issue.Index}}/deadline" method="post" id="update-issue-deadline-form"> {{$.CsrfTokenHtml}} - <input required placeholder="{{ctx.Locale.Tr "repo.issues.due_date_form"}}" {{if gt .Issue.DeadlineUnix 0}}value="{{.Issue.DeadlineUnix.Format "2006-01-02"}}"{{end}} type="date" name="deadlineDate" id="deadlineDate"> + <input required placeholder="{{ctx.Locale.Tr "repo.issues.due_date_form"}}" {{if gt .Issue.DeadlineUnix 0}}value="{{.Issue.DeadlineUnix.FormatDate}}"{{end}} type="date" name="deadlineDate" id="deadlineDate"> <button class="ui icon button"> {{if ne .Issue.DeadlineUnix 0}} {{svg "octicon-pencil"}} diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl index 4fea93be3c..8fe5aadf2b 100644 --- a/templates/shared/issuelist.tmpl +++ b/templates/shared/issuelist.tmpl @@ -114,7 +114,7 @@ <span class="due-date flex-text-inline" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date"}}"> <span{{if .IsOverdue}} class="text red"{{end}}> {{svg "octicon-calendar" 14}} - {{DateTime "short" (.DeadlineUnix.Format "2006-01-02")}} + {{DateTime "short" (.DeadlineUnix.FormatDate)}} </span> </span> {{end}} |