summaryrefslogtreecommitdiffstats
path: root/templates/repo/tag/list.tmpl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
committerDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
commitdd136858f1ea40ad3c94191d647487fa4f31926c (patch)
tree58fec94a7b2a12510c9664b21793f1ed560c6518 /templates/repo/tag/list.tmpl
parentInitial commit. (diff)
downloadforgejo-dd136858f1ea40ad3c94191d647487fa4f31926c.tar.xz
forgejo-dd136858f1ea40ad3c94191d647487fa4f31926c.zip
Adding upstream version 9.0.0.upstream/9.0.0upstreamdebian
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'templates/repo/tag/list.tmpl')
-rw-r--r--templates/repo/tag/list.tmpl79
1 files changed, 79 insertions, 0 deletions
diff --git a/templates/repo/tag/list.tmpl b/templates/repo/tag/list.tmpl
new file mode 100644
index 0000000..82f3dc0
--- /dev/null
+++ b/templates/repo/tag/list.tmpl
@@ -0,0 +1,79 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository tags">
+ {{template "repo/header" .}}
+ <div class="ui container">
+ {{template "base/alert" .}}
+ {{template "repo/release_tag_header" .}}
+ <h4 class="ui top attached header">
+ <div class="five wide column tw-flex tw-items-center">
+ {{svg "octicon-tag" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.release.tags"}}
+ </div>
+ </h4>
+ {{$canReadReleases := $.Permission.CanRead $.UnitTypeReleases}}
+ <div class="ui attached table segment">
+ <table class="ui very basic striped fixed table single line" id="tags-table">
+ <tbody class="tag-list">
+ {{range $idx, $release := .Releases}}
+ <tr>
+ <td class="tag">
+ <h3 class="release-tag-name tw-mb-2 tw-flex">
+ {{if $canReadReleases}}
+ <a class="tw-flex tw-items-center" href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a>
+ {{else}}
+ <a class="tw-flex tw-items-center" href="{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a>
+ {{end}}
+ {{template "repo/tag/verification_box" (dict "ctxData" $ "release" $release)}}
+ </h3>
+ <div class="download tw-flex tw-items-center">
+ {{if $.Permission.CanRead $.UnitTypeCode}}
+ {{if .CreatedUnix}}
+ <span class="tw-mr-2">{{svg "octicon-clock" 16 "tw-mr-1"}}{{TimeSinceUnix .CreatedUnix ctx.Locale}}</span>
+ {{end}}
+
+ <a class="tw-mr-2 tw-font-mono muted" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "tw-mr-1"}}{{ShortSha .Sha1}}</a>
+
+ {{if not $.DisableDownloadSourceArchives}}
+ <a class="archive-link tw-mr-2 muted" href="{{$.RepoLink}}/archive/{{.TagName | PathEscapeSegments}}.zip" rel="nofollow">{{svg "octicon-file-zip" 16 "tw-mr-1"}}ZIP</a>
+ <a class="archive-link tw-mr-2 muted" href="{{$.RepoLink}}/archive/{{.TagName | PathEscapeSegments}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip" 16 "tw-mr-1"}}TAR.GZ</a>
+ {{end}}
+
+ {{if (and $canReadReleases $.CanCreateRelease $release.IsTag)}}
+ <a class="tw-mr-2 muted" href="{{$.RepoLink}}/releases/new?tag={{.TagName}}">{{svg "octicon-tag" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.release.new_release"}}</a>
+ {{end}}
+
+ {{if (and ($.Permission.CanWrite $.UnitTypeCode) $release.IsTag)}}
+ <a class="ui delete-button tw-mr-2 muted" data-url="{{$.RepoLink}}/tags/delete" data-id="{{.ID}}">
+ {{svg "octicon-trash" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.release.delete_tag"}}
+ </a>
+ {{end}}
+
+ {{if and $canReadReleases (not $release.IsTag)}}
+ <a class="tw-mr-2 muted" href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}">{{svg "octicon-tag" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.release.detail"}}</a>
+ {{end}}
+ {{end}}
+ </div>
+ </td>
+ </tr>
+ {{end}}
+ </tbody>
+ </table>
+ </div>
+
+ {{template "base/paginate" .}}
+ </div>
+</div>
+
+{{if $.Permission.CanWrite $.UnitTypeCode}}
+<div class="ui g-modal-confirm delete modal">
+ <div class="header">
+ {{svg "octicon-trash"}}
+ {{ctx.Locale.Tr "repo.release.delete_tag"}}
+ </div>
+ <div class="content">
+ <p>{{ctx.Locale.Tr "repo.release.deletion_tag_desc"}}</p>
+ </div>
+ {{template "base/modal_actions_confirm" .}}
+</div>
+{{end}}
+
+{{template "base/footer" .}}