summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-02-19 15:04:50 -0500
committerUnknwon <u@gogs.io>2016-02-19 15:04:50 -0500
commit2408df3f3549bdddb16c7ce01e9cf5a2e18c0df5 (patch)
treea86642f774a8bd6a30ebc0b85575d2c1594c83b7 /templates
parent736a46dff96430f4ee43e6a2eb1bccbccaa611d4 (diff)
parenta1b28fc33c4a685ffe9a07f67fa6786ec27524bb (diff)
downloadgitea-2408df3f3549bdddb16c7ce01e9cf5a2e18c0df5.tar.gz
gitea-2408df3f3549bdddb16c7ce01e9cf5a2e18c0df5.zip
Merge pull request #2663 from Download-Fritz/MirrorForks
#2505 Allow to fork and disallow to create PRs for mirrors.
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/header.tmpl2
-rw-r--r--templates/repo/settings/options.tmpl16
2 files changed, 10 insertions, 8 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index 3002ff4b38..34ef9fafa1 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -57,7 +57,7 @@
<i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui {{if not .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span>
</a>
{{end}}
- {{if .Repository.EnablePulls}}
+ {{if .Repository.AllowsPulls}}
<a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
<i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span>
</a>
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index 985779fae3..977d841cf5 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -117,15 +117,17 @@
<p class="help">{{.i18n.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p>
</div>
- <div class="ui divider"></div>
+ {{if .Repository.CanEnablePulls}}
+ <div class="ui divider"></div>
- <div class="inline field">
- <label>{{.i18n.Tr "repo.pulls"}}</label>
- <div class="ui checkbox">
- <input name="enable_pulls" type="checkbox" {{if .Repository.EnablePulls}}checked{{end}}>
- <label>{{.i18n.Tr "repo.settings.pulls_desc"}}</label>
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.pulls"}}</label>
+ <div class="ui checkbox">
+ <input name="enable_pulls" type="checkbox" {{if .Repository.EnablePulls}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.pulls_desc"}}</label>
+ </div>
</div>
- </div>
+ {{end}}
<div class="ui divider"></div>
<div class="field">