This commit is contained in:
huang 2016-08-05 18:23:03 +08:00
parent f54eafce76
commit 910fe0f48c
1 changed files with 30 additions and 30 deletions

View File

@ -9,41 +9,41 @@
<div class="cl"></div>
</div>
<div class="new-merge-row b_grey"><strong><%= @request.title %></strong><p class="mt10"><%= @request.description %></p></div>
<div class="mt10 mb15">
请求将 <span class="fontGrey3 fb"><%= @request.source_branch %></span> 合并至 <span class="fontGrey3 fb"><%= @request.target_branch %></span>
<div class="mt10 mb15">
请求将 <span class="fontGrey3 fb"><%= @request.source_branch %></span> 合并至 <span class="fontGrey3 fb"><%= @request.target_branch %></span>
<% if @commits_count == 0 && @changes_count == 0 %>
<div class="merge-commit-option mt15">
<span class="fontGrey3 fb" style="font-size:13px;"><img src="/images/warning.png" width="16" class="mr5 mt2 fl"><%= @request.source_branch %>没有新内容可以合并至<%= @request.target_branch %></span><br />
<p class="fontGrey2 mt5">请将新改动提交至源分支或者切换到其它目标分支</p>
</div>
<% else %>
<% if @request.state == "merged" %>
<div class="merge-commit-option mt15">
<span class="fontGrey3 fb" style="font-size:13px;"><a href="javascript:void(0);" class="link-blue"> <%= link_to @request.author.try(:username), user_path(get_user_by_login_and(@request.author.try(:username))), :class => "link-blue" %></a>于<%= time_tag(@request.created_at) %> 前合并</span><br />
<p class="fontGrey2 mt5">改动已合并至<%= @request.target_branch %></p>
</div>
<% if @commits_count == 0 && @changes_count == 0 %>
<div class="merge-commit-option mt15">
<span class="fontGrey3 fb" style="font-size:13px;"><img src="/images/warning.png" width="16" class="mr5 mt2 fl"><%= @request.source_branch %>没有新内容可以合并至<%= @request.target_branch %></span><br />
<p class="fontGrey2 mt5">请将新改动提交至源分支或者切换到其它目标分支</p>
</div>
<% else %>
<div class="merge-commit-option mt15">
<% if @request.state == "merged" %>
<div class="merge-commit-option mt15">
<span class="fontGrey3 fb" style="font-size:13px;"><a href="javascript:void(0);" class="link-blue"> <%= link_to @request.author.try(:username), user_path(get_user_by_login_and(@request.author.try(:username))), :class => "link-blue" %></a>于<%= time_tag(@request.created_at) %> 前合并</span><br />
<p class="fontGrey2 mt5">改动已合并至<%= @request.target_branch %></p>
</div>
<% else %>
<% if is_project_manager?(User.current.id, @project.id) %>
<%= link_to "接受请求", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "BlueCirBtn", :remote => true %>
<div class="merge-commit-option mt15">
<%= link_to "接受请求", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "BlueCirBtn", :remote => true %>
</div>
<% end %>
</div>
<% end %>
<% end %>
</div>
<ul class="merge-record" style="border-top:1px solid #ddd;">
<li><%= link_to "提交<span class='project-number-dot'>#{@commits_count}</span>".html_safe, pull_request_commits_project_pull_request_path(@request.id, :project_id => @project.id, :type => 1), :remote => true, :class => "active" %></li>
<li><%= link_to "改动<span class='project-number-dot'>#{@changes_count}</span>".html_safe, pull_request_changes_project_pull_request_path(@request.id, :project_id => @project.id, :type => 2), :remote => true %></li>
</ul>
<div class="new-merge-row b_grey fontGrey2"><span class="ml10"> 根据最近提交时间排列</span></div>
<div id="merge_record_0">
<%= render :partial => "pull_requests/pull_request_commits" %>
</div>
<div id="merge_record_1" class="undis">
<%= render :partial => "pull_requests/pull_request_changes" %>
</div>
<% end %>
</div>
<ul class="merge-record" style="border-top:1px solid #ddd;">
<li><%= link_to "提交<span class='project-number-dot'>#{@commits_count}</span>".html_safe, pull_request_commits_project_pull_request_path(@request.id, :project_id => @project.id, :type => 1), :remote => true, :class => "active" %></li>
<li><%= link_to "改动<span class='project-number-dot'>#{@changes_count}</span>".html_safe, pull_request_changes_project_pull_request_path(@request.id, :project_id => @project.id, :type => 2), :remote => true %></li>
</ul>
<div class="new-merge-row b_grey fontGrey2"><span class="ml10"> 根据最近提交时间排列</span></div>
<div id="merge_record_0">
<%= render :partial => "pull_requests/pull_request_commits" %>
</div>
<div id="merge_record_1" class="undis">
<%= render :partial => "pull_requests/pull_request_changes" %>
</div>
<% end %>
</div>