socialforge/app/views/pull_requests/index.html.erb

36 lines
1.9 KiB
Plaintext

<%= render :partial => "pull_requests/pull_request_container" %>
<ul id="mergeBanner" class="project-merge-banner">
<li><a href="javascript:void(0);">打开<span class="project-number-dot">1</span></a></li>
<li><a href="javascript:void(0);">合并<span class="project-number-dot">1</span></a></li>
<li><a href="javascript:void(0);">关闭<span class="project-number-dot">1</span></a></li>
<li class="active"><a href="javascript:void(0);">全部<span class="project-number-dot">3</span></a></li>
<%= link_to "创建Pull Request", new_project_pull_request_path, :class => "BlueCirBtn fr ml10 mt10", :style => "width:110px;" %>
<div class="cl"></div>
</ul>
<div class="cl"></div>
<ul class="project-merge-content">
<% if @requests.nil? %>
<div class="no-merge-content">没有可显示的请求</div>
<% else %>
<% @requests.each do |request| %>
<li>
<% request %>
<%=link_to request.title, project_pull_request_path(request.id, :project_id => @project.id), :class => "linkGrey3 fb fl"%>
<!--<a href="javascript:void(0);" class="fr fontGrey2 fb"><img src="/images/comments.png" class="mr5" width="15" />0</a><span class="fr mr15 fb fontGrey2">关闭</span>-->
<div class="cl mb5"></div>
<span class="fontGrey2"><%= link_to request.author.try(:username), user_path(get_user_by_login_and(request.author.try(:username))), :class => "link-blue" %> 创建于<%= time_tag(request.created_at) %></span>
<span class="fr fontGrey2"><%= time_tag(request.updated_at) %>更新</span>
<div class="cl"></div>
</li>
<% end %>
<% end %>
</ul>
<script>
$("#mergeBanner").parent().css("width","730px");
$(".project-merge-banner li").click(function(){
$(".project-merge-banner li").removeClass("active");
$(this).addClass("active");
});
</script>