Browse Source

fix issue #327

tags/v1.21.12.1
zhoupzh 4 years ago
parent
commit
6af2679fc1
8 changed files with 97 additions and 32 deletions
  1. +18
    -8
      templates/repo/issue/labels.tmpl
  2. +7
    -2
      templates/repo/issue/list.tmpl
  3. +8
    -2
      templates/repo/issue/milestone_issues.tmpl
  4. +22
    -6
      templates/repo/issue/milestone_new.tmpl
  5. +19
    -8
      templates/repo/issue/milestones.tmpl
  6. +1
    -1
      templates/repo/issue/navbar.tmpl
  7. +15
    -3
      templates/repo/issue/new.tmpl
  8. +7
    -2
      templates/repo/issue/view.tmpl

+ 18
- 8
templates/repo/issue/labels.tmpl View File

@@ -2,14 +2,24 @@
<div class="repository labels">
{{template "repo/header" .}}
<div class="ui container">
<div class="navbar">
{{template "repo/issue/navbar" .}}
{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
<div class="ui right">
<div class="ui green new-label button">{{.i18n.Tr "repo.issues.new_label"}}</div>
</div>
{{end}}
</div>
<div class="ui two column stackable grid">
<div class="column" style="display: flex;align-items: center;">
<div class="ui large breadcrumb">
<a class="section" href="{{.RepoLink}}/issues">{{.i18n.Tr "repo.issues"}}</a>
<div class="divider"> / </div>
<div class="action section">{{.Title | RenderEmoji}}</div>
</div>
</div>
<div class="column right aligned">
{{template "repo/issue/navbar" .}}
{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
<div class="ui right">
<div class="ui green new-label button">{{.i18n.Tr "repo.issues.new_label"}}</div>
</div>
{{end}}
</div>
</div>
<div class="ui divider"></div>
{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
{{template "repo/issue/labels/label_new" .}}


+ 7
- 2
templates/repo/issue/list.tmpl View File

@@ -3,14 +3,19 @@
{{template "repo/header" .}}
<div class="ui container">
<div class="ui three column stackable grid">
<div class="column">
{{template "repo/issue/navbar" .}}
<div class="column" style="display: flex;align-items: center;">
<div class="ui large breadcrumb">
<a href="{{.RepoLink}}/issues">{{.i18n.Tr "repo.issues"}}</a>
<div class="divider"> / </div>
</div>
</div>
<div class="column center aligned">
{{template "repo/issue/search" .}}
</div>
{{if not .Repository.IsArchived}}
<div class="column right aligned">
{{template "repo/issue/navbar" .}}
{{if .PageIsIssueList}}
<a class="ui green button" href="{{.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a>
{{else}}


+ 8
- 2
templates/repo/issue/milestone_issues.tmpl View File

@@ -3,8 +3,14 @@
{{template "repo/header" .}}
<div class="ui container">
<div class="ui three column stackable grid">
<div class="column">
<h3>{{.Milestone.Name}}</h3>
<div class="column" style="display: flex;align-items: center;">
<div class="ui large breadcrumb">
<a class="section" href="{{.RepoLink}}/issues">{{.i18n.Tr "repo.issues"}}</a>
<div class="divider"> / </div>
<a class="section" href="{{.RepoLink}}/milestones">{{.i18n.Tr "repo.milestones"}}</a>
<div class="divider"> / </div>
<div class="action section">{{.Milestone.Name}}</div>
</div>
</div>
<div class="column center aligned">



+ 22
- 6
templates/repo/issue/milestone_new.tmpl View File

@@ -2,13 +2,29 @@
<div class="repository new milestone">
{{template "repo/header" .}}
<div class="ui container">
<div class="navbar">
{{template "repo/issue/navbar" .}}
{{if and (or .CanWriteIssues .CanWritePulls) .PageIsEditMilestone}}
<div class="ui right floated secondary menu">
<a class="ui green button" href="{{$.RepoLink}}/milestones/new">{{.i18n.Tr "repo.milestones.new"}}</a>
<div class="ui two column stackable grid">
<div class="column" style="display: flex;align-items: center;">
<div class="ui large breadcrumb">
<a class="section" href="{{.RepoLink}}/issues">{{.i18n.Tr "repo.issues"}}</a>
<div class="divider"> / </div>
<a class="section" href="{{.RepoLink}}/milestones">{{.i18n.Tr "repo.milestones"}}</a>
<div class="divider"> / </div>
{{if .PageIsEditMilestone}}
<div class="action section">{{.i18n.Tr "repo.milestones.edit"}}</div>
{{else}}
<div class="action section">{{.i18n.Tr "repo.milestones.new"}}</div>
{{end}}
</div>
</div>
{{end}}
<div class="column right aligned">
{{template "repo/issue/navbar" .}}
{{if and (or .CanWriteIssues .CanWritePulls) .PageIsEditMilestone}}
<div class="ui right floated secondary menu">
<a class="ui green button" href="{{$.RepoLink}}/milestones/new">{{.i18n.Tr "repo.milestones.new"}}</a>
</div>
{{end}}
</div>
</div>
<div class="ui divider"></div>
<h2 class="ui dividing header">


+ 19
- 8
templates/repo/issue/milestones.tmpl View File

@@ -2,14 +2,25 @@
<div class="repository milestones">
{{template "repo/header" .}}
<div class="ui container">
<div class="navbar">
{{template "repo/issue/navbar" .}}
{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
<div class="ui right">
<a class="ui green button" href="{{$.Link}}/new">{{.i18n.Tr "repo.milestones.new"}}</a>
</div>
{{end}}
</div>
<div class="ui two column stackable grid">
<div class="column" style="display: flex;align-items: center;">
<div class="ui large breadcrumb">
<a class="section" href="{{.RepoLink}}/issues">{{.i18n.Tr "repo.issues"}}</a>
<div class="divider"> / </div>
<div class="action section">{{.Title | RenderEmoji}}</div>
</div>
</div>
{{if not .Repository.IsArchived}}
<div class="column right aligned">
{{template "repo/issue/navbar" .}}
{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
<div class="ui right">
<a class="ui green button" href="{{$.Link}}/new">{{.i18n.Tr "repo.milestones.new"}}</a>
</div>
{{end}}
</div>
{{end}}
</div>
<div class="ui divider"></div>
{{template "base/alert" .}}
<div class="ui tiny basic buttons">


+ 1
- 1
templates/repo/issue/navbar.tmpl View File

@@ -1,4 +1,4 @@
<div class="ui compact left small menu">
<div class="ui compact small menu" style="margin-right: 1rem;">
<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>

+ 15
- 3
templates/repo/issue/new.tmpl View File

@@ -2,9 +2,21 @@
<div class="repository new issue">
{{template "repo/header" .}}
<div class="ui container">
<div class="navbar">
{{template "repo/issue/navbar" .}}
</div>
<div class="ui two column stackable grid">
<div class="column" style="display: flex;align-items: center;">
<div class="ui large breadcrumb">
<a class="section" href="{{.RepoLink}}/issues">{{.i18n.Tr "repo.issues"}}</a>
<div class="divider"> / </div>
<div class="action section">{{.i18n.Tr "repo.issues.new"}}</div>
</div>
</div>
<div class="column right aligned">
{{template "repo/issue/navbar" .}}
</div>
</div>
<div class="ui divider"></div>
{{template "repo/issue/new_form" .}}
</div>


+ 7
- 2
templates/repo/issue/view.tmpl View File

@@ -3,11 +3,16 @@
{{template "repo/header" .}}
<div class="ui container">
<div class="ui two column stackable grid">
<div class="column">
{{template "repo/issue/navbar" .}}
<div class="column" style="display: flex;align-items: center;">
<div class="ui large breadcrumb">
<a class="section" href="{{.RepoLink}}/issues">{{.i18n.Tr "repo.issues"}}</a>
<div class="divider"> / </div>
<div class="action section">{{.Title | RenderEmoji}}</div>
</div>
</div>
{{if not .Repository.IsArchived}}
<div class="column right aligned">
{{template "repo/issue/navbar" .}}
{{if .PageIsIssueList}}
<a class="ui green button" href="{{.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a>
{{else}}


Loading…
Cancel
Save