Show view/annotate/download links on repositories/entries and repositories/annotate views (#2367).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2167 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
4fd2e4aa90
commit
3f80a89a69
|
@ -127,6 +127,9 @@ class RepositoriesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def annotate
|
def annotate
|
||||||
|
@entry = @repository.entry(@path, @rev)
|
||||||
|
show_error_not_found and return unless @entry
|
||||||
|
|
||||||
@annotate = @repository.scm.annotate(@path, @rev)
|
@annotate = @repository.scm.annotate(@path, @rev)
|
||||||
render_error l(:error_scm_annotate) and return if @annotate.nil? || @annotate.empty?
|
render_error l(:error_scm_annotate) and return if @annotate.nil? || @annotate.empty?
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<p>
|
||||||
|
<% if @repository.supports_cat? %>
|
||||||
|
<%= link_to l(:button_view), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev } %> |
|
||||||
|
<% end %>
|
||||||
|
<% if @repository.supports_annotate? %>
|
||||||
|
<%= link_to l(:button_annotate), {:action => 'annotate', :id => @project, :path => to_path_param(@path), :rev => @rev } %> |
|
||||||
|
<% end %>
|
||||||
|
<%= link_to(l(:button_download), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev, :format => 'raw' }) if @repository.supports_cat? %>
|
||||||
|
<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
|
||||||
|
</p>
|
|
@ -1,5 +1,7 @@
|
||||||
<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
|
<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
|
||||||
|
|
||||||
|
<p><%= render :partial => 'link_to_functions' %></p>
|
||||||
|
|
||||||
<% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %>
|
<% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %>
|
||||||
|
|
||||||
<div class="autoscroll">
|
<div class="autoscroll">
|
||||||
|
|
|
@ -1,15 +1,6 @@
|
||||||
<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => (@entry ? @entry.kind : nil), :revision => @rev } %></h2>
|
<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => (@entry ? @entry.kind : nil), :revision => @rev } %></h2>
|
||||||
|
|
||||||
<p>
|
<p><%= render :partial => 'link_to_functions' %></p>
|
||||||
<% if @repository.supports_cat? %>
|
|
||||||
<%= link_to l(:button_view), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev } %> |
|
|
||||||
<% end %>
|
|
||||||
<% if @repository.supports_annotate? %>
|
|
||||||
<%= link_to l(:button_annotate), {:action => 'annotate', :id => @project, :path => to_path_param(@path), :rev => @rev } %> |
|
|
||||||
<% end %>
|
|
||||||
<%= link_to(l(:button_download), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev, :format => 'raw' }) if @repository.supports_cat? %>
|
|
||||||
<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<%= render_properties(@properties) %>
|
<%= render_properties(@properties) %>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
|
<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
|
||||||
|
|
||||||
|
<p><%= render :partial => 'link_to_functions' %></p>
|
||||||
|
|
||||||
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
|
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
<% content_for :header_tags do %>
|
||||||
|
|
Loading…
Reference in New Issue