Sha256: 6706b008b37765afa62cc39104e69c520217defc25b4cbe52c4ba35adfeacc17
Contents?: true
Size: 1.64 KB
Versions: 2
Compression:
Stored size: 1.64 KB
Contents
<% content_for :content do %> <table class="table table-hover"> <thead> <tr> <% @list_fields.each_with_index do |name, index| %> <th class="col-md-3 sort-button" data-column="<%=name%>"> <% unless index == 0 %> <span class="line"></span> <% end %> <span><%= field_to_label(name) + @sortable_service.sorting_sign(name) %></span> </th> <% end %> <th class="col-md-3 align-right"> <span class="line"></span> <span>Management</span> </th> </tr> </thead> <% has_position = @sortable_service.has_position? %> <tbody data-position='false'> <% @items.each_with_index do |item, index| %> <tr<% if has_position %> id='<%= item.position %>'<% end %> data-id='<%= item.id %>'> <% @list_fields.each do |name| %><td><% td_data = item.send(name) if td_data.is_a? Mongoid::Document #rm_todo remove hard code, extract helper (data adapter) concat link_to td_data.to_s, admin_edit_uri(td_data) else concat td_data end %></td> <% end %> <td> <ul class="actions"> <li><%= button_to 'Unlink', admin_unlink_uri(item, params[:parent], params[:parent_id]), { :method => :patch, :form => {:class => 'delete-item-form'} } %></li> </ul> </td> </tr> <% end %> </tbody> </table> <%= render 'rademade_admin/_blocks/pagination' %> <% end %>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rademade_admin-0.0.3 | app/views/rademade_admin/_layouts/inner/related_index_table.html.erb |
rademade_admin-0.0.2 | app/views/rademade_admin/_layouts/inner/related_index_table.html.erb |