From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec 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.3. Signed-off-by: Daniel Baumann --- templates/repo/release/list.tmpl | 142 ++++++++++++++++++++++++++++++ templates/repo/release/new.tmpl | 183 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 325 insertions(+) create mode 100644 templates/repo/release/list.tmpl create mode 100644 templates/repo/release/new.tmpl (limited to 'templates/repo/release') diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl new file mode 100644 index 0000000..4c7f13d --- /dev/null +++ b/templates/repo/release/list.tmpl @@ -0,0 +1,142 @@ +{{template "base/head" .}} +
+ {{template "repo/header" .}} +
+ {{template "base/alert" .}} + {{template "repo/release_tag_header" .}} +
    + {{range $idx, $info := .Releases}} + {{$release := $info.Release}} +
  • +
    + {{svg "octicon-tag" 16 "tw-mr-1"}}{{$release.TagName}} + {{if and $release.Sha1 ($.Permission.CanRead $.UnitTypeCode)}} + {{svg "octicon-git-commit" 16 "tw-mr-1"}}{{ShortSha $release.Sha1}} + {{template "repo/branch_dropdown" dict "root" $ "release" $release}} + {{end}} +
    +
    +
    +

    + {{$release.Title}} + {{template "repo/commit_statuses" dict "Status" $info.CommitStatus "Statuses" $info.CommitStatuses "AdditionalClasses" "tw-flex"}} + {{if $release.IsDraft}} + {{ctx.Locale.Tr "repo.release.draft"}} + {{else if $release.IsPrerelease}} + {{ctx.Locale.Tr "repo.release.prerelease"}} + {{else if (not $release.IsTag)}} + {{ctx.Locale.Tr "repo.release.stable"}} + {{end}} +

    +
    + {{if $.CanCreateRelease}} + + {{svg "octicon-pencil"}} + + {{end}} +
    +
    +

    + + {{if $release.OriginalAuthor}} + {{svg (MigrationIcon $release.Repo.GetOriginalURLHostname) 20 "tw-mr-1"}}{{$release.OriginalAuthor}} + {{else if $release.Publisher}} + {{ctx.AvatarUtils.Avatar $release.Publisher 20 "tw-mr-1"}} + {{$release.Publisher.GetDisplayName}} + {{else}} + Ghost + {{end}} + + + {{ctx.Locale.Tr "repo.released_this"}} + + {{if $release.CreatedUnix}} + {{TimeSinceUnix $release.CreatedUnix ctx.Locale}} + {{end}} + {{if and (not $release.IsDraft) ($.Permission.CanRead $.UnitTypeCode)}} + | {{ctx.Locale.Tr "repo.release.ahead.commits" $release.NumCommitsBehind}} {{ctx.Locale.Tr "repo.release.ahead.target" $release.TargetBehind}} + {{end}} +

    + {{template "repo/tag/verification_line" (dict "ctxData" $ "release" $release)}} +
    + {{$release.RenderedNote}} +
    + {{$hasReleaseAttachment := gt (len $release.Attachments) 0}} + {{$hasArchiveLinks := and (not $.DisableDownloadSourceArchives) (not $release.IsDraft) (not $release.HideArchiveLinks) ($.Permission.CanRead $.UnitTypeCode)}} + {{if or $hasArchiveLinks $hasReleaseAttachment}} +
    +
    + + {{ctx.Locale.Tr "repo.release.downloads"}} + + +
    + {{end}} +
    +
    +
  • + {{end}} +
+ + {{template "base/paginate" .}} +
+
+ +{{if (and ($.Permission.CanWrite $.UnitTypeCode) .PageIsTagList)}} + +{{end}} + +{{template "base/footer" .}} diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl new file mode 100644 index 0000000..9bbd11f --- /dev/null +++ b/templates/repo/release/new.tmpl @@ -0,0 +1,183 @@ +{{template "base/head" .}} +
+ {{template "repo/header" .}} +
+

+ {{if .PageIsEditRelease}} + {{ctx.Locale.Tr "repo.release.edit_release"}} +
{{ctx.Locale.Tr "repo.release.edit_subheader"}}
+ {{else}} + {{ctx.Locale.Tr "repo.release.new_release"}} +
{{ctx.Locale.Tr "repo.release.new_subheader"}}
+ {{end}} +

+ {{template "base/alert" .}} +
+ {{.CsrfTokenHtml}} +
+
+ {{if .PageIsEditRelease}} + {{.tag_name}}@{{.tag_target}} + {{else}} + + +
+ @ + +
+
+ {{ctx.Locale.Tr "repo.release.tag_helper"}} +
+ {{end}} +
+
+
+
+ +
+
+ {{template "shared/combomarkdowneditor" (dict + "MarkdownPreviewUrl" (print .Repository.Link "/markup") + "MarkdownPreviewContext" .RepoLink + "TextareaName" "content" + "TextareaContent" .content + "TextareaPlaceholder" (ctx.Locale.Tr "repo.release.message") + "TextareaAriaLabel" (ctx.Locale.Tr "repo.release.message") + "DropzoneParentContainer" "form" + "EasyMDE" true + )}} +
+ {{range .attachments}} +
+
+
+ {{if .ExternalURL}} + {{svg "octicon-link-external" 16 "tw-mr-2"}} + {{else}} + {{svg "octicon-package" 16 "tw-mr-2"}} + {{end}} +
+ + + {{if .ExternalURL}} + + {{else}} + {{ctx.Locale.TrN + .DownloadCount "repo.release.download_count_one" + "repo.release.download_count_few" (ctx.Locale.PrettyNumber + .DownloadCount)}} · {{.Size | ctx.Locale.TrSize}} + {{end}} +
+ + {{ctx.Locale.Tr "remove"}} + +
+ {{end}} +
+
+
+ {{svg "octicon-link-external" 16 "tw-mr-2"}} +
+ + +
+ + {{ctx.Locale.Tr "remove"}} + +
+ + {{if .IsAttachmentEnabled}} +
+ {{template "repo/upload" .}} +
+ {{end}} +
+
+
+
+
+ {{if not .PageIsEditRelease}} + + {{else}} + + {{end}} + + {{if not .DisableDownloadSourceArchives}} + + {{end}} +
+
+
+ {{if .PageIsEditRelease}} + + {{ctx.Locale.Tr "repo.release.cancel"}} + + + {{ctx.Locale.Tr "repo.release.delete_release"}} + + {{if .IsDraft}} + + + {{else}} + + {{end}} + {{else}} + {{if not .tag_name}} + + {{end}} + + + {{end}} +
+
+
+
+
+
+ +{{if .PageIsEditRelease}} + +{{end}} +{{template "base/footer" .}} -- cgit v1.2.3