link_to_view_and_annotate.diff

Go MAEDA, 2008-12-20 14:35

Download (2.6 KB)

View differences:

app/controllers/repositories_controller.rb (working copy)
127 127
  end
128 128
  
129 129
  def annotate
130
    @entry = @repository.entry(@path, @rev)
131
    show_error_not_found and return unless @entry
132

  
130 133
    @annotate = @repository.scm.annotate(@path, @rev)
131 134
    render_error l(:error_scm_annotate) and return if @annotate.nil? || @annotate.empty?
132 135
  end
app/views/repositories/entry.rhtml (working copy)
1 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 5
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
4 6

  
5 7
<% content_for :header_tags do %>
app/views/repositories/changes.rhtml (working copy)
1 1
<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => (@entry ? @entry.kind : nil), :revision => @rev } %></h2>
2 2

  
3
<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>
3
<p><%= render :partial => 'link_to_functions' %></p>
13 4

  
14 5
<%= render_properties(@properties) %>
15 6

  
app/views/repositories/annotate.rhtml (working copy)
1 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 5
<% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %>
4 6

  
5 7
<div class="autoscroll">