<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
diff --git a/app/views/student_work/new.html.erb b/app/views/student_work/new.html.erb
index c7f1d45c4..09544d004 100644
--- a/app/views/student_work/new.html.erb
+++ b/app/views/student_work/new.html.erb
@@ -21,6 +21,19 @@
"

");
$('#ajax-modal').parent().css("top","30%").css("left","20%").css("position","fixed");
}
+
+ // 点击 checkbox选中引用的资源的时候,保存该资源的id到session里去
+ function store_seleted_resource(dom){
+ if(dom.attr('checked') == 'checked' ){
+ $.get(
+ '<%= store_selected_resource_user_path(User.current) %>'+'?save=y&res_id='+dom.val()
+ )
+ }else {
+ $.get(
+ '<%= store_selected_resource_user_path(User.current) %>'+'?save=n&res_id='+dom.val()
+ )
+ }
+ }