RefugeRestrooms/refugerestrooms

View on GitHub
app/views/layouts/_search.html.haml

Summary

Maintainability
Test Coverage
- splash = false if local_assigns[:splash].nil?

.row.search-container
  = form_tag restrooms_path, class: "search-restrooms-form", method: :get do
    = hidden_field_tag :lat, ""
    = hidden_field_tag :long, ""
    .input-group
      = text_field_tag :search, params[:search], class: "form-control search-bar", aria: {label: t("search_bar.enter_location")}
      .input-group-btn
        %button.btn.btn-light-purple.submit-search-button{type: "button", title: t('.search'), value: t('.search'), aria: { label: t('.search') }}
          %i.fa.fa-search.fa-2x
          %i.fa.fa-refresh.fa-spin.fa-2x
        %button.btn.btn-light-purple.current-location-button{type: "button", title: t('.search-by-current-location'), aria: { label: t('.search-by-current-location') }, value: (splash ? t('.search-by-current-location') : nil ) }
          %i.fa.fa-location-arrow.fa-2x
          %i.fa.fa-refresh.fa-spin.fa-2x