pull request 列表页面

This commit is contained in:
huang 2016-10-21 11:19:56 +08:00
parent 56cf1f9ba3
commit ac54d02bdc
3 changed files with 94 additions and 10 deletions

View File

@ -1,4 +1,88 @@
<% if @allow_to_pull_request %>
<!--PullReques列表开始-->
<div class="new_roadmap_conbox " >
<div class="new_roadmap_navbox clear">
<ul class="new_roadmap_nav fl" >
<li class="new_roadmap_nav_hover"><%= link_to "待处理<span class='new_roadmap_nav_taghover ml5'>#{@requests_opened_count}</span>".html_safe, project_pull_requests_path(:type => "1"), :remote => true %></li>
<li><%= link_to "已处理<span class='new_roadmap_nav_tagnomal ml5'>#{@requests_merged_count}</span>".html_safe, project_pull_requests_path(:type => "2"), :remote => true %></li>
<li><%= link_to "已关闭<span class='new_roadmap_nav_tagnomal ml5'>#{@requests_closed_count}</span>".html_safe, project_pull_requests_path(:type => "3"), :remote => true %></li>
<% if allow_pull_request(@project) && User.current.member_of?(@project) %>
<%= link_to "创建Pull Request", new_project_pull_request_path, :class => "btn btn-green fr mr15 mt10" %>
<% end %>
<li id="new_roadmap_nav_1" class="new_roadmap_nav_hover " onclick="HoverLi(1);">
<a href="javascript:void(0);" id="new_roadmap_type_1" class="new_roadmap_type_nomal" >待处理<span id="new_roadmap_num_1" class="new_roadmap_nav_taghover ml5">210</span></a>
</li>
<li id="new_roadmap_nav_2" onclick="HoverLi(2);" >
<a href="javascript:void(0);" id="new_roadmap_type_2" class="new_roadmap_type_nomal" >已处理<span id="new_roadmap_num_2" class="new_roadmap_nav_tagnomal ml5">25</span></a>
</li>
<li id="new_roadmap_nav_3" onclick="HoverLi(3);" >
<a href="javascript:void(0);" id="new_roadmap_type_3" class="new_roadmap_type_nomal" >关闭<span id="new_roadmap_num_3" class="new_roadmap_nav_tagnomal ml5">5</span></a>
</li>
</ul>
<a href="javascript:void(0);" class="btn btn-green fr mr15 mt10"> 新建 </a>
</div>
<div class="pullreques_category clear ">
<a href="javascript:void(0);" class="sortdownbtn mt10 fr mr15"></a>
<a href="javascript:void(0);" class="sy_cgrey fr">更新时间</a>
<a href="javascript:void(0);" class="sortupbtn mt10 fr"></a>
<a href="javascript:void(0);" class="sy_cgrey fr">创建时间 </a>
</div>
<div id="new_roadmap_content_1">
<div class="clear new_roadmap_listbox">
<div class="clear">
<span class="icons_pullreques fl "></span><h4 class="fl new_roadmap_listtitle"><a href="javascript:void(0);" class="">两个分支作用不是很大</a></h4>
<a href="javascript:void(0);" class="fr mt2">3</a>
<a href="javascript:void(0);" class="issues_icons_mes fr mr5 ml5 "></a>
</div>
<div class="c_grey clear mt5">
<p class="fl">由 <a href="javascript:void(0);" class="linkBlue2 " >胡莎莎</a> 创建于1个月前</p>
<span class="fl ml10">大约1个月前更新</span>
<p class="fr">凌彬/Rep_course<span class="c_grey02 ml10 mr10">合并到</span>胡莎莎/Rep_quality</p>
</div>
</div>
<div class=" pages ">
<a href="javascript:void(0);" class="pages-big" >上一页</a>
<a href="javascript:void(0);" class="active " >1</a>
<a href="javascript:void(0);" >2</a>
<a href="javascript:void(0);" >3</a>
<a href="javascript:void(0);" >...</a>
<a href="javascript:void(0);" >31</a>
<a href="javascript:void(0);" class="pages-big" >下一页</a>
<div class="cl"></div>
</div><!--翻页 end-->
<div class="cl"></div>
</div><!--new_roadmap_content_1 end-->
<div id="new_roadmap_content_2" class="undis">
ddd
</div><!--new_roadmap_content_2 end-->
<div id="new_roadmap_content_3" class="undis">
eee
</div><!--new_roadmap_content_3 end-->
</div><!--new_roadmap end-->
<!--PullReques列表结束-->
<%#= render :partial => "pull_requests/pull_request_container" %>
<ul id="mergeBanner" class="project-merge-banner">
<li class="active"><%= link_to "待处理<span class='project-number-dot'>#{@requests_opened_count}</span>".html_safe, project_pull_requests_path(:type => "1"), :remote => true %></li>
@ -17,12 +101,12 @@
<script>
$("#mergeBanner").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
// $("#mergeBanner").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
$("#mergeBanner").parent().before("<div class='homepageRightBanner mb10'><span class='f16 fontGrey3'>Pull Request</span></div>");
$(".project-merge-banner li").click(function(){
$(".project-merge-banner li").removeClass("active");
$(this).addClass("active");
$(".project-merge-banner li").removeClass("new_roadmap_nav_hover");
$(this).addClass("new_roadmap_nav_hover");
});
</script>
<% else %>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 KiB

