gitea/routers/web
Rowan Bohde ac2d97cb61
Link to tree views of submodules if possible (#33424)
This is a follow-up to https://github.com/go-gitea/gitea/pull/33097. 

When linking a submodule at a commit in either the repo view, or a diff
when adding a new submodule, link to the tree view of that submodules
intead of the individual commit. This shows the user the full tree,
instead of the diff of the commit.

This makes the assumption that the tree for a given SHA is at
`<repo_url>/tree/<sha>`. This URL format is supported by both Github &
Gitlab, but not Gitea. To fix this, add a redirect from
`<username>/<repo>/tree/<ref>` to `<username>/<repo>/src/<ref>`, so that
Gitea can support this URL structure.
2025-01-30 00:09:52 +00:00
..
admin Support performance trace (#32973) 2025-01-21 18:57:07 +00:00
auth Support disable passkey auth (#33348) 2025-01-22 22:58:36 +00:00
devtest De-emphasize signed commits (#31160) 2024-12-28 04:18:30 +08:00
events Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
explore Fix bleve fuzziness search (#33078) 2025-01-03 00:32:02 +08:00
feed Add pubdate for repository rss and add some tests (#33411) 2025-01-27 23:58:46 +08:00
healthcheck Always enable caches (#28527) 2023-12-19 09:29:05 +00:00
misc Refactor template & test related code (#32938) 2024-12-22 15:33:19 +00:00
org Use project's redirect url instead of composing url (#33058) 2024-12-31 19:19:53 +08:00
repo Link to tree views of submodules if possible (#33424) 2025-01-30 00:09:52 +00:00
shared [Feature] Private README.md for organization (#32872) 2024-12-31 04:22:09 +00:00
user Refactor user & avatar (#33433) 2025-01-30 07:33:50 +08:00
base.go Prepare for support performance trace (#33286) 2025-01-15 20:05:18 +00:00
githttp.go Fix LFS route mock, realm, middleware names (#32488) 2024-11-13 16:58:09 +08:00
goget.go Make git clone URL could use current signed-in user (#33091) 2025-01-07 13:17:44 +08:00
home.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +00:00
metrics.go
nodeinfo.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
passkey.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
swagger_json.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
web.go Link to tree views of submodules if possible (#33424) 2025-01-30 00:09:52 +00:00
webfinger.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00