diff --git a/app/controllers/admin/admin_modules_controller.rb b/app/controllers/admin/admin_modules_controller.rb index 53d6124..2296afa 100644 --- a/app/controllers/admin/admin_modules_controller.rb +++ b/app/controllers/admin/admin_modules_controller.rb @@ -34,7 +34,9 @@ class Admin::AdminModulesController < OrbitAdminController def revoke_list rm = RegisteredModule.find(params[:id]) rescue nil - @registered_sites = site_list_with_module(rm, true) + slwm = site_list_with_module(rm, true) + @registered_sites = slwm.first + @times = slwm.last render :layout => false end @@ -117,6 +119,7 @@ class Admin::AdminModulesController < OrbitAdminController def site_list_with_module(rm,access=nil) registered_sites = [] + times = [] if !rm.nil? rss = RegisteredSite.active rss.each do |rs| @@ -127,10 +130,11 @@ class Admin::AdminModulesController < OrbitAdminController end if im.count > 0 registered_sites << rs + times << im.created_at.strftime("%Y-%m-%d %H:%M") rescue "" end end end - registered_sites + [registered_sites, times] end diff --git a/app/views/admin/admin_modules/uninstall_site_list.html.erb b/app/views/admin/admin_modules/uninstall_site_list.html.erb index c7805e1..d679ef4 100644 --- a/app/views/admin/admin_modules/uninstall_site_list.html.erb +++ b/app/views/admin/admin_modules/uninstall_site_list.html.erb @@ -2,10 +2,11 @@ <% if @registered_sites.blank? %> Sorry no sites active or this module is not installed anywhere. <% else %> - <% @registered_sites.each do |rs|%> + <% @registered_sites.each_with_index do |rs, index|%> <% end %> <% end %>