|
|
|
@ -147,9 +147,9 @@
|
|
|
|
|
<div class="ui tabs container"> |
|
|
|
|
{{if not (or .Repository.IsBeingCreated .Repository.IsBroken)}} |
|
|
|
|
<div class="ui tabular stackable menu navbar"> |
|
|
|
|
{{if .Permission.CanRead $.UnitTypeCode}} |
|
|
|
|
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL}}{{end}}"> |
|
|
|
|
{{svg "octicon-code"}} {{.i18n.Tr "repo.code"}} |
|
|
|
|
{{if or (.Permission.CanRead $.UnitTypeWiki) (.Permission.CanRead $.UnitTypeExternalWiki)}} |
|
|
|
|
<a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki" {{if (.Permission.CanRead $.UnitTypeExternalWiki)}} target="_blank" rel="noopener noreferrer" {{end}}> |
|
|
|
|
{{svg "octicon-book"}} {{.i18n.Tr "repo.wiki"}} |
|
|
|
|
</a> |
|
|
|
|
{{end}} |
|
|
|
|
|
|
|
|
@ -168,15 +168,6 @@
|
|
|
|
|
</a> |
|
|
|
|
{{end}} |
|
|
|
|
|
|
|
|
|
{{if and .Repository.CanEnablePulls (.Permission.CanRead $.UnitTypePullRequests)}} |
|
|
|
|
<a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls"> |
|
|
|
|
{{svg "octicon-git-pull-request"}} {{.i18n.Tr "repo.pulls"}} |
|
|
|
|
{{if .Repository.NumOpenPulls}} |
|
|
|
|
<span class="ui blue small label">{{CountFmt .Repository.NumOpenPulls}}</span> |
|
|
|
|
{{end}} |
|
|
|
|
</a> |
|
|
|
|
{{end}} |
|
|
|
|
|
|
|
|
|
{{ if and (not .UnitProjectsGlobalDisabled) (.Permission.CanRead $.UnitTypeProjects)}} |
|
|
|
|
<a href="{{.RepoLink}}/projects" class="{{ if .IsProjectsPage }}active{{end}} item"> |
|
|
|
|
{{svg "octicon-project"}} {{.i18n.Tr "repo.project_board"}} |
|
|
|
@ -186,6 +177,22 @@
|
|
|
|
|
</a> |
|
|
|
|
{{ end }} |
|
|
|
|
|
|
|
|
|
{{if .Permission.CanRead $.UnitTypeCode}} |
|
|
|
|
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL}}{{end}}"> |
|
|
|
|
{{svg "octicon-code"}} {{.i18n.Tr "repo.code"}} |
|
|
|
|
</a> |
|
|
|
|
{{end}} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{if and .Repository.CanEnablePulls (.Permission.CanRead $.UnitTypePullRequests)}} |
|
|
|
|
<a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls"> |
|
|
|
|
{{svg "octicon-git-pull-request"}} {{.i18n.Tr "repo.pulls"}} |
|
|
|
|
{{if .Repository.NumOpenPulls}} |
|
|
|
|
<span class="ui blue small label">{{CountFmt .Repository.NumOpenPulls}}</span> |
|
|
|
|
{{end}} |
|
|
|
|
</a> |
|
|
|
|
{{end}} |
|
|
|
|
|
|
|
|
|
{{if and (.Permission.CanRead $.UnitTypeReleases) (not .IsEmptyRepo) }} |
|
|
|
|
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases"> |
|
|
|
|
{{svg "octicon-tag"}} {{.i18n.Tr "repo.releases"}} |
|
|
|
@ -195,12 +202,6 @@
|
|
|
|
|
</a> |
|
|
|
|
{{end}} |
|
|
|
|
|
|
|
|
|
{{if or (.Permission.CanRead $.UnitTypeWiki) (.Permission.CanRead $.UnitTypeExternalWiki)}} |
|
|
|
|
<a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki" {{if (.Permission.CanRead $.UnitTypeExternalWiki)}} target="_blank" rel="noopener noreferrer" {{end}}> |
|
|
|
|
{{svg "octicon-book"}} {{.i18n.Tr "repo.wiki"}} |
|
|
|
|
</a> |
|
|
|
|
{{end}} |
|
|
|
|
|
|
|
|
|
{{if and (.Permission.CanReadAny $.UnitTypePullRequests $.UnitTypeIssues $.UnitTypeReleases) (not .IsEmptyRepo)}} |
|
|
|
|
<a class="{{if .PageIsActivity}}active{{end}} item" href="{{.RepoLink}}/activity"> |
|
|
|
|
{{svg "octicon-pulse"}} {{.i18n.Tr "repo.activity"}} |
|
|
|
|