diff options
author | Lauris BH <lauris@nix.lv> | 2018-10-09 03:46:23 +0300 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-10-09 08:46:23 +0800 |
commit | fb3954f9a58eb9e64e9b34deba715e79feb172ce (patch) | |
tree | 79036ffc9fab4ce94ad589a6d630dc61a4675ba5 | |
parent | 6df46c50b113c3603a8e0f6cd1d087067aa6eece (diff) | |
download | gitea-fb3954f9a58eb9e64e9b34deba715e79feb172ce.tar.gz gitea-fb3954f9a58eb9e64e9b34deba715e79feb172ce.zip |
Fix adding review comment in split view (#5038)
-rw-r--r-- | templates/repo/diff/box.tmpl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 8be31ce8c3..b5bc3ee073 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -122,10 +122,9 @@ <tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}"> <td class="lines-num lines-num-old"> <span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span> - </td> <td class="lines-code lines-code-old halfwidth"> - {{if and $.root.SignedUserID $line.CanComment $.root.PageIsPullFiles}} + {{if and $.SignedUserID $line.CanComment $.PageIsPullFiles (not (eq .GetType 2))}} <a class="ui green button add-code-comment add-code-comment-left" data-path="{{$file.Name}}" data-side="left" data-idx="{{$line.LeftIdx}}">+</a> {{end}} <pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></pre> @@ -135,7 +134,7 @@ </td> <td class="lines-code lines-code-new halfwidth"> - {{if and $.root.SignedUserID $line.CanComment}} + {{if and $.SignedUserID $line.CanComment $.PageIsPullFiles (not (eq .GetType 3))}} <a class="ui green button add-code-comment add-code-comment-right" data-path="{{$file.Name}}" data-side="right" data-idx="{{$line.RightIdx}}">+</a> {{end}} <pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></pre> |