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) %>
+ + + + + + + + + + <% show_diff = entry && entry.is_file? && revisions.size > 1 %> <% line_num = 1 %> <% revisions.each do |changeset| %> - - - - - - + + + + + + <% line_num += 1 %> <% end %> Index: app/views/repositories/show.rhtml =================================================================== --- app/views/repositories/show.rhtml (revision 2589) +++ app/views/repositories/show.rhtml (working copy) @@ -9,16 +9,11 @@ <% end -%> -

<%= l(:label_repository) %> (<%= @repository.scm_name %>)

-<% if !@entries.nil? && authorize_for('repositories', 'browse') %> -<%= render :partial => 'dir_list' %> -<% end %> <% if !@changesets.empty? && authorize_for('repositories', 'revisions') %> -

<%= l(:label_latest_revision_plural) %>

<%= render :partial => 'revisions', :locals => {:project => @project, :path => '', :revisions => @changesets, :entry => nil }%> -

<%= link_to l(:label_view_revisions), :action => 'revisions', :id => @project %>

+

<%= link_to l(:label_latest_revision_plural), :action => 'revisions', :id => @project %>

<% content_for :header_tags do %> <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :action => 'revisions', :id => @project, :page => nil, :key => User.current.rss_key})) %> <% end %> @@ -28,6 +23,18 @@

<% end %> + + + + + +

<%= l(:label_repository) %> (<%= @repository.scm_name %>)

+ +<% if !@entries.nil? && authorize_for('repositories', 'browse') %> +<%= render :partial => 'dir_list' %> +<% end %> + + <% content_for :header_tags do %> <%= stylesheet_link_tag "scm" %> <% end %> Index: app/views/issues/show.rhtml =================================================================== --- app/views/issues/show.rhtml (revision 2589) +++ app/views/issues/show.rhtml (working copy) @@ -93,6 +93,8 @@ <% end %> +<%= render :partial => 'related_changesets', :locals => {:related_changesets => @related_changesets} %> + <% if @journals.any? %>

<%=l(:label_history)%>

@@ -124,3 +126,6 @@ <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %> <%= stylesheet_link_tag 'scm' %> <% end %> + + + Index: public/stylesheets/application.css =================================================================== --- public/stylesheets/application.css (revision 2589) +++ public/stylesheets/application.css (working copy) @@ -133,9 +133,24 @@ table.list tbody tr:hover { background-color:#ffffdd; } table td {padding:2px;} table p {margin:0;} -.odd {background-color:#f6f7f8;} -.even {background-color: #fff;} +.odd, .even { + padding: 5px 4px; + color: #333; + font-family: Verdana, sans-serif; + background-color: #E6F2FF; + border-bottom: solid 1px #C5DBF7; + border-left: solid 1px #C5DBF7; +} + +.odd td, .even td { + border-right: solid 1px #ccc; +} +.even { + background-color: #fff; + border-left: solid 1px #ddd; +} + .highlight { background-color: #FCFD8D;} .highlight.token-1 { background-color: #faa;} .highlight.token-2 { background-color: #afa;}
<%= l(:label_latest_revision_plural) %>
InfoDIFF<%= 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) %>
+ <%=h changeset.author %>
+ <%= 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)) %> +