Sha256: 1f4aa9bf465bcff4273dd6202d691899338f13c1aa6a89f64bfd15352b4b6bc7
Contents?: true
Size: 1.93 KB
Versions: 1
Compression:
Stored size: 1.93 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: t('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> <%= t('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") %> <%= t('solved') %></strong> <% if is_moderator_or_owner?(@forum_thread) %> <small> <%= link_to t('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") %> <%= t('this_solved_my_question') %> <% end %> </small> </div> </div> <% end %> <% end %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simple_discussion-1.0.1 | app/views/simple_discussion/forum_posts/_forum_post.html.erb |