翻页及commit详情

This commit is contained in:
huang 2016-12-09 20:26:32 +08:00
parent 9d0a941926
commit 85ef1108c9
3 changed files with 26 additions and 16 deletions

View File

@ -1,3 +1,9 @@
var checked = $("input[name='checkbox1[]']:checked").size();
if(checked > 0)
{
alert('翻页或搜索后将丢失当前选择的用户数据!');
}
<% if @type %>
$("#issue_commit_list").html('<%= escape_javascript(render :partial => 'issues/issue_commits_list') %>');
<% else %>

View File

@ -17,14 +17,16 @@
<%= link_to_user_mail(commit.author_email, "pullreques_pull_name fl ml10") %>
<p class="pullreques_pull_txt ml10 fl"><%= commit.title %></p>
<%= link_to truncate(commit.short_id, :length => 20), {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit.id}, :target => "_blank", :class => "fr mr15 c_grey" %>
<% get_commit_issues(commit.short_id, @project.id, 0).each do |issue_id| %>
<div class="btn-commit-issue btn-blue mb5 mr5 fr">
<% if issue_id == "more" %>
<%= link_to "更多", {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit.id}, :target => "_blank", :class => "commit_id_value mr5" %>
<% else %>
<%= link_to "##{issue_id}", issue_path(issue_id), :target => "_blank", :class => "commit_id_value mr5" %>
<% end %>
</div>
<% unless get_commit_issues(commit.short_id, @project.id, 0).nil? %>
<% get_commit_issues(commit.short_id, @project.id, 0).each do |issue_id| %>
<div class="btn-commit-issue btn-blue mb5 mr5 fr">
<% if issue_id == "more" %>
<%= link_to "更多", {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit.id}, :target => "_blank", :class => "commit_id_value mr5" %>
<% else %>
<%= link_to "##{issue_id}", issue_path(issue_id), :target => "_blank", :class => "commit_id_value mr5" %>
<% end %>
</div>
<% end %>
<% end %>
<div class="cl"></div>
</li>

View File

@ -10,14 +10,16 @@
</div>
<div class=" clear mb10">
<p class="fb c_grey">关联Issue:</p>
<% get_commit_issues(@commit_details.short_id, @project.id, 1).each do |issue_id| %>
<div class="btn-commit-issue btn-blue mb5 mr5">
<% if issue_id == "more" %>
<%= link_to "更多", {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => @commit_details.id}, :target => "_blank", :class => "commit_id_value mr5" %>
<% else %>
<%= link_to "##{issue_id}", issue_path(issue_id), :target => "_blank", :class => "commit_id_value mr5" %>
<% end %>
</div>
<% unless get_commit_issues(@commit_details.short_id, @project.id, 1).nil? %>
<% get_commit_issues(@commit_details.short_id, @project.id, 1).each do |issue_id| %>
<div class="btn-commit-issue btn-blue mb5 mr5">
<% if issue_id == "more" %>
<%= link_to "更多", {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => @commit_details.id}, :target => "_blank", :class => "commit_id_value mr5" %>
<% else %>
<%= link_to "##{issue_id}", issue_path(issue_id), :target => "_blank", :class => "commit_id_value mr5" %>
<% end %>
</div>
<% end %>
<% end %>
</div>
<li class="commit js-toggle-container">