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.1.9 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.1.8 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.1.7 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.1.6 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.1.5 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.1.4 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.1.3 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.1.2 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.1.1 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.1.0 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.0.37 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.0.36 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.0.35 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.0.34 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.0.33 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.0.32 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.0.31 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.0.30 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.0.29 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb
conte_rails_template-0.0.28 lib/generators/conte_rails_template/templates/erb/scaffold/index.html.erb