Skip to content

Instantly share code, notes, and snippets.

@StaverDmitry
Created June 7, 2017 01:39
Show Gist options
  • Save StaverDmitry/8b9287704452a0c653c8bf72128731e2 to your computer and use it in GitHub Desktop.
Save StaverDmitry/8b9287704452a0c653c8bf72128731e2 to your computer and use it in GitHub Desktop.
= form_tag forecasts_path, method: :get do
.row.forecast-row.flex-container.space-between
.forecast-bar
.title
| Use data since:
= text_field_tag :data_start, @data_dates.first, class: 'form-control'
.forecast-bar
.title
| Cruise
= select_tag :cruise_id, options_for_select(Cruise.pluck(:name, :id), selected: params[:cruise_id]), include_blank: "All", class: "form-control"
.forecast-bar
.title
| Forecast till:
= text_field_tag :forecast_end, @forecast_end.strftime('%d/%m/%Y'), class: 'form-control'
.row.forecast-row.flex-container.space-between
= submit_tag "Chart View", class: "btn btn-primary forecast-bar"
= link_to "Table View", table_forecasts_path(request.query_parameters), class: "btn btn-primary forecast-bar"
= link_to "Download CSV", forecasts_path(request.query_parameters.merge(format: :csv)), class: "btn btn-primary forecast-bar generate_report"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment