summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorVinnie Okada <vokada@mrvinn.com>2015-02-19 21:07:54 -0700
committerVinnie Okada <vokada@mrvinn.com>2015-02-19 21:25:28 -0700
commit83e2a1ca12372279cf7948b4d4b3e8a11c50e428 (patch)
treec7d956af810c8dea7a1312efcfd1df0bebe1cdcf /app
parent9e9ce95d62ec4feb76c3ec238dd3189c781f40ce (diff)
downloadgitlab-ce-83e2a1ca12372279cf7948b4d4b3e8a11c50e428.tar.gz
Update path helper references
Use the path helpers for nested project resources, for Rails 4.1.9 compatibility.
Diffstat (limited to 'app')
-rw-r--r--app/views/layouts/nav/_project.html.haml4
-rw-r--r--app/views/projects/issues/index.html.haml8
-rw-r--r--app/views/projects/merge_requests/index.html.haml2
-rw-r--r--app/views/projects/merge_requests/show/_diffs.html.haml2
-rw-r--r--app/views/projects/merge_requests/show/_remove_source_branch.html.haml2
-rw-r--r--app/views/search/results/_snippet_title.html.haml2
-rw-r--r--app/views/snippets/_snippet.html.haml2
7 files changed, 11 insertions, 11 deletions
diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml
index 67e2721bb4a..4d859e817ac 100644
--- a/app/views/layouts/nav/_project.html.haml
+++ b/app/views/layouts/nav/_project.html.haml
@@ -50,7 +50,7 @@
Graphs
= nav_link(controller: :milestones) do
- = link_to project_milestones_path(@project), title: 'Milestones' do
+ = link_to namespace_project_milestones_path(@project.namespace, @project), title: 'Milestones' do
%i.fa.fa-clock-o
%span
Milestones
@@ -73,7 +73,7 @@
%span.count.merge_counter= @project.merge_requests.opened.count
= nav_link(controller: :labels) do
- = link_to project_labels_path(@project), title: 'Labels' do
+ = link_to namespace_project_labels_path(@project.namespace, @project), title: 'Labels' do
%i.fa.fa-tags
%span
Labels
diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml
index 0d0e3e3c82f..7defc8787a9 100644
--- a/app/views/projects/issues/index.html.haml
+++ b/app/views/projects/issues/index.html.haml
@@ -3,10 +3,10 @@
.pull-left
- if current_user
.hidden-xs.pull-left
- = link_to project_issues_path(@project, :atom, { private_token: current_user.private_token }), class: 'btn append-right-10' do
+ = link_to namespace_project_issues_path(@project.namespace, @project, :atom, { private_token: current_user.private_token }), class: 'btn append-right-10' do
%i.fa.fa-rss
- = form_tag project_issues_path(@project), method: :get, id: "issue_search_form", class: 'pull-left issue-search-form' do
+ = form_tag namespace_project_issues_path(@project.namespace, @project), method: :get, id: "issue_search_form", class: 'pull-left issue-search-form' do
.append-right-10.hidden-xs.hidden-sm
= search_field_tag :issue_search, params[:issue_search], { placeholder: 'Filter by title or description', class: 'form-control issue_search search-text-input input-mn-300' }
= hidden_field_tag :state, params['state']
@@ -16,7 +16,7 @@
= hidden_field_tag :label_id, params['label_id']
- if can? current_user, :write_issue, @project
- = link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "btn btn-new pull-left", title: "New Issue", id: "new_issue_link" do
+ = link_to new_namespace_project_issue_path(@project.namespace, @project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "btn btn-new pull-left", title: "New Issue", id: "new_issue_link" do
%i.fa.fa-plus
New Issue
@@ -24,7 +24,7 @@
.clearfix
.issues_bulk_update.hide
- = form_tag bulk_update_project_issues_path(@project), method: :post do
+ = form_tag bulk_update_namespace_project_issues_path(@project.namespace, @project), method: :post do
= select_tag('update[status]', options_for_select([['Open', 'open'], ['Closed', 'closed']]), prompt: "Status")
= project_users_select_tag('update[assignee_id]', placeholder: 'Assignee')
= select_tag('update[milestone_id]', bulk_update_milestone_options, prompt: "Milestone")
diff --git a/app/views/projects/merge_requests/index.html.haml b/app/views/projects/merge_requests/index.html.haml
index 35e85156951..e3b9a28033b 100644
--- a/app/views/projects/merge_requests/index.html.haml
+++ b/app/views/projects/merge_requests/index.html.haml
@@ -2,7 +2,7 @@
.append-bottom-10
.pull-right
- if can? current_user, :write_merge_request, @project
- = link_to new_project_merge_request_path(@project), class: "btn btn-new pull-left", title: "New Merge Request" do
+ = link_to new_namespace_project_merge_request_path(@project.namespace, @project), class: "btn btn-new pull-left", title: "New Merge Request" do
%i.fa.fa-plus
New Merge Request
= render 'shared/issuable_filter'
diff --git a/app/views/projects/merge_requests/show/_diffs.html.haml b/app/views/projects/merge_requests/show/_diffs.html.haml
index d361c5f579a..eb1640891e6 100644
--- a/app/views/projects/merge_requests/show/_diffs.html.haml
+++ b/app/views/projects/merge_requests/show/_diffs.html.haml
@@ -8,5 +8,5 @@
Changes view for this comparison is extremely large.
%p
You can
- = link_to "download it", project_merge_request_path(@merge_request.target_project, @merge_request, format: :diff), class: "vlink"
+ = link_to "download it", namespace_project_merge_request_path(@merge_request.target_project.namespace, @merge_request.target_project, @merge_request, format: :diff), class: "vlink"
instead.
diff --git a/app/views/projects/merge_requests/show/_remove_source_branch.html.haml b/app/views/projects/merge_requests/show/_remove_source_branch.html.haml
index 9bf6a9d081c..0a642b7e6d0 100644
--- a/app/views/projects/merge_requests/show/_remove_source_branch.html.haml
+++ b/app/views/projects/merge_requests/show/_remove_source_branch.html.haml
@@ -4,7 +4,7 @@
- elsif can_remove_branch?(@merge_request.source_project, @merge_request.source_branch) && @merge_request.merged?
.remove_source_branch_widget
%p Changes merged into #{@merge_request.target_branch}. You can remove source branch now
- = link_to project_branch_path(@merge_request.source_project, @source_branch), remote: true, method: :delete, class: "btn btn-primary btn-small remove_source_branch" do
+ = link_to namespace_project_branch_path(@merge_request.source_project.namespace, @merge_request.source_project, @source_branch), remote: true, method: :delete, class: "btn btn-primary btn-small remove_source_branch" do
%i.fa.fa-times
Remove Source Branch
diff --git a/app/views/search/results/_snippet_title.html.haml b/app/views/search/results/_snippet_title.html.haml
index f7e5ee5e20e..c414acb6a11 100644
--- a/app/views/search/results/_snippet_title.html.haml
+++ b/app/views/search/results/_snippet_title.html.haml
@@ -11,7 +11,7 @@
%small.pull-right.cgray
- if snippet_title.project_id?
- = link_to snippet_title.project.name_with_namespace, project_path(snippet_title.project)
+ = link_to snippet_title.project.name_with_namespace, namespace_project_path(snippet_title.project.namespace, snippet_title.project)
.snippet-info
= "##{snippet_title.id}"
diff --git a/app/views/snippets/_snippet.html.haml b/app/views/snippets/_snippet.html.haml
index c584dd8dfb6..5bb28664349 100644
--- a/app/views/snippets/_snippet.html.haml
+++ b/app/views/snippets/_snippet.html.haml
@@ -11,7 +11,7 @@
%small.pull-right.cgray
- if snippet.project_id?
- = link_to snippet.project.name_with_namespace, project_path(snippet.project)
+ = link_to snippet.project.name_with_namespace, namespace_project_path(snippet.project.namespace, snippet.project)
.snippet-info
= "##{snippet.id}"