diff options
author | Okunev Yu Dmitry <dyokunev@ut.mephi.ru> | 2016-07-29 17:59:38 +0300 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2016-07-29 22:59:38 +0800 |
commit | 55b4e77a5e9376a8a105d59a721fda3888e555bf (patch) | |
tree | e4725d18630623c3b4cc9a224ed082129cd86c40 /templates/repo | |
parent | ad7ea88923e371df7558835d8f3e0236cfdf69ba (diff) | |
download | gitea-55b4e77a5e9376a8a105d59a721fda3888e555bf.tar.gz gitea-55b4e77a5e9376a8a105d59a721fda3888e555bf.zip |
Fix of template error in "/:owner/:repo/pulls" (#3343)
If anonymous (not signed in user) requests page
"/:owner/:repo/pulls" he gets an error:
template: repo/issue/list:11:105: executing "repo/issue/list" at <.PullRequestCtx.Base...>: nil pointer evaluating *models.Repository.Link
This commit fixes that.
Signed-off-by: Dmitry Yu Okunev <dyokunev@ut.mephi.ru>
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/issue/list.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 6db997cafc..eebb0b15b0 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -8,7 +8,7 @@ {{if .PageIsIssueList}} <a class="ui green button" href="{{.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a> {{else}} - <a class="ui green button {{if not .PullRequestCtx.Allowed}}disabled{{end}}" href="{{.PullRequestCtx.BaseRepo.Link}}/compare/{{.Repository.DefaultBranch}}...{{.PullRequestCtx.HeadInfo}}">{{.i18n.Tr "repo.pulls.new"}}</a> + <a class="ui green button {{if not .PullRequestCtx.Allowed}}disabled{{end}}" href="{{if not .PullRequestCtx.Allowed}}#{{else}}{{.PullRequestCtx.BaseRepo.Link}}/compare/{{.Repository.DefaultBranch}}...{{.PullRequestCtx.HeadInfo}}{{end}}">{{.i18n.Tr "repo.pulls.new"}}</a> {{end}} </div> </div> |