aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/lines/_line.html.slim9
-rw-r--r--app/views/lines/show.html.slim22
2 files changed, 14 insertions, 17 deletions
diff --git a/app/views/lines/_line.html.slim b/app/views/lines/_line.html.slim
index eb7aecc1d..485937c19 100644
--- a/app/views/lines/_line.html.slim
+++ b/app/views/lines/_line.html.slim
@@ -3,7 +3,7 @@
ul.ce-LineBlock-header-list
li
= check_box_tag "ids[]", line.id, false, class: "multiple_selection", style: "display: none;"
-
+
- if (line.number && line.number.length <= 3)
span.label.label-default.line_number style="#{number_style(line)}"
= line.number
@@ -28,9 +28,8 @@
= line.human_attribute_name('network')
= t('lines.index.unset')
- else
- / FIXME #825
= line.human_attribute_name('network')
- / = link_to_if line.network, line.network.name, line_referential_network_path(line.line_referential, line.network), :title => "#{line.human_attribute_name('network')} #{line.network.name}"
+ = link_to_if line.network, line.network.name, line_referential_network_path(line.line_referential, line.network), :title => "#{line.human_attribute_name('network')} #{line.network.name}"
p
- if line.company.nil?
@@ -38,12 +37,12 @@
= t('lines.index.unset')
- else
= line.human_attribute_name('company')
- / = link_to_if( line.company, line.company.name, line_referential_company_path(line.line_referential, line.company), :title => "#{line.human_attribute_name('company')} #{line.company.name}" )
+ = link_to_if( line.company, line.company.name, line_referential_company_path(line.line_referential, line.company), :title => "#{line.human_attribute_name('company')} #{line.company.name}" )
p
- if line.group_of_lines.count == 0
br
- / = t('lines.form.no_group_of_line')
+ = t('lines.form.no_group_of_line')
- elsif line.group_of_lines.count == 1
= line.human_attribute_name('group_of_line')
= link_to_if( line.group_of_lines.first, line.group_of_lines.first.name, line_referential_group_of_line_path(line.line_referential, line.group_of_lines.first), :title => "#{line.human_attribute_name('group_of_line')} #{line.group_of_lines.first.name}")
diff --git a/app/views/lines/show.html.slim b/app/views/lines/show.html.slim
index b559df842..80a44a7f5 100644
--- a/app/views/lines/show.html.slim
+++ b/app/views/lines/show.html.slim
@@ -9,7 +9,7 @@
.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')} : "
@@ -22,17 +22,15 @@
- if @line.network.nil?
= t('lines.index.unset')
- else
- / FIXME #825
- / = link_to @line.network.name, [@referential, @line.network]
-
+ = 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
- / FIXME #825
- / = link_to @line.company.name, [@referential, @line.company]
+ = link_to @line.company.name, [@line_referential, @line.company]
p
label = "#{@line.human_attribute_name('number')} : "
@@ -60,7 +58,7 @@
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?
@@ -79,7 +77,7 @@
p
label = "#{@line.human_attribute_name('flexible_service')} : "
-
+
- if @line.flexible_service.nil?
= @line.human_attribute_name("unspecified_fs")
- elsif @line.flexible_service?
@@ -93,10 +91,10 @@
= "#{@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)
@@ -135,7 +133,7 @@ h3.routes = t('.itineraries')
= link_to t('lines.actions.edit'), edit_line_referential_line_path(@line_referential, @line), class: 'edit'
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'
-
+
- if !@line.hub_restricted? || (@line.hub_restricted? && @line.routes.size < 2)
/ FIXME #825
li