1.修复某些情况下,缺陷列表点赞图标显示错位

2.修复当描述非常短,或者没有描述时,缺陷列表中缺陷的指派人、查看评论按钮显示异常
This commit is contained in:
sw 2014-12-18 09:33:26 +08:00
parent 3d81331f43
commit 813f2d1026
1 changed files with 59 additions and 57 deletions

View File

@ -1,67 +1,69 @@
<div class="autoscroll"> <div class="autoscroll">
<ul> <ul>
<% issue_list(issues) do |issue, level| -%> <% issue_list(issues) do |issue, level| -%>
<% if @query.grouped? && (group = @query.group_by_column.value(issue)) != previous_group %> <% if @query.grouped? && (group = @query.group_by_column.value(issue)) != previous_group %>
<% reset_cycle %> <% reset_cycle %>
<% previous_group = group %> <% previous_group = group %>
<% end %> <% end %>
<div style=""> <div style="">
<li id="issue-<%= issue.id %>" class="hascontextmenu-1 <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>"> <li id="issue-<%= issue.id %>" class="hascontextmenu-1 <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
<% column_content = ( query.inline_columns.map {|column| "#{column_content_new(column, issue)}"}) %> <% column_content = ( query.inline_columns.map {|column| "#{column_content_new(column, issue)}"}) %>
<% if issue.tracker_id == 1 %>
<%= image_tag("/images/task.png", :class => "img-tag-issues") %>
<% end %>
<% if issue.tracker_id == 2 %>
<%= image_tag("/images/feature.png", :class => "img-tag-issues") %>
<% end %>
<% if issue.tracker_id == 3 %>
<%= image_tag("/images/support.png", :class => "img-tag-issues") %>
<% end %>
<% if issue.tracker_id == 4 %>
<%= image_tag("/images/issues.png", :class => "img-tag-issues") %>
<% end %>
<!-- 在这里添加赞和踩--> <ul class="issue_list">
<span id="praise_tread" style="float: right"> <% unless issue.author.nil? || issue.author.name == "Anonymous" %>
<%= render :partial => "/praise_tread/praise_tread",:locals => <ul class="list-group-item-meta" style="word-break: break-all;word-wrap: break-word;width: 100%;">
{:obj => issue,:show_flag => true,:user_id =>User.current.id,:horizontal => false}%> <!-- 在这里添加赞和踩-->
</span> <span id="praise_tread" style="float: right">
<%= render :partial => "/praise_tread/praise_tread",:locals =>
{:obj => issue,:show_flag => true,:user_id =>User.current.id,:horizontal => false}%>
</span>
<span>
<%= link_to issue.author.name, user_path(issue.author), :class => "bid_user_u" %>
</span>
<%= l(:label_post_on)%>
<% a = [] %>
<% a << column_content[1] %>
<%# a << "##{column_content[0]}" << "(#{raw column_content[2]}):" << column_content[4] %>
<% a << "#{issue.source_from}" << "(#{raw column_content[2]}):" << column_content[4] %>
<%= link_to a.join(' '), issue_path(issue.id), :class => "issue-link" , :target =>"_blank"%>
<% if issue.tracker_id == 1 %> <ul class="list-group-item-meta">
<%= image_tag("/images/task.png", :class => "img-tag-issues") %> <div class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;">
<% end %> <%= textilizable issue, :description %>
<% if issue.tracker_id == 2 %> </div>
<%= image_tag("/images/feature.png", :class => "img-tag-issues") %> </ul>
<% end %> </ul>
<% if issue.tracker_id == 3 %> <ul class="list-group-item-meta" style="margin-top: -15px;">
<%= image_tag("/images/support.png", :class => "img-tag-issues") %> <% unless issue.assigned_to_id.nil? %>
<% end %> <span>
<% if issue.tracker_id == 4 %> <%= l(:field_assigned_to)%>&nbsp;
<%= image_tag("/images/issues.png", :class => "img-tag-issues") %> </span>
<% end %>
<ul class="issue_list">
<% unless issue.author.nil? || issue.author.name == "Anonymous" %>
<ul class="list-group-item-meta" style="word-break: break-all;word-wrap: break-word;">
<span> <%= link_to issue.author.name, user_path(issue.author), :class => "bid_user_u" %></span>
<%= l(:label_post_on)%> <% a = [] %>
<% a << column_content[1] %>
<%# a << "##{column_content[0]}" << "(#{raw column_content[2]}):" << column_content[4] %>
<% a << "#{issue.source_from}" << "(#{raw column_content[2]}):" << column_content[4] %>
<%= link_to a.join(' '), issue_path(issue.id), :class => "issue-link" , :target =>"_blank"%>
</ul>
<% end -%>
<ul class="list-group-item-meta">
<div class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;">
<%= textilizable issue, :description %>
</div>
</ul>
<ul class="list-group-item-meta">
<% unless issue.assigned_to_id.nil? %>
<span>
<%= l(:field_assigned_to)%>&nbsp;
</span>
<%= raw column_content[5] %>&nbsp; <%= raw column_content[5] %>&nbsp;
<% end %> <% end %>
<%= l(:label_updated_time_on, format_date(issue.updated_on)).html_safe %> <%= l(:label_updated_time_on, format_date(issue.updated_on)).html_safe %>
<div class="find-comment-class"> <div class="find-comment-class">
<span> <span>
<%= link_to l(:label_find_all_comments), issue_path(issue.id) %> <%= link_to l(:label_find_all_comments), issue_path(issue.id) %>
</span> </span>
<%= l(:label_comments_count, :count => issue.journals.all.count) %> <%= l(:label_comments_count, :count => issue.journals.all.count) %>
</div> </div>
</ul> </ul>
</ul> <% end -%>
</li> </ul>
</div> </li>
<% end -%> </div>
</ul> <% end -%>
</ul>
</div> </div>