ask/app/views/admin/asks/_index.html.erb

44 lines
1.4 KiB
Plaintext
Raw Normal View History

2014-10-02 06:00:35 +00:00
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @askquestions.each do |b| %>
<tr>
<td>
2014-10-23 07:03:21 +00:00
<% if b.situation == 'is_waiting' %>
<span class='label label-important'><%= t('is_waiting') %></span>
<% elsif b.situation == 'is_processed' %>
<span class='label label-success'><%= t('is_processed') %></span>
<% elsif b.situation == 'is_referral' %>
<span class='label'><%= t('is_referral') %></span>
2014-10-02 06:00:35 +00:00
<% end %>
</td>
<td><%= b.category.title %></td>
<td>
<%= b.title %>
<div class="quick-edit">
<ul class="nav nav-pills">
<% if can_edit_or_delete?(b) %>
<li><a href="/admin/asks/<%=b.id.to_s%>/edit"><%= t(:edit) %></a></li>
<li><a href="#" class="delete text-error" rel="/admin/asks/<%=b.id.to_s%>"><%= t(:delete_) %></a></li>
<% end %>
</ul>
</div>
</td>
<td><%= b.name %></td>
<td><%= format_value b.created_at %></td>
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag :div, paginate(@askquestions), class: "pagination pagination-centered"
end
%>