nukomeet/coworfing

View on GitHub
app/views/home/map.html.haml

Summary

Maintainability
Test Coverage
= content_for :map do
  #map
    .container
      .hero-unit.ac.faq
        %h2= title "We share the places where we like to work."
        %form.form-inline
          .controls
            .input-append
              = text_field_tag 'place_input', nil, placeholder: t('search')
              = button_tag t('search'), class: 'btn btn-search btn-success', id: 'map_search' do
                %i.icon-search.icon-white
              = button_tag t('search'), class: 'btn btn-search btn-danger', id: 'autolocate', title: "Find places near you!" do
                %i.icon-map-marker.icon-white
  #mapino

= content_for :preload_javascript do
  %script{ src: "http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places&language=en", :type => "text/javascript" }

= content_for :javascript do
  %script
    var places = new C.Places(#{raw @places.to_json});
    var mapView = new C.MapView({ collection: places, api_key: "#{raw ENV['CLOUDMADE_KEY']}" } );