summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-10-19 08:58:06 +0100
committerPhil Hughes <me@iamphill.com>2017-10-23 10:45:44 +0100
commit389c852d1210f07d34f2235423235a8ac1cff27b (patch)
treed047054b25831706c56c6411871707dbe4af352f /app
parentfd67a20e2c83257e555a382ae775a2a65b2efadc (diff)
downloadgitlab-ce-389c852d1210f07d34f2235423235a8ac1cff27b.tar.gz
correctly creates file in currently viewed directory
specs
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/repo/components/new_dropdown/index.vue1
-rw-r--r--app/assets/javascripts/repo/index.js1
-rw-r--r--app/assets/javascripts/repo/stores/repo_store.js1
-rw-r--r--app/views/shared/repo/_repo.html.haml3
4 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/repo/components/new_dropdown/index.vue b/app/assets/javascripts/repo/components/new_dropdown/index.vue
index 864db679e82..53baa02c344 100644
--- a/app/assets/javascripts/repo/components/new_dropdown/index.vue
+++ b/app/assets/javascripts/repo/components/new_dropdown/index.vue
@@ -31,6 +31,7 @@
type="button"
class="btn btn-default dropdown-toggle add-to-tree"
data-toggle="dropdown"
+ aria-label="Create new file or directory"
>
<i
class="fa fa-plus"
diff --git a/app/assets/javascripts/repo/index.js b/app/assets/javascripts/repo/index.js
index b1b40d8b8cc..3586b5fea67 100644
--- a/app/assets/javascripts/repo/index.js
+++ b/app/assets/javascripts/repo/index.js
@@ -28,6 +28,7 @@ function setInitialStore(data) {
Store.service = Service;
Store.service.url = data.url;
Store.service.refsUrl = data.refsUrl;
+ Store.path = data.currentPath;
Store.projectId = data.projectId;
Store.projectName = data.projectName;
Store.projectUrl = data.projectUrl;
diff --git a/app/assets/javascripts/repo/stores/repo_store.js b/app/assets/javascripts/repo/stores/repo_store.js
index f4ab80b2c98..530c725ceb6 100644
--- a/app/assets/javascripts/repo/stores/repo_store.js
+++ b/app/assets/javascripts/repo/stores/repo_store.js
@@ -38,6 +38,7 @@ const RepoStore = {
newMrTemplateUrl: '',
branchChanged: false,
commitMessage: '',
+ path: '',
loading: {
tree: false,
blob: false,
diff --git a/app/views/shared/repo/_repo.html.haml b/app/views/shared/repo/_repo.html.haml
index 7185f5bcc5b..7861f92b33f 100644
--- a/app/views/shared/repo/_repo.html.haml
+++ b/app/views/shared/repo/_repo.html.haml
@@ -7,4 +7,5 @@
blob_url: namespace_project_blob_path(project.namespace, project, '{{branch}}'),
new_mr_template_url: namespace_project_new_merge_request_path(project.namespace, project, merge_request: { source_branch: '{{source_branch}}' }),
can_commit: (!!can_push_branch?(project, @ref)).to_s,
- on_top_of_branch: (!!on_top_of_branch?(project, @ref)).to_s } }
+ on_top_of_branch: (!!on_top_of_branch?(project, @ref)).to_s,
+ current_path: @path } }