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