66 lines
2.4 KiB
Plaintext
66 lines
2.4 KiB
Plaintext
<script>
|
|
if(document.querySelectorAll("#orbit-bar").length==0) location.reload();
|
|
</script>
|
|
|
|
<table class="table main-list">
|
|
<thead>
|
|
<tr class="sort-header">
|
|
<% @table_fields.each do |f| %>
|
|
<%= thead(f) %>
|
|
<% end %>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @emails.each do |email| %>
|
|
<tr>
|
|
<td>
|
|
<%= email.mail_subject %>
|
|
<div class="quick-edit">
|
|
<ul class="nav nav-pills">
|
|
<li><a href="#" class="detail-row" onclick="$('#<%= "#{email.id.to_s}-detail" %>').slideToggle(300); return false;"><%= t(:detail) %></a></li>
|
|
<% if can_edit_or_delete?(email) %>
|
|
<li><a href="/admin/emailers/<%=email.id.to_s%>/edit"><%= t(:edit) %></a></li>
|
|
<li><a data-confirm="Are you sure?" data-method="delete" href="/admin/emailers/<%= email.id.to_s %>" class="delete text-error" ><%= t(:delete_) %></a></li>
|
|
<% if !email.approved && current_user.is_admin? %>
|
|
<li><a href="/admin/emailers/<%=email.id.to_s%>/approve"><%= t("announcement.approve") %></a>
|
|
<% end %>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<%= email.email_sentdate.strftime("%Y-%m-%d %H:%M") rescue "" %>
|
|
</td>
|
|
<td>
|
|
<%= User.find(email.create_user_id).name rescue "" %>
|
|
</td>
|
|
<td>
|
|
<label class="label label-info"><%= email.status_for_table %></label>
|
|
</td>
|
|
</tr>
|
|
<tr class="footable-row-detail">
|
|
<td class="footable-cell-detail" colspan="4">
|
|
<div id="<%= "#{email.id.to_s}-detail" %>" class="footable-row-detail-inner" style="display: none;">
|
|
<div>
|
|
<strong><%= t("emailer.email_to") %></strong> :
|
|
<% email.email_members.each do |member| %>
|
|
<span class="label"><%= member.name %></span>
|
|
<% end %>
|
|
<% unless email.other_mailaddress.nil? %>
|
|
<% email.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(@emails), class: "pagination pagination-centered"
|
|
end
|
|
%> |