Merge branch 'create_menu_additions' into 'master'

Add new branch and tag action to tree dropdown

Right now, creating a branch or tag is only possible on the project page dropdown or on the commits page. This merge request both actions to the tree header dropdown. Now all repository web actions are available in this one location, plus the existing ones. It makes the operations a lot more intuitive.

## Existing Tree/Repository dropdown:

![Screen_Shot_2015-12-17_at_2.38.50_PM](/uploads/4d83a4b518093ea85f0859b385abcc7c/Screen_Shot_2015-12-17_at_2.38.50_PM.png)

## New Tree/Repository dropdown:

![Screen_Shot_2015-12-17_at_2.32.28_PM](/uploads/1fc18a511774630c5078a7d5c0fbb5b6/Screen_Shot_2015-12-17_at_2.32.28_PM.png)'

See merge request !2144
This commit is contained in:
Dmitriy Zaporozhets 2015-12-18 13:08:29 +00:00
commit 08ddb8f768
1 changed files with 10 additions and 2 deletions

View File

@ -20,16 +20,24 @@
%li
= link_to namespace_project_new_blob_path(@project.namespace, @project, @id), title: 'Create file', id: 'new-file-link' do
= icon('pencil fw')
Create file
New file
%li
= link_to '#modal-upload-blob', { 'data-target' => '#modal-upload-blob', 'data-toggle' => 'modal'} do
= icon('file fw')
Upload file
%li.divider
%li
= link_to '#modal-create-new-dir', { 'data-target' => '#modal-create-new-dir', 'data-toggle' => 'modal'} do
= icon('folder fw')
New directory
%li.divider
%li
= link_to new_namespace_project_branch_path(@project.namespace, @project) do
= icon('code-fork fw')
New branch
%li
= link_to new_namespace_project_tag_path(@project.namespace, @project) do
= icon('tags fw')
New tag
- elsif !on_top_of_branch?
%li
%span.btn.btn-sm.add-to-tree.disabled.has_tooltip{title: "You can only add files when you are on a branch.", data: {container: 'body'}}