added date for installed modules
This commit is contained in:
parent
94d91a4956
commit
e384ecff3c
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
<% if @registered_sites.blank? %>
|
||||
<span>Sorry no sites active or this module is not installed anywhere.</span>
|
||||
<% else %>
|
||||
<% @registered_sites.each do |rs|%>
|
||||
<% @registered_sites.each_with_index do |rs, index|%>
|
||||
<label>
|
||||
<input type="checkbox" name="websites[]" value="<%= rs.id.to_s %>" />
|
||||
<a href="<%= "http://" + rs.site_domain %>" target="_blank"><%= rs.title || rs.site_domain %></a>
|
||||
<span class="pull-right"><%= @times[index] %></span>
|
||||
</label>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue