From f6c2141a1672acb7010f2e7b961e53b0e34a21cb Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Wed, 23 May 2018 17:21:03 -0700 Subject: Refs #6860 Remove all call of referential_stop_areas_path & referential_stop_area_path --- app/views/connection_links/_connection_link.slim | 4 ++-- app/views/referential_stop_areas/_stop_area.html.slim | 4 ++-- app/views/referential_stop_areas/edit.html.slim | 2 +- app/views/referential_stop_areas/index.html.slim | 6 +++--- app/views/referential_stop_areas/new.html.slim | 2 +- app/views/referential_stop_areas/show.html.slim | 2 +- app/views/routing_constraint_zones/_stop_points.html.slim | 2 +- app/views/routing_constraint_zones/show.html.slim | 2 +- app/views/shared/_header.html.slim | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) (limited to 'app/views') diff --git a/app/views/connection_links/_connection_link.slim b/app/views/connection_links/_connection_link.slim index 44ed5093f..9de04ba12 100644 --- a/app/views/connection_links/_connection_link.slim +++ b/app/views/connection_links/_connection_link.slim @@ -20,14 +20,14 @@ = t('.from') - if connection_link.departure.present? - = link_to_if connection_link.departure, truncate(connection_link.departure.name, :length => 15) , referential_stop_area_path(@referential, connection_link.departure), :title => "#{connection_link.human_attribute_name('departure')} #{connection_link.departure.name}" + = link_to_if connection_link.departure, truncate(connection_link.departure.name, :length => 15) , stop_area_referential_stop_area_path(connection_link.departure.stop_area_referential, connection_link.departure), :title => "#{connection_link.human_attribute_name('departure')} #{connection_link.departure.name}" - else = connection_link.human_attribute_name('undefined') = t('.to') - if connection_link.arrival.present? - = link_to_if( connection_link.arrival, truncate(connection_link.arrival.name, :length => 15), referential_stop_area_path(@referential, connection_link.arrival), :title => "#{connection_link.human_attribute_name('arrival')} #{connection_link.arrival.name}" ) + = link_to_if( connection_link.arrival, truncate(connection_link.arrival.name, :length => 15), stop_area_referential_stop_area_path(connection_link.arrival.stop_area_referential, connection_link.arrival), :title => "#{connection_link.human_attribute_name('arrival')} #{connection_link.arrival.name}" ) - else = connection_link.human_attribute_name("undefined") p diff --git a/app/views/referential_stop_areas/_stop_area.html.slim b/app/views/referential_stop_areas/_stop_area.html.slim index bb9ed7ce3..e4dfe63fa 100644 --- a/app/views/referential_stop_areas/_stop_area.html.slim +++ b/app/views/referential_stop_areas/_stop_area.html.slim @@ -3,11 +3,11 @@ .panel-title.clearfix span.pull-right - if policy(stop_area).update? - = link_to edit_referential_stop_area_path(@referential, stop_area), class: 'btn btn-default btn-sm' do + = link_to edit_stop_area_referential_stop_area_path(stop_area.stop_area_referential, stop_area), class: 'btn btn-default btn-sm' do span.fa.fa-pencil - if policy(stop_area).destroy? - = link_to referential_stop_area_path(@referential, stop_area), method: :delete, :data => {:confirm => t('stop_areas.actions.destroy_confirm')}, class: 'btn btn-danger btn-sm' do + = link_to stop_area_referential_stop_area_path(stop_area.stop_area_referential, stop_area), method: :delete, :data => {:confirm => t('stop_areas.actions.destroy_confirm')}, class: 'btn btn-danger btn-sm' do span.fa.fa-trash-o h5 diff --git a/app/views/referential_stop_areas/edit.html.slim b/app/views/referential_stop_areas/edit.html.slim index d88230b58..4641cf0be 100644 --- a/app/views/referential_stop_areas/edit.html.slim +++ b/app/views/referential_stop_areas/edit.html.slim @@ -1,3 +1,3 @@ -- breadcrumb :referential_stop_area, @referential, @stop_area +- breadcrumb :stop_area, @stop_area.stop_area_referential, @stop_area - page_header_content_for @stop_area = render 'form' diff --git a/app/views/referential_stop_areas/index.html.slim b/app/views/referential_stop_areas/index.html.slim index ad04fb02e..39073540d 100644 --- a/app/views/referential_stop_areas/index.html.slim +++ b/app/views/referential_stop_areas/index.html.slim @@ -1,6 +1,6 @@ -- breadcrumb :referential_stop_areas, @referential +- breadcrumb :stop_areas, @referential.workbench.stop_area_referential -= search_form_for @q, :url => referential_stop_areas_path(@referential), remote: true, :html => {:method => :get, class: "form-inline", :id => "search", role: "form"} do |f| += search_form_for @q, :url => stop_area_referential_stop_areas_path(@referential.workbench.stop_area_referential), remote: true, :html => {:method => :get, class: "form-inline", :id => "search", role: "form"} do |f| .panel.panel-default .panel-heading .input-group.col-md-9.col-sm-9 @@ -29,6 +29,6 @@ ul.actions - if policy(Chouette::StopArea).create? li - = link_to t('stop_areas.actions.new'), new_referential_stop_area_path(@referential), class: 'add' + = link_to t('stop_areas.actions.new'), new_stop_area_referential_stop_area_path(@referential.workbench.stop_area_referential), class: 'add' li / = link_to t('stop_areas.actions.default_geometry'), default_geometry_referential_stop_areas_path(@referential), :method => :put, :class => "calculator" diff --git a/app/views/referential_stop_areas/new.html.slim b/app/views/referential_stop_areas/new.html.slim index 9342b673b..8fbef33de 100644 --- a/app/views/referential_stop_areas/new.html.slim +++ b/app/views/referential_stop_areas/new.html.slim @@ -1,2 +1,2 @@ -- breadcrumb :referential_stop_areas, @referential +- breadcrumb :stop_areas, @referential.workbench.stop_area_referential = render 'form' diff --git a/app/views/referential_stop_areas/show.html.slim b/app/views/referential_stop_areas/show.html.slim index 06096bbaa..d464eb438 100644 --- a/app/views/referential_stop_areas/show.html.slim +++ b/app/views/referential_stop_areas/show.html.slim @@ -1,4 +1,4 @@ -- breadcrumb :referential_stop_area, @referential, @stop_area +- breadcrumb :stop_area, @stop_area.stop_area_referential, @stop_area - page_header_content_for @stop_area .page_content diff --git a/app/views/routing_constraint_zones/_stop_points.html.slim b/app/views/routing_constraint_zones/_stop_points.html.slim index 4e85ba8b2..c2da4bb2d 100644 --- a/app/views/routing_constraint_zones/_stop_points.html.slim +++ b/app/views/routing_constraint_zones/_stop_points.html.slim @@ -1,7 +1,7 @@ - stop_points.each do |stop_point| .wrapper div - = link_to referential_stop_area_path(@referential, stop_point.stop_area.id), class: 'navlink', title: "Voir l'arrĂȘt" do + = link_to stop_area_referential_stop_area_path(stop_point.stop_area.stop_are_referential, stop_point.stop_area.id), class: 'navlink', title: "Voir l'arrĂȘt" do span = stop_point.stop_area.name div diff --git a/app/views/routing_constraint_zones/show.html.slim b/app/views/routing_constraint_zones/show.html.slim index 55c952ae6..2d444fe90 100644 --- a/app/views/routing_constraint_zones/show.html.slim +++ b/app/views/routing_constraint_zones/show.html.slim @@ -19,7 +19,7 @@ name: t('.route_stop_points'), \ attribute: 'name', \ link_to: lambda do |stop_point| \ - referential_stop_area_path(@referential, stop_point.stop_area) \ + stop_area_referential_stop_area_path(stop_point.stop_area.stop_area_referential, stop_point.stop_area) \ end \ ), TableBuilderHelper::Column.new( \ diff --git a/app/views/shared/_header.html.slim b/app/views/shared/_header.html.slim index afe802b49..b59be2b08 100644 --- a/app/views/shared/_header.html.slim +++ b/app/views/shared/_header.html.slim @@ -67,7 +67,7 @@ nav.navbar.navbar-default.navbar-fixed-top role="navigation" = Referential.human_attribute_name("lines") li - = link_to referential_stop_areas_path(@referential) do + = link_to stop_area_referential_stop_areas_path(@referential.workbench.stop_area_referential) do span.badge.pull-right = @referential.stop_areas.size = Referential.human_attribute_name("stop_areas") -- cgit v1.2.3