mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-10-22 17:07:33 +00:00
3ea7437fa6
Fixes https://github.com/go-gitea/gitea/issues/30005. Regression from https://github.com/go-gitea/gitea/pull/29945. There was only once instance of `tw-content-center` before that PR, so I just ran below command and reverted that one instance. ```sh perl -p -i -e 's#tw-content-center#tw-items-center#g' web_src/js/**/* templates/**/* models/**/* tests/**/* ``` (cherry picked from commit 04f9ad056882fc3f21b247b16f84437adf0f36d8) Conflicts: templates/repo/diff/conversation.tmpl templates/repo/header.tmpl templates/repo/issue/filter_list.tmpl templates/repo/issue/view_content/conversation.tmpl templates/repo/wiki/view.tmpl web_src/js/components/DashboardRepoList.vue re-ran the command after discarding the Gitea changes to ensure all Forgejo files are also covered
30 lines
1.3 KiB
Go HTML Template
30 lines
1.3 KiB
Go HTML Template
{{$canReadReleases := $.Permission.CanRead $.UnitTypeReleases}}
|
|
{{$canReadCode := $.Permission.CanRead $.UnitTypeCode}}
|
|
|
|
{{if $canReadReleases}}
|
|
<div class="tw-flex">
|
|
<div class="tw-flex-1 tw-flex tw-items-center">
|
|
<h2 class="ui compact small menu header small-menu-items">
|
|
<a class="{{if and .PageIsReleaseList (not .PageIsSingleTag)}}active {{end}}item" href="{{.RepoLink}}/releases">{{ctx.Locale.PrettyNumber .NumReleases}} {{ctx.Locale.TrN .NumReleases "repo.release" "repo.releases"}}</a>
|
|
{{if $canReadCode}}
|
|
<a class="{{if or .PageIsTagList .PageIsSingleTag}}active {{end}}item" href="{{.RepoLink}}/tags">{{ctx.Locale.PrettyNumber .NumTags}} {{ctx.Locale.TrN .NumTags "repo.tag" "repo.tags"}}</a>
|
|
{{end}}
|
|
</h2>
|
|
</div>
|
|
{{if .EnableFeed}}
|
|
<a class="ui small button" href="{{.RepoLink}}/{{if .PageIsTagList}}tags{{else}}releases{{end}}.rss">
|
|
{{svg "octicon-rss" 16}} {{ctx.Locale.Tr "rss_feed"}}
|
|
</a>
|
|
{{end}}
|
|
{{if and (not .PageIsTagList) .CanCreateRelease}}
|
|
<a class="ui small primary button" href="{{$.RepoLink}}/releases/new">
|
|
{{ctx.Locale.Tr "repo.release.new_release"}}
|
|
</a>
|
|
{{end}}
|
|
</div>
|
|
<div class="divider"></div>
|
|
{{else if $canReadCode}}
|
|
{{/* if the "repo.releases" unit is disabled, only show the "commits / branches / tags" sub menu */}}
|
|
{{template "repo/sub_menu" .}}
|
|
{{end}}
|