summaryrefslogtreecommitdiffstats
path: root/templates/repo/diff
diff options
context:
space:
mode:
authorguillep2k <18600385+guillep2k@users.noreply.github.com>2020-04-16 18:26:24 -0300
committerGitHub <noreply@github.com>2020-04-16 16:26:24 -0500
commit3d6f1731b5fd1378ffc7999ef26154c510eb6eba (patch)
tree6373393f52add47f97e91eb5945e890d9538ccdf /templates/repo/diff
parenteeb968eab591d21eacf45e3743575f614ba5ba66 (diff)
downloadgitea-3d6f1731b5fd1378ffc7999ef26154c510eb6eba.tar.gz
gitea-3d6f1731b5fd1378ffc7999ef26154c510eb6eba.zip
Fix and simplify some tmpl conditions (#11080)
Diffstat (limited to 'templates/repo/diff')
-rw-r--r--templates/repo/diff/blob_excerpt.tmpl4
-rw-r--r--templates/repo/diff/box.tmpl2
-rw-r--r--templates/repo/diff/section_unified.tmpl2
3 files changed, 4 insertions, 4 deletions
diff --git a/templates/repo/diff/blob_excerpt.tmpl b/templates/repo/diff/blob_excerpt.tmpl
index ad5e3b1b10..cff5e6385d 100644
--- a/templates/repo/diff/blob_excerpt.tmpl
+++ b/templates/repo/diff/blob_excerpt.tmpl
@@ -9,7 +9,7 @@
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }}
<i class="ui blob-excerpt fa fa-caret-up" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=up" data-anchor="{{$.Anchor}}"></i>
{{end}}
- {{if or (eq $line.GetExpandDirection 2)}}
+ {{if eq $line.GetExpandDirection 2}}
<span class="ui blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=" data-anchor="{{$.Anchor}}">{{svg "octicon-fold" 16}}</span>
{{end}}
</td>
@@ -35,7 +35,7 @@
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }}
<i class="ui blob-excerpt fa fa-caret-down" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=down" data-anchor="{{$.Anchor}}"></i>
{{end}}
- {{if or (eq $line.GetExpandDirection 2)}}
+ {{if eq $line.GetExpandDirection 2}}
<span class="ui blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=" data-anchor="{{$.Anchor}}">{{svg "octicon-fold" 16}}</span>
{{end}}
</td>
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl
index 0b5c7a0564..d113f9ecee 100644
--- a/templates/repo/diff/box.tmpl
+++ b/templates/repo/diff/box.tmpl
@@ -132,7 +132,7 @@
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }}
<i class="ui blob-excerpt fa fa-caret-up" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=up" data-anchor="diff-{{Sha1 $file.Name}}K{{$line.SectionInfo.RightIdx}}"></i>
{{end}}
- {{if or (eq $line.GetExpandDirection 2)}}
+ {{if eq $line.GetExpandDirection 2}}
<span class="ui blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{$.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=" data-anchor="diff-{{Sha1 $file.Name}}K{{$line.SectionInfo.RightIdx}}">{{svg "octicon-fold" 16}}</span>
{{end}}
</td>
diff --git a/templates/repo/diff/section_unified.tmpl b/templates/repo/diff/section_unified.tmpl
index 33544fd032..c25d3ef079 100644
--- a/templates/repo/diff/section_unified.tmpl
+++ b/templates/repo/diff/section_unified.tmpl
@@ -11,7 +11,7 @@
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }}
<i class="ui blob-excerpt fa fa-caret-up" data-url="{{$.root.RepoLink}}/blob_excerpt/{{$.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=up" data-anchor="diff-{{Sha1 $file.Name}}K{{$line.SectionInfo.RightIdx}}"></i>
{{end}}
- {{if or (eq $line.GetExpandDirection 2)}}
+ {{if eq $line.GetExpandDirection 2}}
<span class="ui blob-excerpt" data-url="{{$.root.RepoLink}}/blob_excerpt/{{$.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=" data-anchor="diff-{{Sha1 $file.Name}}K{{$line.SectionInfo.RightIdx}}">{{svg "octicon-fold" 16}}</span>
{{end}}
</td>