Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
Conflicts: app/views/layouts/base_projects.html.erbgitlab
commit
f2c87f198d
@ -1,54 +1,53 @@
|
|||||||
<% show_revision_graph = ( @repository.supports_revision_graph? && path.blank? ) %>
|
<% show_revision_graph = ( @repository.supports_revision_graph? && path.blank? ) %>
|
||||||
<%= if show_revision_graph && revisions && revisions.any?
|
<%= if show_revision_graph && revisions && revisions.any?
|
||||||
indexed_commits, graph_space = index_commits(revisions, @repository.branches) do |scmid|
|
indexed_commits, graph_space = index_commits(revisions, @repository.branches) do |scmid|
|
||||||
url_for(
|
url_for(
|
||||||
:controller => 'repositories',
|
:controller => 'repositories',
|
||||||
:action => 'revision',
|
:action => 'revision',
|
||||||
:id => project,
|
:id => project,
|
||||||
:repository_id => @repository.identifier_param,
|
:repository_id => @repository.identifier_param,
|
||||||
:rev => scmid)
|
:rev => scmid)
|
||||||
end
|
end
|
||||||
render :partial => 'revision_graph',
|
render :partial => 'revision_graph',
|
||||||
:locals => {
|
:locals => {
|
||||||
:commits => indexed_commits,
|
:commits => indexed_commits,
|
||||||
:space => graph_space
|
:space => graph_space
|
||||||
}
|
}
|
||||||
end %>
|
end %>
|
||||||
<%= form_tag(
|
<%= form_tag(
|
||||||
{:controller => 'repositories', :action => 'diff', :id => project,
|
{:controller => 'repositories', :action => 'diff', :id => project,
|
||||||
:repository_id => @repository.identifier_param, :path => to_path_param(path)},
|
:repository_id => @repository.identifier_param, :path => to_path_param(path)},
|
||||||
:method => :get
|
:method => :get
|
||||||
) do %>
|
) do %>
|
||||||
<table class="list changesets">
|
<table class="list changesets">
|
||||||
<thead><tr>
|
<thead><tr>
|
||||||
<th>#</th>
|
<th>#</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th><%= l(:label_date) %></th>
|
<th><%= l(:label_date) %></th>
|
||||||
<th><%= l(:field_author) %></th>
|
<th><%= l(:field_author) %></th>
|
||||||
<th><%= l(:field_comments) %></th>
|
<th><%= l(:field_comments) %></th>
|
||||||
</tr></thead>
|
</tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% show_diff = revisions.size > 1 %>
|
<% show_diff = revisions.size > 1 %>
|
||||||
<% line_num = 1 %>
|
<% line_num = 1 %>
|
||||||
<% revisions.each do |changeset| %>
|
<% revisions.each do |changeset| %>
|
||||||
<tr class="changeset <%= cycle 'odd', 'even' %>">
|
<tr class="changeset <%= cycle 'odd', 'even' %>">
|
||||||
<% id_style = (show_revision_graph ? "padding-left:#{(graph_space + 1) * 20}px" : nil) %>
|
<% id_style = (show_revision_graph ? "padding-left:#{(graph_space + 1) * 20}px" : nil) %>
|
||||||
<%= content_tag(:td, :class => 'id', :style => id_style) do %>
|
<%= content_tag(:td, :class => 'id', :style => id_style) do %>
|
||||||
<%= link_to_revision(changeset, @repository) %>
|
<%= link_to_revision(changeset, @repository) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<td class="checkbox"><%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').attr('checked',true);") if show_diff && (line_num < revisions.size) %></td>
|
<td class="checkbox"><%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').attr('checked',true);") if show_diff && (line_num < revisions.size) %></td>
|
||||||
<td class="checkbox"><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('#cb-#{line_num}').attr('checked')) {$('#cb-#{line_num-1}').attr('checked',true);}") if show_diff && (line_num > 1) %></td>
|
<td class="checkbox"><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('#cb-#{line_num}').attr('checked')) {$('#cb-#{line_num-1}').attr('checked',true);}") if show_diff && (line_num > 1) %></td>
|
||||||
<td class="committed_on"><%= format_time(changeset.committed_on) %></td>
|
<td class="committed_on"><%= format_time(changeset.committed_on) %></td>
|
||||||
<td class="author"><%= h truncate(changeset.author.to_s, :length => 30) %></td>
|
<td class="author"><%= h truncate(changeset.author.to_s, :length => 30) %></td>
|
||||||
<td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td>
|
<td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% line_num += 1 %>
|
<% line_num += 1 %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p style="padding-top: 10px;">
|
<p style="padding-top: 10px;">
|
||||||
<%= submit_tag(l(:label_view_diff), :name => nil, :class=>"c_blue") if show_diff %>
|
<%= submit_tag(l(:label_view_diff), :name => nil, :class=>"c_blue") if show_diff %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
Loading…
Reference in new issue