Skip to content

Commit

Permalink
Add description to map show page
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren authored Apr 7, 2020
1 parent 295ca82 commit b085f65
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions app/views/maps/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,24 @@
<h2><%= @map.name %>,</h2>
<p><%= @map.location %> </p>
<p>by <%= @map.anonymous? ? @map.author : link_to("@#{@map.author}", "/profile/#{@map.author}") %>
<%= 'with' unless @users.empty? %>
<% @users.each_with_index do |author,i| %>
<a href="/profile/<%= author.login %>">
<%= 'with' unless @users.empty? %>
<% @users.each_with_index do |author,i| %>
<a href="/profile/<%= author.login %>">
<%= "@#{author.login}"%></a>
<% if i < @users.length-2 %>
<%= ',' %>
<% elsif i < @users.length-1 %>
<%= '&' %>
<% end %>
<% end %>
<br><br>
<% if i < @users.length-2 %>
<%= ',' %>
<% elsif i < @users.length-1 %>
<%= '&' %>
<% end %>
<% end %>
</p>

<div>
<%=raw markdown_to_html(@map.description) unless @map.description.nil? %>
</div>
<br><br>
</div>
</div>
</div>

<div class="container">
<div class="card-deck mb-6 text-center mx-auto">
Expand Down

0 comments on commit b085f65

Please sign in to comment.