|  | 
| 5 | 5 | 		{{template "base/alert" .}} | 
| 6 | 6 | 		{{template "repo/release_tag_header" .}} | 
| 7 | 7 | 		<h4 class="ui top attached header"> | 
| 8 |  | -			<div class="five wide column tw-flex tw-items-center"> | 
| 9 |  | -				{{.TagCount}} {{ctx.Locale.Tr "repo.release.tags"}} | 
| 10 |  | -			</div> | 
|  | 8 | +			{{.TagCount}} {{ctx.Locale.Tr "repo.release.tags"}} | 
| 11 | 9 | 		</h4> | 
| 12 | 10 | 		{{$canReadReleases := $.Permission.CanRead ctx.Consts.RepoUnitTypeReleases}} | 
| 13 | 11 | 		<div class="ui attached segment"> | 
| 14 | 12 | 			<form class="ignore-dirty" method="get"> | 
| 15 | 13 | 				{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.tag_kind") "Tooltip" (ctx.Locale.Tr "search.tag_tooltip")}} | 
| 16 | 14 | 			</form> | 
| 17 | 15 | 		</div> | 
| 18 |  | -		<div class="ui attached table segment"> | 
|  | 16 | +		<div class="ui attached segment tw-p-0"> | 
| 19 | 17 | 			{{if .Releases}} | 
| 20 |  | -			<table class="ui very basic striped fixed table single line" id="tags-table"> | 
| 21 |  | -				<tbody class="tag-list"> | 
| 22 |  | -					{{range $idx, $release := .Releases}} | 
| 23 |  | -						<tr> | 
| 24 |  | -							<td class="tag-list-row"> | 
| 25 |  | -								<h3 class="tag-list-row-title tw-mb-2"> | 
| 26 |  | -									{{if $canReadReleases}} | 
| 27 |  | -										<a class="tag-list-row-link tw-flex tw-items-center" href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a> | 
| 28 |  | -									{{else}} | 
| 29 |  | -										<a class="tag-list-row-link tw-flex tw-items-center" href="{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a> | 
| 30 |  | -									{{end}} | 
| 31 |  | -								</h3> | 
| 32 |  | -								<div class="download tw-flex tw-items-center"> | 
| 33 |  | -									{{if $.Permission.CanRead ctx.Consts.RepoUnitTypeCode}} | 
| 34 |  | -										{{if .CreatedUnix}} | 
| 35 |  | -											<span class="tw-mr-2">{{svg "octicon-clock" 16 "tw-mr-1"}}{{DateUtils.TimeSince .CreatedUnix}}</span> | 
| 36 |  | -										{{end}} | 
|  | 18 | +				<div class="ui divided list" id="tags-table"> | 
|  | 19 | +				{{range $idx, $release := .Releases}} | 
|  | 20 | +					<div class="item tag-list-row tw-p-4"> | 
|  | 21 | +						<h3 class="tag-list-row-title tw-mb-2"> | 
|  | 22 | +							{{if $canReadReleases}} | 
|  | 23 | +								<a class="tag-list-row-link" href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a> | 
|  | 24 | +							{{else}} | 
|  | 25 | +								<a class="tag-list-row-link" href="{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a> | 
|  | 26 | +							{{end}} | 
|  | 27 | +						</h3> | 
|  | 28 | +						<div class="flex-text-block muted-links tw-gap-4 tw-flex-wrap"> | 
|  | 29 | +							{{if $.Permission.CanRead ctx.Consts.RepoUnitTypeCode}} | 
|  | 30 | +								{{if .CreatedUnix}} | 
|  | 31 | +									<span class="flex-text-inline">{{svg "octicon-clock"}}{{DateUtils.TimeSince .CreatedUnix}}</span> | 
|  | 32 | +								{{end}} | 
| 37 | 33 | 
 | 
| 38 |  | -										<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> | 
|  | 34 | +								<a class="flex-text-inline tw-font-mono" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit"}}{{ShortSha .Sha1}}</a> | 
| 39 | 35 | 
 | 
| 40 |  | -										{{if not $.DisableDownloadSourceArchives}} | 
| 41 |  | -											<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> | 
| 42 |  | -											<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> | 
| 43 |  | -										{{end}} | 
|  | 36 | +								{{if not $.DisableDownloadSourceArchives}} | 
|  | 37 | +									<a class="archive-link flex-text-inline" href="{{$.RepoLink}}/archive/{{.TagName | PathEscapeSegments}}.zip" rel="nofollow">{{svg "octicon-file-zip"}}ZIP</a> | 
|  | 38 | +									<a class="archive-link flex-text-inline" href="{{$.RepoLink}}/archive/{{.TagName | PathEscapeSegments}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip"}}TAR.GZ</a> | 
|  | 39 | +								{{end}} | 
| 44 | 40 | 
 | 
