课程资源tag点击报错问题,回退后删除无效问题
This commit is contained in:
parent
41e372c16a
commit
ef7949584c
|
@ -317,6 +317,14 @@ class TagsController < ApplicationController
|
||||||
when '8'
|
when '8'
|
||||||
@obj = OpenSourceProject.find_by_id(obj_id)
|
@obj = OpenSourceProject.find_by_id(obj_id)
|
||||||
@obj_pages, @open_source_projects_results, @results_count = for_pagination(get_open_source_projects_by_tag(selected_tags))
|
@obj_pages, @open_source_projects_results, @results_count = for_pagination(get_open_source_projects_by_tag(selected_tags))
|
||||||
|
when '10'
|
||||||
|
@obj = Attachment.find_by_id(obj_id)
|
||||||
|
|
||||||
|
# modifed by Long Jun
|
||||||
|
# this is used to find the attachments that came from the same project and tagged with the same tag.
|
||||||
|
#@result = get_attachments_by_project_tag(selected_tags, @obj)
|
||||||
|
@result = get_attachments_by_tag(selected_tags)
|
||||||
|
@obj_pages, @attachments_results, @results_count = for_pagination(@result)
|
||||||
when '9' then
|
when '9' then
|
||||||
@obj = Course.find_by_id(obj_id)
|
@obj = Course.find_by_id(obj_id)
|
||||||
@obj_pages, @courses_results, @results_count = for_pagination(get_courses_by_tag(selected_tags))
|
@obj_pages, @courses_results, @results_count = for_pagination(get_courses_by_tag(selected_tags))
|
||||||
|
|
|
@ -4,3 +4,8 @@ $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
|
||||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
|
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if @object_flag == "10"%>
|
||||||
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||||
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
|
||||||
|
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
|
||||||
|
<% end %>
|
Loading…
Reference in New Issue