Conflicts: app/views/managements/_partner_customer_list.html.erbdev_partners
commit
dac1d99f9e
@ -1,19 +1,23 @@
|
||||
<li class="clearfix tableHead">
|
||||
<span>序号</span>
|
||||
<span>客户名称</span>
|
||||
<span>操作</span>
|
||||
<span><a href="<%= customers_list_managements_path(:partner_id => @current_partner.try(:id)) %>"s
|
||||
<span>
|
||||
<a href="<%= customers_list_managements_path(:partner_id => @current_partner.try(:id)) %>"
|
||||
data-remote="true" class="color-blue">+添加</a>
|
||||
</span>
|
||||
<span>添加时间</span>
|
||||
</li>
|
||||
<% @current_partner.try(:customers).try(:each_with_index) do |customer, index| %>
|
||||
<li>
|
||||
<span><%= index + 1 %></span>
|
||||
<span class="task-hide"><%= customer.school.name %></span>
|
||||
<a href="<%= customer.school.statistic_url %>" target="_blank" class="color-blue"><%= customer.school.name %></a>
|
||||
<span>
|
||||
<a href="javascript:void(0)" onclick="delete_confirm_box_2('<%= delete_customers_managements_path(customer: customer.id, partner_id: @current_partner.try(:id)) %>',
|
||||
'确定要删除该客户吗')" class="color-grey-9">删除</a>
|
||||
</span>
|
||||
<a href="javascript:void(0)" onclick="delete_confirm_box_2('<%= delete_customers_managements_path(customer: customer.id, partner_id: @current_partner.try(:id)) %>',
|
||||
'确定要删除该客户吗')" class="color-grey-9">删除</a>
|
||||
</span>
|
||||
<span>
|
||||
<%= format_time customer.created_at %>
|
||||
</span>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -1,3 +1,4 @@
|
||||
console.log("<%= @user_picture.present? %>")
|
||||
<% if @user_picture.present? %>
|
||||
$("#picture_display").html('<%= j (render :partial => 'games/picture_display') %>');
|
||||
$("#picture_display").show();
|
||||
|
@ -0,0 +1,20 @@
|
||||
class MigrateExerciseAnswerScore < ActiveRecord::Migration
|
||||
def up
|
||||
exercise = Exercise.where(:id => 1527).first
|
||||
if exercise.present?
|
||||
exercise.exercise_users.each do |exercise_user|
|
||||
score = 0
|
||||
exercise.exercise_questions.each do |question|
|
||||
ExerciseShixunAnswer.where(exercise_question_id: question.id, user_id: exercise_user.user_id).each do |answer|
|
||||
score += answer.score
|
||||
end
|
||||
end
|
||||
|
||||
exercise_user.update_attributes(objective_score: score, score: score)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
Loading…
Reference in new issue