mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 15:10:43 +02:00
Almost done diff page
This commit is contained in:
1 parent
4b9eef50c9
commit
dd6246877d
9 files changed
+83
-210
No files matched your search
@@ -70,5 +70,6 @@ var TemplateFuncs template.FuncMap = map[string]interface{}{
|
||||
"SubStr": func(str string, start, length int) string {
|
||||
return str[start : start+length]
|
||||
},
|
||||
"DiffTypeToStr": DiffTypeToStr,
|
||||
"DiffTypeToStr": DiffTypeToStr,
|
||||
"DiffLineTypeToStr": DiffLineTypeToStr,
|
||||
}
|
||||
@@ -552,3 +552,15 @@ func DiffTypeToStr(diffType int) string {
|
||||
return "unknown"
|
||||
}
|
||||
}
|
||||
|
||||
func DiffLineTypeToStr(diffType int) string {
|
||||
switch diffType {
|
||||
case 2:
|
||||
return "add"
|
||||
case 3:
|
||||
return "del"
|
||||
case 4:
|
||||
return "tag"
|
||||
}
|
||||
return "same"
|
||||
}
|
||||
Reference in new issue
Block a user