JohnKellyFerguson/octomaps

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

Summary

Maintainability
Test Coverage
- @title = "Octomaps: #{@map.repository_name}"
%body.map
  #left
    %header
      %h1 Great success!
      %h2
        %strong= @map.contributions_count
        contributors in
        %br
        %strong= @map.number_of_locations
        - if @map.is_of_cities?
          locations for
        - elsif @map.is_of_countries?
          countries for
        %br
        %strong= @map.repository_name
      #twitter
        %a.twitter-share-button{:href => "https://twitter.com/share"} Tweet
        %script
          !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
    #table
      %ul
        - @map.sorted_list.each do |location, count|
          %li
            = "#{count} in #{location}"
    #query_form
      %p
        Enter a GitHub repository owner and name to generate another map.
        Repository Owner:
      = partial 'public/form'
      %footer
        * Please note that this option maps contributors by the location they have specified on their GitHub account, which is not standardized.
    #credits
      %ul
        %li Created by:
        %li
          %a{:href => "http://www.twitter.com/johnkferguson"}> John Kelly Ferguson
          ,
          %a{:href => "http://www.twitter.com/mrikhter"} Masha Rikhter
          \&
          %a{:href => "http://www.twitter.com/jkestler"} Justin Kestler
        %li
          Students at the
          %a{:href => "http://www.flatironschool.com"} Flatiron School.
  #chart_markers
    != @map.google_visualr_chart_markers.to_js('chart_markers')