This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
redmine_entrouvert/app/views/attachments/diff.html.erb

25 lines
1.2 KiB
Plaintext

<h2><%=h @attachment.filename %></h2>
<div class="attachments">
<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></p>
</div>
<%= form_tag({}, :method => 'get') do %>
<p>
<%= l(:label_view_diff) %>:
<label><%= radio_button_tag 'type', 'inline', @diff_type != 'sbs', :onchange => "this.form.submit()" %> <%= l(:label_diff_inline) %></label>
<label><%= radio_button_tag 'type', 'sbs', @diff_type == 'sbs', :onchange => "this.form.submit()" %> <%= l(:label_diff_side_by_side) %></label>
</p>
<pre class="format-patch-description"><%= @diff_format_patch %></pre>
<pre class="format-patch-diff-stat"><%= @diffstat_format_patch %></pre>
<% end %>
<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type, :diff_style => nil} %>
<% html_title @attachment.filename %>
<% content_for :header_tags do -%>
<%= stylesheet_link_tag "scm" -%>
<% end -%>