Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
Browse files Browse the repository at this point in the history
…-user-block
  • Loading branch information
KN4CK3R committed Feb 6, 2024
2 parents 5099747 + f9072db commit 3d8e1b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 27 deletions.
6 changes: 3 additions & 3 deletions options/locale/locale_zh-CN.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1005,10 +1005,10 @@ reactions_more=再加载 %d
unit_disabled=站点管理员已禁用此仓库单元。
language_other=其它
adopt_search=输入用户名以搜索未被收录的仓库... (留空以查找全部)
adopt_preexisting_label=收录文件
adopt_preexisting=收录已存在的文件
adopt_preexisting_label=收录仓库
adopt_preexisting=收录已存在的仓库
adopt_preexisting_content=从 %s 创建仓库
adopt_preexisting_success=从 %s 收录文件并创建仓库成功
adopt_preexisting_success=从 %s 收录仓库成功
delete_preexisting_label=刪除
delete_preexisting=删除已存在的文件
delete_preexisting_content=删除 %s 中的文件
Expand Down
29 changes: 5 additions & 24 deletions templates/repo/release/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
{{range $idx, $release := .Releases}}
<li class="ui grid">
<div class="ui four wide column meta">
<a class="muted" href="{{if not .Sha1}}#{{else}}{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}{{end}}" rel="nofollow">{{svg "octicon-tag" 16 "gt-mr-2"}}{{.TagName}}</a>
{{if .Sha1}}
<a class="muted" href="{{if not (and .Sha1 ($.Permission.CanRead $.UnitTypeCode))}}#{{else}}{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}{{end}}" rel="nofollow">{{svg "octicon-tag" 16 "gt-mr-2"}}{{.TagName}}</a>
{{if and .Sha1 ($.Permission.CanRead $.UnitTypeCode)}}
<a class="muted gt-mono" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "gt-mr-2"}}{{ShortSha .Sha1}}</a>
{{template "repo/branch_dropdown" dict "root" $ "release" .}}
{{end}}
Expand All @@ -22,36 +22,18 @@
<span class="ui yellow label">{{ctx.Locale.Tr "repo.release.draft"}}</span>
{{else if .IsPrerelease}}
<span class="ui orange label">{{ctx.Locale.Tr "repo.release.prerelease"}}</span>
{{else if not .IsTag}}
{{else}}
<span class="ui green label">{{ctx.Locale.Tr "repo.release.stable"}}</span>
{{end}}
</h4>
<div>
{{if and $.CanCreateRelease (not .IsTag)}}
{{if $.CanCreateRelease}}
<a class="muted" data-tooltip-content="{{ctx.Locale.Tr "repo.release.edit"}}" href="{{$.RepoLink}}/releases/edit/{{.TagName | PathEscapeSegments}}" rel="nofollow">
{{svg "octicon-pencil"}}
</a>
{{end}}
</div>
</div>
{{if .IsTag}}
<p class="text grey">
{{if gt .Publisher.ID 0}}
<span class="author">
{{ctx.AvatarUtils.Avatar .Publisher 20 "gt-mr-2"}}
<a href="{{.Publisher.HomeLink}}">{{.Publisher.Name}}</a>
</span>
<span class="released">
{{ctx.Locale.Tr "repo.tagged_this"}}
</span>
{{if .CreatedUnix}}
<span class="time">{{TimeSinceUnix .CreatedUnix ctx.Locale}}</span>
{{end}}
|
{{end}}
<span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | PathEscapeSegments}}...{{.TargetBehind | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{ctx.Locale.Tr "repo.tag.ahead.target" .TargetBehind}}</span>
</p>
{{else}}
<p class="text grey">
<span class="author">
{{if .OriginalAuthor}}
Expand All @@ -69,11 +51,10 @@
{{if .CreatedUnix}}
<span class="time">{{TimeSinceUnix .CreatedUnix ctx.Locale}}</span>
{{end}}
{{if not .IsDraft}}
{{if and (not .IsDraft) ($.Permission.CanRead $.UnitTypeCode)}}
| <span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | PathEscapeSegments}}...{{.TargetBehind | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{ctx.Locale.Tr "repo.release.ahead.target" .TargetBehind}}</span>
{{end}}
</p>
{{end}}
<div class="markup desc">
{{Str2html .Note}}
</div>
Expand Down

0 comments on commit 3d8e1b9

Please sign in to comment.