From 21747d02a2413607c722070c29d1cfc9f6a76af9 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 4 Aug 2016 11:13:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BAPR=E6=88=90=E5=8A=9F=E5=90=8E?= =?UTF-8?q?JS=E8=B7=B3=E8=BD=ACHTML=E8=B7=B3=E8=BD=AC=EF=BC=8C=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E9=A1=B5=E9=9D=A2=E5=B1=80=E9=83=A8=E5=88=B7=E6=96=B0?= =?UTF-8?q?=EF=BC=8C=E5=8F=8A=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 4 +-- app/views/pull_requests/_new.html.erb | 19 +++++------ app/views/pull_requests/_show.html.erb | 43 +++++++++++++++++++++++++ app/views/pull_requests/create.js.erb | 2 +- app/views/pull_requests/new.html.erb | 3 +- app/views/pull_requests/show.html.erb | 44 +------------------------- app/views/pull_requests/show.js.erb | 1 + 7 files changed, 58 insertions(+), 58 deletions(-) create mode 100644 app/views/pull_requests/_show.html.erb create mode 100644 app/views/pull_requests/show.js.erb diff --git a/Gemfile b/Gemfile index 1c1edfd35..6ee66a592 100644 --- a/Gemfile +++ b/Gemfile @@ -50,10 +50,10 @@ gem 'elasticsearch-model' gem 'elasticsearch-rails' #rails 3.2.22.2 bug -gem "test-unit", "~>3.0" +# gem "test-unit", "~>3.0" ### profile -gem 'oneapm_rpm' +# gem 'oneapm_rpm' group :development do gem 'grape-swagger' diff --git a/app/views/pull_requests/_new.html.erb b/app/views/pull_requests/_new.html.erb index 16f299ca5..54c7434b0 100644 --- a/app/views/pull_requests/_new.html.erb +++ b/app/views/pull_requests/_new.html.erb @@ -1,19 +1,16 @@ -
+
+
<%= render :partial => "pull_requests/error_message" %> -
+
-
-
新的合并请求
- - - - +
+
新的合并请求
+
+ <%= render :partial => "pull_requests/form" %>
-<%= render :partial => "pull_requests/form" %> - \ No newline at end of file diff --git a/app/views/pull_requests/create.js.erb b/app/views/pull_requests/create.js.erb index 36c9368af..ce5f50ac0 100644 --- a/app/views/pull_requests/create.js.erb +++ b/app/views/pull_requests/create.js.erb @@ -1 +1 @@ -$("#create_pull_request_error").html('<%= escape_javascript(render :partial => "pull_requests/error_message") %>'); \ No newline at end of file +$("#create_pull_request_error").html('<%= escape_javascript(render :partial => "pull_requests/error_message") %>'); diff --git a/app/views/pull_requests/new.html.erb b/app/views/pull_requests/new.html.erb index 47ba66f09..e7494708c 100644 --- a/app/views/pull_requests/new.html.erb +++ b/app/views/pull_requests/new.html.erb @@ -1,2 +1,3 @@ <%= render :partial => "pull_requests/pull_request_container" %> -<%= render :partial => "pull_requests/new" %> \ No newline at end of file +<%= render :partial => "pull_requests/new" %> + diff --git a/app/views/pull_requests/show.html.erb b/app/views/pull_requests/show.html.erb index 2564dda77..8cbbdc081 100644 --- a/app/views/pull_requests/show.html.erb +++ b/app/views/pull_requests/show.html.erb @@ -1,44 +1,2 @@ <%= render :partial => "pull_requests/pull_request_container" %> -
- 待处理合并请求 由<%= 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.title %>

<%= @request.description %>

-
- 请求将 <%= @request.source_branch %> 合并至 <%= @request.target_branch %> -
- <%= link_to "接受请求", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "BlueCirBtn" %> -
-
- -
根据最近提交时间排列
-
- <%= render :partial => "pull_requests/pull_request_commits" %> -
-
- <%= render :partial => "pull_requests/pull_request_changes" %> -
- - \ No newline at end of file +<%= render :partial => "pull_requests/show" %> \ No newline at end of file diff --git a/app/views/pull_requests/show.js.erb b/app/views/pull_requests/show.js.erb new file mode 100644 index 000000000..af5935536 --- /dev/null +++ b/app/views/pull_requests/show.js.erb @@ -0,0 +1 @@ +$("#pull_request_new_form").html('<%= escape_javascript(render :partial => "pull_requests/show") %>'); \ No newline at end of file