From e6e444bd775351b91b7ac9ede955ae2aebe6498b Mon Sep 17 00:00:00 2001 From: Eric Tsai Date: Thu, 13 Feb 2020 16:46:59 +0800 Subject: [PATCH] let rulingcom new activity for other members --- app/controllers/admin/activities_controller.rb | 1 + app/views/admin/activities/_form.html.erb | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/app/controllers/admin/activities_controller.rb b/app/controllers/admin/activities_controller.rb index 38befd1..d391a34 100644 --- a/app/controllers/admin/activities_controller.rb +++ b/app/controllers/admin/activities_controller.rb @@ -17,6 +17,7 @@ class Admin::ActivitiesController < OrbitMemberController end def new + @member = MemberProfile.find_by(:uid=>params['uid']) rescue nil @activity = Activity.new end diff --git a/app/views/admin/activities/_form.html.erb b/app/views/admin/activities/_form.html.erb index 0d77476..dc984cc 100644 --- a/app/views/admin/activities/_form.html.erb +++ b/app/views/admin/activities/_form.html.erb @@ -86,6 +86,16 @@
+ <% if !@member.nil? %> +
+ +
+ <%= @member.name rescue ''%> + <%= f.hidden_field :member_profile_id, :value => @member.id %> +
+
+ <% end %> +