diff --git a/app/views/tags/_project_tag.html.erb b/app/views/tags/_project_tag.html.erb index ce80e36ab..408f3ba1d 100644 --- a/app/views/tags/_project_tag.html.erb +++ b/app/views/tags/_project_tag.html.erb @@ -1,15 +1,6 @@ -
- <%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %> +
+
+ <%= render :partial => "tags/tag_project_new_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %> +
-<% if User.current.logged?%> - <%= l(:label_add_tag)%> - -<% end%> diff --git a/app/views/tags/_tag_project_new_name.html.erb b/app/views/tags/_tag_project_new_name.html.erb new file mode 100644 index 000000000..e657071bc --- /dev/null +++ b/app/views/tags/_tag_project_new_name.html.erb @@ -0,0 +1,30 @@ +<% @tags = obj.reload.tag_list %> +<% if non_list_all && @tags.size > 0 %> + +<% else %> + + <% if @tags.size > 0 %> + <% @tags.each do |tag| %> + + <%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id, :class => 'pt5' %> + + <%= 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 (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %> + + + <% end %> + <% end %> +<% end %> + +<% if User.current.logged?%> + <%= l(:label_add_tag)%> + +<% end%> + + diff --git a/app/views/tags/remove_tag.js.erb b/app/views/tags/remove_tag.js.erb index b8c65c13e..cd56fef1a 100644 --- a/app/views/tags/remove_tag.js.erb +++ b/app/views/tags/remove_tag.js.erb @@ -2,6 +2,9 @@ <% if @object_flag == '3'%> $('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>'); +<% elsif @object_flag == '2'%> +$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_project_new_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>'); <% elsif @object_flag == '6'%> $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name', diff --git a/app/views/tags/tag_save.js.erb b/app/views/tags/tag_save.js.erb index 74a38c99d..992c472ed 100644 --- a/app/views/tags/tag_save.js.erb +++ b/app/views/tags/tag_save.js.erb @@ -4,6 +4,10 @@ $('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_n :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); //$('#put-tag-form-issue').hide(); $('#name-issue').val(""); +<% elsif @obj_flag == '2'%> +$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_project_new_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); +$('#tags_name2').val(""); <% elsif @obj_flag == '6'%> <%if @course%> $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();