diff options
author | Yarden Shoham <hrsi88@gmail.com> | 2022-11-13 07:55:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-13 00:55:19 -0500 |
commit | 6f3efdfe117b46978d449f9223394326e39067ce (patch) | |
tree | f2d3fec145b75b3286086d7cc4f95110a4273423 /templates | |
parent | bea25d77ce1084a2dd065a9d8a31e73743b35eb9 (diff) | |
download | gitea-6f3efdfe117b46978d449f9223394326e39067ce.tar.gz gitea-6f3efdfe117b46978d449f9223394326e39067ce.zip |
Render number of commits in repo page in a user friendly way (#21786)
Use `JsPrettyNumber` to render the number of commits
* Closes #12637
### Before
![1094](https://user-images.githubusercontent.com/20454870/201484428-eaa80d27-eeed-444e-9dc5-ae046424de2f.png)
### After
![1,094](https://user-images.githubusercontent.com/20454870/201484385-b5bdc290-86fd-493b-a87c-c987012b18ad.png)
Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/sub_menu.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/sub_menu.tmpl b/templates/repo/sub_menu.tmpl index fac8e5ac99..e74823e36d 100644 --- a/templates/repo/sub_menu.tmpl +++ b/templates/repo/sub_menu.tmpl @@ -4,7 +4,7 @@ <div class="ui two horizontal center link list"> {{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo)}} <div class="item{{if .PageIsCommits}} active{{end}}"> - <a class="ui" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}">{{svg "octicon-history"}} <b>{{.CommitsCount}}</b> {{.locale.TrN .CommitsCount "repo.commit" "repo.commits"}}</a> + <a class="ui" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}">{{svg "octicon-history"}} <b>{{JsPrettyNumber .CommitsCount}}</b> {{.locale.TrN .CommitsCount "repo.commit" "repo.commits"}}</a> </div> <div class="item{{if .PageIsBranches}} active{{end}}"> <a class="ui" href="{{.RepoLink}}/branches">{{svg "octicon-git-branch"}} <b>{{.BranchesCount}}</b> {{.locale.TrN .BranchesCount "repo.branch" "repo.branches"}}</a> |