Orbit/vendor/built_in_modules/NewBlog/app/views/panel/blog/back_end/posts/index.html.erb

33 lines
822 B
Plaintext

<% content_for :secondary do %>
<ul class="list">
<li><%= link_to t('blog.new_post'), new_panel_blog_back_end_post_path, :class => 'seclink1' %></li>
</ul>
<% end -%>
<%= flash_messages %>
<h1><%= t('blog.list_post') %></h1>
<table>
<tr>
<th><%= t('blog.title') %></th>
<th><%= t('blog.body') %></th>
<th></th>
<th></th>
<th></th>
</tr>
<% @posts.each do |post| %>
<tr>
<td><%= post.title %></td>
<td><%= truncate(post.body,:length=>15) %></td>
<td><%= link_to t('blog.show'), panel_blog_back_end_post_path(post) %></td>
<td><%= link_to t('blog.edit'), edit_panel_blog_back_end_post_path(post) %></td>
<td><%= link_to t('blog.delete'), panel_blog_back_end_post_path(post), :confirm => t('blog.sure?'), :method => :delete %></td>
</tr>
<% end %>
</table>
<br />