Traccia attività

<%= form_tag(business_audits_path, method: :get) do %> <%= view_table_open %> <%= view_table_row_open %> <%= render partial: "shared/filtercontroller", locals: { list_controllers: AuthUser.get_controllers_used } %> <%= render partial: "shared/filteraction", locals: { list_actions: AuthUser.get_actions_used } %> <%= render "shared/filterloginname" %> <%= render partial: "shared/filterdaterangestart", locals: { button_label: 'Inizio data', pulsante_a_capo: false } %> <%= render partial: "shared/filterdaterangeend", locals: { button_label: 'Fine data', pulsante_a_capo: false } %> <%= view_table_cell (text_field_tag(:filterobject_id, @filter_params[:filterobject_id], placeholder: "object_id", :style => "width:100px;") + tag.div(class: "btn-group") do submit_tag('Cerca', name: nil, :class => "btn btn-warning btn-xs") end ) %> <%= view_table_row_close %> <%= view_table_row_open %> <%= render "shared/filterdate" %> <%= render "shared/filterperson_id" %> <%= render "shared/filterhouse_id" %> <%= render "shared/filterhouseregion_id" %> <%= render "shared/filterorganization_id" %> <%= view_table_cell ( filter_select_tag("filterbusinessauditerror", options_for_select( [true, false], @filter_params[:filterbusinessauditerror].present? ? @filter_params[:filterbusinessauditerror].to_i : nil), prompt: "(errore?)", include_blank: true, is_selected: @filter_params[:filterbusinessauditerror].present? ) ) %> <%= view_table_row_close %> <%= view_table_close %> <% end %> <%= page_entries_info @business_audits %>, <%= select_per_page(params, session) %>
<%= will_paginate @business_audits %> <%= view_table_open %> <%= view_table_head_open %> <%= view_table_row_open %> <%= view_table_head_cell ('Quando') %> <%= view_table_head_cell ('User') %> <%= view_table_head_cell ('*Controller') %> <%= view_table_head_cell ('*Action') %> <%= view_table_head_cell ('*DateScope') %> <%= view_table_head_cell ('Descrizione') %> <%= view_table_head_cell ('*Object_id') %> <%= view_table_head_cell ('Persona') %> <%= view_table_head_cell ('Nucleo') %> <%= view_table_head_cell ('Regione') %> <%= view_table_head_cell ('Associazione') %> <%= view_table_head_cell ('Error?') %> <%= view_table_head_cell ('ErrorMessage') %> <%= view_table_head_cell ('*Params') %> <%= view_table_row_close %> <%= view_table_head_close %> <%= view_table_body_open %> <% @business_audits.each do |business_audit| %> <%= view_table_row_open %> <% bgcolor = business_audit.error ? 'Salmon' : nil %> <%= view_table_cell_right( business_audit.created_at.as_timestamp_short, bgcolor) %> <%= view_table_cell( business_audit.user.name, bgcolor) %> <%= view_table_cell( business_audit.controller, bgcolor) %> <%= view_table_cell( business_audit.action, bgcolor) %> <%= view_table_cell( business_audit.datescope.present? ? business_audit.datescope.to_dmy : nil, bgcolor) %> <%= view_table_cell( business_audit.descrizione, bgcolor) %> <%#= view_table_cell ( polymorphic_url [business_audit.controller.to_sym, business_audit.object_id], routing_type: :path ) %> <%#= Rails.application.routes.routes.select{ |route| route.defaults[:controller] == 'srg_pns'} %> <% if business_audit.object_id.present? %> <%= view_table_cell( begin (link_to business_audit.object_id, controller: business_audit.controller, action: business_audit.action, id: business_audit.object_id, method: :get) rescue business_audit.object_id end, bgcolor) %> <% else %> <%= view_table_cell( business_audit.object_id, bgcolor) %> <% end %> <%= view_table_cell( business_audit.person_id.present? ? link_to( business_audit.person.dh_person_name, person_path(business_audit.person_id) ) : nil, bgcolor) %> <%= view_table_cell( business_audit.house_id.present? ? link_to(business_audit.house.descrizione, house_path(business_audit.house_id)) : nil, bgcolor) %> <%= view_table_cell( business_audit.region_id.present? ? link_to(business_audit.region.descrizione, region_path(business_audit.region_id)) : nil, bgcolor) %> <%= view_table_cell( business_audit.organization_id.present? ? link_to(business_audit.organization.descrizione, organization_path(business_audit.organization_id)) : nil, bgcolor) %> <%= view_table_cell( business_audit.error, bgcolor) %> <%= view_table_cell( business_audit.error_message, bgcolor) %> <%= view_table_cell( business_audit.params, bgcolor) %> <%= view_table_row_close %> <% end %> <%= view_table_body_close %> <%= view_table_close %> <%= will_paginate @business_audits %>