Sha256: 4cb712a2445d154c7fd58c1d59882f89366e175ea4ffc97d65e2d156275977de

Contents?: true

Size: 1.38 KB

Versions: 14

Compression:

Stored size: 1.38 KB

Contents

%h4 Listing <%= plural_table_name.humanize %>
%table.outer-list#top-level
	%thead 
		<% if @search_sort %>
		%tr.header-row
			%td{ colspan: "<%= @col_count %>" }
				%table{style: "width: 100%"}
					%tr
						%td= render "sort_form" #, :opts => @sort_dropdown_opts
						%td{ style: "text-align: right" }= render "search_form"
		<% end %>
		%tr.header-row{	style: "font-weight: bold;" }
		<% @attr_cols.each do |col| %>
			%td <%= col.name.humanize %>
		<% end %>
		<% if inc_link?("edit") %>
			%td.link_col
		<% end %>
		<% if inc_link?("destroy") %>
			%td.link_col
		<% end %>
	%tbody.items
		- @<%= plural_table_name %>.each do |<%= singular_table_name %>|
			%tr.item
			<% @attr_cols.each do |col| %> 
				%td= <%= singular_table_name %>.<%= col.name %>
			<% end %>
			<% if inc_link?("edit") %>
				%td= link_to "Edit", edit_<%= singular_table_name %>_path(<%= singular_table_name %>)
			<% end %>
			<% if inc_link?("destroy") %>
				%td= link_to "Del", <%= singular_table_name %>, method: :delete, data: {confirm: "Are you sure?"}  
			<% end %>
	<% if options.ext_index_nav? %>
		%tr#pagination-row
			%td{:colspan => '<%= @col_count %>', :class => "pagination-container"}
				= render partial: 'pagination', locals: { :coll => @<%= plural_table_name %> }
	<% end %>
%br/ 
<% if inc_link?("new") %>
= link_to 'New <%= singular_table_name.humanize %>', new_<%= singular_table_name %>_path
<% end %>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
controller_scaffolding-1.4.4 lib/templates/haml/controller/index.html.haml
controller_scaffolding-1.4.3 lib/templates/haml/controller/index.html.haml
controller_scaffolding-1.4.2 lib/templates/haml/controller/index.html.haml
controller_scaffolding-1.4.1 lib/templates/haml/controller/index.html.haml
controller_scaffolding-1.4.0 lib/templates/haml/controller/index.html.haml
controller_scaffolding-1.3.0 lib/templates/haml/controller/index.html.haml
controller_scaffolding-1.2.0 lib/templates/haml/controller/index.html.haml
controller_scaffolding-1.1.1 lib/templates/haml/controller/index.html.haml
controller_scaffolding-1.1.0 lib/templates/haml/controller/index.html.haml
controller_scaffolding-1.0.4 lib/templates/haml/controller/index.html.haml
controller_scaffolding-1.0.3 lib/templates/haml/controller/index.html.haml
controller_scaffolding-1.0.2 lib/templates/haml/controller/index.html.haml
controller_scaffolding-1.0.1 lib/templates/haml/controller/index.html.haml
controller_scaffolding-1.0.0 lib/templates/haml/controller/index.html.haml