index.rhtml 1.02 KB
<h1> <%= _("Manage comments status") %></h1>

<div id='comment-classification-status'>
  <% if @status.empty? %>
    <%= _('(no status registered yet)') %>
  <% else %>
    <table>
      <tr>
        <th><%= _('Status') %></th>
        <th><%= _('Enabled') %></th>
        <th><%= _('Reason enabled?') %></th>
        <th><%= _('Actions') %></th>
      </tr>
      <% @status.each do |st| %>
        <tr>
          <td><%= st.name %></td>
          <td><%= st.enabled %></td>
          <td><%= st.enable_reason %></td>
          <td>
            <%= button_without_text :edit, _('Edit'), {:action => 'edit', :id => st} %>
            <%= button_without_text :delete, _('Remove'), {:action => 'destroy', :id => st}, :confirm => _('Are you sure you want to remove this status?') %>
          </td>
        </tr>
      <% end %>
    </table>
  <% end %>

  <% button_bar do %>
    <%= button(:add, _('Add a new status'), :action => 'create')%>
    <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %>
  <% end %>
</div>