From dd136858f1ea40ad3c94191d647487fa4f31926c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.0. Signed-off-by: Daniel Baumann --- templates/projects/list.tmpl | 93 ++++++++++++++++++++++ templates/projects/new.tmpl | 66 ++++++++++++++++ templates/projects/view.tmpl | 180 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 339 insertions(+) create mode 100644 templates/projects/list.tmpl create mode 100644 templates/projects/new.tmpl create mode 100644 templates/projects/view.tmpl (limited to 'templates/projects') diff --git a/templates/projects/list.tmpl b/templates/projects/list.tmpl new file mode 100644 index 0000000..b892cff --- /dev/null +++ b/templates/projects/list.tmpl @@ -0,0 +1,93 @@ +{{if and $.CanWriteProjects (not $.Repository.IsArchived)}} + +{{end}} + +{{template "base/alert" .}} + +
+ + + + +
+ +
+ {{range .Projects}} +
  • +

    + {{svg .IconName 16}} + {{.Title}} +

    +
    +
    +
    + {{svg "octicon-issue-opened" 14}} + {{ctx.Locale.PrettyNumber (.NumOpenIssues ctx)}} {{ctx.Locale.Tr "repo.issues.open_title"}} +
    +
    + {{svg "octicon-check" 14}} + {{ctx.Locale.PrettyNumber (.NumClosedIssues ctx)}} {{ctx.Locale.Tr "repo.issues.closed_title"}} +
    +
    + {{if and $.CanWriteProjects (not $.Repository.IsArchived)}} + + {{end}} +
    + {{if .Description}} +
    + {{.RenderedContent}} +
    + {{end}} +
  • + {{end}} + + {{template "base/paginate" .}} +
    + +{{if and $.CanWriteProjects (not $.Repository.IsArchived)}} + +{{end}} diff --git a/templates/projects/new.tmpl b/templates/projects/new.tmpl new file mode 100644 index 0000000..bd173b5 --- /dev/null +++ b/templates/projects/new.tmpl @@ -0,0 +1,66 @@ +

    + {{if .PageIsEditProjects}} + {{ctx.Locale.Tr "repo.projects.edit"}} +
    {{ctx.Locale.Tr "repo.projects.edit_subheader"}}
    + {{else}} + {{ctx.Locale.Tr "repo.projects.new"}} +
    {{ctx.Locale.Tr "repo.projects.new_subheader"}}
    + {{end}} +

    +{{template "base/alert" .}} +
    + {{.CsrfTokenHtml}} +
    + +
    + + +
    +
    + + +
    + + {{if not .PageIsEditProjects}} +
    + + +
    + {{end}} + +
    + + +
    +
    +
    +
    + + {{ctx.Locale.Tr "repo.milestones.cancel"}} + + +
    +
    diff --git a/templates/projects/view.tmpl b/templates/projects/view.tmpl new file mode 100644 index 0000000..08b08b9 --- /dev/null +++ b/templates/projects/view.tmpl @@ -0,0 +1,180 @@ +{{$canWriteProject := and .CanWriteProjects (or (not .Repository) (not .Repository.IsArchived))}} + +
    +
    +

    {{.Project.Title}}

    + {{if $canWriteProject}} + + + {{end}} +
    + +
    {{$.Project.RenderedContent}}
    + +
    +
    + +
    +
    + {{range .Columns}} +
    +
    +
    +
    + {{.NumIssues ctx}} +
    + {{.Title}} +
    + {{if $canWriteProject}} + + {{end}} +
    +
    +
    + {{range (index $.IssuesMap .ID)}} +
    + {{template "repo/issue/card" (dict "Issue" . "Page" $)}} +
    + {{end}} +
    +
    + {{end}} +
    +
    + +{{if .CanWriteProjects}} + +{{end}} -- cgit v1.2.3