Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <br />
- <br />
- <div id="entry-<%= entry.id %>">
- <h3><%= entry.title %></h3>
- <small>Posted <%= time_ago_in_words(entry.created_at) %> ago.</small>
- <br />
- <%= render entry.photos %>
- <%= simple_format(entry.content) %>
- <br />
- <% if entry.comments.length > 0 %>
- <button class="show_comments" id="show_comments-<%= entry.id %>">show comments(<%= entry.comments.length %>)</button>
- <% end %>
- <ul id='comment_list-<%= entry.id %>' class='comment_lists'>
- <%= render entry.comments %>
- </ul>
- <div id="comment-<%= entry.id %>"></div>
- <br />
- <div id="comment_button-<%= entry.id %>">
- <% if current_user.nil? %>
- <%= link_to "Comment", new_user_session_path, class: "btn btn-primary" %>
- <% else %>
- <%= link_to "Comment", new_entry_comment_path(entry.id), class: "btn btn-primary", remote: true %>
- <%end%>
- </div>
- <%= link_to 'Edit', edit_entry_path(entry.id) if current_user.try(:admin?) %>
- </div>
- <br />
- <br />
- <br />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement