Sha256: ada954dc21b2814fcff19f345aeab3abafcbaaafc8b57e5c2f0c4b21cfed0f2a

Contents?: true

Size: 1.66 KB

Versions: 2

Compression:

Stored size: 1.66 KB

Contents

<div class='post-actions'>
  <h2><%= t('.post_actions') %></h2>
    <ul>
      <% if is_admin? %>
        <li><%= link_to t('.edit'),  [:edit, @presenter.post] %></li>
        <li><%= link_to t('.delete'), @presenter.post, :method => :delete, :confirm => t('.confirm') %></li>
      <% end %>
      <li> <%= link_to 'All posts', posts_path %></li>
    </ul>
</div>
<div class='post-title'>
  <h1><%= @presenter.post %></h1>
  <span class='published-at'><%= l @presenter.post.updated_at, :format => :short %></span>
</div>
<div class='post-pody'>
  <%= @presenter.post.body.html_safe %>
</div>
<div class='post-comments'>
  <% @presenter.comments.each do |comment| %>
    <div class='comment <%= admin_comment?(comment) %>'>
      <h4><%= comment.author %></h4>
      <p class='body'><%= comment.body %></p>
      <span><%= l comment.created_at, :format => :short %></span>
      <% if is_admin? %>
        <div class='admin-actions'>
          <%= link_to t('.delete'), post_comment_path(@presenter.post, comment), 
                                    :method => :delete, :confirm => t('.confirm'), 
                                    :class=> 'delete' %>
        </div>
      <% end %>
    </div>
  <% end %>
</div>
<div class='new-comment'>
  <h2><%= t('.new_comment') %></h2>
  <%= form_for [@presenter.post, Kublog::Comment.new], :remote => true do |f| %>
    <%= f.text_area :body, :rows => 5, :cols => 20, :class => 'small' %> <br />
    <% unless current_user %>
      <%= f.label :author_name %><br />
      <%= f.text_field :author_name %> <br />
      <%= f.label :author_email %><br />
      <%= f.text_field :author_email %> <br />
    <% end %>
    <%= f.submit %>
  <% end %>
</div>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kublog-0.9.0 app/views/kublog/posts/show.html.erb
kublog-0.0.1.1 app/views/kublog/posts/show.html.erb