app/views/admin/assets/_browser.html.erb in beef-has_assets-0.5.0 vs app/views/admin/assets/_browser.html.erb in beef-has_assets-0.6.1
- old
+ new
@@ -6,20 +6,12 @@
<% asset_types.each do |asset_type, assets| %>
<dt class="<%= asset_type.split('/').first.parameterize %>" id="<%= asset_type.parameterize %>-<%= assets.first.id %>"><%= asset_type %></dt>
<dd id="<%= asset_type.parameterize %>-description">
<h3 class="type-heading"><%= asset_type %></h3>
<ul id="<%= asset_type.parameterize %>-list" class="asset-list">
-<% for asset in assets -%>
- <li class="<%= asset.content_type.gsub('/', ' ') %>" id="browser-asset-<%= asset.id %>">
-<% if asset.content_type =~ /image/ -%>
- <%= render :partial => "admin/assets/image", :locals => { :asset => asset, :for_content => for_content } %>
-<% else -%>
- <%= render :partial => "admin/assets/document", :locals => { :asset => asset, :for_content => for_content } %>
-<% end -%>
- </li>
-<% end -%>
+<%= render :partial => "admin/assets/category_contents", :locals => { :assets => assets, :for_content => for_content } unless ajaxify %>
</ul>
</dd>
<% end -%>
</dl>
-<%= javascript_tag "new AssetBrowser('#{@grouping}', '#{params[:folder]}');" %>
+<%= javascript_tag "new AssetBrowser('#{@grouping}', '#{params[:folder]}', #{for_content.to_s}, #{ajaxify.to_s});" %>