diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 72314cad9..f41dbe6c7 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -283,7 +283,9 @@ update def changes @entry = @repository.entry(@path, @rev) (show_error_not_found; return) unless @entry - @changesets = @repository.latest_changesets(@path, @rev, Setting.repository_log_display_limit.to_i) + g = Gitlab.client + @changesets = g.get ("/projects/#{@project.gpid}/repository/commits?#{@rev}") + #@changesets = @repository.latest_changesets(@path, @rev, Setting.repository_log_display_limit.to_i) @properties = @repository.properties(@path, @rev) @changeset = @repository.find_changeset_by_name(@rev) render :layout => 'base_projects' diff --git a/app/views/repositories/_revisions.html.erb b/app/views/repositories/_revisions.html.erb index 3da718484..fe60f8933 100644 --- a/app/views/repositories/_revisions.html.erb +++ b/app/views/repositories/_revisions.html.erb @@ -1,35 +1,35 @@ - <%= form_tag( {:controller => 'repositories', :action => 'diff', :id => project, :repository_id => @repository.identifier_param, :path => to_path_param(path)}, :method => :get ) do %>
# | -- | - | <%= l(:label_date) %> | -<%= l(:field_author) %> | -<%= l(:field_comments) %> | -|||
---|---|---|---|---|---|---|---|---|
<%= 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) %> | -<%= 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) %> | -<%= format_time(changeset.committed_on) %> | -<%= h truncate(changeset.author.to_s, :length => 30) %> | -<%= textilizable(truncate_at_line_break(changeset.comments)) %> | +<%= h truncate(changeset.id.to_s, :length => 20) %> | + +<%= format_time(changeset.created_at) %> | +<%= h truncate(changeset.author_name.to_s, :length => 30) %> | +<%= textilizable(truncate_at_line_break(changeset.message)) %> |
- <%= 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 %>
+ <% end %> diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 132d915f2..7f9f675d2 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -59,15 +59,7 @@ <%= render_properties(@properties) %> -<% if authorize_for('repositories', 'revisions') %> - <% if @changesets && !@changesets.empty? %> - <% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0) - sep = '' %> - <% if @repository.supports_all_revisions? && @path.blank? %> - <%= link_to l(:label_view_all_revisions_commits), :action => 'revisions', :id => @project, :repository_id => @repository.identifier_param %> - <% end %> | - <% end %> -<% end %> + 如何提交代码 <% content_for :header_tags do %>