parent
08cde8a142
commit
e900e6d6fd
|
@ -4,14 +4,16 @@
|
|||
<p><%= h("#{@attachment.description} - ") unless @attachment.description.blank? %>
|
||||
<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 -%>
|
||||
<span class="size">(<%= number_to_human_size @attachment.filesize %>)</span>   <span class="size">
|
||||
<%= link = link_to(l(:button_add), {:controller => 'code_review',
|
||||
<span class="size">(<%= number_to_human_size @attachment.filesize %>)</span>   
|
||||
<span class="size">
|
||||
<% if @attachment!=nil&&@attachment.container_type == 'Document' %>
|
||||
<%= link = link_to(l(:button_add), {:controller => 'code_review',
|
||||
:action => 'assign', :action_type => 'attachment',
|
||||
:id=>@attachment.project,
|
||||
:change_id => '', :attachment_id => @attachment.id,
|
||||
}, :class => 'icon icon-add') %>
|
||||
<% end %>
|
||||
</span></p>
|
||||
|
||||
</div>
|
||||
|
||||
<%= render :partial => 'common/file', :locals => {:content => @content, :filename => @attachment.filename} %>
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<div class="autoscroll">
|
||||
<table class="filecontent syntaxhl">
|
||||
<table class="filecontent syntaxhl" >
|
||||
<tbody>
|
||||
<% line_num = 1 %>
|
||||
<% syntax_highlight_lines(filename, Redmine::CodesetUtil.to_utf8_by_setting(content)).each do |line| %>
|
||||
<tr>
|
||||
<th class="line-num" id="L<%= line_num %>">
|
||||
<a href="#L<%= line_num %>"><%= line_num %></a>
|
||||
<th class="line-num" id="L<%= line_num %>" style="vertical-align: top;">
|
||||
<a href="#L<%= line_num %>" style="padding-top: 0px;"><%= line_num %></a>
|
||||
</th>
|
||||
<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>
|
||||
</tr>
|
||||
<% line_num += 1 %>
|
||||
|
|
Loading…
Reference in New Issue