diff --git a/app/models/issue.rb b/app/models/issue.rb index 4c5e77cb5..f47e1c6f9 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -564,10 +564,8 @@ class Issue < ActiveRecord::Base end # 缺陷的短描述信息 def short_description(length = 255) - # 不再使用短描述 - #description.gsub(/<\/?.*?>/,"").html_safe if description + description.gsub(/<\/?.*?>/,"").html_safe if description #description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description - description end private :workflow_rule_by_attribute diff --git a/app/models/news.rb b/app/models/news.rb index 860dd0baa..4f8601796 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -76,10 +76,9 @@ class News < ActiveRecord::Base # 新闻的短描述信息 def short_description(length = 255) - #description.gsub(/<\/?.*?>/,"").html_safe if description + description.gsub(/<\/?.*?>/,"").html_safe if description #description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description - # 不再使用短描述 - description + #description end private diff --git a/app/models/open_source_project.rb b/app/models/open_source_project.rb index 4a657edb4..0adc0957f 100644 --- a/app/models/open_source_project.rb +++ b/app/models/open_source_project.rb @@ -84,10 +84,10 @@ class OpenSourceProject < ActiveRecord::Base # end def short_description(length = 255) - #description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description + description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description #description.gsub(/<\/?.*?>/,"").html_safe if description # 不再使用短描述 - description + # description end def applied_by?(user) diff --git a/app/models/project.rb b/app/models/project.rb index 6c453baa9..5bcd2e8c5 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -630,9 +630,7 @@ class Project < ActiveRecord::Base # Returns a short description of the projects (first lines) def short_description(length = 255) #description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description - # 不再使用短描述 - # description.gsub(/<\/?.*?>/,"").html_safe if description - description + description.gsub(/<\/?.*?>/,"").html_safe if description end def css_classes diff --git a/app/views/contests/show_attendingcontest.html.erb b/app/views/contests/show_attendingcontest.html.erb index 752f54163..ba27f09b5 100644 --- a/app/views/contests/show_attendingcontest.html.erb +++ b/app/views/contests/show_attendingcontest.html.erb @@ -108,12 +108,18 @@
- - <%= l(:label_work_description) %> - * : - <%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %> - (<%= l(:label_workdescription_lengthlimit) %>) - + + <%= l(:label_work_description) %> + * : + + + + + + +