Browse Source

feat: add header with datasets

master
colorfulberry 5 years ago
parent
commit
0dd4c678b6
3 changed files with 10 additions and 0 deletions
  1. +2
    -0
      options/locale/locale_en-US.ini
  2. +4
    -0
      templates/base/head_navbar.tmpl
  3. +4
    -0
      templates/repo/header.tmpl

+ 2
- 0
options/locale/locale_en-US.ini View File

@@ -1,6 +1,7 @@
home = Home
dashboard = Dashboard
explore = Explore
data_sets = Data Sets
help = Help
sign_in = Sign In
sign_in_with = Sign In With
@@ -666,6 +667,7 @@ pick_reaction = Pick your reaction
reactions_more = and %d more
unit_disabled = The site administrator has disabled this repository section.
language_other = Other
data_sets = Data Sets

template.items = Template Items
template.git_content = Git Content (Default Branch)


+ 4
- 0
templates/base/head_navbar.tmpl View File

@@ -20,13 +20,17 @@
{{if .ShowMilestonesDashboardPage}}<a class="item {{if .PageIsMilestonesDashboard}}active{{end}}" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a>{{end}}
{{end}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
<a class="item {{if .PageIsDataSets}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "data_sets"}}</a>
{{else if .IsLandingPageHome}}
<a class="item {{if .PageIsHome}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
<a class="item {{if .PageIsDataSets}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "data_sets"}}</a>
{{else if .IsLandingPageExplore}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "home"}}</a>
<a class="item {{if .PageIsDataSets}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "data_sets"}}</a>
{{else if .IsLandingPageOrganizations}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.i18n.Tr "home"}}</a>
<a class="item {{if .PageIsDataSets}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "data_sets"}}</a>
{{end}}

{{template "custom/extra_links" .}}


+ 4
- 0
templates/repo/header.tmpl View File

@@ -101,6 +101,10 @@
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
{{svg "octicon-issue-opened" 16}} {{.i18n.Tr "repo.issues"}} <span class="ui {{if not .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span>
</a>

<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
{{svg "octicon-file-submodule" 16}} {{.i18n.Tr "repo.data_sets"}}
</a>
{{end}}

{{if .Permission.CanRead $.UnitTypeExternalTracker}}


Loading…
Cancel
Save