Commit 2df11dd71a94402816792418bfa60ba93bc00671
1 parent
0d9bdbdf
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Improve layout of email templates list
Showing
2 changed files
with
26 additions
and
21 deletions
Show diff stats
app/views/email_templates/index.html.erb
1 | -<h1><%= _('Email Templates') %></h1> | |
1 | +<div class="email-templates"> | |
2 | + <h1><%= _('Email Templates') %></h1> | |
2 | 3 | |
3 | -<table> | |
4 | - <tr> | |
5 | - <th><%= _('Name') %></th> | |
6 | - <th><%= _('Type') %></th> | |
7 | - <th></th> | |
8 | - </tr> | |
4 | + <table> | |
5 | + <tr> | |
6 | + <th><%= _('Name') %></th> | |
7 | + <th><%= _('Type') %></th> | |
8 | + <th><%= _('Actions') %></th> | |
9 | + </tr> | |
9 | 10 | |
10 | -<% @email_templates.each do |email_template| %> | |
11 | - <tr> | |
12 | - <td><%= email_template.name %></td> | |
13 | - <td><%= email_template.available_types[email_template.template_type][:description] if email_template.template_type.present? %></td> | |
14 | - <td> | |
15 | - <%= link_to 'Edit', url_for(:controller => :email_templates, :action => :edit, :id => email_template.id) %> | |
16 | - <%= link_to 'Destroy', url_for(:controller => :email_templates, :action => :destroy, :id => email_template.id), method: :delete, data: { confirm: 'Are you sure?' } %> | |
17 | - </td> | |
18 | - </tr> | |
19 | -<% end %> | |
20 | -</table> | |
11 | + <% @email_templates.each do |email_template| %> | |
12 | + <tr> | |
13 | + <td><%= email_template.name %></td> | |
14 | + <td><%= email_template.available_types[email_template.template_type][:description] if email_template.template_type.present? %></td> | |
15 | + <td> | |
16 | + <%= button_without_text(:edit, _('Edit'), {:controller => :email_templates, :action => :edit, :id => email_template.id}) %> | |
17 | + <%= button_without_text(:remove, _('Remove'), {:controller => :email_templates, :action => :destroy, :id => email_template.id}, method: :delete, data: { confirm: 'Are you sure?' }) %> | |
18 | + </td> | |
19 | + </tr> | |
20 | + <% end %> | |
21 | + </table> | |
21 | 22 | |
22 | -<br /> | |
23 | + <br /> | |
23 | 24 | |
24 | -<%= button(:new, _('New template'), :controller => :email_templates, :action => :new) %> | |
25 | -<%= button(:back, _('Back to control panel'), :controller => :profile_editor) %> | |
25 | + <%= button(:new, _('New template'), :controller => :email_templates, :action => :new) %> | |
26 | + <%= button(:back, _('Back to control panel'), :controller => :profile_editor) %> | |
27 | +</div> | ... | ... |