diff options
author | Mario Lubenka <mario.lubenka@googlemail.com> | 2019-11-01 23:02:41 +0100 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-11-01 22:02:41 +0000 |
commit | ba336f6f456835f1f327ee967991079dd220266d (patch) | |
tree | 7fa0484ffeff881d76cd48958a6e0a3f97b1a93a /modules | |
parent | 9175556da0e89ec82bd3311990e34dd83dc7e3df (diff) | |
download | gitea-ba336f6f456835f1f327ee967991079dd220266d.tar.gz gitea-ba336f6f456835f1f327ee967991079dd220266d.zip |
Unifies commit list in repository commit table and wiki revision page (#7907)
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/templates/helper.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go index bdcaa12754..2d7a1aee9b 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -246,6 +246,18 @@ func NewFuncMap() []template.FuncMap { "MirrorFullAddress": mirror_service.AddressNoCredentials, "MirrorUserName": mirror_service.Username, "MirrorPassword": mirror_service.Password, + "CommitType": func(commit interface{}) string { + switch commit.(type) { + case models.SignCommitWithStatuses: + return "SignCommitWithStatuses" + case models.SignCommit: + return "SignCommit" + case models.UserCommit: + return "UserCommit" + default: + return "" + } + }, }} } |