Skip to content

Commit

Permalink
Revert "Fix to the new pull request button"
Browse files Browse the repository at this point in the history
This reverts commit 90733f3.
  • Loading branch information
wb129 committed Mar 5, 2019
1 parent 90733f3 commit f1e0be6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,3 @@ prime/
*.snap
*.snap-build
*_source.tar.bz2
/.vs
2 changes: 0 additions & 2 deletions modules/context/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,6 @@ func RepoAssignment() macaron.Handler {
ctx.Data["CanWriteCode"] = ctx.Repo.CanWrite(models.UnitTypeCode)
ctx.Data["CanWriteIssues"] = ctx.Repo.CanWrite(models.UnitTypeIssues)
ctx.Data["CanWritePulls"] = ctx.Repo.CanWrite(models.UnitTypePullRequests)
ctx.Data["HasForkedRepo"] = ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)


if ctx.Data["CanSignedUserFork"], err = ctx.Repo.Repository.CanUserFork(ctx.User); err != nil {
ctx.ServerError("CanUserFork", err)
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/home.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
{{if eq $n 0}}
{{if and .PullRequestCtx.Allowed .IsViewBranch (not .Repository.IsArchived)}}
<div class="fitted item">
<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch | EscapePound}}...{{ if or .HasForkedRepo (.Repository.IsFork) }}{{ .SignedUserName }}:{{ end }}{{.BranchName | EscapePound}}">
<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch | EscapePound}}...{{if ne .Repository.Owner.Name .BaseRepo.Owner.Name}}{{.Repository.Owner.Name}}:{{end}}{{.BranchName | EscapePound}}">
<button id="new-pull-request" class="ui compact basic button">{{.i18n.Tr "repo.pulls.compare_changes"}}</button>
</a>
</div>
Expand Down

0 comments on commit f1e0be6

Please sign in to comment.