OSDN Git Service

Check if a file is editied "on" a branch or a commit.
authorJohannes Schleifenbaum <johannes@js-webcoding.de>
Wed, 30 Oct 2013 10:20:43 +0000 (11:20 +0100)
committerJohannes Schleifenbaum <johannes@js-webcoding.de>
Wed, 30 Oct 2013 10:34:26 +0000 (11:34 +0100)
commitcc505f550da83b2073adb168bcca620f656a076b
tree21dda30dfb8b36baf57b529361210c05eada66a0
parentee0e9830c1c1e4c54fd0b18fadef50f76c3680a4
Check if a file is editied "on" a branch or a commit.

The previous behavior was a "disabled" link, which was still clickable
and linked to the edit file action.

If the  user accesses a path like "/edit/master/README" show the file
edit form (just like before).

If the user accesses a path like
"/edit/8d5c1f375ce99e5df84e26b0eafbf1448c6a001e/README", redirect the
user to the file detail page with a note, that he cannot edit a file
"on" a commit.

fixes #5482
app/controllers/projects/edit_tree_controller.rb
app/views/projects/blob/_actions.html.haml