修改版本格式

gitlab
huang 10 years ago
parent f489512c6f
commit 94877bb353

@ -13,42 +13,41 @@
: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 %>

@ -7,7 +7,6 @@
<%= render :partial => 'breadcrumbs', <%= render :partial => 'breadcrumbs',
:locals => {:path => @path, :kind => 'dir', :revision => @rev} %> :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>
<%= render :partial => 'navigation' %> <%= render :partial => 'navigation' %>
</div> </div>
<!--contextual end--> <!--contextual end-->
<div class="cl"></div> <div class="cl"></div>
@ -101,20 +100,23 @@
<p><a href="/users/646" class="c_orange">李海</a>提供</p> <p><a href="/users/646" class="c_orange">李海</a>提供</p>
</div> </div>
</div> </div>
<% if !@entries.nil? && authorize_for('repositories', 'browse') %> <!-- 代码库显示 -->
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
<%= render :partial => 'dir_list' %> <%= render :partial => 'dir_list' %>
<% end %> <% end %>
<%= render_properties(@properties) %>
<%= render_properties(@properties) %> <!-- 代码修订 -->
<% if authorize_for('repositories', 'revisions') %> <% if authorize_for('repositories', 'revisions') %>
<% if @changesets && !@changesets.empty? %> <%# if @changesets && !@changesets.empty? %>
<h3> <h3>
<%= l(:label_latest_revision_plural) %> <%= l(:label_latest_revision_plural) %>
</h3> </h3>
<%= render :partial => 'revisions', <%= render :partial => 'revisions',
:locals => {:project => @project, :path => @path, :locals => {:project => @project, :path => @path,
:revisions => @changesets, :entry => nil} %> :revisions => @changesets, :entry => nil} %>
<% end %> <%# end %>
<p style="padding-top: 10px;"> <p style="padding-top: 10px;">
<% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0) <% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0)
sep = '' %> sep = '' %>
@ -143,14 +145,14 @@
:id => @project, :page => nil, :key => User.current.rss_key})) %> :id => @project, :page => nil, :key => User.current.rss_key})) %>
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>
<!-- added by bai --> <!-- added by bai -->
<p class="fb c_dark mt10">查看如何提交代码: <p class="fb c_dark mt10">查看如何提交代码:
<%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "c_blue") %> <%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "c_blue") %>
<%= link_to('English', en_usage_path, :class => "c_blue") %> <%= link_to('English', en_usage_path, :class => "c_blue") %>
<div class="cl"></div> <div class="cl"></div>
<% content_for :header_tags do %> <% content_for :header_tags do %>
<%= stylesheet_link_tag "scm" %> <%= stylesheet_link_tag "scm" %>

Loading…
Cancel
Save