aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjpl2017-02-17 12:01:03 +0100
committerjpl2017-02-17 12:01:03 +0100
commitbb53de085fe3d5870498673bc74d1331bac44e8d (patch)
treec890d4c2b07e78aeb8a9bd5812c300e0c9108d66
parent89629faa94c436430fe2c2910a53956db7ffd261 (diff)
downloadchouette-core-bb53de085fe3d5870498673bc74d1331bac44e8d.tar.bz2
Refs #2615: fix layouts on empty filter results, for lines#index && stop_areas#index
-rw-r--r--app/views/lines/index.html.slim6
-rw-r--r--app/views/stop_areas/index.html.slim6
2 files changed, 8 insertions, 4 deletions
diff --git a/app/views/lines/index.html.slim b/app/views/lines/index.html.slim
index 6e32d9ac1..056733a55 100644
--- a/app/views/lines/index.html.slim
+++ b/app/views/lines/index.html.slim
@@ -22,11 +22,13 @@
.col-lg-7.col-md-6.col-sm-6.col-xs-4.text-right
= new_pagination @lines
- - if @lines.any?
.row
.col-lg-12
= render 'filters'
+ - if @lines.any?
+ .row
+ .col-lg-12
= table_builder @lines,
{ 'Oid' => Proc.new { |n| n.objectid.local_id },
@lines.human_attribute_name(:name) => 'name', @lines.human_attribute_name(:network) => Proc.new { |n| n.try(:network).try(:name) },
@@ -40,6 +42,6 @@
= new_pagination @lines, 'pull-right'
- unless @lines.any?
- .row
+ .row.mt-xs
.col-lg-12
= replacement_msg t('referential_lines.search_no_results')
diff --git a/app/views/stop_areas/index.html.slim b/app/views/stop_areas/index.html.slim
index 21b5435cc..8baa81ab0 100644
--- a/app/views/stop_areas/index.html.slim
+++ b/app/views/stop_areas/index.html.slim
@@ -22,11 +22,13 @@
.col-lg-7.col-md-6.col-sm-6.col-xs-4.text-right
= new_pagination @stop_areas
- - if @stop_areas.any?
.row
.col-lg-12
= render 'filters'
+ - if @stop_areas.any?
+ .row
+ .col-lg-12
= table_builder @stop_areas,
{ 'Oid' => Proc.new { |n| n.try(:objectid).try(:local_id) }, @stop_areas.human_attribute_name(:name) => 'name', @stop_areas.human_attribute_name(:registration_number) => 'registration_number', @stop_areas.human_attribute_name(:zip_code) => 'zip_code',
@stop_areas.human_attribute_name(:city_name) => 'city_name', @stop_areas.human_attribute_name(:area_type) => Proc.new{|s| (s.area_type.nil? ? '-' : t("enumerize.stop_area.area_type.#{s.try(:area_type)}"))} },
@@ -37,6 +39,6 @@
= new_pagination @stop_areas, 'pull-right'
- unless @stop_areas.any?
- .row
+ .row.mt-xs
.col-lg-12
= replacement_msg t('stop_areas.search_no_results')