More on diff page

This commit is contained in:
Unknown 2014-03-26 07:24:20 -04:00
parent 78979c6d4c
commit ed9b7d2db9
5 changed files with 45 additions and 18 deletions

View file

@ -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,
}

View file

@ -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"
}
}