<%= AuthRole.label %>

<%= form_tag(auth_roles_path, method: :get) do %> <%= view_table_open %> <%= view_table_row_open %> <%= render partial: "shared/filtercontroller", locals: { list_controllers: AuthRole.get_controllers_all } %> <%= render partial: "shared/filteraction", locals: { list_actions: AuthRole.get_actions_all(@filter_params[:filtercontroller]) } %> <%= render "shared/filteruserrole_id" %> <%= render "shared/filtergranted" %> <%= view_table_row_close %> <%= view_table_close %> <% end %> <%= page_entries_info @auth_roles %>, <%= select_per_page(params, session) %>
<% if @added.present? %> <% @added.each do |add| %> <%= link_to( add, auth_role_path(add) )%>
<% end %> <% end %>
<% if @auth_roles %> <%= will_paginate @auth_roles %> <%= form_tag(auth_roles_path, method: :get) do %> <%= view_table_open %> <%= view_table_head_open %> <%= view_table_row_open %> <%= view_table_head_cell_span 5 %> <%= view_table_head_cell ('Ruolo') %> <%= view_table_head_cell ('Controller') %> <%= view_table_head_cell ('Action') %> <%= view_table_head_cell ('Granted') %> <%= view_table_row_close %> <%= view_table_head_close %> <%= view_table_body_open %> <%# @auth_roles.order_for_index.each do |auth_role| %> <% @auth_roles.each do |auth_role| %> <% auth_role_filter = @filter_params.merge(filtercontroller: auth_role.controller, filteraction: auth_role.action, filteruserrole_id: auth_role.user_role_id) %> <%= view_table_row_open %> <%= view_table_cell ( iconbutton_view auth_role, '') %> <%= view_table_cell ( iconbutton_edit edit_auth_role_path(auth_role), '') %> <%= view_table_cell ( iconbutton_delete auth_role, '') %> <%= view_table_cell ( iconbutton_to editgranted_auth_roles_path, icon('thumbs-up'), 'btn-warning btn-xs', '', auth_role_filter.merge(do_what: AuthUsersHelper::GrantTrue), '') %> <%= view_table_cell ( iconbutton_to editgranted_auth_roles_path, icon('thumbs-down'), 'btn-warning btn-xs', '', auth_role_filter.merge(do_what: AuthUsersHelper::GrantFalse), '') %> <%= view_table_cell ( auth_role.user_role.descrizione) %> <%= view_table_cell ( auth_role.controller) %> <%= view_table_cell ( auth_role.action) %> <% bg = ((auth_role.granted == true) ? 'green' : 'red') %> <%= view_table_cell( auth_role.granted, bg) %> <%= view_table_row_close %> <% end %> <%= view_table_body_close %> <%= view_table_close %> <% end %> <%= will_paginate @auth_roles %> <% end %>