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
|
def revoke_list
|
||||||
rm = RegisteredModule.find(params[:id]) rescue nil
|
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
|
render :layout => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -117,6 +119,7 @@ class Admin::AdminModulesController < OrbitAdminController
|
||||||
|
|
||||||
def site_list_with_module(rm,access=nil)
|
def site_list_with_module(rm,access=nil)
|
||||||
registered_sites = []
|
registered_sites = []
|
||||||
|
times = []
|
||||||
if !rm.nil?
|
if !rm.nil?
|
||||||
rss = RegisteredSite.active
|
rss = RegisteredSite.active
|
||||||
rss.each do |rs|
|
rss.each do |rs|
|
||||||
|
@ -127,10 +130,11 @@ class Admin::AdminModulesController < OrbitAdminController
|
||||||
end
|
end
|
||||||
if im.count > 0
|
if im.count > 0
|
||||||
registered_sites << rs
|
registered_sites << rs
|
||||||
|
times << im.created_at.strftime("%Y-%m-%d %H:%M") rescue ""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
registered_sites
|
[registered_sites, times]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,11 @@
|
||||||
<% if @registered_sites.blank? %>
|
<% if @registered_sites.blank? %>
|
||||||
<span>Sorry no sites active or this module is not installed anywhere.</span>
|
<span>Sorry no sites active or this module is not installed anywhere.</span>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% @registered_sites.each do |rs|%>
|
<% @registered_sites.each_with_index do |rs, index|%>
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="websites[]" value="<%= rs.id.to_s %>" />
|
<input type="checkbox" name="websites[]" value="<%= rs.id.to_s %>" />
|
||||||
<a href="<%= "http://" + rs.site_domain %>" target="_blank"><%= rs.title || rs.site_domain %></a>
|
<a href="<%= "http://" + rs.site_domain %>" target="_blank"><%= rs.title || rs.site_domain %></a>
|
||||||
|
<span class="pull-right"><%= @times[index] %></span>
|
||||||
</label>
|
</label>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue