Commit 08ddb8f7 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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
parents 9b9cf3bc 50ef6761
...@@ -20,16 +20,24 @@ ...@@ -20,16 +20,24 @@
%li %li
= link_to namespace_project_new_blob_path(@project.namespace, @project, @id), title: 'Create file', id: 'new-file-link' do = link_to namespace_project_new_blob_path(@project.namespace, @project, @id), title: 'Create file', id: 'new-file-link' do
= icon('pencil fw') = icon('pencil fw')
Create file New file
%li %li
= link_to '#modal-upload-blob', { 'data-target' => '#modal-upload-blob', 'data-toggle' => 'modal'} do = link_to '#modal-upload-blob', { 'data-target' => '#modal-upload-blob', 'data-toggle' => 'modal'} do
= icon('file fw') = icon('file fw')
Upload file Upload file
%li.divider
%li %li
= link_to '#modal-create-new-dir', { 'data-target' => '#modal-create-new-dir', 'data-toggle' => 'modal'} do = link_to '#modal-create-new-dir', { 'data-target' => '#modal-create-new-dir', 'data-toggle' => 'modal'} do
= icon('folder fw') = icon('folder fw')
New directory 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? - elsif !on_top_of_branch?
%li %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'}} %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'}}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment