From 04458d49a066c8befd79b59e62df00fbf49fa46b Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 3 Aug 2015 17:42:09 +0800 Subject: milestone: list view --- templates/.VERSION | 2 +- templates/repo/issue/labels.tmpl | 22 ++++--- templates/repo/issue/list.tmpl | 68 +++++++++---------- templates/repo/issue/milestone.tmpl | 111 ++++++++++++++++++++------------ templates/repo/issue/milestone_old.tmpl | 43 +++++++++++++ templates/repo/issue/navbar.tmpl | 2 +- 6 files changed, 161 insertions(+), 87 deletions(-) create mode 100644 templates/repo/issue/milestone_old.tmpl (limited to 'templates') diff --git a/templates/.VERSION b/templates/.VERSION index 8c77c21638..c03ca0c8a5 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.6.3.0802 Beta \ No newline at end of file +0.6.3.0803 Beta \ No newline at end of file diff --git a/templates/repo/issue/labels.tmpl b/templates/repo/issue/labels.tmpl index b69988cdb9..1d99428999 100644 --- a/templates/repo/issue/labels.tmpl +++ b/templates/repo/issue/labels.tmpl @@ -32,17 +32,19 @@
{{.i18n.Tr "repo.issues.label_count" .NumLabels}}
-
- {{range .Labels}} -
  • -
    {{.Name}}
    - {{if $.IsRepositoryAdmin}} - {{$.i18n.Tr "repo.issues.label_delete"}} - {{$.i18n.Tr "repo.issues.label_edit"}} +
    +
    + {{range .Labels}} +
  • +
    {{.Name}}
    + {{if $.IsRepositoryAdmin}} + {{$.i18n.Tr "repo.issues.label_delete"}} + {{$.i18n.Tr "repo.issues.label_edit"}} + {{end}} + {{$.i18n.Tr "repo.issues.label_open_issues" .NumOpenIssues}} +
  • {{end}} - {{$.i18n.Tr "repo.issues.label_open_issues" .NumOpenIssues}} - - {{end}} +
    diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 21da0f543e..e24f8bb926 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -70,43 +70,45 @@ -
    - {{range .Issues}} - {{ $timeStr:= TimeSince .Created $.Lang }} -
  • -
    #{{.Index}}
    - {{.Name}} +
    +
    + {{range .Issues}} + {{ $timeStr:= TimeSince .Created $.Lang }} +
  • +
    #{{.Index}}
    + {{.Name}} - {{range .Labels}} - {{.Name}} - {{end}} + {{range .Labels}} + {{.Name}} + {{end}} - {{if .NumComments}} {{.NumComments}}{{end}} -

    {{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.Name|Str2html}}

    -
  • - {{end}} - - {{with .Page}} - {{if gt .Total 1}} -
    - - {{end}} - {{end}}
    diff --git a/templates/repo/issue/milestone.tmpl b/templates/repo/issue/milestone.tmpl index 6a9e5f3790..3add7cd807 100644 --- a/templates/repo/issue/milestone.tmpl +++ b/templates/repo/issue/milestone.tmpl @@ -1,43 +1,70 @@ -{{template "base/head_old" .}} -{{template "base/navbar" .}} -{{template "repo/nav" .}} -{{template "repo/toolbar" .}} -
    -
    - -
    -
    - {{range .Milestones}} -
    -

    {{.Name}}

    - {{.NumOpenIssues}} - {{.NumClosedIssues}} -

    - Edit - {{if .IsClosed}} - Open - {{else}} - Close - {{end}} - Delete - Issues -

    -
    -

    {{.RenderedContent | Str2html}}

    -
    - {{end}} -
    -
    -
    +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + +
    + + + +
    +
    + {{range .Milestones}} +
  • + {{.Name}} +
    +
    +
    +
    +
    +
    + {{ $closedDate:= TimeSince .ClosedDate $.Lang }} + {{if .IsClosed}} + {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}} + {{else}} + {{if .DeadlineString}}{{.DeadlineString}}{{else}}{{$.i18n.Tr "repo.milestones.no_due_date"}}{{end}} + {{end}} + + {{$.i18n.Tr "repo.issues.open_tab" .NumOpenIssues}} + {{$.i18n.Tr "repo.issues.close_tab" .NumClosedIssues}} + +
    + {{if $.IsRepositoryAdmin}} + + {{if .Content}} +
    + {{.RenderedContent|Str2html}} +
    + {{end}} + {{end}} +
  • + {{end}} +
    +
    +
    -
    -{{template "base/footer_old" .}} +{{template "base/footer" .}} \ No newline at end of file diff --git a/templates/repo/issue/milestone_old.tmpl b/templates/repo/issue/milestone_old.tmpl new file mode 100644 index 0000000000..6a9e5f3790 --- /dev/null +++ b/templates/repo/issue/milestone_old.tmpl @@ -0,0 +1,43 @@ +{{template "base/head_old" .}} +{{template "base/navbar" .}} +{{template "repo/nav" .}} +{{template "repo/toolbar" .}} +
    +
    + +
    +
    + {{range .Milestones}} +
    +

    {{.Name}}

    + {{.NumOpenIssues}} + {{.NumClosedIssues}} +

    + Edit + {{if .IsClosed}} + Open + {{else}} + Close + {{end}} + Delete + Issues +

    +
    +

    {{.RenderedContent | Str2html}}

    +
    + {{end}} +
    +
    +
    +
    + +{{template "base/footer_old" .}} diff --git a/templates/repo/issue/navbar.tmpl b/templates/repo/issue/navbar.tmpl index beff907d2f..509ee5f66e 100644 --- a/templates/repo/issue/navbar.tmpl +++ b/templates/repo/issue/navbar.tmpl @@ -2,6 +2,6 @@ \ No newline at end of file -- cgit v1.2.3