mirror of
https://github.com/go-gitea/gitea.git
synced 2024-10-19 06:43:41 -04:00
7dde3e6489
Resolves #31998 The first screenshot shows the tag page without any filter being applied: ![image](https://github.com/user-attachments/assets/eac0e51c-9e48-42b2-bb1c-a25896ca40cb) The second one, shows the page when the given filter returns no tag: ![image](https://github.com/user-attachments/assets/98df191e-1a7b-4947-b0ef-4987a0293c3e) The last one shows a single tag being filtered: ![image](https://github.com/user-attachments/assets/79c7e05e-8c86-4f06-b17e-15818b7b9291) Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com>
89 lines
3.8 KiB
Handlebars
89 lines
3.8 KiB
Handlebars
{{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">
|
|
{{.TagCount}} {{ctx.Locale.Tr "repo.release.tags"}}
|
|
</div>
|
|
</h4>
|
|
{{$canReadReleases := $.Permission.CanRead ctx.Consts.RepoUnitTypeReleases}}
|
|
<div class="ui attached segment">
|
|
<form class="ignore-dirty" method="get">
|
|
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.tag_kind") "Tooltip" (ctx.Locale.Tr "search.tag_tooltip")}}
|
|
</form>
|
|
</div>
|
|
<div class="ui attached table segment">
|
|
{{if .Releases}}
|
|
<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-list-row">
|
|
<h3 class="tag-list-row-title tw-mb-2">
|
|
{{if $canReadReleases}}
|
|
<a class="tag-list-row-link tw-flex tw-items-center" href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a>
|
|
{{else}}
|
|
<a class="tag-list-row-link tw-flex tw-items-center" href="{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a>
|
|
{{end}}
|
|
</h3>
|
|
<div class="download tw-flex tw-items-center">
|
|
{{if $.Permission.CanRead ctx.Consts.RepoUnitTypeCode}}
|
|
{{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 ctx.Consts.RepoUnitTypeCode) $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>
|
|
{{else}}
|
|
{{if .NumTags}}
|
|
<p class="tw-p-4">{{ctx.Locale.Tr "no_results_found"}}</p>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
{{template "base/paginate" .}}
|
|
</div>
|
|
</div>
|
|
|
|
{{if $.Permission.CanWrite ctx.Consts.RepoUnitTypeCode}}
|
|
<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" .}}
|