|
|
@@ -88,20 +88,69 @@ |
|
|
|
</div><!-- end grid --> |
|
|
|
</div><!-- end container --> |
|
|
|
{{end}} |
|
|
|
<style> |
|
|
|
.dropdown-menu { |
|
|
|
position: relative; |
|
|
|
display: inline-block; |
|
|
|
margin-top: 4px; |
|
|
|
} |
|
|
|
.dropdown-menu:hover .dropdown-content { |
|
|
|
display: block; |
|
|
|
} |
|
|
|
.dropdown-content{ |
|
|
|
display: none; |
|
|
|
position: absolute; |
|
|
|
background-color: #ffffff; |
|
|
|
min-width: 160px; |
|
|
|
z-index: 999; |
|
|
|
border: 1px solid transparent; |
|
|
|
border-color: #d4d4d5; |
|
|
|
border-top: none; |
|
|
|
|
|
|
|
} |
|
|
|
.dropdown-content a { |
|
|
|
color: black; |
|
|
|
padding: 12px 16px; |
|
|
|
text-decoration: none; |
|
|
|
display: block; |
|
|
|
} |
|
|
|
.dropdown-content a:hover {background-color: #f1f1f1} |
|
|
|
.cloudbrain-question{ |
|
|
|
margin-left: 4px !important; |
|
|
|
color: #3291F8; |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
<div class="ui tabs container"> |
|
|
|
{{if not .Repository.IsBeingCreated}} |
|
|
|
<div class="ui tabular stackable menu navbar"> |
|
|
|
{{if .Permission.CanRead $.UnitTypeCode}} |
|
|
|
<div class="dropdown-menu"> |
|
|
|
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL | EscapePound}}{{end}}"> |
|
|
|
{{svg "octicon-code" 16}} {{.i18n.Tr "repo.code"}} |
|
|
|
<span>{{svg "octicon-code" 16}} {{.i18n.Tr "repo.code"}} <i class="dropdown icon"></i></span> |
|
|
|
</a> |
|
|
|
<div class="dropdown-content"> |
|
|
|
{{if and (.Permission.CanRead $.UnitTypeReleases) (not .IsEmptyRepo) }} |
|
|
|
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases"> |
|
|
|
{{svg "octicon-tag" 16}} {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .NumReleases}}gray{{else}}blue{{end}} small label">{{.NumReleases}}</span> |
|
|
|
</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" 16}} {{.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" 16}} {{.i18n.Tr "repo.activity"}} |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
{{end}} |
|
|
|
|
|
|
|
|
|
|
|
{{if .Permission.CanRead $.UnitTypeDatasets}} |
|
|
|
<a class="{{if .PageIsDataset}}active{{end}} item" href="{{.RepoLink}}/datasets?type=0"> |
|
|
|
{{svg "octicon-inbox" 16}} {{.i18n.Tr "datasets"}} |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
|
|
|
|
{{if .Permission.CanRead $.UnitTypeIssues}} |
|
|
|
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues"> |
|
|
@@ -109,11 +158,11 @@ |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
|
|
|
|
{{if .Permission.CanRead $.UnitTypeExternalTracker}} |
|
|
|
<!-- {{if .Permission.CanRead $.UnitTypeExternalTracker}} |
|
|
|
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoExternalIssuesLink}}" target="_blank" rel="noopener noreferrer"> |
|
|
|
{{svg "octicon-link-external" 16}} {{.i18n.Tr "repo.issues"}} </span> |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
{{end}} --> |
|
|
|
|
|
|
|
{{if and .Repository.CanEnablePulls (.Permission.CanRead $.UnitTypePullRequests)}} |
|
|
|
<a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls"> |
|
|
@@ -121,35 +170,22 @@ |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
|
|
|
|
{{if and (.Permission.CanRead $.UnitTypeReleases) (not .IsEmptyRepo) }} |
|
|
|
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases"> |
|
|
|
{{svg "octicon-tag" 16}} {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .NumReleases}}gray{{else}}blue{{end}} small label">{{.NumReleases}}</span> |
|
|
|
{{if .Permission.CanRead $.UnitTypeDatasets}} |
|
|
|
<a class="{{if .PageIsDataset}}active{{end}} item" href="{{.RepoLink}}/datasets?type=0"> |
|
|
|
{{svg "octicon-inbox" 16}} {{.i18n.Tr "datasets"}} |
|
|
|
</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" 16}} {{.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" 16}} {{.i18n.Tr "repo.activity"}} |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
|
|
|
|
{{if .Permission.CanRead $.UnitTypeCloudBrain}} |
|
|
|
<a class="{{if .PageIsCloudBrain}}active{{end}} item" href="{{.RepoLink}}/cloudbrain"> |
|
|
|
{{svg "octicon-server" 16}} {{.i18n.Tr "repo.cloudbrain"}} |
|
|
|
<span>{{svg "octicon-server" 16}} {{.i18n.Tr "repo.cloudbrain"}}<i class="question circle icon link cloudbrain-question" data-content={{.i18n.Tr "repo.cloudbrain_helper"}} data-position="top center" data-variation="mini"></i></span> |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
{{if .IsSigned}} |
|
|
|
<!-- {{if .IsSigned}} |
|
|
|
<a class="{{if .PageIsBlockChain}}active{{end}} item " href="{{.RepoLink}}/blockchain"> |
|
|
|
{{svg "octicon-law" 16}} |
|
|
|
{{.i18n.Tr "repo.balance"}} |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
{{end}} --> |
|
|
|
|
|
|
|
{{template "custom/extra_tabs" .}} |
|
|
|
|
|
|
@@ -243,4 +279,9 @@ |
|
|
|
window.location.href = repolink + "/datasets?type=" + checked_radio |
|
|
|
}) |
|
|
|
}) |
|
|
|
$('.question.circle.icon').hover(function(){ |
|
|
|
$(this).popup('show') |
|
|
|
$('.ui.popup.mini.top.center').css({"border-color":'rgba(50, 145, 248, 100)',"color":"rgba(3, 102, 214, 100)","border-radius":"5px"}) |
|
|
|
}); |
|
|
|
|
|
|
|
</script> |