Browse Source

feat: improve the pages

tags/v1.21.12.1
colorfulberry 5 years ago
parent
commit
daf35e238f
4 changed files with 14 additions and 2 deletions
  1. +4
    -0
      routers/repo/cloudbrain.go
  2. +2
    -1
      templates/repo/cloudbrain/index.tmpl
  3. +2
    -1
      templates/repo/cloudbrain/new.tmpl
  4. +6
    -0
      templates/repo/header.tmpl

+ 4
- 0
routers/repo/cloudbrain.go View File

@@ -11,9 +11,13 @@ const (
)

func CloudBrainIndex(ctx *context.Context) {
ctx.Data["PageIsViewCloudBrain"] = true

ctx.HTML(200, tplCloudBrainIndex)
}

func CloudBrainNew(ctx *context.Context) {
ctx.Data["PageIsViewCloudBrain"] = true

ctx.HTML(200, tplCloudBrainNew)
}

+ 2
- 1
templates/repo/cloudbrain/index.tmpl View File

@@ -1,4 +1,5 @@
{{template "base/head" .}}
<div class="repository release dataset-list view">
{{template "repo/header" .}}
</div>
</div>
{{template "base/footer" .}}

+ 2
- 1
templates/repo/cloudbrain/new.tmpl View File

@@ -1,4 +1,5 @@
{{template "base/head" .}}
<div class="repository release dataset-list view">
{{template "repo/header" .}}
</div>
</div>
{{template "base/footer" .}}

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

@@ -139,6 +139,12 @@
</a>
{{end}}

{{if .Permission.CanRead $.UnitTypeCode}}
<a class="{{if .PageIsViewCloudBrain}}active{{end}} item" href="{{.RepoLink}}/cloudbrain">
{{svg "octicon-circuit-board" 16}} {{.i18n.Tr "repo.cloudbrain"}}
</a>
{{end}}

{{template "custom/extra_tabs" .}}

{{if .Permission.IsAdmin}}


Loading…
Cancel
Save