Sha256: 54ad6473224012f8e2d7849b2d28ef4e786f8ef56f14206631fb2d3676d347a1

Contents?: true

Size: 793 Bytes

Versions: 3

Compression:

Stored size: 793 Bytes

Contents

<ul class="image_subnav">
  <li><%= link_to "All", admin_attachments_path, :class => "awesome light" %></li>
  <% Attachment.content_types.each do |type| %>
    <li><%= link_to type.pluralize.titleize, admin_attachments_path({:type => type}), :class => "awesome light" %></li>
  <% end %>
</ul>
<% #debugger %>
<% if params[:type] && 
	(
		FileTest.exist?(File.join(RAILS_ROOT, 'app', 'views', params[:controller],'_'+params[:type]+'.html.erb'))	|| 
		FileTest.exist?(File.join(RAILS_ROOT, 'vendor', 'plugins', 'soapbox', 'app', 'views', params[:controller],'_'+params[:type]+'.html.erb'))
	) %>
  <%= render "admin/attachments/#{params[:type]}", :collection => collection %>
<% else %>
  <%= render "admin/shared/list", :list_fields => ["id","title","attachment", "attachable"] %>  
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
soapbox-0.1.3 app/views/admin/attachments/index.html.erb
soapbox-0.1.2 app/views/admin/attachments/index.html.erb
soapbox-0.1.1 app/views/admin/attachments/index.html.erb