Sha256: 9311fbd7fd73a6ca9c9811ad585d5a68c3c3b47091f0814da33a4606a750d5bc

Contents?: true

Size: 1.32 KB

Versions: 1

Compression:

Stored size: 1.32 KB

Contents

%h4 Listing <%= plural_table_name.humanize %>
%table.outer-list#top-level
	%thead 
		<% if @search_sort %>
		%tr
			%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 
		<% @attr_cols.each do |col| %>
			%th <%= col.name.humanize %>
		<% end %>
		<% if inc_link?("edit") %>
			%th.link_col
		<% end %>
		<% if inc_link?("destroy") %>
			%th.link_col
		<% end %>
	%tbody.items
		- @<%= plural_table_name %>.each do |<%= singular_table_name %>|
			%tr
			<% @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 %>', :style => "text-align: center;"}
				= 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

1 entries across 1 versions & 1 rubygems

Version Path
controller_scaffolding-0.1.5 lib/templates/haml/controller/index.html.haml