Sha256: 6066e82a3a6ef87fa45eed88cfcfcba918a5821d351a943de478725958813697

Contents?: true

Size: 1.44 KB

Versions: 27

Compression:

Stored size: 1.44 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 %>

<%%= 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 -%>

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
conte_rails_template-0.0.27 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.0.26 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.0.25 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.0.24 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.0.23 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.0.22 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.0.21 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb