Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (29 sloc) 1.35 KB
<% if params[:action] == "places" %>
</div>
<div style="width:100%;margin-left:0;height:300px;" id="map"></div>
<script>
var map = L.map('map').setView([22,0], 2);
L.tileLayer("https://a.tiles.mapbox.com/v3/jywarren.map-lmrwb2em/{z}/{x}/{y}.png",{
attribution: "<a href='http://openstreetmap.org'>OSM</a> tiles by <a href='http://mapbox.com'>MapBox</a>",
}).addTo(map)
<% @notes.each do |place| %>
<% if place.lat && place.lon %>L.marker([<%= place.lat %>, <%= place.lon %>]).addTo(map).bindPopup("<a href='<%= place.path %>'><%= place.latest.title %></a>");<% end %>
<% end %>
</script>
<br />
<div class="row">
<% end %>
<div class="col-lg-12">
<%= feature('places') %>
<hr />
<% if params[:controller] == "notes" && (params[:action] == "popular" || params[:action] == "index" || params[:action] == "liked") %>
<div class="navbar">
<ul class="navbar-nav">
<li class="nav-item <% if params[:action] == "methods" %> active <% end %>"><a class="nav-link" href="/methods/"><i class="fa fa-wrench"></i> <%= t('notes.tools_places.tools') %></a></li>
<li class="nav-item <% if params[:action] == "places" %> active <% end %>"><a class="nav-link" href="/places/"><i class="fa fa-flag"></i> <%= t('notes.tools_places.places') %></a></li>
</ul>
</div>
<% end %>
<%= render :partial => "notes/notes" %>
<hr />
</div>
You can’t perform that action at this time.