2017-07-05 09:16:55 +00:00
|
|
|
<table class="table main-list">
|
|
|
|
<thead>
|
|
|
|
<tr class="sort-header">
|
|
|
|
<% @table_fields.each do |f| %>
|
|
|
|
<%= thead(f) %>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% @topics.each do |topic| %>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<%= topic.paper.title rescue nil %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<%= topic.episode %>
|
|
|
|
<div class="quick-edit">
|
|
|
|
<% if can_edit_or_delete?(@paper) %>
|
|
|
|
<ul class="nav nav-pills">
|
|
|
|
<li>
|
|
|
|
<a href="/<%= I18n.locale %>/admin/topics/<%= topic.id.to_s %>/edit"><%= t(:edit) %></a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a class="text-error" href="/<%= I18n.locale %>/admin/topics/<%= topic.id.to_s %>" data-method="delete" data-confirm="Are you sure?"><%= t(:delete_) %></a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
2017-08-07 07:46:44 +00:00
|
|
|
<%= topic.created_at.strftime("%Y-%m-%d") %>
|
2017-07-05 09:16:55 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
<% if can_edit_or_delete?(@paper) %>
|
|
|
|
<div class="bottomnav clearfix" style="left: 81px;">
|
|
|
|
<div class="action pull-right">
|
|
|
|
<a class="btn btn-primary" href="<%= new_admin_topic_path(:page => params[:page], :paper_id => @paper.id) %>">
|
|
|
|
<%= t("e_paper.add") %>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|