Sha256: cd49e324d76513caaadfbccba149e8a6171019e0e38c7ebc9e33867d641c443a

Contents?: true

Size: 1.73 KB

Versions: 5

Compression:

Stored size: 1.73 KB

Contents

<%% title "<%=parent_plural_class_name%>" %>
<%% heading "<%=parent_plural_class_name%>" %>

<%%= stylesheet( 'dust_<%=parent_singular_name%>','<%=parent_singular_name%>_uploadify') %>

<div class="button_bar">
	<%%= render :partial => 'search' %>
	<%%=link_to('new <%=parent_singular_name%>', new_<%=parent_singular_name%>_path, :class => 'newfile tip', :title => "New <%=parent_class_name%>")%>
</div>

<div class='<%=child_singular_name%>list'>
	
	<%%= will_paginate @<%=parent_plural_name%> %>
	
	<table class="<%=child_plural_name%>">
		<tr style='color:#222;'>
			<th></th>
			<th>
				<%=parent_class_name%> Title
			</th>
			<th>
				Created At
			</th>
			<th></th>
		</tr>
	<%% @<%=parent_plural_name%>.each do |<%=parent_singular_name%>| %>
	<tr class='<%%= cycle('odd', 'even')%>'>

		<td>
				<%% if <%=parent_singular_name%>.<%=child_plural_name%>.empty? %>
					<%%= link_to "add <%=child_plural_name%> to #{<%=parent_singular_name%>.title}", <%=parent_singular_name%> %>
				<%% else %>
					<%%  @<%=child_singular_name%> = <%=parent_singular_name%>.<%=child_plural_name%>.find(:first)  %>
					<%%= link_to image_tag(@<%=child_singular_name%>.file.url(:thumb)), <%=parent_singular_name%> %>
				<%% end -%>
		</td>
		<td>
			<%%= <%=parent_singular_name%>.title%>
		</td>
		<td>
			<%%= <%=parent_singular_name%>.created_at.to_s(:m_d_y) %>
		</td>
		<td>
			<div style='float:right'> 
				<%%=link_to('', edit_<%=parent_singular_name%>_path(<%=parent_singular_name%>), :class => 'edit')%>
				<%%=link_to "", <%=parent_singular_name%>, :confirm => 'Are you sure?', :method => :delete, :class => 'destroy' %>						
			</div>
		</td>
	</tr>
	<%% end %>

	</table>
	 
	
</div>
	
<div class="clear"></div>

<%%= will_paginate @<%=parent_plural_name%> %>


Version data entries

5 entries across 3 versions & 1 rubygems

Version Path
dust-generators-0.2.5 lib/generators/dust/albums/templates/app/views/albums/index.html.erb
dust-generators-0.2.5 rails_generators/dust_albums/templates/app/views/albums/index.html.erb
dust-generators-0.2.4 lib/generators/dust/albums/templates/app/views/albums/index.html.erb
dust-generators-0.2.4 rails_generators/dust_albums/templates/app/views/albums/index.html.erb
dust-generators-0.2.3 rails_generators/dust_albums/templates/app/views/albums/index.html.erb