aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/stop_areas
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/stop_areas')
-rw-r--r--app/views/stop_areas/_filters.html.slim6
-rw-r--r--app/views/stop_areas/index.html.slim2
-rw-r--r--app/views/stop_areas/show.html.slim2
3 files changed, 5 insertions, 5 deletions
diff --git a/app/views/stop_areas/_filters.html.slim b/app/views/stop_areas/_filters.html.slim
index 2bc59ce75..88ed6a772 100644
--- a/app/views/stop_areas/_filters.html.slim
+++ b/app/views/stop_areas/_filters.html.slim
@@ -16,9 +16,9 @@
= f.label Chouette::StopArea.tmf('area_type'), required: false, class: 'control-label'
= f.input :area_type_eq_any, checked: params[:q] && params[:q][:area_type_eq_any], collection: Chouette::AreaType.options, as: :check_boxes, label: false, label_method: lambda{|w| ("<span>" + w[0] + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list' }
- .form-group.togglable class=filter_item_class(@status, :status_eq_any)
- = f.label Chouette::StopArea.tmf('state'), required: false, class: 'control-label'
- = f.input :status_eq_any, checked: lambda { |w| @status.try(:[], :status_eq_any).try(:[], w)}, collection: [:in_creation, :confirmed, :deactivated], as: :check_boxes, label: false, label_method: lambda{|w| ("<span>" + stop_area_status(w) + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list' }
+ .form-group.togglable class=filter_item_class(params[:q], :by_status)
+ = f.label Chouette::StopArea.tmf('status'), required: false, class: 'control-label'
+ = f.input :by_status, checked: params[:q] && params[:q][:by_status], collection: [:in_creation, :confirmed, :deactivated], as: :check_boxes, label: false, label_method: lambda{|w| ("<span>" + stop_area_status(w) + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list' }
.actions
= link_to t('actions.erase'), @workbench, class: 'btn btn-link'
diff --git a/app/views/stop_areas/index.html.slim b/app/views/stop_areas/index.html.slim
index 62b873c36..e5ca82ee2 100644
--- a/app/views/stop_areas/index.html.slim
+++ b/app/views/stop_areas/index.html.slim
@@ -33,7 +33,7 @@
), \
TableBuilderHelper::Column.new( \
key: :status, \
- attribute: Proc.new { |s| stop_area_status(s) } \
+ attribute: Proc.new { |s| stop_area_status(s.status) } \
), \
TableBuilderHelper::Column.new( \
key: :zip_code, \
diff --git a/app/views/stop_areas/show.html.slim b/app/views/stop_areas/show.html.slim
index c10d22bfb..c1965c161 100644
--- a/app/views/stop_areas/show.html.slim
+++ b/app/views/stop_areas/show.html.slim
@@ -21,7 +21,7 @@
Chouette::StopArea.tmf('city_name') => @stop_area.city_name,
Chouette::StopArea.tmf('country_code') => @stop_area.country_code.presence || '-',
Chouette::StopArea.tmf('time_zone') => @stop_area.time_zone.presence || '-',
- Chouette::StopArea.tmf('status') => stop_area_status(@stop_area),
+ Chouette::StopArea.tmf('status') => stop_area_status(@stop_area.status),
Chouette::StopArea.tmf('comment') => @stop_area.try(:comment),
})
- @stop_area.custom_fields.each do |code, field|