Sha256: 544b1d6ddb41ad6ac4f94651ab902afe3e7974a9a9ee39ed20b423599c6d4ff2

Contents?: true

Size: 1.78 KB

Versions: 1

Compression:

Stored size: 1.78 KB

Contents

<%= content_tag_for(:li, post) do %>
  <div class="metas">
    <div class="links">
      <% if (last_fives rescue false) %>
        <%= link_to_last_fives_post_position(post, topic, post_counter) %>
      <% else %>
        <%= link_to_post_position(post, post_counter) %>
      <% end %>
      (<%= link_to t('.permalink'), topic_post_path(topic, post) %>)
    </div>
    <div class="user">
      <span class="display_name"><%= post.user.display_name %></span>
      <% if display_avatars?(current_formol_user) %>
        <figure>
          <img alt="<%= post.user.display_name %>" src="/images/emule.png" />
        </figure>
      <% end %>
      <span class="posts_count"><%= t('.user_posts') %>: <%= post.user.formol_posts_count %></span>
    </div>
  </div>
  <div class="content">
    <%= formol_format(post.content) %>
    <% if display_signatures?(current_formol_user, post) %>
      --
      <%= formol_format(post.user.preference.signature) %>
    <% end %>
  </div>
  <span class="created_at">
    <%= t('.posted') %>
    <time datetime="<%= post.created_at.to_s(:db) %>">
      <%= time_ago_in_words(post.created_at) %>
    </time>
  </span>
  <ul class="actions">
    <% if formol_authorized?(current_formol_user, :create_post, topic) %>
      <li class="quote"><%= link_to(t('.quote'), new_topic_post_path(topic, :quote => post.id)) %></li>
    <% end %>
    <% unless topic.first_post?(post) %>
      <% if formol_authorized?(current_formol_user, :edit_post, post) %>
        <li class="edit"><%= link_to(t('.edit'), edit_topic_post_path(topic, post)) %></li>
      <% end %>
      <% if formol_authorized?(current_formol_user, :destroy_post, post) %>
        <li class="delete"><%= link_to(t('.destroy'), topic_post_path(topic, post), :method => :delete) %>
      <% end %>
    <% end %>
  </ul>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
formol-0.0.4 app/views/formol/posts/_post.html.erb