Commit 83e2a1ca authored by Vinnie Okada's avatar Vinnie Okada

Update path helper references

Use the path helpers for nested project resources, for Rails 4.1.9
compatibility.
parent 9e9ce95d
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
Graphs Graphs
= nav_link(controller: :milestones) do = 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 %i.fa.fa-clock-o
%span %span
Milestones Milestones
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
%span.count.merge_counter= @project.merge_requests.opened.count %span.count.merge_counter= @project.merge_requests.opened.count
= nav_link(controller: :labels) do = 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 %i.fa.fa-tags
%span %span
Labels Labels
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
.pull-left .pull-left
- if current_user - if current_user
.hidden-xs.pull-left .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 %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 .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' } = 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'] = hidden_field_tag :state, params['state']
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
= hidden_field_tag :label_id, params['label_id'] = hidden_field_tag :label_id, params['label_id']
- if can? current_user, :write_issue, @project - 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 %i.fa.fa-plus
New Issue New Issue
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
.clearfix .clearfix
.issues_bulk_update.hide .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") = select_tag('update[status]', options_for_select([['Open', 'open'], ['Closed', 'closed']]), prompt: "Status")
= project_users_select_tag('update[assignee_id]', placeholder: 'Assignee') = project_users_select_tag('update[assignee_id]', placeholder: 'Assignee')
= select_tag('update[milestone_id]', bulk_update_milestone_options, prompt: "Milestone") = select_tag('update[milestone_id]', bulk_update_milestone_options, prompt: "Milestone")
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.append-bottom-10 .append-bottom-10
.pull-right .pull-right
- if can? current_user, :write_merge_request, @project - 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 %i.fa.fa-plus
New Merge Request New Merge Request
= render 'shared/issuable_filter' = render 'shared/issuable_filter'
......
...@@ -8,5 +8,5 @@ ...@@ -8,5 +8,5 @@
Changes view for this comparison is extremely large. Changes view for this comparison is extremely large.
%p %p
You can 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. instead.
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
- elsif can_remove_branch?(@merge_request.source_project, @merge_request.source_branch) && @merge_request.merged? - elsif can_remove_branch?(@merge_request.source_project, @merge_request.source_branch) && @merge_request.merged?
.remove_source_branch_widget .remove_source_branch_widget
%p Changes merged into #{@merge_request.target_branch}. You can remove source branch now %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 %i.fa.fa-times
Remove Source Branch Remove Source Branch
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
%small.pull-right.cgray %small.pull-right.cgray
- if snippet_title.project_id? - 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-info
= "##{snippet_title.id}" = "##{snippet_title.id}"
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
%small.pull-right.cgray %small.pull-right.cgray
- if snippet.project_id? - 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-info
= "##{snippet.id}" = "##{snippet.id}"
......
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