experiment/app/views/admin/experiments/_index.html.erb

46 lines
1.4 KiB
Plaintext
Raw Normal View History

2017-01-24 10:30:38 +00:00
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @subjects.each do |subject| %>
<tr>
<td><img src="<%= subject.image.thumb.url %>" /></td>
<td>
<%= subject.category.title rescue "" %>
<% if (subject.category.disable rescue false) %>
<span class='label'><%= t(:disabled) %></span>
<% end %>
</td>
<td>
<a href="<%= subject %>" target="_blank"><%= subject.title %></a>
<div class="quick-edit">
<ul class="nav nav-pills">
<% if can_edit_or_delete?(subject) %>
<li><a href="<%= edit_admin_experiment_path(subject.id) %>"><%= t(:edit) %></a></li>
<li><a href="<%= admin_experiment_path(subject.id) %>" data-method="delete" data-confirm="Are you sure?"><%= t(:delete_) %></a></li>
<% end %>
</ul>
</div>
</td>
<td>
<% subject.email_members.each do |member| %>
<span class="icons-user">
<%= link_to(member.name, admin_member_path(member.to_param) ) %>
</span>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag :div, paginate(@subjects), class: "pagination pagination-centered"
end
%>