短描述修改
This commit is contained in:
parent
5087f90a26
commit
0e9a15aad5
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -108,12 +108,18 @@
|
|||
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_description) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
|
||||
</tr>
|
||||
<tr style="width:800px;">
|
||||
<span style="margin-top: 1px"><%= l(:label_work_description) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
|
||||
<span class="jstEditor">
|
||||
<textarea id="contest_description" style="font-size:small;width:400px;" rows="5" cols="40">
|
||||
<%= @contest.description %>
|
||||
</textarea>
|
||||
</span>
|
||||
|
||||
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
|
Loading…
Reference in New Issue