Sha256: cb83486db74167d8bb4850f19c22ae509ef18a94a68c74981d0c768733b6250b

Contents?: true

Size: 1.17 KB

Versions: 3

Compression:

Stored size: 1.17 KB

Contents

- if topic.visible_to?(current_reader)
  - with_context ||= false
  - cssclass = ['topic']
  - cssclass << 'sticky' if topic.sticky?
  - cssclass << 'locked' if topic.locked?

  %li{:id => topic.dom_id, :class => cssclass.join(' ')}
    %span.context
      - if with_context
        = link_to topic.forum.name, forum_url(topic.forum)
    %span.subject
      %a{:href => forum_topic_url(topic.forum, topic), :class => 'main'}
        - if topic.reader
          = gravatar_for(topic.reader, {:size => 40}, {:alt => topic.reader.name, :class => 'gravatar'})
        = topic.name
    %span.context
      = t('posted_by')
      = link_to topic.reader.name + '.', reader_url(topic.reader)
      = t('post_count_from', :count => topic.posts.count - 1)
      - if topic.has_posts?
        = link_to topic.replied_by.name, reader_url(topic.replied_by)
        = friendly_date(topic.replied_at)
      - else 
        = friendly_date(topic.created_at)
        
    .post_wrapper
      - if topic.page
        = truncate_words(topic.page.render_part(:body), 50)
      - elsif topic.first_post
        = truncate_and_textilize(topic.first_post.body, 50)
      - else
        %p 
          = t('topic_empty')
    

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
radiant-forum-extension-1.1.2 app/views/topics/_topic.html.haml
radiant-forum-extension-1.1.1 app/views/topics/_topic.html.haml
radiant-forum-extension-1.1.0 app/views/topics/_topic.html.haml