解决查看文本页面内容未换行Bug

修改文本页面行号样式居上
修改新增评审在没有的时候引发的Bug
competition
linhk 11 years ago
parent 08cde8a142
commit e900e6d6fd

@ -4,14 +4,16 @@
<p><%= h("#{@attachment.description} - ") unless @attachment.description.blank? %> <p><%= h("#{@attachment.description} - ") unless @attachment.description.blank? %>
<span class="author"><%= link_to_user(@attachment.author) %>, <%= format_time(@attachment.created_on) %></span></p> <span class="author"><%= link_to_user(@attachment.author) %>, <%= format_time(@attachment.created_on) %></span></p>
<p><%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%> <p><%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%>
<span class="size">(<%= number_to_human_size @attachment.filesize %>)</span>&nbsp&nbsp&nbsp<span class="size"> <span class="size">(<%= number_to_human_size @attachment.filesize %>)</span>&nbsp&nbsp&nbsp
<%= link = link_to(l(:button_add), {:controller => 'code_review', <span class="size">
<% if @attachment!=nil&&@attachment.container_type == 'Document' %>
<%= link = link_to(l(:button_add), {:controller => 'code_review',
:action => 'assign', :action_type => 'attachment', :action => 'assign', :action_type => 'attachment',
:id=>@attachment.project, :id=>@attachment.project,
:change_id => '', :attachment_id => @attachment.id, :change_id => '', :attachment_id => @attachment.id,
}, :class => 'icon icon-add') %> }, :class => 'icon icon-add') %>
<% end %>
</span></p> </span></p>
</div> </div>
&nbsp; &nbsp;
<%= render :partial => 'common/file', :locals => {:content => @content, :filename => @attachment.filename} %> <%= render :partial => 'common/file', :locals => {:content => @content, :filename => @attachment.filename} %>

@ -1,14 +1,14 @@
<div class="autoscroll"> <div class="autoscroll">
<table class="filecontent syntaxhl"> <table class="filecontent syntaxhl" >
<tbody> <tbody>
<% line_num = 1 %> <% line_num = 1 %>
<% syntax_highlight_lines(filename, Redmine::CodesetUtil.to_utf8_by_setting(content)).each do |line| %> <% syntax_highlight_lines(filename, Redmine::CodesetUtil.to_utf8_by_setting(content)).each do |line| %>
<tr> <tr>
<th class="line-num" id="L<%= line_num %>"> <th class="line-num" id="L<%= line_num %>" style="vertical-align: top;">
<a href="#L<%= line_num %>"><%= line_num %></a> <a href="#L<%= line_num %>" style="padding-top: 0px;"><%= line_num %></a>
</th> </th>
<td class="line-code"> <td class="line-code">
<pre><%= line.html_safe %></pre> <pre style="width:880px;word-wrap: break-word; word-break: normal; "><%= line.html_safe %></pre>
</td> </td>
</tr> </tr>
<% line_num += 1 %> <% line_num += 1 %>

Loading…
Cancel
Save