Project

General

Profile

Patch #235 » revision_link.diff

Teruo Adachi, 2008-02-03 11:01

View differences:

app/controllers/repositories_controller.rb (作業コピー)
100 100
    @changes = @changeset.changes.find(:all,
101 101
  						:limit  =>  @changes_pages.items_per_page,
102 102
  						:offset =>  @changes_pages.current.offset)
103
  	
104 103
  	render :action => "revision", :layout => false if request.xhr?	
105 104
  end
106 105
  
app/controllers/projects_controller.rb (作業コピー)
506 506
      @date_from = Date.civil(@year, @month, 1)
507 507
      @date_to = @date_from >> 1
508 508
    end
509
    
509

  
510
    # check if new revisions have been committed in the repository
511
    Repository.fetch_changesets if Setting.autofetch_changesets?
512

  
510 513
    @event_types = %w(issues news files documents wiki_pages changesets)
511 514
    @event_types.delete('wiki_pages') unless @project.wiki
512 515
    @event_types.delete('changesets') unless @project.repository
app/views/repositories/revision.rhtml (作業コピー)
32 32
<tbody>
33 33
<% @changes.each do |change| %>
34 34
<tr class="<%= cycle 'odd', 'even' %>">
35
<td><div class="square action_<%= change.action %>"></div> <%= change.path %> <%= "(#{change.revision})" unless change.revision.blank?  %></td>
35
  <td><div class="square action_<%= change.action %>"></div> <%= link_to l(change.path), :action => 'entry', :id => @changeset.repository_id, :path => change.path %> <%= "(#{change.revision})" unless change.revision.blank?  %></td>
36 36
<td align="right">
37 37
<% if change.action == "M" %>
38 38
<%= link_to l(:label_view_diff), :action => 'diff', :id => @project, :path => change.path, :rev => @changeset.revision %>
(2-2/2)