Skip to content

Commit 382a558

Browse files
committed
Fix to allow add code review comments only on review files tab
1 parent b36f5f3 commit 382a558

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

public/css/theme-arc-green.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/less/themes/arc-green.less

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,9 @@
570570
.ui.info.message {
571571
background-color: #2c3b4a;
572572
color: #9ebcc5;
573+
}
574+
.CodeMirror div.CodeMirror-cursor {
575+
border-left: 1px solid #9e9e9e;
573576
}
574577
.ui .warning.header {
575578
background-color: #5d3a22 !important;
@@ -791,3 +794,19 @@
791794
border: none;
792795
}
793796
}
797+
798+
.file-comment {
799+
color: #888;
800+
}
801+
802+
.ui.comments .comment {
803+
.author {
804+
color: #dbdbdb;
805+
}
806+
.metadata {
807+
color: #808084;
808+
}
809+
.text {
810+
color: #9e9e9e;
811+
}
812+
}

templates/repo/diff/box.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125

126126
</td>
127127
<td class="lines-code lines-code-old halfwidth">
128-
{{if and $.root.SignedUserID $line.CanComment}}
128+
{{if and $.root.SignedUserID $line.CanComment $.root.PageIsPullFiles}}
129129
<a class="ui green button add-code-comment add-code-comment-left" data-path="{{$file.Name}}" data-side="left" data-idx="{{$line.LeftIdx}}">+</a>
130130
{{end}}
131131
<pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></pre>

templates/repo/diff/section_unified.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</td>
1717
{{end}}
1818
<td class="lines-code {{if (not $line.RightIdx)}}lines-code-old{{end}}">
19-
{{if and $.root.SignedUserID $line.CanComment}}
19+
{{if and $.root.SignedUserID $line.CanComment $.root.PageIsPullFiles}}
2020
<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>
2121
{{end}}
2222
<pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.GetComputedInlineDiffFor $line}}</code></pre>

0 commit comments

Comments
 (0)