aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/lines_controller.rb3
-rw-r--r--app/controllers/networks_controller.rb4
-rw-r--r--app/views/lines/index.html.slim1
-rw-r--r--app/views/lines/new.html.slim4
-rw-r--r--app/views/lines/show.html.slim1
-rw-r--r--app/views/networks/edit.html.slim3
-rw-r--r--app/views/networks/index.html.slim1
-rw-r--r--app/views/networks/new.html.slim3
-rw-r--r--app/views/networks/show.html.slim1
-rw-r--r--config/breadcrumbs.rb21
10 files changed, 32 insertions, 10 deletions
diff --git a/app/controllers/lines_controller.rb b/app/controllers/lines_controller.rb
index 4b6448ce8..544d56e64 100644
--- a/app/controllers/lines_controller.rb
+++ b/app/controllers/lines_controller.rb
@@ -26,7 +26,6 @@ class LinesController < BreadcrumbController
if collection.out_of_bounds?
redirect_to params.merge(:page => 1)
end
- build_breadcrumb :index
}
end
end
@@ -38,8 +37,6 @@ class LinesController < BreadcrumbController
line_referential: @line_referential,
current_organisation: current_organisation
})
-
- build_breadcrumb :show
end
end
diff --git a/app/controllers/networks_controller.rb b/app/controllers/networks_controller.rb
index 5dae1ba3f..363e56829 100644
--- a/app/controllers/networks_controller.rb
+++ b/app/controllers/networks_controller.rb
@@ -17,8 +17,6 @@ class NetworksController < BreadcrumbController
@network = @network.decorate(context: {
line_referential: line_referential
})
-
- build_breadcrumb :show
end
end
@@ -43,8 +41,6 @@ class NetworksController < BreadcrumbController
format.js {
@networks = decorate_networks(@networks)
}
-
- build_breadcrumb :index
end
end
diff --git a/app/views/lines/index.html.slim b/app/views/lines/index.html.slim
index 87c3a69e7..7e3e1cc85 100644
--- a/app/views/lines/index.html.slim
+++ b/app/views/lines/index.html.slim
@@ -1,3 +1,4 @@
+- breadcrumb :lines, @line_referential
/ PageHeader
= pageheader 'ligne',
t('lines.index.title'),
diff --git a/app/views/lines/new.html.slim b/app/views/lines/new.html.slim
index 56da24d7c..f09a4b4aa 100644
--- a/app/views/lines/new.html.slim
+++ b/app/views/lines/new.html.slim
@@ -1,3 +1,5 @@
+- breadcrumb :lines, @line_referential
+
= title_tag t('lines.new.title')
-= render 'form' \ No newline at end of file
+= render 'form'
diff --git a/app/views/lines/show.html.slim b/app/views/lines/show.html.slim
index b16b6472a..d8f236ecc 100644
--- a/app/views/lines/show.html.slim
+++ b/app/views/lines/show.html.slim
@@ -1,3 +1,4 @@
+- breadcrumb :line, @line
/ PageHeader
= pageheader 'ligne',
@line.name,
diff --git a/app/views/networks/edit.html.slim b/app/views/networks/edit.html.slim
index d4e088937..2d511e15d 100644
--- a/app/views/networks/edit.html.slim
+++ b/app/views/networks/edit.html.slim
@@ -1,3 +1,4 @@
+- breadcrumb :network, @network
= title_tag t('networks.edit.title', network: @network.name)
-= render 'form' \ No newline at end of file
+= render 'form'
diff --git a/app/views/networks/index.html.slim b/app/views/networks/index.html.slim
index 235bdebda..e498ea35f 100644
--- a/app/views/networks/index.html.slim
+++ b/app/views/networks/index.html.slim
@@ -1,3 +1,4 @@
+- breadcrumb :networks, @line_referential
/ PageHeader
= pageheader 'reseau',
t('networks.index.title'),
diff --git a/app/views/networks/new.html.slim b/app/views/networks/new.html.slim
index 7071ded33..cf04ab03f 100644
--- a/app/views/networks/new.html.slim
+++ b/app/views/networks/new.html.slim
@@ -1,3 +1,4 @@
+- breadcrumb :networks, @line_referential
= title_tag t('networks.new.title')
-= render 'form' \ No newline at end of file
+= render 'form'
diff --git a/app/views/networks/show.html.slim b/app/views/networks/show.html.slim
index d237351c4..9b2a0dbf8 100644
--- a/app/views/networks/show.html.slim
+++ b/app/views/networks/show.html.slim
@@ -1,3 +1,4 @@
+- breadcrumb :network, @network
/ PageHeader
= pageheader 'reseau',
@network.name,
diff --git a/config/breadcrumbs.rb b/config/breadcrumbs.rb
index 41c87cc29..7b7a38058 100644
--- a/config/breadcrumbs.rb
+++ b/config/breadcrumbs.rb
@@ -76,6 +76,27 @@ crumb :company do |company|
link company.name, line_referential_company_path(company.line_referential, company)
parent :companies, company.line_referential
end
+
+crumb :networks do |line_referential|
+ link I18n.t('networks.index.title'), line_referential_networks_path
+ parent :line_referential, line_referential
+end
+
+crumb :network do |network|
+ link network.name, line_referential_network_path(network.line_referential, network)
+ parent :networks, network.line_referential
+end
+
+crumb :lines do |line_referential|
+ link I18n.t('lines.index.title'), line_referential_lines_path
+ parent :line_referential, line_referential
+end
+
+crumb :line do |line|
+ link line.name, line_referential_line_path(line.line_referential, line)
+ parent :lines, line.line_referential
+end
+
# crumb :compliance_controls do|compliance_control_sets|
# link
# parent :compliance_control_sets, compliance_control_sets