chromesetting
parent
664b3b22db
commit
5745ff8c28
@ -1,6 +1,8 @@
|
||||
class Admins::ShixunFeedbackMessagesController < Admins::BaseController
|
||||
|
||||
def index
|
||||
|
||||
default_sort('created_at', 'desc')
|
||||
@params_page = params[:page] || 1
|
||||
@discusses = paginate Discuss.where(:dis_type => 'Shixun').preload(:user)
|
||||
end
|
||||
end
|
@ -0,0 +1 @@
|
||||
$(".shixun_feedback_messages-list-container").html("<%= j render partial: "admins/shixun_feedback_messages/shared/list", locals: {shixun_settings:@discusses} %>")
|
@ -1,24 +1,28 @@
|
||||
<table class="table table-hover text-center">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th width="6%">ID</th>
|
||||
<th width="10%">标识</th>
|
||||
<th width="22%" class="text-left">实训名称</th>
|
||||
<th width="10%">实训老师</th>
|
||||
<th width="6%">完成</th>
|
||||
<th width="6%">经验值</th>
|
||||
<th width="10%">学员姓名</th>
|
||||
<th width="16%" class="text-left">学员单位</th>
|
||||
<th width="14%">11</th>
|
||||
<th width="5%">序号</th>
|
||||
<th width="25%" class="text-left">实训名称</th>
|
||||
<th width="50%" class="text-left">评论内容</th>
|
||||
<th width="10%">评论者</th>
|
||||
<th width="10%">评论时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% if true %>
|
||||
|
||||
<% if discusses.present? %>
|
||||
<% discusses.each_with_index do |discuss, index| %>
|
||||
<tr>
|
||||
<td><%= (@params_page.to_i - 1) * 20 + index + 1 %></td>
|
||||
<td class="text-left"><%= discuss.dis.name %></td>
|
||||
<td class="text-left"><%= content_safe discuss.content %></td>
|
||||
<td><%= discuss.user.show_real_name %></td>
|
||||
<td><%= format_time discuss.created_at %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render 'admins/shared/no_data_for_table' %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%#= render partial: 'admins/shared/paginate', locals: { objects: myshixuns } %>
|
||||
<%= render partial: 'admins/shared/paginate', locals: { objects: discusses } %>
|
@ -1,7 +1,12 @@
|
||||
json.(@result, :id, :status, :error_line, :error_msg,
|
||||
:input, :output, :execute_time, :execute_memory)
|
||||
json.status 0
|
||||
json.message "评测成功"
|
||||
json.data do
|
||||
json.(@result, :id, :status, :error_line, :error_msg,
|
||||
:input, :output, :execute_time, :execute_memory)
|
||||
# 提交模式多了一个预计输出
|
||||
if @mode == "submit"
|
||||
json.expected_output @result.expected_output
|
||||
if @mode == "submit"
|
||||
json.expected_output @result.expected_output
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
Reference in new issue