gitlab-org--gitlab-foss/app/helpers
Dmitriy Zaporozhets 76b7e24f85 Merge branch 'edit-on-fork' into 'master'
Automatically fork a project when not allowed to edit a file.

Fixes #3215.

To do:

- [ ] Add tests

-----

## "Edit" button on file in a project the user does NOT have write access to

![edit_file](/uploads/7602157420768aef483a6586bba2d164/edit_file.png)

## Clicking will automatically create a fork

![during_fork](/uploads/32f4f5dff9f24ea99522000b0bf881c5/during_fork.png)

## When the fork has been created, the user is returned to the edit page on the original project with a notice

![edit_notice](/uploads/94ed1319404370ff1e9c0d672fb41e03/edit_notice.png)

## The user cannot change the target branch and is informed that editing will start an MR

![edit_footer](/uploads/4da68d4795c7177e575b7c434d16eeae/edit_footer.png)

## Hitting "Commit changes" will commit and start an MR from my fork to the origin project

![Screen_Shot_2015-12-17_at_23.38.08](/uploads/d777a4db6f38a5a1be84031694465bc1/Screen_Shot_2015-12-17_at_23.38.08.png)

-----

## "Create file, "Upload file" and "New directory" buttons in a project the user does NOT have write access to

![new_directory](/uploads/72f556248f30d6652523bbb4be01b3e0/new_directory.png)

## Clicking any of these options will automatically create a fork

![during_fork](/uploads/32f4f5dff9f24ea99522000b0bf881c5/during_fork.png)

## When the fork has been created, the user is returned to the tree page on the original project with a notice

![new_directory_notice](/uploads/a1a3e11308ae0e8f0913fae6813a37ed/new_directory_notice.png)

## Clicking "New directory" again will show the modal. The user cannot change the target branch and is informed that editing will start an MR

![new_dir](/uploads/99ca8cbfb2f70603e352b3fdf67b6281/new_dir.png)

## Hitting "Create directory" will commit and start an MR from my fork to the origin project

![Screen_Shot_2015-12-17_at_23.39.19](/uploads/3713d0235abf831361b803a6198c5bc1/Screen_Shot_2015-12-17_at_23.39.19.png)

cc @dzaporozhets @skyruler

See merge request !2145
2015-12-24 12:24:57 +00:00
..
appearances_helper.rb
application_helper.rb Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-12-16 14:24:32 +01:00
application_settings_helper.rb
auth_helper.rb
blob_helper.rb Fix specs and behavior for LFS files 2015-12-18 16:14:12 +01:00
branches_helper.rb Default target branch to patch-n when editing file in protected branch 2015-12-08 16:42:10 +01:00
broadcast_messages_helper.rb
button_helper.rb Fix clipboard buttons on MR instructions and Commit#show 2015-12-15 16:11:01 -05:00
ci_badge_helper.rb Update badge 2015-12-11 18:02:09 +01:00
ci_status_helper.rb Merge remote-tracking branch 'origin/rs-simplify-status-icon' 2015-12-16 19:19:07 +01:00
commits_helper.rb Brefer "Directory" over "Dir", "Files" over "Code 2015-12-02 14:56:17 +01:00
compare_helper.rb
dashboard_helper.rb
diff_helper.rb Truncate submodule commit SHAs to 7 characters 2015-12-02 14:53:20 +01:00
emails_helper.rb
events_helper.rb
explore_helper.rb
external_wiki_helper.rb Fixed Rubocop offenses 2015-12-15 00:53:52 -02:00
git_helper.rb
gitlab_markdown_helper.rb Merge remote-tracking branch 'origin/feature/update-rubocop' 2015-12-16 13:44:50 +01:00
gitlab_routing_helper.rb Ensure "Remove Source Branch" button is not shown when branch is being deleted. #3583 2015-12-04 10:43:33 -05:00
graph_helper.rb Migrate CI::Project to Project 2015-12-11 18:02:09 +01:00
groups_helper.rb
icons_helper.rb
issues_helper.rb Emoji picker: better alias handling 2015-12-24 11:28:55 +02:00
labels_helper.rb Banzai::XFilter -> Banzai::Filter::XFilter 2015-12-15 16:10:32 +01:00
merge_requests_helper.rb ci_build_details_path should return nil if builds_page result is nil 2015-12-22 00:28:36 +01:00
milestones_helper.rb sort milestones by due_date 2015-12-03 08:53:34 -06:00
namespaces_helper.rb
nav_helper.rb
notes_helper.rb
notifications_helper.rb
page_layout_helper.rb Separate page title segments by middot rather than pipe 2015-12-02 14:57:51 +01:00
preferences_helper.rb
projects_helper.rb Fix and test leave project display 2015-12-21 15:58:42 -06:00
runners_helper.rb Migrate CI::Project to Project 2015-12-11 18:02:09 +01:00
search_helper.rb
selects_helper.rb Merge branch 'master' into ui/dashboard-new-issue 2015-12-07 17:12:29 +01:00
snippets_helper.rb
sorting_helper.rb
submodule_helper.rb
tab_helper.rb
tags_helper.rb
time_helper.rb
tree_helper.rb Automatically fork a project when not allowed to edit a file. 2015-12-18 10:03:34 +01:00
triggers_helper.rb Reimplement Trigger API 2015-12-11 18:02:09 +01:00
version_check_helper.rb
visibility_level_helper.rb Merge branch 'master' into fix/visibility-level-setting-in-forked-projects 2015-12-21 13:27:34 +01:00