Sha256: 56a0e983027f6460d263e6a6ed2362291ed4ac77bd9036a2b59f2f69958143d5

Contents?: true

Size: 1.3 KB

Versions: 2

Compression:

Stored size: 1.3 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="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, :confirm => t('page.are_you_sure'), :method => :delete -%>
      <% end %>
    </td>
  </tr>
<%- end -%>
</table>

<%= will_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.0.3 app/views/news_posts/index.html.erb
enju_news-0.0.2 app/views/news_posts/index.html.erb