epaper/app/views/admin/e_paper_subscribers/_index.html.erb

51 lines
1.9 KiB
Plaintext
Raw Normal View History

2019-05-28 15:54:32 +00:00
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @subscribers.each do |subscriber| %>
<tr>
<td>
<%= subscriber.email rescue "" %>
<div class="quick-edit">
<ul class="nav nav-pills">
<li><a class="delete text-error" href="<%= admin_e_paper_subscriber_path(subscriber.id) %>" data-method="delete" data-confirm="Are you sure?"><%= t(:delete_) %></a></li>
</ul>
</div>
</td>
<td>
<%= subscriber.subscribed ? "Subscribed" : "Unsubscribed" %>
</td>
<td>
<%= t(subscriber.language) %>
</td>
</tr>
<% end %>
</tbody>
</table>
<div class="bottomnav clearfix" style="left: 81px;">
<%= content_tag(:div, paginate(@subscribers), class: "pagination pagination-centered") %>
<div class="pull-right">
<%=
content_tag(:div, link_to(t("e_paper.export"), admin_e_paper_subscribers_export_excel_path + '.xlsx', :class=>"btn btn-success"), class: "pull-right")
%>
<div class="dropup upload-button pull-right">
<button class="btn btn-info dropdown-toggle" type="button" data-toggle="dropdown">
<i class="icon-upload-alt icon-white"></i><%= t('personal_journal.upload') %>
<span class="caret"></span>
</button>
<div class="dropdown-menu upload-box">
<form action="<%=admin_e_paper_subscribers_import_from_excel_path%>" method="post" enctype="multipart/form-data">
<%= hidden_field_tag :authenticity_token, form_authenticity_token %>
<input type="file" name="import_file" >
<button class="btn btn-primary" type="submit"><%= t(:submit) %></button>
<a class="" href="<%=admin_e_paper_subscribers_download_excel_format_path%>.xlsx">Download excel format</a>
</form>
</div>
</div>
</div>
2019-05-28 15:54:32 +00:00
</div>