% file_types.each do |key, header| %>
<% display = @recent_files[key].present? ? '' : 'none' %>
<%= header %>
<% if @recent_files[key].total_pages > 1 %>
<%= link_to(_('View all'), {:controller => 'cms', :action => 'view_all_media', :profile => profile.identifier, :key => key}, :class => 'view-all colorbox', 'data-key' => key) %>
<% end %>
<%= render :partial => "cms/media_panel/list_published_media_items", :locals => { key: key, show_pagination_links: false } %>
<% end %>