Sha256: bfe717cc464fc403e4ed1abf6ae7addd2be253f80c0f8079608883147e205c4a

Contents?: true

Size: 1.26 KB

Versions: 5

Compression:

Stored size: 1.26 KB

Contents

<%= cache forum_thread do %>
  <div class="forum-thread">
    <div class="row">

      <div class="col-sm-1 text-center">
          <%= avatar_tag(forum_thread.user.email) %>
      </div>

      <div class="col">
        <h4>
          <% if forum_thread.solved? %>
            <span class="text-success"><%= icon "check-circle" %></span>
          <% end %>

          <%= link_to simple_discussion.forum_thread_path(forum_thread) do %>
            <%= icon "thumb-tack", class: "text-muted" if forum_thread.pinned? %> <%= forum_thread.title %>
          <% end %>
        </h4>

        <div class="thread-details">
          <strong><%= category_link(forum_thread.forum_category) %></strong>
          • Asked <%= time_ago_in_words forum_thread.created_at %> by <%= forum_thread.user.name %>
        </div>

        <p class="text-muted"><%= truncate(forum_thread.forum_posts.first.body, length: 200) %></p>
      </div>

      <div class="col-sm-1 text-center">
        <%= link_to simple_discussion.forum_thread_path(forum_thread), class: "thread-posts-count" do %>
          <span class="count"><%= forum_thread.forum_posts_count %></span>
          <small><%= "post".pluralize(forum_thread.forum_posts_count) %></small>
        <% end %>
      </div>

    </div>
  </div>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
simple_discussion-0.9.4 app/views/simple_discussion/forum_threads/_forum_thread.html.erb
simple_discussion-0.9.3 app/views/simple_discussion/forum_threads/_forum_thread.html.erb
simple_discussion-0.9.2 app/views/simple_discussion/forum_threads/_forum_thread.html.erb
simple_discussion-0.9.1 app/views/simple_discussion/forum_threads/_forum_thread.html.erb
simple_discussion-0.9.0 app/views/simple_discussion/forum_threads/_forum_thread.html.erb