After

Width:  |  Height:  |  Size: 205 KiB

View File

@ -977,10 +977,10 @@ select.new_roadmap_select{border:1px solid #dbdbdb; color: #666;}
.pullreques span{ float: left;}
a.sortupbtn{ background: url(/images/sy/liststyle.png) 0 3px no-repeat;width:12px;height:17px; display:block; margin-right:10px; cursor:pointer;}
a.sortdownbtn{background: url(/images/sy/liststyle.png) 0 -12px no-repeat; width:12px; height:17px;display:block;cursor:pointer; }
.icons_pullreques{background: url(/images/project/icons_issue.png) 0 -270px no-repeat; display: inline-block; width: 25px; height: 25px;}
.pullreques_blueicon{ background: url(/images/project/icons_issue.png) 0 -299px no-repeat; display: inline-block; width: 43px; height: 16px;}
.pullreques_greyicon{ background: url(/images/project/icons_issue.png) 0 -322px no-repeat; display: inline-block; width: 43px; height: 16px;}
.pullreques_greyicon02{ background: url(/images/project/icons_issue.png) 0 -344px no-repeat; display: inline-block; width:32px; height: 16px;}
.icons_pullreques{background: url(/images/new_project/icons_issue.png) 0 -270px no-repeat; display: inline-block; width: 25px; height: 25px;}
.pullreques_blueicon{ background: url(/images/new_project/icons_issue.png) 0 -299px no-repeat; display: inline-block; width: 43px; height: 16px;}
.pullreques_greyicon{ background: url(/images/new_project/icons_issue.png) 0 -322px no-repeat; display: inline-block; width: 43px; height: 16px;}
.pullreques_greyicon02{ background: url(/images/new_project/icons_issue.png) 0 -344px no-repeat; display: inline-block; width:32px; height: 16px;}
.pullreques_reply_textarea{ width: 100%; padding:0; height: 60px; color: #666;}
.pullreques_reply_list li{ padding:15px 0; border-top: 1px dashed #ddd; }
.pullreques_reply_user_img{ width:50px;height:50px; -webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;}
@ -992,9 +992,9 @@ a.pullreques_pull_name{display: block; margin-left: 10px;max-width:80px; color:#
.pullreques_pull_txt{display: block; margin-left: 10px;max-width:740px; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
.pullreques_change_list li{height: 40px; line-height: 40px;border-bottom:1px solid #e1e1e1; }
.pullreques_change_list li:last-child{ border-bottom: none;}
.pullreques_icons_add{background: url(/images/project/icons_issue.png) 0 -374px no-repeat; display: inline-block; width: 19px; height: 16px;}
.pullreques_icons_del{background: url(/images/project/icons_issue.png) 0 -399px no-repeat; display: inline-block; width: 19px; height: 16px;}
.pullreques_icons_new{background: url(/images/project/icons_issue.png) 0 -421px no-repeat; display: inline-block; width: 19px; height: 16px;}
.pullreques_icons_add{background: url(/images/new_project/icons_issue.png) 0 -374px no-repeat; display: inline-block; width: 19px; height: 16px;}
.pullreques_icons_del{background: url(/images/new_project/icons_issue.png) 0 -399px no-repeat; display: inline-block; width: 19px; height: 16px;}
.pullreques_icons_new{background: url(/images/new_project/icons_issue.png) 0 -421px no-repeat; display: inline-block; width: 19px; height: 16px;}
.PullReques_minselect{border:1px solid #e1e1e1; height: 30px; line-height: 30px; width: 262px;color: #666;}
.PullReques_maxinput{ width:900px;border:1px solid #e1e1e1; height: 30px; line-height: 30px; color: #666;}
.PullReques_textarea{width:900px;border:1px solid #e1e1e1; height: 80px; line-height: 1.9; color: #666;}