Sha256: 9d205a1d8899d57e309f67531bc263ed8c7599768362a8c83e8d2f4cfdbf2710

Contents?: true

Size: 1.32 KB

Versions: 2

Compression:

Stored size: 1.32 KB

Contents

<div id="content_detail" class="ui-corner-all">
<h1 class="title"><%= t('page.listing', :model => t('activerecord.models.news_post')) -%></h1>
<div id="content_list">

<table class="table table-striped index">
  <tr>
    <th><%= t('activerecord.attributes.news_post.title') -%></th>
    <th><%= t('activerecord.models.user') -%></th>
    <th><%= t('page.date') -%></th>
    <th><%= t('role.required_role') -%></th>
    <th></th>
  </tr>

<%- @news_posts.each do |news_post| -%>
  <tr class="line<%= cycle("0", "1") -%>">
    <td><%= link_to h(news_post.title), news_post -%></td>
    <td><%= link_to h(news_post.user.username), user_path(news_post.user.username) -%></td>
    <td>
      <%= l(news_post.start_date) -%>
      -
      <%= l(news_post.end_date) -%>
    </td>
    <td><%= news_post.required_role.display_name.localize -%></td>
    <td>
      <% if can? :destroy, news_post %>
        <%= link_to t('page.edit'), edit_news_post_path(news_post) -%>
        <%= link_to t('page.destroy'), news_post, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
      <% end %>
    </td>
  </tr>
<%- end -%>
</table>

<%= paginate(@news_posts) -%>
</div>
</div>

<div id="submenu" class="ui-corner-all">
  <ul>
    <li><%= link_to t('page.new', :model => t('activerecord.models.news_post')), new_news_post_path -%></li>
  </ul>
</div>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
enju_news-0.1.0.pre2 app/views/news_posts/index.html.erb
enju_news-0.1.0.pre app/views/news_posts/index.html.erb