From 1db5064486218ecfd6295b02312aa761b1144a6d Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 8 Oct 2016 17:37:41 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E6=96=B0=E7=9A=84=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/pull_requests/_new.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/pull_requests/_new.html.erb b/app/views/pull_requests/_new.html.erb index 08e723e6d..8a376d995 100644 --- a/app/views/pull_requests/_new.html.erb +++ b/app/views/pull_requests/_new.html.erb @@ -10,7 +10,7 @@ \ No newline at end of file diff --git a/app/views/files/_project_list.html.erb b/app/views/files/_project_list.html.erb index faf254015..3193f4b42 100644 --- a/app/views/files/_project_list.html.erb +++ b/app/views/files/_project_list.html.erb @@ -40,8 +40,10 @@
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
- + <%= form_tag(edit_file_description_project_file_path(file, :project_id => project.id),:remote=>'true', :method => :post, :id=>"files_query_form_#{file.id}") do %> + + <% end %> <% else %>
@@ -70,6 +72,11 @@ <%= pagination_links_full @feedback_pages, @feedback_count, :per_page_links => false, :remote => true, :flag => true%> + diff --git a/app/views/files/_resource_detail.html.erb b/app/views/files/_resource_detail.html.erb index b60814afd..08b85ab2f 100644 --- a/app/views/files/_resource_detail.html.erb +++ b/app/views/files/_resource_detail.html.erb @@ -42,8 +42,10 @@
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
- + <%= form_tag(edit_file_description_course_file_path(file, :course_id => @course.id),:remote=>'true', :method => :post, :id=>"files_query_form_#{file.id}") do %> + + <% end %>
<% else %>
@@ -99,4 +101,9 @@
-
\ No newline at end of file +
+ diff --git a/app/views/files/edit_file_description.js.erb b/app/views/files/edit_file_description.js.erb new file mode 100644 index 000000000..40b47a2ec --- /dev/null +++ b/app/views/files/edit_file_description.js.erb @@ -0,0 +1,3 @@ +$("#file_description_show_<%= @attachment.id %>").html("<%= escape_javascript render(:partial => "files/file_description", :locals => {:file => @attachment}) %>"); +$("#file_description_show_<%= @attachment.id %>").show(); +$("#file_description_edit_<%= @attachment.id %>").hide(); \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 4ff75cbf9..7ca24d861 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -133,6 +133,7 @@ RedmineApp::Application.routes.draw do member do match "quote_resource_show_org_subfield", :via => [:get] get "update_file_description" + post "edit_file_description" end end @@ -809,6 +810,7 @@ RedmineApp::Application.routes.draw do match "quote_resource_show", :via => [:get] get "file_hidden" get "update_file_description" + post "edit_file_description" end end @@ -1219,6 +1221,7 @@ RedmineApp::Application.routes.draw do get "file_hidden" post "republish_file" get "update_file_description" + post "edit_file_description" end end resources :memberships, :shallow => true, :controller => 'members', :only => [:index, :show, :new, :create, :update, :destroy] do From 125a389448b8e374bb6a0e1f600655cbd8b0874e Mon Sep 17 00:00:00 2001 From: huang Date: Sun, 9 Oct 2016 15:33:22 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E2=80=9C=E5=B8=AE=E5=8A=A9=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E2=80=9D500=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_logined_header.html.erb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index 378741035..b8235ff1c 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -14,9 +14,12 @@ - + <% memo = Memo.where(:id => 1168).first %> + <% unless memo.nil? %> + + <% end %> <% else %>