Index: app/helpers/application_helper.rb =================================================================== --- app/helpers/application_helper.rb (revision 2589) +++ app/helpers/application_helper.rb (working copy) @@ -442,9 +442,21 @@ end when 'commit' if project && (changeset = project.changesets.find(:first, :conditions => ["scmid LIKE ?", "#{name}%"])) - link = link_to h("#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.revision}, - :class => 'changeset', - :title => truncate_single_line(changeset.comments, 100) + + # Changes by Kazuyoshi Tlacaelel. + # Last edited on: Sun Mar 15 15:33:23 JST 2009 + # Point users straight to the diff, rather than sending + # them to the revision and make them click again to see + # a diff and then again to see a diff side by side + # + my_hash = {:only_path => only_path, :controller => 'repositories', + :action => 'diff', :id => project, :type => 'sbs', :rev => changeset.revision} + + link = link_to h("#{name}"), my_hash, :class => 'changeset', + :title => truncate_single_line(changeset.comments, 100) + # + # + # end when 'source', 'export' if project && project.repository Index: app/controllers/issues_controller.rb =================================================================== --- app/controllers/issues_controller.rb (revision 2589) +++ app/controllers/issues_controller.rb (working copy) @@ -102,6 +102,8 @@ @edit_allowed = User.current.allowed_to?(:edit_issues, @project) @priorities = Enumeration::get_values('IPRI') @time_entry = TimeEntry.new + my_query = "select * from changesets where comments like '%##{@issue.id} %' order by committed_on desc" + @related_changesets = Changeset.find_by_sql(my_query) respond_to do |format| format.html { render :template => 'issues/show.rhtml' } format.atom { render :action => 'changes', :layout => false, :content_type => 'application/atom+xml' } Index: app/views/repositories/_revisions.rhtml =================================================================== --- app/views/repositories/_revisions.rhtml (revision 2589) +++ app/views/repositories/_revisions.rhtml (working copy) @@ -1,24 +1,62 @@ + + + <% form_tag({:controller => 'repositories', :action => 'diff', :id => @project, :path => to_path_param(path)}, :method => :get) do %> -
# | -- | - | <%= l(:label_date) %> | -<%= l(:field_author) %> | -<%= l(:field_comments) %> | -
---|
Info | +DIFF | +<%= l(:field_comments) %> | +||||||
---|---|---|---|---|---|---|---|---|
<%= link_to format_revision(changeset.revision), :action => 'revision', :id => project, :rev => changeset.revision %> | -<%= radio_button_tag('rev', changeset.revision, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < revisions.size) %> | -<%= radio_button_tag('rev_to', changeset.revision, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %> | -<%= format_time(changeset.committed_on) %> | -<%=h changeset.author %> | -<%= textilizable(truncate_at_line_break(changeset.comments)) %> | + +
+
+ <%= format_time(changeset.committed_on) %> + + <%= format_revision(changeset.revision) %> + <%= radio_button_tag('rev', changeset.revision, (line_num==1), :id => "cb-#{line_num}",:onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < revisions.size) %> + <%= radio_button_tag('rev_to', changeset.revision, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %> + + |
+
++ <% + my_hash = {:controller => 'repositories', :action => 'diff', + :id => project, :type => 'sbs', :rev => changeset.revision} + %> + <%= link_to 'DIFF', my_hash, :title => "Show DIFF: #{format_revision(changeset.revision)}" %> + | + ++ <%= textilizable(truncate_at_line_break(changeset.comments)) %> + |