Fix problems introduced by checking for singed in user

Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
Jonas Franz 2018-05-31 17:01:29 +02:00 committed by Jonas Franz
parent e3f87a916f
commit 3f48c7c3cc
No known key found for this signature in database
GPG Key ID: 506AEEBE80BEDECD
2 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@
</td>
<td class="lines-code lines-code-old halfwidth">
{{if and $.SignedUserID (not (len $line.Comments))}}
<a class="ui green button add-code-comment add-code-comment-right" data-path="{{$file.Name}}" data-side="right" data-idx="{{$line.RightIdx}}">+</a>
<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>
</td>

View File

@ -16,7 +16,7 @@
</td>
{{end}}
<td class="lines-code {{if (not $line.RightIdx)}}lines-code-old{{end}}">
{{if and $.SignedUserID (not (len $line.Comments))}}
{{if and $.root.SignedUserID (not (len $line.Comments))}}
<a class="ui green button add-code-comment add-code-comment-{{if $line.RightIdx}}right{{else}}left{{end}}" data-path="{{$file.Name}}" data-side="{{if $line.RightIdx}}right{{else}}left{{end}}" data-idx="{{if $line.RightIdx}}{{$line.RightIdx}}{{else}}{{$line.LeftIdx}}{{end}}">+</a>
{{end}}
<pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.GetComputedInlineDiffFor $line}}</code></pre>