Skip to content

Commit

Permalink
conflict resolved, preserve translation
Browse files Browse the repository at this point in the history
  • Loading branch information
joemsak committed Sep 15, 2011
2 parents 5d96f20 + 2409002 commit fe524e2
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 4 deletions.
47 changes: 44 additions & 3 deletions app/views/events/_event.html.erb
Expand Up @@ -37,8 +37,49 @@
</section>

<section id="event_map">
<iframe width="400" height="200" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?q=<%= CGI::escape(event.venue_address) %>&amp;z=14&amp;output=embed"></iframe>
</section><!-- #event_map -->

<% content_for :javascripts do %>
<%= javascript_include_tag 'http://maps.googleapis.com/maps/api/js?sensor=false' %>
<script type="text/javascript">
function initialize() {
var geocoder = new google.maps.Geocoder();
var address = '<%= CGI::escape(event.venue_address) %>';

if (geocoder) {
geocoder.geocode({ 'address': address }, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var myOptions = {
zoom: 13,
center: results[0].geometry.location,
mapTypeId: google.maps.MapTypeId.ROADMAP
};

var infowindow = new google.maps.InfoWindow({
content: "<%= event.venue_name %>"
});

var map = new google.maps.Map(document.getElementById("event_map"), myOptions);
var marker = new google.maps.Marker ({
position: results[0].geometry.location,
map: map
});

google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
});

}
else {
console.log("Geocoding failed: " + status);
}
});
}
}
google.maps.event.addDomListener(window, 'load', initialize);

</script>
<% end %>
<% end -%>
<% unless archive -%>
Expand All @@ -52,7 +93,7 @@
<% unless event.ticket_link.blank? -%>
<section class="ticket">
<p><%= t('.ticket_link') %>:<br/>
<%=auto_link event.ticket_link %>
<%=link_to event.ticket_link, event.ticket_link %>
</p>
</section>
<% end -%>
Expand Down Expand Up @@ -108,4 +149,4 @@
</nav><!--#event_nav-->
<% end -%>
<% end -%>
<% end -%>
5 changes: 4 additions & 1 deletion public/stylesheets/refinerycms-events.css
Expand Up @@ -70,4 +70,7 @@
width: 33%;
float: left;
}

#event_map {
width: 400px;
height: 200px;
}

0 comments on commit fe524e2

Please sign in to comment.