diff options
| author | Luc Donnet | 2018-04-19 09:46:33 +0200 | 
|---|---|---|
| committer | GitHub | 2018-04-19 09:46:33 +0200 | 
| commit | ca0a4907e5714d6f56ede8d47f2514cdd2752e2f (patch) | |
| tree | 6f25b8c1b916c0fb9408ca5471ea89fb7799baa2 | |
| parent | 3396dfd379d5e9f0145b8b40414f0751c2657759 (diff) | |
| parent | e6c6fb7e7544d840bec4d84f8249ed9d5c01661c (diff) | |
| download | chouette-core-ca0a4907e5714d6f56ede8d47f2514cdd2752e2f.tar.bz2 | |
Merge pull request #500 from af83/6545-add_generic_navbar
6545 add generic navbar
| -rw-r--r-- | app/controllers/application_controller.rb | 12 | ||||
| -rw-r--r-- | app/views/layouts/application.html.slim | 6 | ||||
| -rw-r--r-- | app/views/layouts/devise.html.slim | 28 | ||||
| -rw-r--r-- | app/views/layouts/navigation/_main_nav.html.slim | 6 | ||||
| -rw-r--r-- | app/views/layouts/navigation/_main_nav_left_content.html.slim | 137 | ||||
| -rw-r--r-- | app/views/layouts/navigation/_main_nav_left_content_stif.html.slim | 220 | ||||
| -rw-r--r-- | app/views/line_referentials/show.html.slim | 1 | ||||
| -rw-r--r-- | config/locales/layouts.en.yml | 2 | ||||
| -rw-r--r-- | config/locales/merges.en.yml | 23 | ||||
| -rw-r--r-- | config/locales/merges.fr.yml (renamed from config/locales/merges.yml) | 0 | ||||
| -rw-r--r-- | config/locales/stop_area_referentials.en.yml | 5 | ||||
| -rw-r--r-- | config/locales/stop_area_referentials.fr.yml | 3 | ||||
| -rw-r--r-- | spec/views/line_referentials/show.html.slim_spec.rb | 2 | ||||
| -rw-r--r-- | spec/views/stop_area_referentials/show.html.slim_spec.rb (renamed from spec/views/line_referentials/stop_area_referentials/show.html.slim_spec.rb) | 2 | 
14 files changed, 228 insertions, 219 deletions
| diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8b66e6097..7f071a6a4 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -12,6 +12,7 @@ class ApplicationController < ActionController::Base    # Load helpers in rails engine    helper LanguageEngine::Engine.helpers +  layout :layout_by_resource    def set_locale      # I18n.locale = session[:language] || I18n.default_locale @@ -56,4 +57,15 @@ class ApplicationController < ActionController::Base    def after_sign_out_path_for(resource_or_scope)      new_user_session_path    end + +  private + +  def layout_by_resource +    if devise_controller? +      "devise" +    else +      "application" +    end +  end +  end diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim index 3921c8701..abf39c089 100644 --- a/app/views/layouts/application.html.slim +++ b/app/views/layouts/application.html.slim @@ -17,7 +17,11 @@ html lang=I18n.locale        | I18n.locale = '#{I18n.locale}'    body -    = render 'layouts/navigation/main_nav' +    nav#main_nav +      // Left menu content +      = render 'layouts/navigation/main_nav_left' +      // Top menu content +      = render 'layouts/navigation/main_nav_top'      = render 'layouts/flash_messages', flash: flash      = render 'layouts/navigation/page_header'      = yield diff --git a/app/views/layouts/devise.html.slim b/app/views/layouts/devise.html.slim new file mode 100644 index 000000000..34a3a3f11 --- /dev/null +++ b/app/views/layouts/devise.html.slim @@ -0,0 +1,28 @@ +doctype html +html lang=I18n.locale +  head +    meta charset="utf-8" +    meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" + +    = csrf_meta_tag + +    title = t('brandname') + +    = stylesheet_link_tag 'base' +    = stylesheet_link_tag 'application' + +    = javascript_pack_tag 'application' +    = javascript_include_tag 'application' +    = javascript_tag do +      | I18n.locale = '#{I18n.locale}' + +  body +    nav#main_nav +      // Top menu content +      = render 'layouts/navigation/main_nav_top' +    = render 'layouts/flash_messages', flash: flash +    = render 'layouts/navigation/page_header' +    = yield + +    = render 'shared/development_toolbar' +    = yield :javascript diff --git a/app/views/layouts/navigation/_main_nav.html.slim b/app/views/layouts/navigation/_main_nav.html.slim deleted file mode 100644 index 806290223..000000000 --- a/app/views/layouts/navigation/_main_nav.html.slim +++ /dev/null @@ -1,6 +0,0 @@ -nav#main_nav -  // Left menu content -  = render 'layouts/navigation/main_nav_left' - -  // Top menu content -  = render 'layouts/navigation/main_nav_top' diff --git a/app/views/layouts/navigation/_main_nav_left_content.html.slim b/app/views/layouts/navigation/_main_nav_left_content.html.slim index f04d05700..0b55578a7 100644 --- a/app/views/layouts/navigation/_main_nav_left_content.html.slim +++ b/app/views/layouts/navigation/_main_nav_left_content.html.slim @@ -1,87 +1,64 @@ -- if current_organisation -  - current_organisation.workbenches.each do |workbench| -    #menu-items.panel-group -      .menu-item.panel -        .panel-heading -          h4.panel-title -            = link_to '#miOne', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do -              = t('layouts.navbar.current_offer.other') -        #miOne.panel-collapse.collapse -          .list-group -            = link_to root_path, class: "list-group-item" do -              span = t('layouts.navbar.dashboard') -            = link_to workbench_output_path(workbench), class: 'list-group-item' do -              span = t('layouts.navbar.workbench_outputs.organisation') -            = link_to '#', class: 'list-group-item disabled' do -              span = t('layouts.navbar.workbench_outputs.workgroup') +- current_organisation.workbenches.each do |workbench| +  #menu-items.panel-group +    .menu-item.panel +      .panel-heading +        h4.panel-title +          = link_to '#miOne', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do +            = t('layouts.navbar.current_offer.other') -      .menu-item.panel -        .panel-heading -          h4.panel-title -            = link_to '#miTwo', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do -              - t('activerecord.models.workbench.one').capitalize +      #miOne.panel-collapse.collapse +        .list-group +          = link_to root_path, class: "list-group-item" do +            span = t('layouts.navbar.dashboard') +          = link_to workbench_output_path(workbench), class: 'list-group-item' do +            span = t('layouts.navbar.workbench_outputs.organisation') +          = link_to '#', class: 'list-group-item disabled' do +            span = t('layouts.navbar.workbench_outputs.workgroup') -        #miTwo.panel-collapse.collapse -          .list-group -            = link_to workbench_path(workbench), class: "list-group-item" do -              span = t('activerecord.models.referential.other').capitalize -            = link_to workbench_imports_path(workbench), class: "list-group-item" do -              span = t('activerecord.models.import.other').capitalize -            = link_to workbench_exports_path(workbench), class: "list-group-item" do -              span = t('activerecord.models.export.other').capitalize -            = link_to workgroup_calendars_path(workbench.workgroup), class: 'list-group-item' do -              span = t('activerecord.models.calendar.other').capitalize -            = link_to workbench_compliance_check_sets_path(workbench), class: 'list-group-item' do -              span = t('activerecord.models.compliance_check_set.other').capitalize -            = link_to compliance_control_sets_path, class: 'list-group-item' do -              span = t('activerecord.models.compliance_control_set.other').capitalize +    .menu-item.panel +      .panel-heading +        h4.panel-title +          = link_to '#miTwo', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do +            - t('activerecord.models.workbench.one').capitalize -      .menu-item.panel -        .panel-heading -          h4.panel-title -            = link_to '#miThree', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do -              = t('layouts.navbar.referential_datas') +      #miTwo.panel-collapse.collapse +        .list-group +          = link_to workbench_path(workbench), class: "list-group-item" do +            span = t('activerecord.models.referential.other').capitalize +          = link_to workbench_imports_path(workbench), class: "list-group-item" do +            span = t('activerecord.models.import.other').capitalize +          = link_to workbench_exports_path(workbench), class: "list-group-item" do +            span = t('activerecord.models.export.other').capitalize +          = link_to workgroup_calendars_path(workbench.workgroup), class: 'list-group-item' do +            span = t('activerecord.models.calendar.other').capitalize +          = link_to workbench_compliance_check_sets_path(workbench), class: 'list-group-item' do +            span = t('activerecord.models.compliance_check_set.other').capitalize +          = link_to compliance_control_sets_path, class: 'list-group-item' do +            span = t('activerecord.models.compliance_control_set.other').capitalize +             +    .menu-item.panel +      .panel-heading +        h4.panel-title +          = link_to '#miFour', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do +            = t('layouts.navbar.line_referential') -        #miThree.panel-collapse.collapse -          - if @referential.try(:id) && respond_to?(:current_referential) -            .list-group -              .list-group-item -                = (current_referential.name).upcase -                .list-group -                  = link_to referential_time_tables_path(current_referential), class: 'list-group-item' do -                    span = t('time_tables.index.title').capitalize -                  - if has_feature?(:purchase_windows) -                    = link_to referential_purchase_windows_path(current_referential), class: 'list-group-item' do -                      span = t('purchase_windows.index.title').capitalize +      #miFour.panel-collapse.collapse +        .list-group +          = link_to line_referential_lines_path(workbench.line_referential), class: "list-group-item" do +            span = Chouette::Line.t.capitalize +          = link_to line_referential_networks_path(workbench.line_referential), class: "list-group-item" do +            span = Chouette::Network.t.capitalize +          = link_to line_referential_companies_path(workbench.line_referential), class: "list-group-item" do +            span = Chouette::Company.t.capitalize -          - else -            .panel-body -              em.text-muted -                = t('layouts.navbar.select_referential_for_more_features') +    .menu-item.panel +      .panel-heading +        h4.panel-title +          = link_to '#miFive', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do +            = t('layouts.navbar.stop_area_referential') -      .menu-item.panel -        .panel-heading -          h4.panel-title -            = link_to '#miFour', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do -              = t('layouts.navbar.line_referential') - -        #miFour.panel-collapse.collapse -          .list-group -            = link_to line_referential_lines_path(workbench.line_referential), class: "list-group-item" do -              span = Chouette::Line.t.capitalize -            = link_to line_referential_networks_path(workbench.line_referential), class: "list-group-item" do -              span = Chouette::Network.t.capitalize -            = link_to line_referential_companies_path(workbench.line_referential), class: "list-group-item" do -              span = Chouette::Company.t.capitalize - -      .menu-item.panel -        .panel-heading -          h4.panel-title -            = link_to '#miFive', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do -              = t('layouts.navbar.stop_area_referential') - -        #miFive.panel-collapse.collapse -          .list-group -            = link_to stop_area_referential_stop_areas_path(workbench.stop_area_referential), class: "list-group-item" do -              span = Chouette::StopArea.t.capitalize +      #miFive.panel-collapse.collapse +        .list-group +          = link_to stop_area_referential_stop_areas_path(workbench.stop_area_referential), class: "list-group-item" do +            span = Chouette::StopArea.t.capitalize diff --git a/app/views/layouts/navigation/_main_nav_left_content_stif.html.slim b/app/views/layouts/navigation/_main_nav_left_content_stif.html.slim index 589f99ae3..9404eeae6 100644 --- a/app/views/layouts/navigation/_main_nav_left_content_stif.html.slim +++ b/app/views/layouts/navigation/_main_nav_left_content_stif.html.slim @@ -1,125 +1,95 @@ -- if current_organisation -  - current_organisation.workbenches.each do |workbench| -    #menu-items.panel-group -      .menu-item.panel -        .panel-heading -          h4.panel-title -            = link_to '#miOne', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do -              = t('layouts.navbar.current_offer.other') - -        #miOne.panel-collapse.collapse -          .list-group -            = link_to root_path, class: "list-group-item" do -              span = t('layouts.navbar.dashboard') -            = link_to workbench_output_path(workbench), class: 'list-group-item' do -              span = t('layouts.navbar.workbench_outputs.organisation') -            = link_to '#', class: 'list-group-item disabled' do -              span = t('layouts.navbar.workbench_outputs.workgroup') - -      .menu-item.panel -        .panel-heading -          h4.panel-title -            = link_to '#miTwo', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do -              - t('activerecord.models.workbench.one').capitalize - -        #miTwo.panel-collapse.collapse -          .list-group -            = link_to workbench_path(workbench), class: "list-group-item" do -              span = t('activerecord.models.referential.other').capitalize -            = link_to workbench_imports_path(workbench), class: "list-group-item" do -              span = t('activerecord.models.import.other').capitalize -            = link_to workbench_exports_path(workbench), class: "list-group-item" do -              span = t('activerecord.models.export.other').capitalize -            = link_to workgroup_calendars_path(workbench.workgroup), class: 'list-group-item' do -              span = t('activerecord.models.calendar.other').capitalize -            = link_to workbench_compliance_check_sets_path(workbench), class: 'list-group-item' do -              span = t('activerecord.models.compliance_check_set.other').capitalize -            = link_to compliance_control_sets_path, class: 'list-group-item' do -              span = t('activerecord.models.compliance_control_set.other').capitalize - -      .menu-item.panel -        .panel-heading -          h4.panel-title -            = link_to '#miThree', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do -              = Referential.ts.capitalize - -        #miThree.panel-collapse.collapse -          - if @referential.try(:id) && respond_to?(:current_referential) -            .list-group -              .list-group-item -                = (current_referential.name).upcase -                .list-group -                  = link_to referential_networks_path(current_referential), class: 'list-group-item' do -                    span = t('networks.index.title') - -                  = link_to referential_companies_path(current_referential), class: 'list-group-item' do -                    span = t('companies.index.title') - -                  = link_to '#', class: 'list-group-item disabled' do -                    span = t('layouts.navbar.shapes') - -                  = link_to referential_time_tables_path(current_referential), class: 'list-group-item' do -                    span = t('time_tables.index.title') - -          - else -            .panel-body -              em.text-muted -                = t('layouts.navbar.select_referential_for_more_features') - -      .menu-item.panel -        .panel-heading -          h4.panel-title -            = link_to '#miFour', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do -              = t('layouts.navbar.line_referential') - -        #miFour.panel-collapse.collapse -          .list-group -            = link_to line_referential_path(workbench.line_referential), class: "list-group-item" do -              span = t('layouts.navbar.sync_ilico') -            = link_to line_referential_lines_path(workbench.line_referential), class: "list-group-item" do -              span = Chouette::Line.t.capitalize -            = link_to line_referential_networks_path(workbench.line_referential), class: "list-group-item" do -              span = Chouette::Network.t.capitalize -            = link_to line_referential_companies_path(workbench.line_referential), class: "list-group-item" do -              span = Chouette::Company.t.capitalize - -      .menu-item.panel -        .panel-heading -          h4.panel-title -            = link_to '#miFive', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do -              = t('layouts.navbar.stop_area_referential') - -        #miFive.panel-collapse.collapse -          .list-group -            = link_to stop_area_referential_path(workbench.stop_area_referential), class: "list-group-item" do -              span = t('layouts.navbar.sync_icar') -            = link_to stop_area_referential_stop_areas_path(workbench.stop_area_referential), class: "list-group-item" do -              span = Chouette::StopArea.t.capitalize - -      .menu-item.panel -        .panel-heading -          h4.panel-title -            = link_to '#miSix', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do -              = t('layouts.navbar.tools') - -        #miSix.panel-collapse.collapse -          .list-group -            = link_to Rails.application.config.try(:portal_url), target: '_blank', class: 'list-group-item' do -              span -                span.fa.fa-2x.fa-circle -                = t('layouts.navbar.portal') - -            = link_to Rails.application.config.try(:codifligne_url), target: '_blank', class: 'list-group-item' do -              span -                span.fa.fa-2x.fa-circle -                = t('layouts.navbar.ilico') - -            = link_to Rails.application.config.try(:reflex_url), target: '_blank', class: 'list-group-item' do -              span -                span.fa.fa-2x.fa-circle -                = t('layouts.navbar.icar') - -            = link_to '#', target: '_blank', class: 'list-group-item' do -              span -                span.fa.fa-2x.fa-circle -                = t('layouts.navbar.support') +- current_organisation.workbenches.each do |workbench| +  #menu-items.panel-group +    .menu-item.panel +      .panel-heading +        h4.panel-title +          = link_to '#miOne', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do +            = t('layouts.navbar.current_offer.other') + +      #miOne.panel-collapse.collapse +        .list-group +          = link_to root_path, class: "list-group-item" do +            span = t('layouts.navbar.dashboard') +          = link_to workbench_output_path(workbench), class: 'list-group-item' do +            span = t('layouts.navbar.workbench_outputs.organisation') +          = link_to '#', class: 'list-group-item disabled' do +            span = t('layouts.navbar.workbench_outputs.workgroup') + +    .menu-item.panel +      .panel-heading +        h4.panel-title +          = link_to '#miTwo', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do +            - t('activerecord.models.workbench.one').capitalize + +      #miTwo.panel-collapse.collapse +        .list-group +          = link_to workbench_path(workbench), class: "list-group-item" do +            span = t('activerecord.models.referential.other').capitalize +          = link_to workbench_imports_path(workbench), class: "list-group-item" do +            span = t('activerecord.models.import.other').capitalize +          = link_to workbench_exports_path(workbench), class: "list-group-item" do +            span = t('activerecord.models.export.other').capitalize +          = link_to workgroup_calendars_path(workbench.workgroup), class: 'list-group-item' do +            span = t('activerecord.models.calendar.other').capitalize +          = link_to workbench_compliance_check_sets_path(workbench), class: 'list-group-item' do +            span = t('activerecord.models.compliance_check_set.other').capitalize +          = link_to compliance_control_sets_path, class: 'list-group-item' do +            span = t('activerecord.models.compliance_control_set.other').capitalize + +    .menu-item.panel +      .panel-heading +        h4.panel-title +          = link_to '#miFour', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do +            = t('layouts.navbar.line_referential') + +      #miFour.panel-collapse.collapse +        .list-group +          = link_to line_referential_path(workbench.line_referential), class: "list-group-item" do +            span = t('layouts.navbar.sync_ilico') +          = link_to line_referential_lines_path(workbench.line_referential), class: "list-group-item" do +            span = Chouette::Line.t.capitalize +          = link_to line_referential_networks_path(workbench.line_referential), class: "list-group-item" do +            span = Chouette::Network.t.capitalize +          = link_to line_referential_companies_path(workbench.line_referential), class: "list-group-item" do +            span = Chouette::Company.t.capitalize + +    .menu-item.panel +      .panel-heading +        h4.panel-title +          = link_to '#miFive', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do +            = t('layouts.navbar.stop_area_referential') + +      #miFive.panel-collapse.collapse +        .list-group +          = link_to stop_area_referential_path(workbench.stop_area_referential), class: "list-group-item" do +            span = t('layouts.navbar.sync_icar') +          = link_to stop_area_referential_stop_areas_path(workbench.stop_area_referential), class: "list-group-item" do +            span = Chouette::StopArea.t.capitalize + +    .menu-item.panel +      .panel-heading +        h4.panel-title +          = link_to '#miSix', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do +            = t('layouts.navbar.tools') + +      #miSix.panel-collapse.collapse +        .list-group +          = link_to Rails.application.config.try(:portal_url), target: '_blank', class: 'list-group-item' do +            span +              span.fa.fa-2x.fa-circle +              = t('layouts.navbar.portal') + +          = link_to Rails.application.config.try(:codifligne_url), target: '_blank', class: 'list-group-item' do +            span +              span.fa.fa-2x.fa-circle +              = t('layouts.navbar.ilico') + +          = link_to Rails.application.config.try(:reflex_url), target: '_blank', class: 'list-group-item' do +            span +              span.fa.fa-2x.fa-circle +              = t('layouts.navbar.icar') + +          = link_to '#', target: '_blank', class: 'list-group-item' do +            span +              span.fa.fa-2x.fa-circle +              = t('layouts.navbar.support') diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim index 4a4acc427..8db94609a 100644 --- a/app/views/line_referentials/show.html.slim +++ b/app/views/line_referentials/show.html.slim @@ -1,5 +1,4 @@  - breadcrumb :line_referential, @line_referential -- page_header_content_for @line_referential  - if policy(@line_referential).synchronize?    - content_for :page_header_actions do      = link_to(t('actions.sync'), sync_line_referential_path(@line_referential), method: :post, class: 'btn btn-default') diff --git a/config/locales/layouts.en.yml b/config/locales/layouts.en.yml index 76a4d65d1..31bff403c 100644 --- a/config/locales/layouts.en.yml +++ b/config/locales/layouts.en.yml @@ -22,7 +22,7 @@ en:          other: Current offers        workbench_output:          organisation: Organisation offers -        idf: IDF offers +        workgroup: Workgroup offers        tools: Tools        sync: Synchronization        sync_icar: iCAR synchronization diff --git a/config/locales/merges.en.yml b/config/locales/merges.en.yml new file mode 100644 index 000000000..f9e90f1ef --- /dev/null +++ b/config/locales/merges.en.yml @@ -0,0 +1,23 @@ +fr: +  merges: +    referential_name: "Merged offer %{date}" +    index: +      title: "Merged offers" +    new: +      title: "New merged offer" +    show: +      title: "Merged offer %{name}" +    actions: +      create: Merge data spaces +  activerecord: +    models: +      merge: "Merged offer" +    attributes: +      merge: +        created_at: "Created at" +        started_at: Started at +        name: Name +        ended_at: Ended at +        status: "Status" +        creator: "Creator" +        referentials: "Data spaces" diff --git a/config/locales/merges.yml b/config/locales/merges.fr.yml index 345727b74..345727b74 100644 --- a/config/locales/merges.yml +++ b/config/locales/merges.fr.yml diff --git a/config/locales/stop_area_referentials.en.yml b/config/locales/stop_area_referentials.en.yml index 9d49d7c5d..3fa91bc92 100644 --- a/config/locales/stop_area_referentials.en.yml +++ b/config/locales/stop_area_referentials.en.yml @@ -4,7 +4,10 @@ en:        sync: "Launch a new reflex synchronization"        cancel_sync: "Cancel reflex synchronization"      show: -      title: 'Stop area referential' +      title: 'Synchronization iCAR' +      synchronized: Synchronized +      status: status +      message: Message    activerecord:      models:        stop_area_referential: diff --git a/config/locales/stop_area_referentials.fr.yml b/config/locales/stop_area_referentials.fr.yml index bb4c4463a..956e801f1 100644 --- a/config/locales/stop_area_referentials.fr.yml +++ b/config/locales/stop_area_referentials.fr.yml @@ -5,6 +5,9 @@ fr:        cancel_sync: "Annuler la synchronisation Reflex"      show:        title: 'Synchronisation iCAR' +      synchronized: Synchronisé +      status: Statut +      message: Message          activerecord:      models:        stop_area_referential: diff --git a/spec/views/line_referentials/show.html.slim_spec.rb b/spec/views/line_referentials/show.html.slim_spec.rb index 0516677cb..6734957c8 100644 --- a/spec/views/line_referentials/show.html.slim_spec.rb +++ b/spec/views/line_referentials/show.html.slim_spec.rb @@ -10,13 +10,11 @@ describe "/line_referentials/show", :type => :view do    it "should not present syncing infos and button" do      expect(view.content_for(:page_header_actions)).to_not have_selector("a[href=\"#{view.sync_line_referential_path(line_referential)}\"]") -    expect(view.content_for(:page_header_meta)).to_not have_selector(".last-update")    end    with_permission "line_referentials.synchronize" do      it "should present syncing infos and button" do        expect(view.content_for(:page_header_actions)).to have_selector("a[href=\"#{view.sync_line_referential_path(line_referential)}\"]", count: 1) -      expect(view.content_for(:page_header_meta)).to have_selector(".last-update", count: 1)      end    end  end diff --git a/spec/views/line_referentials/stop_area_referentials/show.html.slim_spec.rb b/spec/views/stop_area_referentials/show.html.slim_spec.rb index 71a8d16f5..a7567a969 100644 --- a/spec/views/line_referentials/stop_area_referentials/show.html.slim_spec.rb +++ b/spec/views/stop_area_referentials/show.html.slim_spec.rb @@ -10,13 +10,11 @@ describe "/stop_area_referentials/show", :type => :view do    it "should not present syncing infos and button" do      expect(view.content_for(:page_header_actions)).to_not have_selector("a[href=\"#{view.sync_stop_area_referential_path(stop_area_referential)}\"]") -    expect(view.content_for(:page_header_meta)).to_not have_selector(".last-update")    end    with_permission "stop_area_referentials.synchronize" do      it "should present syncing infos and button" do        expect(view.content_for(:page_header_actions)).to have_selector("a[href=\"#{view.sync_stop_area_referential_path(stop_area_referential)}\"]", count: 1) -      expect(view.content_for(:page_header_meta)).to have_selector(".last-update", count: 1)      end    end  end | 
