diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 5bd5fb0e3..6738d2135 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -73,7 +73,7 @@ class TagsController < ApplicationController @issues_results, @bids_results, @forums_results, - @attachments_results, + @attachments_results, @contests_results, @courses_results, @open_source_projects_results= refresh_results(@obj_id,@obj_flag,@selected_tags) @@ -109,7 +109,7 @@ class TagsController < ApplicationController @issues_results, @bids_results, @forums_results, - @attachments_results, + @attachments_results, @contests_results, @courses_results, @open_source_projects_results= refresh_results(@obj_id,@show_flag) diff --git a/app/views/tags/_new_tag.html.erb b/app/views/tags/_new_tag.html.erb index bc947e5c5..7db324cd7 100644 --- a/app/views/tags/_new_tag.html.erb +++ b/app/views/tags/_new_tag.html.erb @@ -18,17 +18,6 @@ <% else %>
<% end %> diff --git a/app/views/tags/_new_tag_name.html.erb b/app/views/tags/_new_tag_name.html.erb index a1fb3fa46..6d8d58adb 100644 --- a/app/views/tags/_new_tag_name.html.erb +++ b/app/views/tags/_new_tag_name.html.erb @@ -9,9 +9,21 @@ <%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id, :class => 'pt5' %> - <%= link_to('x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,:taggable_id => obj.id, :taggable_type => object_flag) if (CourseInfos.find_by_course_id(obj.id)).try(:user_id) == User.current.id %> + <%= link_to('x', remove_tag_path(:tag_name => tag,:taggable_id => obj.id, :taggable_type => object_flag), :remote => true, :confirm => l(:text_are_you_sure) ) if (CourseInfos.find_by_course_id(obj.id)).try(:user_id) == User.current.id %> <% end %> <% end %> -<% end %> \ No newline at end of file +<% end %> + +<% if User.current.logged?%> + <%= l(:label_add_tag)%> + +<% end%> \ No newline at end of file diff --git a/app/views/tags/remove_tag.js.erb b/app/views/tags/remove_tag.js.erb index dbad80f96..b102776d5 100644 --- a/app/views/tags/remove_tag.js.erb +++ b/app/views/tags/remove_tag.js.erb @@ -6,8 +6,10 @@ $('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_n $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name', :locals => {:obj => @obj,:non_list_all => false, :object_flag => @object_flag}) %>'); -<% else %> +<% 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}) %>'); +<% else%> $('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>'); - <% end %> \ No newline at end of file