Report List

<%@reports.each do |x|%> <% if(x.flag == 1) %> <% else %> <% end %> <% end %>
Report Generated For Created At Actions
<%= x.title %> <%= x.from_time.try("strftime","%b %d %Y").to_s+" - "+x.to_time.try("strftime","%b %d %Y").to_s %> <%= x.created_at.strftime('%d %b %Y-%H:%M (UTC)')%><%= link_to " PDF".html_safe, {:controller=>'reports',:action=>'download_pdf', :id=>x.id, :type => 'pdf'} if x.download_type.try(:include?,"PDF") %> <%= link_to " CSV".html_safe, {:controller=>'reports',:action=>'download_pdf', :id=>x.id,:type => 'csv'},:target => "_blank" if x.title.include?("Uplink Usage by AP")%> <%= link_to " Excel".html_safe, {:controller=>'reports',:action=>'download_pdf', :id=>x.id,:type => 'excel'} if x.download_type.try(:include?,"Excel") %> <%#= link_to " Email".html_safe, {:controller=>'reports',:action=>'send_email', :id=>x.id} %> <%= 'Pending ....' %>
<% if can? :manage, ScheduledReport%>
<%@scheduled_reports.each do |x|%> <% if(x.scheduled_on == 'Customize') %> <% else %> <% end %> <% end %>
Report Scheduled For Notification Group Actions
<%= x.title %><%= x.from_time.strftime("%b %d %Y")+" - "+x.to_time.strftime("%b %d %Y")%><%= x.scheduled_on%><%= x.notification_groups.pluck(:name).join(',') %> <%= link_to 'Edit', reports_report_path(:scheduled_report_id => x.id), :class => "label label-info" %> <%= link_to 'Destroy', reports_remove_scheduled_path(scheduled_id: x.id), :method => :delete, :class=>"label label-danger", :confirm => "Are you sure you want to delete?" %>
<% end %>