<%= _('Content management') %>

<% if !environment.enabled?('cant_change_homepage') && !remove_content_button(:home) %>
<%= _('Profile homepage:') %> <% if profile.home_page %> <%= link_to_article(profile.home_page) %> <%= button_without_text(:'home-not', _('Reset homepage'), { :action => 'set_home_page', :id => nil }, :method => :post) %> <% else %> <%= _('Profile Information') %> <% end %>
<% end %> <% button_bar(:style => 'margin-bottom: 1em;') do %> <% parent_id = ((@article && @article.allow_children?) ? @article : nil) %> <%= colorbox_button('new', _('New content'), :action => 'new', :parent_id => parent_id, :cms => true) %> <%= button(:back, _('Back to control panel'), :controller => 'profile_editor', :action => "index") %> <% end %> <% if @article %>
<%= _('Current folder: ') %> <%= link_to profile.identifier, :action => 'index' %> <%= @article.hierarchy.map {|item| " / " + ((item == @article) ? item.name : link_to(item.slug, :id => item.id)) } %>
<% end %> <%# header %> <% if @article %> <% end %> <% @articles.each do |article| article = FilePresenter.for article %> <% short_description = article.respond_to?(:short_description) ? article.short_description : article.class.short_description %> <% end %>
<%= _('Name') %> <%= _('Type') %> <%= _('Actions') %>
<% if @article.parent %> <%= link_to '.. (' + _('parent folder') + ')', {:action => 'view', :id => @article.parent.id}, :class => 'icon-parent-folder' %> <% else %> <%= link_to '.. (' + _('parent folder') + ')', {:action => 'index'}, :class => 'icon-parent-folder' %> <% end %> <%= Folder.short_description %>
<%= link_to_article(article) %> > <%= short_description %> <%= expirable_button article, :edit, _('Edit'), {:action => 'edit', :id => article.id} if !remove_content_button(:edit) %> <%= button_without_text :eyes, _('Public view'), article.view_url %> <%= display_spread_button(profile, article) unless article.folder? || remove_content_button(:spread)%> <% if !environment.enabled?('cant_change_homepage') && !remove_content_button(:home) %> <% if profile.home_page != article %> <%= expirable_button article, :home, _('Use as homepage'), { :action => 'set_home_page', :id => article.id }, :method => :post %> <% else %> <%= button_without_text(:'home-not', _('Reset homepage'), { :action => 'set_home_page', :id => nil }, :method => :post) %> <% end %> <% end %> <%= display_delete_button(article) if !remove_content_button(:delete) %>
<%= pagination_links @articles, {:param_name => 'npage', :page_links => true} %>