| 45 |  | -										{{if (and $canReadReleases $.CanCreateRelease $release.IsTag)}} | 
| 46 |  | -											<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> | 
| 47 |  | -										{{end}} | 
|  | 41 | +								{{if (and $canReadReleases $.CanCreateRelease $release.IsTag)}} | 
|  | 42 | +									<a class="flex-text-inline" href="{{$.RepoLink}}/releases/new?tag={{.TagName}}">{{svg "octicon-tag"}}{{ctx.Locale.Tr "repo.release.new_release"}}</a> | 
|  | 43 | +								{{end}} | 
| 48 | 44 | 
 | 
| 49 |  | -										{{if (and ($.Permission.CanWrite ctx.Consts.RepoUnitTypeCode) $release.IsTag)}} | 
| 50 |  | -											<a class="ui delete-button tw-mr-2 muted" data-url="{{$.RepoLink}}/tags/delete" data-id="{{.ID}}"> | 
| 51 |  | -												{{svg "octicon-trash" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.release.delete_tag"}} | 
| 52 |  | -											</a> | 
| 53 |  | -										{{end}} | 
|  | 45 | +								{{if (and ($.Permission.CanWrite ctx.Consts.RepoUnitTypeCode) $release.IsTag)}} | 
|  | 46 | +									<a class="flex-text-inline link-action" data-url="{{$.RepoLink}}/tags/delete?id={{.ID}}" data-modal-confirm="#confirm-delete-tag-modal"> | 
|  | 47 | +										{{svg "octicon-trash"}}{{ctx.Locale.Tr "repo.release.delete_tag"}} | 
|  | 48 | +									</a> | 
|  | 49 | +								{{end}} | 
| 54 | 50 | 
 | 
| 55 |  | -										{{if and $canReadReleases (not $release.IsTag)}} | 
| 56 |  | -											<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> | 
| 57 |  | -										{{end}} | 
| 58 |  | -									{{end}} | 
| 59 |  | -								</div> | 
| 60 |  | -							</td> | 
| 61 |  | -						</tr> | 
| 62 |  | -					{{end}} | 
| 63 |  | -				</tbody> | 
| 64 |  | -			</table> | 
|  | 51 | +								{{if and $canReadReleases (not $release.IsTag)}} | 
|  | 52 | +									<a class="flex-text-inline" href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}">{{svg "octicon-tag"}}{{ctx.Locale.Tr "repo.release.detail"}}</a> | 
|  | 53 | +								{{end}} | 
|  | 54 | +							{{end}} | 
|  | 55 | +						</div> | 
|  | 56 | +					</div> | 
|  | 57 | +				{{end}} | 
|  | 58 | +				</div> | 
| 65 | 59 | 			{{else}} | 
| 66 | 60 | 				{{if .NumTags}} | 
| 67 | 61 | 					<p class="tw-p-4">{{ctx.Locale.Tr "no_results_found"}}</p> | 
|  | 
| 73 | 67 | </div> | 
| 74 | 68 | 
 | 
| 75 | 69 | {{if $.Permission.CanWrite ctx.Consts.RepoUnitTypeCode}} | 
| 76 |  | -<div class="ui g-modal-confirm delete modal"> | 
|  | 70 | +<div id="confirm-delete-tag-modal" class="ui small modal"> | 
| 77 | 71 | 	<div class="header"> | 
| 78 |  | -		{{svg "octicon-trash"}} | 
| 79 | 72 | 		{{ctx.Locale.Tr "repo.release.delete_tag"}} | 
| 80 | 73 | 	</div> | 
| 81 | 74 | 	<div class="content"> | 
|  | 
0 commit comments