summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/diff/blob_excerpt.tmpl4
-rw-r--r--templates/repo/diff/section_split.tmpl6
-rw-r--r--templates/repo/diff/section_unified.tmpl4
3 files changed, 7 insertions, 7 deletions
diff --git a/templates/repo/diff/blob_excerpt.tmpl b/templates/repo/diff/blob_excerpt.tmpl
index caa428dc28..7e11b33ba6 100644
--- a/templates/repo/diff/blob_excerpt.tmpl
+++ b/templates/repo/diff/blob_excerpt.tmpl
@@ -1,6 +1,6 @@
{{if $.IsSplitStyle}}
{{range $k, $line := $.section.Lines}}
- <tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}">
+ <tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}}">
{{if eq .GetType 4}}
<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}">
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}}
@@ -44,7 +44,7 @@
{{end}}
{{else}}
{{range $k, $line := $.section.Lines}}
- <tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}">
+ <tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}}">
{{if eq .GetType 4}}
<td colspan="2" class="lines-num">
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}}
diff --git a/templates/repo/diff/section_split.tmpl b/templates/repo/diff/section_split.tmpl
index e44c2a0f73..42aed85084 100644
--- a/templates/repo/diff/section_split.tmpl
+++ b/templates/repo/diff/section_split.tmpl
@@ -13,7 +13,7 @@
{{range $k, $line := $section.Lines}}
{{$hasmatch := ne $line.Match -1}}
{{if or (ne .GetType 2) (not $hasmatch)}}
- <tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}" data-line-type="{{DiffLineTypeToStr .GetType}}">
+ <tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}}" data-line-type="{{.GetHTMLDiffLineType}}">
{{if eq .GetType 4}}
<td class="lines-num lines-num-old">
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}}
@@ -107,7 +107,7 @@
{{if and (eq .GetType 3) $hasmatch}}
{{$match := index $section.Lines $line.Match}}
{{if or (gt (len $line.Comments) 0) (gt (len $match.Comments) 0)}}
- <tr class="add-comment" data-line-type="{{DiffLineTypeToStr .GetType}}">
+ <tr class="add-comment" data-line-type="{{.GetHTMLDiffLineType}}">
<td class="add-comment-left" colspan="4">
{{if gt (len $line.Comments) 0}}
{{if eq $line.GetCommentSide "previous"}}
@@ -133,7 +133,7 @@
</tr>
{{end}}
{{else if gt (len $line.Comments) 0}}
- <tr class="add-comment" data-line-type="{{DiffLineTypeToStr .GetType}}">
+ <tr class="add-comment" data-line-type="{{.GetHTMLDiffLineType}}">
<td class="add-comment-left" colspan="4">
{{if gt (len $line.Comments) 0}}
{{if eq $line.GetCommentSide "previous"}}
diff --git a/templates/repo/diff/section_unified.tmpl b/templates/repo/diff/section_unified.tmpl
index cdd2c26f81..8bf331f6db 100644
--- a/templates/repo/diff/section_unified.tmpl
+++ b/templates/repo/diff/section_unified.tmpl
@@ -8,7 +8,7 @@
</colgroup>
{{range $j, $section := $file.Sections}}
{{range $k, $line := $section.Lines}}
- <tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}" data-line-type="{{DiffLineTypeToStr .GetType}}">
+ <tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}}" data-line-type="{{.GetHTMLDiffLineType}}">
{{if eq .GetType 4}}
{{if $.root.AfterCommitID}}
<td colspan="2" class="lines-num">
@@ -55,7 +55,7 @@
{{end}}
</tr>
{{if gt (len $line.Comments) 0}}
- <tr class="add-comment" data-line-type="{{DiffLineTypeToStr .GetType}}">
+ <tr class="add-comment" data-line-type="{{.GetHTMLDiffLineType}}">
<td class="add-comment-left add-comment-right" colspan="5">
{{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}}
</td>