mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-20 20:07:03 +01:00
Reorder repo tabs (#4139)
More info in the linked PR. --- Make positioning of the repo tabs make more sense. This is an isolated implementation for one of many changes discussed in the referenced issue, it will work good without the other changes too. ## Changes - Actions are moved to the edge. This tab is the least relevant to both visitors and developers. The first don't really need it at all, the second only visit it when something goes unexpected (run did not happen or attached to the wrong event), or just to see the run queue to know when their actions is going to get processed. This is not a tab with always-relevant information. - put Packages after releases. The Packages are like a download page for Releases, but for released packages instead of binaries/source code. It is relevant to Releases, so it should stay close, but it is secondary to Releases by importance. For example, because they don't actually contain release notes unlike Releases. - the above makes Projects appear next to Issues and Pull requests which I think is nice as they're related. ## Preview ### v7 https://codeberg.org/attachments/c434e8fd-aaab-4c27-9071-2a3ba68ad4b7 ### This PR https://codeberg.org/attachments/74743c03-883e-40cf-8cb1-384d1d8cf63c Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4139 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Reviewed-by: Otto <otto@codeberg.org> Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
This commit is contained in:
parent
133d62a2ef
commit
0a026a9cd8
2 changed files with 29 additions and 24 deletions
5
release-notes/8.0.0/4139.md
Normal file
5
release-notes/8.0.0/4139.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Reorder repo tabs for better UX:
|
||||||
|
- Actions is now the last tab
|
||||||
|
- Packages are located after Releases
|
||||||
|
- This puts Projects after Pull requests
|
||||||
|
(tab positions may depend on which units are enabled in the repo)
|
|
@ -114,21 +114,6 @@
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if and .EnableActions (not .UnitActionsGlobalDisabled) (.Permission.CanRead $.UnitTypeActions)}}
|
|
||||||
<a class="{{if .PageIsActions}}active {{end}}item" href="{{.RepoLink}}/actions">
|
|
||||||
{{svg "octicon-play"}} {{ctx.Locale.Tr "actions.actions"}}
|
|
||||||
{{if .Repository.NumOpenActionRuns}}
|
|
||||||
<span class="ui small label">{{CountFmt .Repository.NumOpenActionRuns}}</span>
|
|
||||||
{{end}}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{if .Permission.CanRead $.UnitTypePackages}}
|
|
||||||
<a href="{{.RepoLink}}/packages" class="{{if .IsPackagesPage}}active {{end}}item">
|
|
||||||
{{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{if and (not .UnitProjectsGlobalDisabled) (.Permission.CanRead $.UnitTypeProjects)}}
|
{{if and (not .UnitProjectsGlobalDisabled) (.Permission.CanRead $.UnitTypeProjects)}}
|
||||||
<a href="{{.RepoLink}}/projects" class="{{if .IsProjectsPage}}active {{end}}item">
|
<a href="{{.RepoLink}}/projects" class="{{if .IsProjectsPage}}active {{end}}item">
|
||||||
{{svg "octicon-project"}} {{ctx.Locale.Tr "repo.project"}}
|
{{svg "octicon-project"}} {{ctx.Locale.Tr "repo.project"}}
|
||||||
|
@ -147,6 +132,12 @@
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
{{if .Permission.CanRead $.UnitTypePackages}}
|
||||||
|
<a href="{{.RepoLink}}/packages" class="{{if .IsPackagesPage}}active {{end}}item">
|
||||||
|
{{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
{{if .Permission.CanRead $.UnitTypeWiki}}
|
{{if .Permission.CanRead $.UnitTypeWiki}}
|
||||||
<a class="{{if .PageIsWiki}}active {{end}}item" href="{{.RepoLink}}/wiki">
|
<a class="{{if .PageIsWiki}}active {{end}}item" href="{{.RepoLink}}/wiki">
|
||||||
{{svg "octicon-book"}} {{ctx.Locale.Tr "repo.wiki"}}
|
{{svg "octicon-book"}} {{ctx.Locale.Tr "repo.wiki"}}
|
||||||
|
@ -165,6 +156,15 @@
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
{{if and .EnableActions (not .UnitActionsGlobalDisabled) (.Permission.CanRead $.UnitTypeActions)}}
|
||||||
|
<a class="{{if .PageIsActions}}active {{end}}item" href="{{.RepoLink}}/actions">
|
||||||
|
{{svg "octicon-play"}} {{ctx.Locale.Tr "actions.actions"}}
|
||||||
|
{{if .Repository.NumOpenActionRuns}}
|
||||||
|
<span class="ui small label">{{CountFmt .Repository.NumOpenActionRuns}}</span>
|
||||||
|
{{end}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
{{template "custom/extra_tabs" .}}
|
{{template "custom/extra_tabs" .}}
|
||||||
|
|
||||||
{{if and RepoFlagsEnabled .SignedUser.IsAdmin}}
|
{{if and RepoFlagsEnabled .SignedUser.IsAdmin}}
|
||||||
|
|
Loading…
Reference in a new issue