File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 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) {
955955 ctx .Data ["NewIssueChooseTemplate" ] = len (ctx .IssueTemplatesFromDefaultBranch ()) > 0
956956 ctx .Data ["RequireHighlightJS" ] = true
957957 ctx .Data ["RequireSimpleMDE" ] = true
958- ctx .Data ["ReadOnly" ] = false
959958 ctx .Data ["PullRequestWorkInProgressPrefixes" ] = setting .Repository .PullRequest .WorkInProgressPrefixes
960959 ctx .Data ["IsAttachmentEnabled" ] = setting .Attachment .Enabled
961960 upload .AddUploadContext (ctx , "comment" )
@@ -1630,7 +1629,6 @@ func ViewIssue(ctx *context.Context) {
16301629 ctx .Data ["Participants" ] = participants
16311630 ctx .Data ["NumParticipants" ] = len (participants )
16321631 ctx .Data ["Issue" ] = issue
1633- ctx .Data ["ReadOnly" ] = false
16341632 ctx .Data ["SignInLink" ] = setting .AppSubURL + "/user/login?redirect_to=" + url .QueryEscape (ctx .Data ["Link" ].(string ))
16351633 ctx .Data ["IsIssuePoster" ] = ctx .IsSigned && issue .IsPoster (ctx .User .ID )
16361634 ctx .Data ["HasIssuesOrPullsWritePermission" ] = ctx .Repo .CanWriteIssuesOrPulls (issue .IsPull )
Original file line number Diff line number Diff line change 55 {{$.CsrfTokenHtml}}
66</form>
77
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"}}">
99 <div class="ui basic small button">
1010 <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 }}
1212 </div>
1313 <div class="menu">
1414 <div class="ui icon search input">
You can’t perform that action at this time.
0 commit comments