mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-21 21:48:00 +02:00
More on diff page
This commit is contained in:
@ -70,4 +70,5 @@ var TemplateFuncs template.FuncMap = map[string]interface{}{
|
||||
"SubStr": func(str string, start, length int) string {
|
||||
return str[start : start+length]
|
||||
},
|
||||
"DiffTypeToStr": DiffTypeToStr,
|
||||
}
|
||||
|
@ -539,3 +539,16 @@ func ActionDesc(act Actioner, avatarLink string) string {
|
||||
return "invalid type"
|
||||
}
|
||||
}
|
||||
|
||||
func DiffTypeToStr(diffType int) string {
|
||||
switch diffType {
|
||||
case 1:
|
||||
return "add"
|
||||
case 2:
|
||||
return "modify"
|
||||
case 3:
|
||||
return "del"
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user