diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 229fc67ab..34662d429 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -31,6 +31,8 @@ class TagsController < ApplicationController @obj = Project.find_by_id(@obj_id) when '3' then @obj = Issue.find_by_id(@obj_id) + when '4' then + @obj = Bid.find_by_id(@obj_id) else @obj = nil end diff --git a/app/models/tag.rb b/app/models/tag.rb deleted file mode 100644 index b6faeda5b..000000000 --- a/app/models/tag.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Tag < ActiveRecord::Base - attr_accessible :content -#添加代码 - has_many :projects, :through => :project_tags - has_many :project_tags, :class_name => 'ProjectTags' - - #确定content不会被重复写入 - validates_uniqueness_of :content - validates_presence_of :content - - #添加tag内容 - def self.add_content(content) - @tag=Tag.new - @tag.content = content - @tag.save - true - end -end -#添加结束 \ No newline at end of file diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index c7ce9a231..6e0609d6a 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -29,8 +29,7 @@ <%= authoring @issue.created_on, @issue.author %>. <% if @issue.created_on != @issue.updated_on %> <%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>. - <% end %> - + <% end %>

diff --git a/app/views/layouts/_tag.html.erb b/app/views/layouts/_tag.html.erb index 04c62fd1f..65d6c55c0 100644 --- a/app/views/layouts/_tag.html.erb +++ b/app/views/layouts/_tag.html.erb @@ -1,7 +1,26 @@ - - - +
+ + + + <% if object_flag == '3' %> + <%= toggle_link (image_tag "/images/add.png"), 'put-tag-form-issue', {:focus => 'name'} %> +
+ <%= render :partial => "layouts/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %> +
+ +
+<% else %> <%= toggle_link (image_tag "/images/add.png"), 'put-tag-form', {:focus => 'name'} %>
<%= render :partial => "layouts/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %> @@ -17,4 +36,5 @@ <%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();'%> <% end %>
- +
+<% end %> diff --git a/app/views/layouts/base_bids.html.erb b/app/views/layouts/base_bids.html.erb index f61d1d1c7..350b1b5d1 100644 --- a/app/views/layouts/base_bids.html.erb +++ b/app/views/layouts/base_bids.html.erb @@ -19,9 +19,8 @@
- - <%=render :partial => 'layouts/base_header'%> - + <%= render :partial => 'layouts/base_header'%> +