From 4c5ba2b6dfb5f9e4ed1291c370f43dc41c55a942 Mon Sep 17 00:00:00 2001
From: william
Date: Thu, 1 Aug 2013 20:38:38 +0800
Subject: [PATCH] =?UTF-8?q?=CD=EA=C9=C6Tag=C4=A3=BF=E9=A1=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/tags_controller.rb | 2 ++
app/models/tag.rb | 19 ------------
app/views/issues/show.html.erb | 3 +-
app/views/layouts/_tag.html.erb | 28 ++++++++++++++---
app/views/layouts/base_bids.html.erb | 34 ++++++---------------
app/views/tags/_tag_search_results.html.erb | 1 -
app/views/tags/index.html.erb | 16 ++++++++--
app/views/users/tag_save.js.erb | 12 +++++++-
8 files changed, 61 insertions(+), 54 deletions(-)
delete mode 100644 app/models/tag.rb
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 %>
+<% 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'%>
+