Skip to content

Commit 9f86967

Browse files
committed
Update template and remove new template variable
1 parent 55edbc3 commit 9f86967

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

routers/repo/pull.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,6 @@ func ViewPullFiles(ctx *context.Context) {
484484
return
485485
}
486486

487-
ctx.Data["IsOwner"] = ctx.IsSigned && issue.IsPoster(ctx.User.ID)
488487
ctx.Data["IsImageFile"] = commit.IsImageFile
489488
ctx.Data["SourcePath"] = setting.AppSubURL + "/" + path.Join(headTarget, "src", "commit", endCommitID)
490489
ctx.Data["BeforeSourcePath"] = setting.AppSubURL + "/" + path.Join(headTarget, "src", "commit", startCommitID)

templates/repo/diff/new_review.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
placeholder="{{$.i18n.Tr "repo.diff.review.placeholder"}}"></textarea>
1717
</div>
1818
<div class="ui divider"></div>
19-
<button type="submit" name="type" value="approve" {{ if .IsOwner }} disabled {{ end }}
19+
<button type="submit" name="type" value="approve" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }}
2020
class="ui submit green tiny button btn-submit">{{$.i18n.Tr "repo.diff.review.approve"}}</button>
2121
<button type="submit" name="type" value="comment"
2222
class="ui submit tiny basic button btn-submit">{{$.i18n.Tr "repo.diff.review.comment"}}</button>
23-
<button type="submit" name="type" value="reject" {{ if .IsOwner }} disabled {{ end }}
23+
<button type="submit" name="type" value="reject" {{ if and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID) }} disabled {{ end }}
2424
class="ui submit red tiny button btn-submit">{{$.i18n.Tr "repo.diff.review.reject"}}</button>
2525
</form>
2626
</div>

0 commit comments

Comments
 (0)