diff options
| author | Xinhui | 2017-11-24 11:48:15 +0100 |
|---|---|---|
| committer | Xinhui | 2017-11-28 12:21:33 +0100 |
| commit | f449e4652e0992fc2c02f40a78f8e9a201f45670 (patch) | |
| tree | 7148cc3e0274862709a287553ed20e54835416c3 /app | |
| parent | 27e212655aa147125b9e658aa7fa9ac714292dc5 (diff) | |
| download | chouette-core-f449e4652e0992fc2c02f40a78f8e9a201f45670.tar.bz2 | |
Refactoring pageheader for referential_companies
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/referential_companies/edit.html.slim | 3 | ||||
| -rw-r--r-- | app/views/referential_companies/index.html.slim | 12 | ||||
| -rw-r--r-- | app/views/referential_companies/new.html.slim | 2 | ||||
| -rw-r--r-- | app/views/referential_companies/show.html.slim | 11 |
4 files changed, 10 insertions, 18 deletions
diff --git a/app/views/referential_companies/edit.html.slim b/app/views/referential_companies/edit.html.slim index d191d2a37..ab233df50 100644 --- a/app/views/referential_companies/edit.html.slim +++ b/app/views/referential_companies/edit.html.slim @@ -1,4 +1,3 @@ - breadcrumb :referential_company, @referential, @company - -= title_tag t('companies.edit.title', company: @company.name) += render partial: 'layouts/navigation/page_header', locals: {object: @company} = render 'form' diff --git a/app/views/referential_companies/index.html.slim b/app/views/referential_companies/index.html.slim index 3348dc722..123c20f5e 100644 --- a/app/views/referential_companies/index.html.slim +++ b/app/views/referential_companies/index.html.slim @@ -1,12 +1,10 @@ - breadcrumb :referential_companies, @referential -/ PageHeader -= pageheader 'transporteur', - t('companies.index.title'), - '', - '', - (policy(Chouette::Company).create? ? link_to(t('companies.actions.new'), new_referential_company_path(@referential), class: 'btn btn-default') : '') +- content_for :page_header_actions do + - if policy(Chouette::Company).create? + = link_to(t('companies.actions.new'), new_referential_company_path(@referential), class: 'btn btn-default') + += render partial: 'layouts/navigation/page_header' -/ PageContent .page_content .container-fluid - if params[:q].present? or @companies.any? diff --git a/app/views/referential_companies/new.html.slim b/app/views/referential_companies/new.html.slim index 1c7fc7297..ce7b784dd 100644 --- a/app/views/referential_companies/new.html.slim +++ b/app/views/referential_companies/new.html.slim @@ -1,3 +1,3 @@ - breadcrumb :referential_companies, @referential -= title_tag t('companies.new.title') += render partial: 'layouts/navigation/page_header' = render 'form' diff --git a/app/views/referential_companies/show.html.slim b/app/views/referential_companies/show.html.slim index 0dbc3cdd0..bfc11260e 100644 --- a/app/views/referential_companies/show.html.slim +++ b/app/views/referential_companies/show.html.slim @@ -1,11 +1,5 @@ - breadcrumb :referential_company, @referential, @company -/ PageHeader -= pageheader 'transporteur', - @company.name, - 'Lorem ipsum dolor sit amet', - t('last_update', time: l(@company.updated_at, format: :short)) do - - / Below is secundary actions & optional contents (filters, ...) +- content_for :page_header_content do .row .col-lg-12.text-right.mb-sm - if policy(Chouette::Company).create? @@ -17,7 +11,8 @@ span.fa.fa-trash span = t('companies.actions.destroy') -/ PageContent += render partial: 'layouts/navigation/page_header', locals: {object: @company} + .page_content .container-fluid .row |
