Noosfero/noosfero

View on GitHub
app/views/email_templates/index.html.erb

Summary

Maintainability
Test Coverage
<div class="email-templates">
  <h1><%= _('Email Templates') %></h1>

  <table>
    <tr>
      <th><%= _('Name') %></th>
      <th><%= _('Type') %></th>
      <th><%= _('Actions') %></th>
    </tr>

  <% @email_templates.each do |email_template| %>
    <tr>
      <td><%= email_template.name %></td>
      <td><%= email_template.type_description %></td>
      <td class='actions'>
        <%= button_without_text(:edit, _('Edit'), {:action => :edit, :id => email_template.id}) %>
        <%= button_without_text(:trash, _('Remove'), {:action => :destroy, :id => email_template.id}, method: :delete, data: { confirm: 'Are you sure?' }) %>
      </td>
    </tr>
  <% end %>
  </table>

  <br />

  <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %>
  <%= button(:new, _('New template'), :action => :new) %>
  <%= button(:back, _('Back'), @back_to) %>
</div>