Sha256: fd90c9e8598040c7af05575fca8d7d7d8893682c8706057d82cb08a54fd9bd0f

Contents?: true

Size: 1.05 KB

Versions: 4

Compression:

Stored size: 1.05 KB

Contents

%h1 Viewing Forum "#{@forum.name}"
- if @forum.moderator?(mongoid_forums_user)
  %b You are a moderator on this forum.
%br
%br
= link_to "Add a topic", forum_path(@forum) + '/new'
%br
%h2 Topics:
%table{:border => "1"}
  %tr
    %th
      Name
    %th
      Creator
    %th
      Last post
    %th
      Unread posts
    %th
      Posts
    %th
      Views

  - @topics.each do |topic|
    - if can?(:read, topic)
      %tr
        %td
          - if topic.locked
            &#128274
          - if topic.hidden
            ⚠
          - if topic.pinned
            *
          = link_to topic.name, topic
        %td
          = topic.user.forum_display_name
          = time_ago_in_words( topic.created_at )
          ago
        %td
          = topic.posts.last.user.forum_display_name
          = time_ago_in_words( topic.posts.last.created_at )
          ago
        %td
          = mongoid_forums_user ? topic.unread_post_count(mongoid_forums_user) : ""
        %td
          = topic.posts.count
        %td
          = topic.views_count ? topic.views_count : "None"

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongoid-forums-0.0.11 app/views/mongoid_forums/forums/show.haml
mongoid-forums-0.0.10 app/views/mongoid_forums/forums/show.haml
mongoid-forums-0.0.9 app/views/mongoid_forums/forums/show.haml
mongoid-forums-0.0.5 app/views/mongoid_forums/forums/show.haml