2016-08-09 16:11:49 +08:00
|
|
|
<div class="merge-discussion-input">
|
|
|
|
<%= form_tag(url_for(:controller => 'pull_requests', :action => 'create_pull_request_comment', :project_id => @project.id), :id => 'pull_request_comment_form', :method => "post", :remote => true) do %>
|
|
|
|
<textarea id="pull_request_comment" name="pull_request_comment"></textarea>
|
|
|
|
<span id ="pr_comment_tip" class="fontGrey2 c_red" style="display: none">内容不能为空</span>
|
|
|
|
<a href="javascript:void(0);" class="BlueCirBtn mt10" onclick="pull_request_commit()">提交请求</a>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% @comments.reverse.each do |comment| %>
|
2016-08-09 14:00:36 +08:00
|
|
|
<div class="merge-discussion-content merge-discussion-automatic">
|
|
|
|
<%= link_to comment.author.try(:username), user_path(get_user_by_login_and(comment.author.try(:username))), :class => "link-blue mr15 fl" %>
|
2016-08-11 11:11:49 +08:00
|
|
|
<span class="fl fontGrey2"><%= time_tag(comment.created_at) %>前</span>
|
2016-08-09 14:00:36 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="merge-discussion-detail"><%= comment.note %></div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2016-08-09 16:11:49 +08:00
|
|
|
<div style="text-align:center;">
|
|
|
|
<div class="pages" style="width:auto; display:inline-block;">
|
|
|
|
<ul id="homework_pository_ref_pages">
|
|
|
|
<%= pagination_links_full @pages, @count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
|
|
|
|
</ul>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
2016-08-09 14:51:48 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
function regex_pr_comment()
|
|
|
|
{
|
|
|
|
var comment = $.trim($("#pull_request_comment").val());
|
|
|
|
if(comment.length == 0)
|
|
|
|
{
|
|
|
|
$("#pr_comment_tip").show();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$("#pr_comment_tip").hide();
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//提交pull request_comment
|
|
|
|
function pull_request_commit()
|
|
|
|
{
|
|
|
|
if(regex_pr_comment())
|
|
|
|
{
|
|
|
|
$("#pull_request_comment_form").submit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|