diff options
author | Zettat123 <zettat123@gmail.com> | 2023-08-01 15:25:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-01 07:25:11 +0000 |
commit | 9a65d011f6b289dd6e7acb18a4b86c51d4d388ee (patch) | |
tree | c9a315d6c90593799a8691f251ec51f728de18b6 /templates/repo | |
parent | b9baed2c74286710481886c5d1f3010e43840012 (diff) | |
download | gitea-9a65d011f6b289dd6e7acb18a4b86c51d4d388ee.tar.gz gitea-9a65d011f6b289dd6e7acb18a4b86c51d4d388ee.zip |
Some fixes of the prompt of new branches (#26257)
Related to #26239
This PR makes some fixes:
- do not show the prompt for mirror repos and repos with pull request
units disabled
- use `commit_time` instead of `updated_unix`, as `commit_time` is the
real time when the branch was pushed
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/code/recently_pushed_new_branches.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/code/recently_pushed_new_branches.tmpl b/templates/repo/code/recently_pushed_new_branches.tmpl index e936fa4bb4..ad68b15831 100644 --- a/templates/repo/code/recently_pushed_new_branches.tmpl +++ b/templates/repo/code/recently_pushed_new_branches.tmpl @@ -1,7 +1,7 @@ {{range .RecentlyPushedNewBranches}} <div class="ui positive message gt-df gt-ac"> <div class="gt-f1"> - {{$timeSince := TimeSince .UpdatedUnix.AsTime $.locale}} + {{$timeSince := TimeSince .CommitTime.AsTime $.locale}} {{$.locale.Tr "repo.pulls.recently_pushed_new_branches" (PathEscapeSegments .Name) $timeSince | Safe}} </div> <a aria-role="button" class="ui compact positive button gt-m-0" href="{{$.Repository.ComposeBranchCompareURL $.Repository.BaseRepo (PathEscapeSegments .Name)}}"> |