Always show 'View' and 'Annotate' links on repository files (download will be forced when clicking 'View' if the file is binary).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1274 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -110,7 +110,7 @@ class RepositoriesController < ApplicationController
|
||||
|
||||
def annotate
|
||||
@annotate = @repository.scm.annotate(@path, @rev)
|
||||
show_error_not_found and return if @annotate.nil? || @annotate.empty?
|
||||
render_error l(:error_scm_annotate) and return if @annotate.nil? || @annotate.empty?
|
||||
rescue Redmine::Scm::Adapters::CommandFailed => e
|
||||
show_error_command_failed(e.message)
|
||||
end
|
||||
|
||||
@@ -3,13 +3,11 @@
|
||||
<h3><%=h @entry.name %></h3>
|
||||
|
||||
<p>
|
||||
<% if @entry.is_text? %>
|
||||
<% if @repository.supports_cat? %>
|
||||
<%= link_to l(:button_view), {:action => 'entry', :id => @project, :path => @path, :rev => @rev } %> |
|
||||
<% end %>
|
||||
<% if @repository.supports_annotate? %>
|
||||
<%= link_to l(:button_annotate), {:action => 'annotate', :id => @project, :path => @path, :rev => @rev } %> |
|
||||
<% end %>
|
||||
<% if @repository.supports_cat? %>
|
||||
<%= link_to l(:button_view), {:action => 'entry', :id => @project, :path => @path, :rev => @rev } %> |
|
||||
<% end %>
|
||||
<% if @repository.supports_annotate? %>
|
||||
<%= link_to l(:button_annotate), {:action => 'annotate', :id => @project, :path => @path, :rev => @rev } %> |
|
||||
<% end %>
|
||||
<%= link_to(l(:button_download), {:action => 'entry', :id => @project, :path => @path, :rev => @rev, :format => 'raw' }) if @repository.supports_cat? %>
|
||||
<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
|
||||
|
||||
Reference in New Issue
Block a user