Sha256: ec2e36c8df021d671817fd7ef70ee1fb4884052e6e4a210414a601f212eca6a6
Contents?: true
Size: 1.89 KB
Versions: 1
Compression:
Stored size: 1.89 KB
Contents
<%# We don't currently cache the forum posts because they have permissions to deal with %> <%= content_tag :div, id: dom_id(forum_post), class: forum_post_classes(forum_post) do %> <div class="card-header"> <% if is_moderator_or_owner?(forum_post) %> <div class="pull-right"> <%= link_to icon("pencil"), simple_discussion.edit_forum_thread_forum_post_path(@forum_thread, forum_post), class: "text-muted", data: { toggle: "tooltip", placement: "left" }, title: "Edit this post" %> </div> <% end %> <div> <%= avatar_tag(forum_post.user.email) %> <strong class="forum-post-user"> <%= forum_post.user.name %> <%= forum_user_badge(forum_post.user) %> </strong> <small> commented on <%= link_to forum_post.created_at.strftime("%b %d, %Y"), simple_discussion.forum_thread_path(@forum_thread, anchor: "forum_post_#{forum_post.id}") %>: </small> </div> </div> <div class="card-body"> <%= formatted_content forum_post.body %> </div> <% if @forum_thread.solved? && forum_post.solved? %> <div class="card-footer"> <div class="pull-right"> <strong class="text-success"><%= icon("check") %> Solved</strong> <% if is_moderator_or_owner?(@forum_thread) %> <small> <%= link_to "Undo", simple_discussion.unsolved_forum_thread_forum_post_path(@forum_thread, forum_post), method: :put %> </small> <% end %> </div> </div> <% elsif is_moderator_or_owner?(@forum_thread) %> <div class="card-footer"> <div class="pull-right"> <small> <%= link_to simple_discussion.solved_forum_thread_forum_post_path(@forum_thread, forum_post), method: :put do %> <%= icon("check") %> This solved my question <% end %> </small> </div> </div> <% end %> <% end %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simple_discussion-0.9.5 | app/views/simple_discussion/forum_posts/_forum_post.html.erb |