aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-16 10:14:12 -0500
committerUnknwon <u@gogs.io>2015-11-16 10:14:12 -0500
commit134d8e7681d098b8b37d4ee47cea0e03d643965d (patch)
treebd14c2318fce4b282687d41e77fba3b268bd4bc1 /templates/repo
parentc9b65f0fdcaebb23cc6071e86881f623e6b6a3e7 (diff)
downloadgitea-134d8e7681d098b8b37d4ee47cea0e03d643965d.tar.gz
gitea-134d8e7681d098b8b37d4ee47cea0e03d643965d.zip
work on #1961
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/issue/labels.tmpl1
-rw-r--r--templates/repo/issue/list.tmpl5
-rw-r--r--templates/repo/issue/milestones.tmpl1
-rw-r--r--templates/repo/issue/navbar.tmpl2
-rw-r--r--templates/repo/sidebar.tmpl34
5 files changed, 26 insertions, 17 deletions
diff --git a/templates/repo/issue/labels.tmpl b/templates/repo/issue/labels.tmpl
index dd84ce416c..f622d1a23b 100644
--- a/templates/repo/issue/labels.tmpl
+++ b/templates/repo/issue/labels.tmpl
@@ -2,6 +2,7 @@
<div class="repository labels">
{{template "repo/header" .}}
<div class="ui container">
+ {{template "repo/sidebar" .}}
<div class="navbar">
{{template "repo/issue/navbar" .}}
{{if .IsRepositoryAdmin}}
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index e0ae697761..479de75bc1 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -2,10 +2,15 @@
<div class="repository">
{{template "repo/header" .}}
<div class="ui container">
+ {{template "repo/sidebar" .}}
<div class="navbar">
{{template "repo/issue/navbar" .}}
<div class="ui right">
+ {{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 .HasForkedRepo}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.BranchName}}...{{.SignedUserName}}:{{.BranchName}}">{{.i18n.Tr "repo.pulls.new"}}</a>
+ {{end}}
</div>
</div>
<div class="ui divider"></div>
diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl
index 248b81e242..7a62606514 100644
--- a/templates/repo/issue/milestones.tmpl
+++ b/templates/repo/issue/milestones.tmpl
@@ -2,6 +2,7 @@
<div class="repository milestones">
{{template "repo/header" .}}
<div class="ui container">
+ {{template "repo/sidebar" .}}
<div class="navbar">
{{template "repo/issue/navbar" .}}
{{if .IsRepositoryAdmin}}
diff --git a/templates/repo/issue/navbar.tmpl b/templates/repo/issue/navbar.tmpl
index 327011afd7..7fdc41aa21 100644
--- a/templates/repo/issue/navbar.tmpl
+++ b/templates/repo/issue/navbar.tmpl
@@ -1,6 +1,8 @@
<div class="ui compact small menu">
+ {{if not .CommitsCount}}
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">{{.i18n.Tr "repo.issues"}}</a>
<a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">{{.i18n.Tr "repo.pulls"}}</a>
+ {{end}}
<a class="{{if .PageIsLabels}}active{{end}} item" href="{{.RepoLink}}/labels">{{.i18n.Tr "repo.labels"}}</a>
<a class="{{if .PageIsMilestones}}active{{end}} item" href="{{.RepoLink}}/milestones">{{.i18n.Tr "repo.milestones"}}</a>
</div> \ No newline at end of file
diff --git a/templates/repo/sidebar.tmpl b/templates/repo/sidebar.tmpl
index 2e4fdfb64e..20d14a27df 100644
--- a/templates/repo/sidebar.tmpl
+++ b/templates/repo/sidebar.tmpl
@@ -1,21 +1,21 @@
{{if not .IsBareRepo}}
<div class="ui {{if .IsRepositoryAdmin}}five{{else}}four{{end}} item menu">
- <a class="item" href="{{.RepoLink}}/issues">
- <i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui blue label">{{.Repository.NumOpenIssues}}</span>
- </a>
- <a class="item" href="{{.RepoLink}}/pulls">
- <i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui blue label">{{.Repository.NumOpenPulls}}</span>
- </a>
- <a class="item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}">
- <i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui blue label">{{.CommitsCount}}</span>
- </a>
- <a class="item" href="{{.RepoLink}}/releases">
- <i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui blue label">{{.Repository.NumTags}}</span>
- </a>
- {{if .IsRepositoryAdmin}}
- <a class="item" href="{{.RepoLink}}/settings">
- <i class="icon octicon octicon-tools"></i> {{.i18n.Tr "repo.settings"}}
- </a>
- {{end}}
+ <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 blue label">{{.Repository.NumOpenIssues}}</span>
+ </a>
+ <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 blue label">{{.Repository.NumOpenPulls}}</span>
+ </a>
+ <a class="item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}">
+ <i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui blue label">{{.CommitsCount}}</span>
+ </a>
+ <a class="item" href="{{.RepoLink}}/releases">
+ <i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui blue label">{{.Repository.NumTags}}</span>
+ </a>
+ {{if .IsRepositoryAdmin}}
+ <a class="item" href="{{.RepoLink}}/settings">
+ <i class="icon octicon octicon-tools"></i> {{.i18n.Tr "repo.settings"}}
+ </a>
+ {{end}}
</div>
{{end}} \ No newline at end of file