2014-05-08 07:33:39 +00:00
|
|
|
<table class="table main-list">
|
2014-08-07 10:47:37 +00:00
|
|
|
<thead>
|
|
|
|
<tr class="sort-header">
|
|
|
|
<% @table_fields.each do |f| %>
|
|
|
|
<%= thead(f) %>
|
|
|
|
<% end %>
|
2020-03-20 08:48:31 +00:00
|
|
|
<th><%=t('faq.update_user')%></th>
|
2014-08-07 10:47:37 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% @qas.each do |qa| %>
|
|
|
|
<tr>
|
|
|
|
<td><%= qa.status_for_table %></td>
|
2014-12-11 09:48:10 +00:00
|
|
|
<td>
|
|
|
|
<%= qa.category.title rescue "" %>
|
|
|
|
<% if (qa.category.disable rescue false) %>
|
|
|
|
<span class='label'><%= t(:disabled) %></span>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
2014-08-07 10:47:37 +00:00
|
|
|
<td>
|
2020-03-20 07:20:16 +00:00
|
|
|
<% if @faq_page_url != '#'%>
|
2021-06-11 04:17:49 +00:00
|
|
|
<a href='<%="/#{I18n.locale}#{@faq_page_url}/#{qa.title.to_s[0..6]}-#{qa.uid}"%>' target="_blank"><%= qa.title %></a>
|
2020-03-20 07:20:16 +00:00
|
|
|
<% else %>
|
2020-03-20 07:26:06 +00:00
|
|
|
<a href="#"><%= qa.title %></a>
|
2020-03-20 07:20:16 +00:00
|
|
|
<% end %>
|
2014-08-07 10:47:37 +00:00
|
|
|
<div class="quick-edit">
|
|
|
|
<ul class="nav nav-pills">
|
|
|
|
<% if can_edit_or_delete?(qa) %>
|
|
|
|
<li><a href="/<%= I18n.locale.to_s %>/admin/faqs/<%= qa.id.to_s %>/edit"><%= t(:edit) %></a></li>
|
|
|
|
<li><a href="/admin/faqs/<%= qa.id.to_s %>" data-method="delete" data-confirm="Are you sure?"><%= t(:delete_) %></a></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<% qa.tags.each do |tag| %>
|
|
|
|
<span class="label label-warning"><%= tag.name %></span>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
2020-03-20 08:48:31 +00:00
|
|
|
<td><%=User.find(qa.update_user_id).user_name rescue ''%></td>
|
2014-08-07 10:47:37 +00:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<%=
|
|
|
|
content_tag :div, class: "bottomnav clearfix" do
|
2021-06-11 04:15:59 +00:00
|
|
|
content_tag(:div, paginate(@qas), class: "pagination pagination-centered") +
|
|
|
|
content_tag(:div, link_to(t(:new_),new_admin_faq_path, :class=>"btn btn-primary"), class: "pull-right")
|
2014-08-07 10:47:37 +00:00
|
|
|
end
|
|
|
|
%>
|