@@ -0,0 +1,10 | |||||
|
1 | <p> | |||
|
2 | <% if @repository.supports_cat? %> | |||
|
3 | <%= link_to l(:button_view), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev } %> | | |||
|
4 | <% end %> | |||
|
5 | <% if @repository.supports_annotate? %> | |||
|
6 | <%= link_to l(:button_annotate), {:action => 'annotate', :id => @project, :path => to_path_param(@path), :rev => @rev } %> | | |||
|
7 | <% end %> | |||
|
8 | <%= link_to(l(:button_download), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev, :format => 'raw' }) if @repository.supports_cat? %> | |||
|
9 | <%= "(#{number_to_human_size(@entry.size)})" if @entry.size %> | |||
|
10 | </p> |
@@ -127,6 +127,9 class RepositoriesController < ApplicationController | |||||
127 | end |
|
127 | end | |
128 |
|
128 | |||
129 | def annotate |
|
129 | def annotate | |
|
130 | @entry = @repository.entry(@path, @rev) | |||
|
131 | show_error_not_found and return unless @entry | |||
|
132 | ||||
130 | @annotate = @repository.scm.annotate(@path, @rev) |
|
133 | @annotate = @repository.scm.annotate(@path, @rev) | |
131 | render_error l(:error_scm_annotate) and return if @annotate.nil? || @annotate.empty? |
|
134 | render_error l(:error_scm_annotate) and return if @annotate.nil? || @annotate.empty? | |
132 | end |
|
135 | end |
@@ -1,5 +1,7 | |||||
1 | <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2> |
|
1 | <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2> | |
2 |
|
2 | |||
|
3 | <p><%= render :partial => 'link_to_functions' %></p> | |||
|
4 | ||||
3 | <% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %> |
|
5 | <% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %> | |
4 |
|
6 | |||
5 | <div class="autoscroll"> |
|
7 | <div class="autoscroll"> |
@@ -1,15 +1,6 | |||||
1 | <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => (@entry ? @entry.kind : nil), :revision => @rev } %></h2> |
|
1 | <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => (@entry ? @entry.kind : nil), :revision => @rev } %></h2> | |
2 |
|
2 | |||
3 | <p> |
|
3 | <p><%= render :partial => 'link_to_functions' %></p> | |
4 | <% if @repository.supports_cat? %> |
|
|||
5 | <%= link_to l(:button_view), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev } %> | |
|
|||
6 | <% end %> |
|
|||
7 | <% if @repository.supports_annotate? %> |
|
|||
8 | <%= link_to l(:button_annotate), {:action => 'annotate', :id => @project, :path => to_path_param(@path), :rev => @rev } %> | |
|
|||
9 | <% end %> |
|
|||
10 | <%= link_to(l(:button_download), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev, :format => 'raw' }) if @repository.supports_cat? %> |
|
|||
11 | <%= "(#{number_to_human_size(@entry.size)})" if @entry.size %> |
|
|||
12 | </p> |
|
|||
13 |
|
4 | |||
14 | <%= render_properties(@properties) %> |
|
5 | <%= render_properties(@properties) %> | |
15 |
|
6 |
@@ -1,5 +1,7 | |||||
1 | <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2> |
|
1 | <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2> | |
2 |
|
2 | |||
|
3 | <p><%= render :partial => 'link_to_functions' %></p> | |||
|
4 | ||||
3 | <%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %> |
|
5 | <%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %> | |
4 |
|
6 | |||
5 | <% content_for :header_tags do %> |
|
7 | <% content_for :header_tags do %> |
General Comments 0
You need to be logged in to leave comments.
Login now