Sha256: 598ab38b9312d13f3f9d80bf01677b2abbfee76397104b2eb1d3cf6f10de2213

Contents?: true

Size: 1.47 KB

Versions: 2

Compression:

Stored size: 1.47 KB

Contents

<%% content_for :right_page_toolbar do %>
<%%= link_to(render_icon_and_text_content('icon-plus-sign', t('model.create', :model => <%= class_name.split('::').last %>.model_name.human)), new_<%= class_name.split('::').last.underscore.downcase %>_path, :class => 'btn btn-inverse') %>
<%% end %>

<div id="content">

<%%= grid(@<%= class_name.split('::').last.underscore.downcase.pluralize %>_grid, :show_filters => :always) do |g|
<% attributes.each do |attribute| -%>
  g.column :name => t('activerecord.attributes.<%= class_name.split('::').last.underscore.downcase %>.<%= attribute.name %>'), :html => {:class => "grid-cell"} do |<%= class_name.split('::').last.underscore.downcase %>|
    <%= class_name.split('::').last.underscore.downcase %>.<%= attribute.name %>
  end
<% end -%>

  g.column :html => {:style => "width:50px;"} do |<%= class_name.split('::').last.underscore.downcase %>|
    content = []
    content << link_to(render_icon_content('icon-edit'), edit_<%= singular_table_name %>_path(<%= class_name.split('::').last.underscore.downcase %>), :class => 'btn btn-link', :rel => 'tooltip', :title => t('buttons.edit'))
    content << link_to(render_icon_content('icon-trash'), <%= singular_table_name %>_path(<%= class_name.split('::').last.underscore.downcase %>), :method => :delete, :confirm => t("confirms.delete"), :class => 'btn btn-link', :rel => 'tooltip', :title => t('buttons.delete'))
    content_tag :div, content.join('').html_safe, class: 'btn-group'
  end
end -%>

</div>

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
tida_conte_template-0.1.19 lib/generators/tida_conte_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.1.11 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb