aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorcedricnjanga2018-05-23 17:21:03 -0700
committerJohan Van Ryseghem2018-05-29 14:41:02 +0200
commitf6c2141a1672acb7010f2e7b961e53b0e34a21cb (patch)
treed3a27c213e1c1ad2383d2dd1784e00b7df313121 /app
parent79e89af12bbc865b6defafa27dca5dafd72df3ef (diff)
downloadchouette-core-f6c2141a1672acb7010f2e7b961e53b0e34a21cb.tar.bz2
Refs #6860 Remove all call of referential_stop_areas_path & referential_stop_area_path
Diffstat (limited to 'app')
-rw-r--r--app/controllers/stop_area_copies_controller.rb2
-rw-r--r--app/views/connection_links/_connection_link.slim4
-rw-r--r--app/views/referential_stop_areas/_stop_area.html.slim4
-rw-r--r--app/views/referential_stop_areas/edit.html.slim2
-rw-r--r--app/views/referential_stop_areas/index.html.slim6
-rw-r--r--app/views/referential_stop_areas/new.html.slim2
-rw-r--r--app/views/referential_stop_areas/show.html.slim2
-rw-r--r--app/views/routing_constraint_zones/_stop_points.html.slim2
-rw-r--r--app/views/routing_constraint_zones/show.html.slim2
-rw-r--r--app/views/shared/_header.html.slim2
10 files changed, 14 insertions, 14 deletions
diff --git a/app/controllers/stop_area_copies_controller.rb b/app/controllers/stop_area_copies_controller.rb
index 992a2bb08..aaa08620e 100644
--- a/app/controllers/stop_area_copies_controller.rb
+++ b/app/controllers/stop_area_copies_controller.rb
@@ -19,7 +19,7 @@ class StopAreaCopiesController < ChouetteController
@stop_area_copy = StopAreaCopy.new(params[:stop_area_copy])
@stop_area = parent
if @stop_area_copy.save
- redirect_to referential_stop_area_path( @referential,@stop_area_copy.copy ), notice: I18n.t("stop_area_copies.new.success")
+ redirect_to stop_area_referential_stop_area_path(@stop_area.stop_area_referential, @stop_area_copy.copy), notice: I18n.t("stop_area_copies.new.success")
else
flash[:error] = I18n.t("stop_area_copies.errors.copy_aborted") + "<br>" + @stop_area_copy.errors.full_messages.join("<br>")
render :action => :new
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")