parent
ed00adb3ba
commit
8eac756ac7
|
@ -564,8 +564,10 @@ 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,8 +76,10 @@ 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
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -85,7 +85,9 @@ class OpenSourceProject < ActiveRecord::Base
|
|||
|
||||
def short_description(length = 255)
|
||||
#description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description
|
||||
description.gsub(/<\/?.*?>/,"").html_safe if description
|
||||
#description.gsub(/<\/?.*?>/,"").html_safe if description
|
||||
# 不再使用短描述
|
||||
description
|
||||
end
|
||||
|
||||
def applied_by?(user)
|
||||
|
|
|
@ -630,7 +630,9 @@ 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.gsub(/<\/?.*?>/,"").html_safe if description
|
||||
description
|
||||
end
|
||||
|
||||
def css_classes
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
<div class="d-p-projectlist">
|
||||
<% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[5]) %>
|
||||
|
||||
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
|
||||
<li style="overflow:auto;word-break:break-all;height:100%;" class='<%= cycle("odd", "even") %>'>
|
||||
<div class="avatar-4" style="float: left; margin-top: 7px">
|
||||
<%= image_tag('/images/contest1.png')%>
|
||||
</div>
|
||||
|
@ -165,8 +165,8 @@
|
|||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class='text_nowrap' style="float: left;margin:5px; margin-left: 12px; margin-bottom: 2px; width: 380px;">
|
||||
<span class='font_lighter' title =<%=contest.description.to_s%>><%=contest.description.truncate(50, omission: '...')%></span>
|
||||
<div style="float: left;margin:5px; margin-left: 12px; margin-bottom: 2px; width: 380px;">
|
||||
<span class='font_lighter' title =<%=contest.description.to_s%>><%=contest.description.to_s%></span>
|
||||
</div><br />
|
||||
|
||||
<div style="padding-left: 57px; clear: left;">
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<% #projects = find_miracle_project(10, 3) %>
|
||||
<% @projects.map do |project| %>
|
||||
<!--<%# cache cache_key_for_project(project) do %> -->
|
||||
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
|
||||
<li style="overflow:auto;word-break:break-all;height:100%;" class='<%= cycle("odd", "even") %>'>
|
||||
<div style="float: left;">
|
||||
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
|
||||
</div>
|
||||
|
@ -72,10 +72,10 @@
|
|||
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
|
||||
(<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>)
|
||||
</div>
|
||||
<div class='text_nowrap' style="float: left;margin:5px; margin-left: 10px; width: 380px;">
|
||||
<span class='font_lighter' title =<%=project.short_description.to_s%>><%=project.short_description.truncate(50, omission: '...')%></span>
|
||||
<div style=" float: left;margin:5px; margin-left: 10px; width: 380px;">
|
||||
<span class='font_lighter' title =<%=project.description.to_s%>><%=project.description%></span>
|
||||
</div>
|
||||
<div style="position:absolute; bottom:0;right:0;margin:5px 10px 5px 5px ;">
|
||||
<div >
|
||||
<%# issue_count = project.issues.count %>
|
||||
<%# issue_journal_count = project.issue_changes.count %>
|
||||
<%# issue_score = issue_count * 0.2 %>
|
||||
|
|
Loading…
Reference in New Issue