- text_color = @line.text_color.blank? ? "black" : "##{@line.text_color}" - bg_color = @line.color.blank? ? "white" : "##{@line.color}" = title_tag t('lines.show.title', line: @line.name) .line_show .summary - text_color = @line.text_color.blank? ? "black" : "##{@line.text_color}" - bg_color = @line.color.blank? ? "white" : "##{@line.color}" - if colors?(@line) p label = "#{t('lines.index.color')} : " label.color style="#{number_style(@line)}" = line_sticker(@line) - if @line.deactivated p = t('lines.index.deactivated') p label = "#{@line.human_attribute_name(:network)} : " - if @line.network.nil? = t('lines.index.unset') - else = link_to @line.network.name, [@line_referential, @line.network] p label = "#{@line.human_attribute_name(:company)} : " - if @line.company.nil? = t('lines.index.unset') - else = link_to @line.company.name, [@line_referential, @line.company] p label = "#{@line.human_attribute_name(:secondary_companies)} : " - @line.secondary_companies.each do |company| = link_to @company.name, [@line_referential, @company] p label = "#{@line.human_attribute_name('number')} : " = @line.number p label = "#{@line.human_attribute_name('published_name')} : " = @line.published_name p label = "#{@line.human_attribute_name('registration_number')} : " = @line.registration_number p label = "#{@line.human_attribute_name('transport_mode')} : " - if @line.transport_mode = " " + t("enumerize.line.transport_mode.#{@line.transport_mode}") - else = " -" p label = "#{@line.human_attribute_name('transport_submode')} : " - if @line.transport_submode = " " + t("enumerize.line.transport_submode.#{@line.transport_submode}") - else = " -" / p / label = "#{@line.human_attribute_name('stable_id')} : " / = @line.stable_id p label = "#{@line.human_attribute_name('url')} : " = @line.url / p / label = "#{@line.human_attribute_name('mobility_restricted_suitability')} : " / / - if @line.mobility_restricted_suitability.nil? / = @line.human_attribute_name("unspecified_mrs") / - elsif @line.mobility_restricted_suitability? / = @line.human_attribute_name("accessible") / - else / = @line.human_attribute_name("not_accessible") / / br / = "#{@line.human_attribute_name('number_of_mrs_vj')} : #{@line.vehicle_journeys.where('mobility_restricted_suitability = ?', true).count}" / br / = "#{@line.human_attribute_name('number_of_non_mrs_vj')} : #{@line.vehicle_journeys.where('mobility_restricted_suitability = ?', false).count}" / br / = @line.human_attribute_name("number_of_null_mrs_vj") / = " : " / = @line.vehicle_journeys.count - (@line.vehicle_journeys.where("mobility_restricted_suitability = ?", true).count + @line.vehicle_journeys.where("mobility_restricted_suitability = ?", false).count) / / p / label = "#{@line.human_attribute_name('flexible_service')} : " / / - if @line.flexible_service.nil? / = @line.human_attribute_name("unspecified_fs") / - elsif @line.flexible_service? / = @line.human_attribute_name("on_demaond_fs") / - else / = @line.human_attribute_name("regular_fs") / / br / = "#{@line.human_attribute_name('number_of_fs_vj')} : #{@line.vehicle_journeys.where('flexible_service = ?', true).count}" / br / = "#{@line.human_attribute_name('number_of_non_fs_vj')} : #{@line.vehicle_journeys.where('flexible_service = ?', false).count}" / br / = @line.human_attribute_name("number_of_null_fs_vj") / / - if @line.flexible_service.nil? / = "(#{@line.human_attribute_name('default_fs_msg')})" / / = " : " / = @line.vehicle_journeys.count - (@line.vehicle_journeys.where("flexible_service = ?", true).count + @line.vehicle_journeys.where("flexible_service = ?", false).count) / p / label = "#{@line.human_attribute_name('comment')} : " / = @line.comment / .row / #mobility_restricted_suitability.col-md-6 / #flexible_service.col-md-6 - content_for :sidebar do ul.actions - if policy(Chouette::Line).create? && @line_referential.organisations.include?(current_organisation) li = link_to t('lines.actions.new'), new_line_referential_line_path(@line_referential), class: 'add' / FIXME #2018 - if false && policy(@line).update? li = link_to t('lines.actions.edit'), edit_line_referential_line_path(@line_referential, @line), class: 'edit' - if policy(@line).destroy? li = link_to t('lines.actions.destroy'), line_referential_line_path(@line_referential, @line), method: :delete, :data => {:confirm => t('lines.actions.destroy_confirm')}, class: 'remove' = creation_tag(@line)