-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
123 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{/* This template is only used to show tags list when repo's release setting is disabled. */}} | ||
{{template "base/head" .}} | ||
<div role="main" aria-label="{{.Title}}" class="page-content repository release"> | ||
{{template "repo/header" .}} | ||
<div class="ui container"> | ||
{{template "base/alert" .}} | ||
{{template "repo/sub_menu" .}} | ||
<div class="gt-mt-4"> | ||
{{template "repo/tag/table" .}} | ||
</div> | ||
</div> | ||
</div> | ||
{{template "base/footer" .}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{{if gt .ReleasesNum 0}} | ||
<h4 class="ui top attached header"> | ||
<div class="five wide column gt-df gt-ac"> | ||
{{svg "octicon-tag" 16 "gt-mr-2"}}{{.locale.Tr "repo.release.tags"}} | ||
</div> | ||
</h4> | ||
<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 gt-mb-3"> | ||
{{if $.Permission.CanRead $.UnitTypeReleases}} | ||
<a class="gt-df gt-ac" href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a> | ||
{{else}} | ||
<a class="gt-df gt-ac" href="{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a> | ||
{{end}} | ||
</h3> | ||
<div class="download gt-df gt-ac"> | ||
{{if $.Permission.CanRead $.UnitTypeCode}} | ||
{{if .CreatedUnix}} | ||
<span class="gt-mr-3">{{svg "octicon-clock" 16 "gt-mr-2"}}{{TimeSinceUnix .CreatedUnix $.locale}}</span> | ||
{{end}} | ||
<a class="gt-mr-3 gt-mono muted" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "gt-mr-2"}}{{ShortSha .Sha1}}</a> | ||
{{if not $.DisableDownloadSourceArchives}} | ||
<a class="archive-link gt-mr-3 muted" href="{{$.RepoLink}}/archive/{{.TagName | PathEscapeSegments}}.zip" rel="nofollow">{{svg "octicon-file-zip" 16 "gt-mr-2"}}ZIP</a> | ||
<a class="archive-link gt-mr-3 muted" href="{{$.RepoLink}}/archive/{{.TagName | PathEscapeSegments}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip" 16 "gt-mr-2"}}TAR.GZ</a> | ||
{{end}} | ||
{{if $.Permission.CanRead $.UnitTypeReleases}} | ||
{{if (and $.CanCreateRelease $release.IsTag)}} | ||
<a class="gt-mr-3 muted" href="{{$.RepoLink}}/releases/new?tag={{.TagName}}">{{svg "octicon-tag" 16 "gt-mr-2"}}{{$.locale.Tr "repo.release.new_release"}}</a> | ||
{{end}} | ||
{{if (and ($.Permission.CanWrite $.UnitTypeCode) $release.IsTag)}} | ||
<a class="ui delete-button gt-mr-3 muted" data-url="{{$.RepoLink}}/tags/delete" data-id="{{.ID}}"> | ||
{{svg "octicon-trash" 16 "gt-mr-2"}}{{$.locale.Tr "repo.release.delete_tag"}} | ||
</a> | ||
{{end}} | ||
{{if (not $release.IsTag)}} | ||
<a class="gt-mr-3 muted" href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}">{{svg "octicon-tag" 16 "gt-mr-2"}}{{$.locale.Tr "repo.release.detail"}}</a> | ||
{{end}} | ||
{{end}} | ||
{{end}} | ||
</div> | ||
</td> | ||
</tr> | ||
{{end}} | ||
</tbody> | ||
</table> | ||
</div> | ||
{{end}} |