mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 04:12:10 +00:00
Almost done diff page
This commit is contained in:
parent
4b9eef50c9
commit
dd6246877d
9 changed files with 83 additions and 210 deletions
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue