gitea/templates/repo
Brecht Van Lommel a46b16f10f
Edit file workflow for creating a fork and proposing changes (#34240)
When viewing a file that the user can't edit because they can't write to
the branch, the new, upload, patch, edit and delete functionality is no
longer disabled.

If no user fork of the repository exists, there is now a page to create one.
It will automatically create a fork with a single branch matching the one
being viewed, and a unique repository name will be automatically picked.

When a fork exists, but it's archived, a mirror or the user can't write
code to it, there will instead be a message explaining the situation.

If the usable fork exists, a message will appear at the top of the edit page
explaining that the changes will be applied to a branch in the fork. The
base repository branch will be pushed to a new branch to the fork, and
then the edits will be applied on top.

The suggestion to fork happens when accessing /_edit/, so that for
example online documentation can have an "edit this page" link to
the base repository that does the right thing.

Also includes changes to properly report errors when trying to commit
to a new branch that is protected, and when trying to commit to an
existing branch when choosing the new branch option.

Resolves #9017, #20882

---------

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-22 12:43:43 +00:00
..
actions Fix commit message rendering and some UI problems (#34680) 2025-06-10 23:20:32 +08:00
branch Refactor commit message rendering and fix bugs (#34412) 2025-05-09 20:42:35 +08:00
cite Fix Citation modal responsiveness and clipboard copy (#29799) 2024-03-15 02:38:13 +00:00
code Auto expand "New PR" form (#33971) 2025-03-24 14:28:02 +00:00
diff Allow renaming/moving binary/LFS files in the UI (#34350) 2025-06-16 17:15:07 -07:00
editor Edit file workflow for creating a fork and proposing changes (#34240) 2025-06-22 12:43:43 +00:00
find Fix word overflow in file search page (#32695) 2024-12-03 16:52:25 +00:00
graph Refactor commit message rendering and fix bugs (#34412) 2025-05-09 20:42:35 +08:00
issue Improve img lazy loading (#34804) 2025-06-21 14:53:22 +08:00
migrate Misc CSS fixes (#34638) 2025-06-07 19:57:07 +02:00
projects Add fullscreen mode as a more efficient operation way to view projects (#34081) 2025-04-23 13:42:22 +08:00
pulls Prevent duplicate form submissions when creating forks (#34714) 2025-06-16 04:19:16 +00:00
release Fix ghost user in feeds when pushing in an actions, it should be gitea-actions (#34703) 2025-06-17 23:44:35 +00:00
settings Improve img lazy loading (#34804) 2025-06-21 14:53:22 +08:00
tag Fix some trivial problems (#34237) 2025-04-18 22:56:50 +08:00
wiki Refactor wiki (#34805) 2025-06-22 18:53:33 +08:00
activity.tmpl
blame.tmpl Fix incorrect file links (#34189) 2025-04-13 12:27:31 -07:00
branch_dropdown.tmpl Fix button alignments (#34276) 2025-04-27 19:39:03 +00:00
clone_buttons.tmpl Rearrange Clone Panel (#31142) 2024-12-11 21:54:30 +08:00
clone_panel.tmpl Fix button alignments and remove unnecessary styles (#34206) 2025-04-16 08:14:10 +00:00
code_frequency.tmpl Refactor web routes (#30519) 2024-04-17 08:31:37 +00:00
commit_load_branches_and_tags.tmpl Migrate `gt-hidden` to `tw-hidden` (#30046) 2024-03-24 18:23:38 +00:00
commit_page.tmpl Improve alignment of commit status icon on commit page (#34750) 2025-06-18 02:14:11 +00:00
commit_sign_badge.tmpl Do not show unnecessary commit sign lock icon (#33387) 2025-01-25 19:32:35 +08:00
commit_status.tmpl Fix actions skipped commit status indicator (#34507) 2025-05-28 11:36:21 -04:00
commit_statuses.tmpl [Fix] Resolve the problem of commit_statuses not being loaded at the top - right when switching files from the file tree (#34079) 2025-03-31 18:39:08 +00:00
commits.tmpl Simplify context ref name (#33267) 2025-01-15 11:15:47 +08:00
commits_list.tmpl Refactor commit message rendering and fix bugs (#34412) 2025-05-09 20:42:35 +08:00
commits_list_small.tmpl Refactor commit message rendering and fix bugs (#34412) 2025-05-09 20:42:35 +08:00
commits_search_dropdown.tmpl Unify search boxes (#29530) 2024-03-14 23:24:59 +00:00
commits_table.tmpl Refactor context repository (#33202) 2025-01-12 03:39:46 +00:00
contributors.tmpl Add "n commits" link to contributors in contributors graph page (#32799) 2024-12-12 19:02:54 +00:00
create.tmpl Refactor dropdown ellipsis (#34123) 2025-04-05 03:21:11 +00:00
create_helper.tmpl
empty.tmpl Fix some trivial problems (#34579) 2025-06-02 15:22:43 +00:00
file_info.tmpl Use lfs label for lfs file rather than a long description (#34363) 2025-05-05 00:07:29 +03:00
forks.tmpl Forks repository list page follow other repositories page (#34784) 2025-06-21 12:27:25 -07:00
graph.tmpl Fix button alignments and remove unnecessary styles (#34206) 2025-04-16 08:14:10 +00:00
header.tmpl ui: add a default tab on repo header when migrating (#34503) 2025-05-20 11:14:18 -04:00
home.tmpl Add file tree to file view page (#32721) 2025-03-15 16:26:49 +08:00
home_sidebar_bottom.tmpl Fix releases sidebar navigation link (#34436) 2025-05-12 16:10:40 -04:00
home_sidebar_top.tmpl Fix incorrect file links (#34189) 2025-04-13 12:27:31 -07:00
icon.tmpl Fix various trivial frontend problems (#34263) 2025-04-24 09:11:54 +08:00
latest_commit.tmpl Refactor commit message rendering and fix bugs (#34412) 2025-05-09 20:42:35 +08:00
navbar.tmpl Add anonymous access support for private/unlisted repositories (#34051) 2025-03-29 13:26:41 +08:00
packages.tmpl
pulse.tmpl Fix various misalignments and overflows (#34227) 2025-04-17 10:32:41 +00:00
recent_commits.tmpl Refactor web routes (#30519) 2024-04-17 08:31:37 +00:00
release_tag_header.tmpl Fix button alignments and remove unnecessary styles (#34206) 2025-04-16 08:14:10 +00:00
search.tmpl Unify search boxes (#29530) 2024-03-14 23:24:59 +00:00
search_name.tmpl
star_unstar.tmpl Fix various trivial frontend problems (#34263) 2025-04-24 09:11:54 +08:00
sub_menu.tmpl Repo homepage styling tweaks (#33289) 2025-01-24 17:35:28 +00:00
unicode_escape_prompt.tmpl Refactor wiki (#34805) 2025-06-22 18:53:33 +08:00
upload.tmpl
user_cards.tmpl Update the list of watchers and stargazers when clicking watch/unwatch or star/unstar (#32570) 2024-11-22 18:51:51 +00:00
view.tmpl Fix "The sidebar of the repository file list does not have a fixed height #34298" (#34321) 2025-05-07 21:33:30 +00:00
view_content.tmpl Edit file workflow for creating a fork and proposing changes (#34240) 2025-06-22 12:43:43 +00:00
view_file.tmpl Fix readme path and markdown link paste (#34755) 2025-06-18 04:19:54 +00:00
view_file_tree.tmpl Fix file tree issues (#33916) 2025-03-17 14:55:15 +00:00
view_list.tmpl Refactor commit message rendering and fix bugs (#34412) 2025-05-09 20:42:35 +08:00
watch_unwatch.tmpl Fix various trivial frontend problems (#34263) 2025-04-24 09:11:54 +08:00
watchers.tmpl