eremail/app/views/admin/er_emails/_index.html.erb

53 lines
2.1 KiB
Plaintext
Raw Permalink Normal View History

2014-07-16 08:32:50 +00:00
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @email_ers.each do |b| %>
<tr>
<td><%= (b.email_confirm.blank? ? t("er_email.email_no_confirm") : t("er_email.email_have_confirm") ) %></td>
<td><%= b.category.title %></td>
<td>
<%= b.mail_subject %>
<div class="quick-edit">
<ul class="nav nav-pills">
<li><a href="/admin/er_emails/<%=b.id.to_s%>/edit"><%= t(:edit) %></a></li>
<li><a href="/admin/er_email/test_send_email/<%=b.id.to_s%>"><%= t('er_email.test_send_email') %></a></li>
<li><a href="#" class="detail-row" onclick="$('#<%= "#{b.id.to_s}-detail" %>').slideToggle(300)"><%= t(:detail) %></a></li>
<li><a href="#" class="delete text-error" rel="/admin/er_emails/<%=b.id.to_s%>"><%= t(:delete_) %></a></li>
<% if b.email_confirm.blank? and !b.email_addresses.blank? %><li><a href="/admin/er_email/send_email/<%=b.id.to_s%>"><%= t('er_email.email_confirm') %></a></li><% end %>
</ul>
</div>
</td>
<td><%= b.update_user.user_name %></td>
</tr>
<tr class="footable-row-detail">
<td class="footable-cell-detail" colspan="6">
<div id="<%= "#{b.id.to_s}-detail" %>" class="footable-row-detail-inner" style="display: none;">
<div>
<strong><%= t("er_email.mail_to") %></strong> :
<% b.email_members.each do |member| %>
<span class="label"><%= member.name %></span>
<% end %>
<% unless b.other_mailaddress.nil? %>
<% b.other_mailaddress.split(',').each do |mailaddress| %>
<span class="label"><%= mailaddress %></span>
<% end %>
<% end %>
</div>
</div>
</td>
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag :div, paginate(@email_ers), class: "pagination pagination-centered"
end
%>