Project

General

Profile

Feature #26035 » 0001-Move-download-link-to-contextual-area.patch

Jan from Planio www.plan.io, 2017-05-24 18:51

View differences:

app/views/layouts/_file.html.erb
<div class="contextual">
<%= link_to_attachment @attachment, :text => "#{l(:button_download)} (#{number_to_human_size(@attachment.filesize)})", :download => true, :class => 'icon icon-download' -%>
</div>
<h2><%=h @attachment.filename %></h2>
<div class="attachments">
<p><%= "#{@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, :class => 'icon icon-download' -%>
<span class="size">(<%= number_to_human_size @attachment.filesize %>)</span></p>
</div>
<%= yield %>
app/views/repositories/_link_to_functions.html.erb
<%= render :partial => 'common/tabs', :locals => {:tabs => tabs, :selected_tab => action_name} %>
<p>
<%= link_to(l(:button_download),
{:action => 'raw', :id => @project,
:repository_id => @repository.identifier_param,
:path => to_path_param(@path),
:rev => @rev}, class: 'icon icon-download') if @repository.supports_cat? %>
<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
</p>
<% end %>
app/views/repositories/_navigation.html.erb
<%= javascript_include_tag 'repository_navigation' %>
<% end %>
<% if @entry && @repository.supports_cat? %>
<% download_label = @entry.size ? "#{l :button_download} (#{number_to_human_size @entry.size})" : l(:button_download) %>
<%= link_to(download_label,
{:action => 'raw', :id => @project,
:repository_id => @repository.identifier_param,
:path => to_path_param(@path),
:rev => @rev}, class: 'icon icon-download') %>
<% end %>
<%= link_to l(:label_statistics),
{:action => 'stats', :id => @project, :repository_id => @repository.identifier_param},
:class => 'icon icon-stats' if @repository.supports_all_revisions? %>
(3-3/5)