summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-04 21:30:33 -0500
committerUnknwon <u@gogs.io>2015-12-04 21:30:33 -0500
commite538ff27704cddb1a99efc1a6be19e134f97355f (patch)
tree88f93b17d47aeb3ac4dd0692f5c5b613ee38b28b /templates
parent76d4b9288b60ed6c037257415a570225764ff0a0 (diff)
downloadgitea-e538ff27704cddb1a99efc1a6be19e134f97355f.tar.gz
gitea-e538ff27704cddb1a99efc1a6be19e134f97355f.zip
fix #1829 and fix #890
Diffstat (limited to 'templates')
-rw-r--r--templates/.VERSION2
-rw-r--r--templates/repo/commits_table.tmpl2
-rw-r--r--templates/repo/header.tmpl6
-rw-r--r--templates/repo/home.tmpl2
-rw-r--r--templates/repo/settings/options.tmpl58
5 files changed, 65 insertions, 5 deletions
diff --git a/templates/.VERSION b/templates/.VERSION
index ebd439271b..716a71b08a 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.7.29.1204 Beta \ No newline at end of file
+0.7.30.1204 Beta \ No newline at end of file
diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl
index f87866bf44..2adc1770f9 100644
--- a/templates/repo/commits_table.tmpl
+++ b/templates/repo/commits_table.tmpl
@@ -37,7 +37,7 @@
</td>
<td class="message collapsing">
<a rel="nofollow" class="ui sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}">{{ShortSha .ID.String}}</a>
- {{RenderCommitMessage .Summary $.RepoLink}}
+ {{RenderCommitMessage .Summary $.RepoLink $.Repository.ComposeMetas}}
</td>
<td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td>
</tr>
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index efe1bdab73..fb25b94bf0 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -51,21 +51,27 @@
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}">
<i class="icon octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
</a>
+ {{if .Repository.EnableIssues}}
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
<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}}
<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>
+ {{end}}
<a class="{{if .PageIsCommits}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}">
<i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui {{if not .CommitsCount}}gray{{else}}blue{{end}} small label">{{.CommitsCount}}</span>
</a>
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
<i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .Repository.NumTags}}gray{{else}}blue{{end}} small label">{{.Repository.NumTags}}</span>
</a>
+ {{if .Repository.EnableWiki}}
<a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki">
<i class="icon octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}}
</a>
+ {{end}}
{{if .IsRepositoryAdmin}}
<div class="right menu">
<a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index b733583b0a..6a3d0f1295 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -7,7 +7,7 @@
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
</p>
<div class="ui secondary menu">
- {{if and .IsRepositoryAdmin .Repository.BaseRepo}}
+ {{if .CanPullRequest}}
<div class="fitted item">
{{ $baseRepo := .Repository.BaseRepo}}
<a href="{{AppSubUrl}}/{{$baseRepo.Owner.Name}}/{{$baseRepo.Name}}/compare/{{$.BaseDefaultBranch}}...{{$.Owner.Name}}:{{$.BranchName}}">
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index 474d719eb7..f3734557d9 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -26,7 +26,6 @@
<input id="website" name="website" type="url" value="{{.Repository.Website}}">
</div>
- <div class="ui divider"></div>
{{if not .Repository.IsBare}}
<div class="required inline field">
<label>{{.i18n.Tr "repo.default_branch"}}</label>
@@ -57,13 +56,68 @@
<input id="interval" name="interval" type="number" value="{{.MirrorInterval}}">
</div>
{{end}}
-
+
+ <div class="ui divider"></div>
<div class="field">
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
</div>
</form>
</div>
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "repo.settings.advanced_settings"}}
+ </h4>
+ <div class="ui attached segment">
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <input type="hidden" name="action" value="advanced">
+
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.wiki"}}</label>
+ <div class="ui checkbox">
+ <input name="enable_wiki" type="checkbox" {{if .Repository.EnableWiki}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.wiki_desc"}}</label>
+ </div>
+ </div>
+
+ <div class="ui divider"></div>
+
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.issues"}}</label>
+ <div class="ui checkbox">
+ <input name="enable_issues" type="checkbox" {{if .Repository.EnableIssues}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.issues_desc"}}</label>
+ </div>
+ </div>
+ <div class="inline field">
+ <div class="ui checkbox">
+ <input name="enable_external_tracker" type="checkbox" {{if .Repository.EnableExternalTracker}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.use_external_issue_tracker"}}</label>
+ </div>
+ </div>
+ <div class="field">
+ <label for="tracker_url_format">{{.i18n.Tr "repo.settings.tracker_url_format"}}</label>
+ <input id="tracker_url_format" name="tracker_url_format" value="{{.Repository.ExternalTrackerFormat}}" placeholder="e.g. https://github.com/{user}/{repo}/issues/{index}">
+ <p class="help">{{.i18n.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p>
+ </div>
+
+ <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>
+ </div>
+
+ <div class="ui divider"></div>
+ <div class="field">
+ <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
+ </div>
+ </form>
+ </div>
+
<h4 class="ui top attached warning header">
{{.i18n.Tr "repo.settings.danger_zone"}}
</h4>