diff options
Diffstat (limited to 'app/views/time_tables')
| -rw-r--r-- | app/views/time_tables/edit.html.slim | 8 | ||||
| -rw-r--r-- | app/views/time_tables/index.html.slim | 9 | ||||
| -rw-r--r-- | app/views/time_tables/new.html.slim | 7 | ||||
| -rw-r--r-- | app/views/time_tables/show.html.slim | 16 | 
4 files changed, 13 insertions, 27 deletions
diff --git a/app/views/time_tables/edit.html.slim b/app/views/time_tables/edit.html.slim index a1ebb2c72..e1c566ff4 100644 --- a/app/views/time_tables/edit.html.slim +++ b/app/views/time_tables/edit.html.slim @@ -1,11 +1,7 @@  - breadcrumb :time_table, @referential, @time_table -/ PageHeader -= pageheader 'calendrier-application', -             @time_table.comment, -             '', -             '' +- page_header_content_for @time_table +- content_for :page_header_title, t('time_tables.show.title', name: @time_table.comment), flush: true -/ PageContent  .page_content    .container-fluid      #periods diff --git a/app/views/time_tables/index.html.slim b/app/views/time_tables/index.html.slim index edbf89c43..b684b0bcb 100644 --- a/app/views/time_tables/index.html.slim +++ b/app/views/time_tables/index.html.slim @@ -1,11 +1,8 @@  - breadcrumb :time_tables, @referential -/ PageHeader -= pageheader 'calendrier-application', -             t('time_tables.index.title'), -             '', -             ((policy(Chouette::TimeTable).create? && @referential.organisation == current_organisation) ? link_to(t('actions.add'), new_referential_time_table_path(@referential), class: 'btn btn-default') : '') +- content_for :page_header_actions do +  - if (policy(Chouette::TimeTable).create? && @referential.organisation == current_organisation) +    = link_to(t('actions.add'), new_referential_time_table_path(@referential), class: 'btn btn-default') -/ PageContent  .page_content    .container-fluid      .row diff --git a/app/views/time_tables/new.html.slim b/app/views/time_tables/new.html.slim index c8c2658ba..ddb34e0b7 100644 --- a/app/views/time_tables/new.html.slim +++ b/app/views/time_tables/new.html.slim @@ -1,11 +1,4 @@  - breadcrumb :time_tables, @referential -/ PageHeader -= pageheader 'calendrier-application', -             t("time_tables.#{params[:action]}.title"), -             '', -             '' - -/ PageContent  .page_content    .container-fluid      .row diff --git a/app/views/time_tables/show.html.slim b/app/views/time_tables/show.html.slim index 85de7f8ec..036581268 100644 --- a/app/views/time_tables/show.html.slim +++ b/app/views/time_tables/show.html.slim @@ -1,14 +1,14 @@  - require 'calendar_helper'  - breadcrumb :time_table, @referential, @time_table -/ PageHeader +- page_header_content_for @time_table -= pageheader 'calendrier-application', -             @time_table.comment, -             '', -             t('last_update', time: l(@time_table.updated_at, format: :short)), -             (policy(@time_table).edit? ? link_to(t('actions.edit'), edit_referential_time_table_path(@referential, @time_table), class: 'btn btn-default') : '') +- content_for :page_header_title, t('time_tables.show.title', name: @time_table.comment), flush: true -  / Below is secundary actions & optional contents (filters, ...) +- content_for :page_header_actions do +  - if policy(@time_table).edit? +    = link_to(t('actions.edit'), edit_referential_time_table_path(@referential, @time_table), class: 'btn btn-default') + +- content_for :page_header_content do    .row.mb-sm      .col-lg-12.text-right        - @time_table.action_links.each do |link| @@ -18,7 +18,7 @@              class: 'btn btn-primary' do                = link.content -/ PageContent +  .page_content    .container-fluid      .row  | 
