File tree 2 files changed +2
-4
lines changed
2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -955,7 +955,6 @@ func NewIssuePost(ctx *context.Context) {
955
955
ctx .Data ["NewIssueChooseTemplate" ] = len (ctx .IssueTemplatesFromDefaultBranch ()) > 0
956
956
ctx .Data ["RequireHighlightJS" ] = true
957
957
ctx .Data ["RequireSimpleMDE" ] = true
958
- ctx .Data ["ReadOnly" ] = false
959
958
ctx .Data ["PullRequestWorkInProgressPrefixes" ] = setting .Repository .PullRequest .WorkInProgressPrefixes
960
959
ctx .Data ["IsAttachmentEnabled" ] = setting .Attachment .Enabled
961
960
upload .AddUploadContext (ctx , "comment" )
@@ -1630,7 +1629,6 @@ func ViewIssue(ctx *context.Context) {
1630
1629
ctx .Data ["Participants" ] = participants
1631
1630
ctx .Data ["NumParticipants" ] = len (participants )
1632
1631
ctx .Data ["Issue" ] = issue
1633
- ctx .Data ["ReadOnly" ] = false
1634
1632
ctx .Data ["SignInLink" ] = setting .AppSubURL + "/user/login?redirect_to=" + url .QueryEscape (ctx .Data ["Link" ].(string ))
1635
1633
ctx .Data ["IsIssuePoster" ] = ctx .IsSigned && issue .IsPoster (ctx .User .ID )
1636
1634
ctx .Data ["HasIssuesOrPullsWritePermission" ] = ctx .Repo .CanWriteIssuesOrPulls (issue .IsPull )
Original file line number Diff line number Diff line change 5
5
{{$.CsrfTokenHtml}}
6
6
</form>
7
7
8
- <div class="ui {{if .ReadOnly }}disabled{{end}} floating filter select-branch dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
8
+ <div class="ui {{if not .HasIssuesOrPullsWritePermission }}disabled{{end}} floating filter select-branch dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
9
9
<div class="ui basic small button">
10
10
<span class="text branch-name">{{if .Issue.Ref}}{{$.RefEndName}}{{else}}{{.i18n.Tr "repo.issues.no_ref"}}{{end}}</span>
11
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
11
+ {{if .HasIssuesOrPullsWritePermission}}{{ svg "octicon-triangle-down" 14 "dropdown icon"}}{{end }}
12
12
</div>
13
13
<div class="menu">
14
14
<div class="ui icon search input">
You can’t perform that action at this time.
0 commit comments