<% if(@elements) %> <% @elements.each do |element| %> <% @attributes.each_with_index do |attribute, index| %> <% value = element.send(attribute) %> <% # se e' un booleano %> <% if(!!value == value) %> <% if value %>
<% else %>
<% end %> <% else %> <%= value %> <% end %> <% end %> <% if @show_link || @edit_link || @delete_link %> <% if(@show_link) %> <%= link_to VIEW_LANG['index']['show'], self.show_link(element.id), class: 'lato-button' %> <% end %> <% if(@edit_link) %> <%= link_to VIEW_LANG['index']['edit'], self.edit_link(element.id), class: 'lato-button button-yellow' %> <% end %> <% if(@delete_link) %> <%= link_to VIEW_LANG['index']['delete'], self.delete_link(element.id), method: :delete, remote: @remote_delete, class: 'lato-button button-red', data: {confirm: VIEW_LANG['input']['confirm_delete']} %> <% end %> <% end %> <% end %> <% end %>