-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add tags list for repos whose release setting is disabled #23465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
deafc1a
add tag list
Zettat123 87ea9ad
remove tags function
Zettat123 d956c21
Merge branch 'main' into bugfix/issue-23427
Zettat123 c76333f
reuse template
Zettat123 7113676
format
Zettat123 46db60e
fix indent
Zettat123 565466b
fix indent
Zettat123 330b888
Merge branch 'main' into bugfix/issue-23427
wxiaoguang 30fbb36
refactor
wxiaoguang 88f702e
fine tune
wxiaoguang 4388338
use repo/sub_menu
Zettat123 38bde8c
fix lint
Zettat123 2d100d8
remove unnecessary line
Zettat123 eb0d233
Merge branch 'main' into bugfix/issue-23427
Zettat123 df06a4d
fix g-modal-confirm
Zettat123 39103f2
Merge branch 'main' into bugfix/issue-23427
GiteaBot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,17 @@ | ||
{{$canReadReleases := $.Permission.CanRead $.UnitTypeReleases}} | ||
{{$canReadCode := $.Permission.CanRead $.UnitTypeCode}} | ||
|
||
{{if $canReadReleases}} | ||
<h2 class="ui compact small menu header"> | ||
<a class="{{if .PageIsReleaseList}}active {{end}}item" href="{{.RepoLink}}/releases">{{.locale.Tr "repo.release.releases"}}</a> | ||
{{if $canReadCode}} | ||
<a class="{{if .PageIsTagList}}active {{end}}item" href="{{.RepoLink}}/tags">{{.locale.Tr "repo.release.tags"}}</a> | ||
{{end}} | ||
</h2> | ||
|
||
{{if .EnableFeed}} | ||
<a href="{{.RepoLink}}/{{if .PageIsTagList}}tags{{else}}releases{{end}}.rss"><i class="ui grey icon gt-ml-3" data-tooltip-content="{{.locale.Tr "rss_feed"}}">{{svg "octicon-rss" 18}}</i></a> | ||
{{end}} | ||
{{else if $canReadCode}} | ||
{{template "repo/sub_menu" .}} | ||
{{end}} |
This file contains hidden or 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,85 @@ | ||
{{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/sub_menu_release_tag" .}} | ||
|
||
<div class="ui divider"></div> | ||
|
||
<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> | ||
|
||
{{$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 gt-mb-3"> | ||
{{if $canReadReleases}} | ||
<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 (and $canReadReleases $.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 and $canReadReleases (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}} | ||
</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"}} | ||
{{.locale.Tr "repo.release.delete_tag"}} | ||
</div> | ||
<div class="content"> | ||
<p>{{.locale.Tr "repo.release.deletion_tag_desc"}}</p> | ||
</div> | ||
{{template "base/modal_actions_confirm" .}} | ||
</div> | ||
{{end}} | ||
|
||
|
||
{{template "base/footer" .}} |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.