diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 2a0d0445d..bb9a44104 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -382,7 +382,9 @@ class TagsController < ApplicationController when '8' return 'OpenSourceProject' when '9' - return 'Course' + return 'Course' + when '10' + return 'Attachment' else render_error :message => e.message return diff --git a/app/helpers/tags_helper.rb b/app/helpers/tags_helper.rb index 17b68c3f6..284ee8c43 100644 --- a/app/helpers/tags_helper.rb +++ b/app/helpers/tags_helper.rb @@ -20,6 +20,8 @@ module TagsHelper @obj= Contest.find_by_id(obj_id) when '9' @obj= Course.find_by_id(obj_id) + when '10' + @obj = Attachment.find_by_id(obj_id) else raise Exception, '[TagsHelper] ===> tag type unknow.' end diff --git a/app/views/tags/remove_tag.js.erb b/app/views/tags/remove_tag.js.erb index b102776d5..b8c65c13e 100644 --- a/app/views/tags/remove_tag.js.erb +++ b/app/views/tags/remove_tag.js.erb @@ -9,6 +9,10 @@ $('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_n <% elsif @object_flag == '9'%> $('#tags_show').html('<%= escape_javascript(render :partial => 'tags/new_tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>'); +<% elsif @object_flag == '10'%> +$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); +$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/course_attachment_tag_name', + :locals => {:obj => @obj,:non_list_all => false, :object_flag => @object_flag}) %>'); <% else%> $('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>'); diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index e2ba02752..4d30ce369 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -109,7 +109,7 @@ a:hover.grey_btn{ background:#717171; color:#fff;} .re_top input{ float:left;} .re_search{ margin-top:7px; margin-left:5px;} .re_schbox{ width:240px; height:24px; border:1px solid #64bdd9; color:#666666;} -.re_schbtn{ width:60px; height:26px; color:#fff; margin-right:5px; border:none; margin-left:0px; } +.re_schbtn{ width:60px; height:26px; color:#fff; margin-right:5px; border:none; margin-left:0px;padding-left: 0px;} a.re_fabu { display:block; width:90px; height:30px; font-size:14px; color:#fff; text-align:center; padding-top:10px; } a:hover.re_fabu{background:#55a1b9;} .re_con{ margin:5px; width:665px;}