diff options
| author | Xinhui | 2017-10-19 16:45:19 +0200 |
|---|---|---|
| committer | Xinhui | 2017-10-19 16:45:19 +0200 |
| commit | a8f4fbe9d16984fbdf2cd769b7abe4f442b56688 (patch) | |
| tree | 603a374aed50b053f4e8700f82a7202dfe385acf | |
| parent | dec856b3dd2f5fc2a5ceb11f936967683efd9d89 (diff) | |
| download | chouette-core-a8f4fbe9d16984fbdf2cd769b7abe4f442b56688.tar.bz2 | |
Breadcrumb for line_referential - stop_area_referential - companies
| -rw-r--r-- | app/controllers/companies_controller.rb | 2 | ||||
| -rw-r--r-- | app/views/companies/index.html.slim | 1 | ||||
| -rw-r--r-- | app/views/companies/show.html.slim | 1 | ||||
| -rw-r--r-- | app/views/line_referentials/show.html.slim | 1 | ||||
| -rw-r--r-- | app/views/stop_area_referentials/show.html.slim | 3 | ||||
| -rw-r--r-- | config/breadcrumbs.rb | 17 |
6 files changed, 22 insertions, 3 deletions
diff --git a/app/controllers/companies_controller.rb b/app/controllers/companies_controller.rb index cf27c39cf..e5d73e95f 100644 --- a/app/controllers/companies_controller.rb +++ b/app/controllers/companies_controller.rb @@ -22,8 +22,6 @@ class CompaniesController < BreadcrumbController format.json { @companies = decorate_companies(@companies) } - - build_breadcrumb :index end end diff --git a/app/views/companies/index.html.slim b/app/views/companies/index.html.slim index dad905c60..ba061f505 100644 --- a/app/views/companies/index.html.slim +++ b/app/views/companies/index.html.slim @@ -1,3 +1,4 @@ +- breadcrumb :companies, @line_referential / PageHeader = pageheader 'transporteur', t('companies.index.title'), diff --git a/app/views/companies/show.html.slim b/app/views/companies/show.html.slim index 4fb437115..668226938 100644 --- a/app/views/companies/show.html.slim +++ b/app/views/companies/show.html.slim @@ -1,3 +1,4 @@ +- breadcrumb :company, @company / PageHeader = pageheader 'transporteur', @company.name, diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim index d2527f360..b98e9d5bb 100644 --- a/app/views/line_referentials/show.html.slim +++ b/app/views/line_referentials/show.html.slim @@ -1,3 +1,4 @@ +- breadcrumb :line_referential, @line_referential / PageHeader = pageheader 'synchro-ilico', t('.title'), diff --git a/app/views/stop_area_referentials/show.html.slim b/app/views/stop_area_referentials/show.html.slim index dc90def50..896ce756e 100644 --- a/app/views/stop_area_referentials/show.html.slim +++ b/app/views/stop_area_referentials/show.html.slim @@ -1,10 +1,11 @@ +- breadcrumb :stop_area_referential, @stop_area_referential / PageHeader = pageheader 'synchro-icar', t('.title'), 'Lorem ipsum dolor sit amet', t('last_update', time: l(@stop_area_referential.updated_at, format: :short)), link_to(t('actions.sync'), sync_stop_area_referential_path(@stop_area_referential), method: :post, class: 'btn btn-default') do - + .row.mb-md .col-lg-12.text-right = link_to stop_area_referential_stop_areas_path(@stop_area_referential), class: 'btn btn-primary' do diff --git a/config/breadcrumbs.rb b/config/breadcrumbs.rb index e0d499931..41c87cc29 100644 --- a/config/breadcrumbs.rb +++ b/config/breadcrumbs.rb @@ -59,6 +59,23 @@ crumb :compliance_control do |compliance_control| parent :compliance_control_set, compliance_control.compliance_control_set end +crumb :stop_area_referential do |stop_area_referential| + link I18n.t('stop_area_referentials.show.title'), stop_area_referential_path(stop_area_referential) +end + +crumb :line_referential do |line_referential| + link I18n.t('line_referentials.show.title'), line_referential_path(line_referential) +end + +crumb :companies do |line_referential| + link I18n.t('companies.index.title'), line_referential_companies_path + parent :line_referential, line_referential +end + +crumb :company do |company| + link company.name, line_referential_company_path(company.line_referential, company) + parent :companies, company.line_referential +end # crumb :compliance_controls do|compliance_control_sets| # link # parent :compliance_control_sets, compliance_control_sets |
