var htmlvalue = "<%= escape_javascript(render :partial => 'subjects/publish_notice')%>"; pop_box_new(htmlvalue,563,406); <% if @status == 2 %> <% Shixun.where(:id => @subject.stage_shixuns.map(&:shixun_id), :status => [0, 1]).each do |shixun| %> $("#stage_shixun_<%= shixun.id %>").find(".fa-exclamation-circle").parent().show(); <% end %> <% end %>