代码没有改动时候提示

This commit is contained in:
huang 2016-08-04 11:35:04 +08:00
parent 0b3e1f558c
commit 1f5c4a800f
3 changed files with 29 additions and 22 deletions

View File

@ -3,10 +3,11 @@
<div class="merge-commit-time">
<img width="16" class="ui-datepicker-trigger mr15" style="cursor:default; margin-top:3px; margin-left:0;" /><span class="fontGrey3"><%= format_date(commit.created_at) %></span>
<!--<p class="mt10 fontGrey2">1次提交</p>-->
<p class="mt10 fontGrey2"><%= link_to commit.author_name, user_path(get_user_by_mail(commit.author_email)), :class => "link-blue" %>创建于<%= time_tag(commit.created_at) %>前</p>
</div>
<div class="merge-commit-detail">
<span class="fontGrey3 fb"><%= commit.title %></span>
<p class="mt10 fontGrey2"><%= link_to commit.author_name, user_path(get_user_by_mail(commit.author_email)), :class => "link-blue" %>创建于24小时前</p>
</div>
<div class="merge-commit-code">
<span class="fontGrey3">

View File

@ -4,23 +4,33 @@
<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="merge-commit-option mt15">
<%= link_to "接受请求", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "BlueCirBtn" %>
</div>
</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>
<% if @commits_count == 0 && @changes_count == 0 %>
<div class="mt10 mb15">
请求将 <span class="fontGrey3 fb"><%= @request.source_branch %></span> 合并至 <span class="fontGrey3 fb"><%= @request.target_branch %></span>
<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>
</div>
<% else %>
<div class="mt10 mb15">
请求将 <span class="fontGrey3 fb"><%= @request.source_branch %></span> 合并至 <span class="fontGrey3 fb"><%= @request.target_branch %></span>
<div class="merge-commit-option mt15">
<%= link_to "接受请求", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "BlueCirBtn" %>
</div>
</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 %>
<script>
$("#mergeShow").parent().css("width","730px");

View File

@ -1,6 +1,2 @@
<%= render :partial => "pull_requests/pull_request_container" %>
<%= render :partial => "pull_requests/show" %>
<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">dev_huang没有新内容可以合并至develop</span><br />
<p class="fontGrey2 mt5">请将新改动提交至源分支或者切换到其它目标分支</p>
</div>