Skip to content

Commit

Permalink
remove center tag and unnecessary javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
nstjean committed Jan 3, 2020
1 parent 67df439 commit aea3216
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions app/views/sidebar/_related.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
<% if @node.type == "page" %>
<% url = "/map/" + @node.slug_from_path %>
<% end %>
<center><a href="<%= url %>" class="btn btn-outline-secondary btn-location mt-2"><i class="fa fa-map" aria-hidden="true"></i> View on a map</a></center>
<a href="<%= url %>" class="btn btn-outline-secondary btn-location mt-2"><i class="fa fa-map" aria-hidden="true"></i> View on a map</a>
<% elsif !@node.lat && !@node.lon %>
<a class="btn btn-outline-secondary btn-location my-2"><i class="fa fa-map-marker" aria-hidden="true"></i> Add a location</a>
<a class="blurred-location-input btn btn-outline-secondary btn-location my-2"><i class="fa fa-map-marker" aria-hidden="true"></i> Add a location</a>
<% end %>

<br style="clear:both;" />
Expand All @@ -77,10 +77,4 @@
<% end %>
</div>
</div>
<%= javascript_include_tag 'sidebar' %>

<script type="text/javascript">
$('#add_location').on('click', function() {
$('.blurred-location-input').click();
})
</script>
<%= javascript_include_tag 'sidebar' %>

0 comments on commit aea3216

Please sign in to comment.