From 53dd41ec37fe9592e11b5d297199b356f691923a Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 8 Aug 2016 16:33:39 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=95=99=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/pull_requests/_show.html.erb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/views/pull_requests/_show.html.erb b/app/views/pull_requests/_show.html.erb index b3d6dd314..e1d54dce4 100644 --- a/app/views/pull_requests/_show.html.erb +++ b/app/views/pull_requests/_show.html.erb @@ -4,7 +4,7 @@
- <%= @request.state == "merged" ? "已合并" : "待处理" %>合并请求 由<%= 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) %>提交 · 最后编辑时间<%= time_tag(@request.updated_at) %> + <%= @request.state == "merged" ? "已合并" : "待处理" %>合并请求 由 <%= 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) %> 提交 · 最后编辑时间 <%= time_tag(@request.updated_at) %>
@@ -25,14 +25,18 @@
根据最近提交时间排列
- <%= render :partial => "pull_requests/pull_request_commits" %> + 留言
+ <%= render :partial => "pull_requests/pull_request_commits" %> +
+
<%= render :partial => "pull_requests/pull_request_changes" %>
<% end %> @@ -54,7 +58,7 @@ var index = $(".merge-record li a").index(this); - $("#merge_record_0, #merge_record_1").hide(); + $("#merge_record_0, #merge_record_1,#merge_record_2").hide(); $("#merge_record_" + index).show(); }); \ No newline at end of file From 5dd6244a347b506d8c1b1fe8286f9fe38125f5f0 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 9 Aug 2016 10:45:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?pull=20request=E6=B7=BB=E5=8A=A0=E7=95=99?= =?UTF-8?q?=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_pull_request_commits.html.erb | 3 +- app/views/pull_requests/_show.html.erb | 32 ++++++++++++------- public/stylesheets/css/project.css | 7 +++- public/stylesheets/css/structure.css | 1 + 4 files changed, 30 insertions(+), 13 deletions(-) diff --git a/app/views/pull_requests/_pull_request_commits.html.erb b/app/views/pull_requests/_pull_request_commits.html.erb index a7f6b5aa7..b7b47ede2 100644 --- a/app/views/pull_requests/_pull_request_commits.html.erb +++ b/app/views/pull_requests/_pull_request_commits.html.erb @@ -1,9 +1,10 @@ +
根据最近提交时间排列
<% @commits.each do |commit| %>
<%= format_date(commit.created_at) %> -

<%= link_to commit.author_name, user_path(get_user_by_mail(commit.author_email)), :class => "link-blue" %>创建于<%= time_tag(commit.created_at) %>前

+

<%= link_to commit.author_name, user_path(get_user_by_mail(commit.author_email)), :class => "link-blue" %> 创建于<%= time_tag(commit.created_at) %>前

<%= commit.title %> diff --git a/app/views/pull_requests/_show.html.erb b/app/views/pull_requests/_show.html.erb index bb3cefc9f..ce0c633c6 100644 --- a/app/views/pull_requests/_show.html.erb +++ b/app/views/pull_requests/_show.html.erb @@ -4,7 +4,7 @@
- <%= get_state(@request.state) %>合并请求 由<%= 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) %>提交 · 最后编辑时间<%= time_tag(@request.updated_at) %> + <%= get_state(@request.state) %>合并请求 由 <%= 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) %> 前提交 · 最后编辑时间 <%= time_tag(@request.updated_at) %> 前 <% unless @request.state == "merged" %> <%= link_to "#{@request.state == 'closed' ? '重新打开' : '关闭'}", update_pull_request_project_pull_request_path(@request.id, :project_id => @project.id, :state => @request.state =="closed" ? "reopen" : "close"), :class => "BlueCirBtn fr" %> <% end %> @@ -36,14 +36,30 @@
    -
  • <%= link_to "提交#{@commits_count}".html_safe, pull_request_commits_project_pull_request_path(@request.id, :project_id => @project.id, :type => 1), :remote => true, :class => "active" %>
  • +
  • <%= link_to "留言#{@commits_count}".html_safe, :class => "active" %>
  • +
  • <%= link_to "提交#{@commits_count}".html_safe, pull_request_commits_project_pull_request_path(@request.id, :project_id => @project.id, :type => 1), :remote => true %>
  • <%= link_to "改动#{@changes_count}".html_safe, pull_request_changes_project_pull_request_path(@request.id, :project_id => @project.id, :type => 2), :remote => true %>
-
根据最近提交时间排列
- <%= render :partial => "pull_requests/pull_request_commits" %> +
+ Hjqreturn20小时前 +
+
回复内容
+
+
+ Hjqreturn20小时前 +
+
已关闭请求/重新审核请求
+
+
+ + 提 交 +
+ <%= render :partial => "pull_requests/pull_request_commits" %> +
+
<%= render :partial => "pull_requests/pull_request_changes" %>
<% end %> @@ -53,19 +69,13 @@ \ No newline at end of file diff --git a/public/stylesheets/css/project.css b/public/stylesheets/css/project.css index 4c4019593..3653cf799 100644 --- a/public/stylesheets/css/project.css +++ b/public/stylesheets/css/project.css @@ -540,4 +540,9 @@ a:hover.upload_btn_grey{background:#8a8a8a;} .merge-commit-code {width:150px; float:left; text-align:right;} .merge-show {margin:-10px -10px 0 -10px; padding:10px; line-height:36px; border-bottom:1px solid #ddd;} .open-status {color:#fff; padding:0 16px; background-color:#3b94d6; border-radius:2px; display:inline-block;} -.merge-commit-option {padding:12px; border:1px solid #ddd; background-color:#f9f9f9; border-radius:2px;} \ No newline at end of file +.merge-commit-option {padding:12px; border:1px solid #ddd; background-color:#f9f9f9; border-radius:2px;} +.merge-discussion-content {font-size:13px; color: #484848; margin:0 -10px; padding:10px; border-bottom:1px solid #ddd;} +.merge-discussion-detail {font-size:13px; line-height:1.5em; color:#484848; margin-top:10px;} +.merge-discussion-automatic {background-color:#fdfdfd;} +.merge-discussion-input {margin:0 -10px; padding:10px; background-color:#f8f8f8;} +.merge-discussion-input textarea {width:720px; height:80px; font-size:13px; line-height:16px; color:#484848; margin-bottom:10px; padding:5px;} \ No newline at end of file diff --git a/public/stylesheets/css/structure.css b/public/stylesheets/css/structure.css index 44b1165c6..c9a4059e0 100644 --- a/public/stylesheets/css/structure.css +++ b/public/stylesheets/css/structure.css @@ -474,6 +474,7 @@ a.f_grey:hover {color:#000000;} .shadowbox_news_list{ max-height:400px; overflow:hidden;} .shadowbox_news_list a{ color:#999;} .shadowbox_news_list li{ height:40px; border-bottom:1px dashed #ebebeb; line-height:40px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis; padding:0 10px;} +.shadowbox_news_list li:last-child {border-bottom:none;} .shadowbox_news_list li:hover{ background-color:#eee;} span.shadowbox_news_user{ color:#3b94d6;} a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px; color:#3b94d6; text-align:center;border-top:1px solid #eee;}