@@ -292,6 +292,13 @@ func RetrieveRepoMetas(ctx *context.Context, repo *models.Repository) []*models.
292
292
return nil
293
293
}
294
294
295
+ brs , err := ctx .Repo .GitRepo .GetBranches ()
296
+ if err != nil {
297
+ ctx .Handle (500 , "GetBranches" , err )
298
+ return nil
299
+ }
300
+ ctx .Data ["Branches" ] = brs
301
+
295
302
return labels
296
303
}
297
304
@@ -418,6 +425,7 @@ func NewIssuePost(ctx *context.Context, form auth.CreateIssueForm) {
418
425
ctx .Data ["PageIsIssueList" ] = true
419
426
ctx .Data ["RequireHighlightJS" ] = true
420
427
ctx .Data ["RequireSimpleMDE" ] = true
428
+ ctx .Data ["ReadOnly" ] = false
421
429
renderAttachmentSettings (ctx )
422
430
423
431
var (
@@ -447,6 +455,7 @@ func NewIssuePost(ctx *context.Context, form auth.CreateIssueForm) {
447
455
MilestoneID : milestoneID ,
448
456
AssigneeID : assigneeID ,
449
457
Content : form .Content ,
458
+ Ref : form .Ref ,
450
459
}
451
460
if err := models .NewIssue (repo , issue , labelIDs , attachments ); err != nil {
452
461
ctx .Handle (500 , "NewIssue" , err )
@@ -668,6 +677,7 @@ func ViewIssue(ctx *context.Context) {
668
677
ctx .Data ["Participants" ] = participants
669
678
ctx .Data ["NumParticipants" ] = len (participants )
670
679
ctx .Data ["Issue" ] = issue
680
+ ctx .Data ["ReadOnly" ] = true
671
681
ctx .Data ["IsIssueOwner" ] = ctx .Repo .IsWriter () || (ctx .IsSigned && issue .IsPoster (ctx .User .ID ))
672
682
ctx .Data ["SignInLink" ] = setting .AppSubURL + "/user/login?redirect_to=" + ctx .Data ["Link" ].(string )
673
683
ctx .HTML (200 , tplIssueView )
0 commit comments