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

<% button_bar(:style => 'margin-bottom: 1em;') do %> <% parent_id = ((@article && @article.allow_children?) ? @article : nil) %> <% if !@article or !@article.blog? %> <%= button :newfolder, _('New folder'), :action => 'new', :type => 'Folder', :parent_id => parent_id %> <%= button :newblog, _('New Blog'), :action => 'new', :type => 'Blog', :parent_id => parent_id %> <%= button('upload-file', _('Upload files'), :action => 'upload_files', :parent_id => parent_id) %> <% end %> <%= lightbox_button('new', label_for_new_article(@article), :action => 'new', :parent_id => parent_id) %> <%= 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 %> <%# folders %> <% for folder in @folders %> <% end %> <%# non-folder subitems %> <% for item in @subitems %> <% end %>
<%= _('Name') %> <%= _('Type') %> <%= _('Actions') %>
<%= image_tag 'icons-mime/gnome-folder.png' %> <% if @article.parent %> <%= link_to '.. (parent folder)', :action => 'view', :id => @article.parent.id %> <% else %> <%= link_to '.. (parent folder)', :action => 'index' %> <% end %> <%= Folder.short_description %>
<%= image_tag(icon_for_article(folder)) %> <%= link_to folder.name, :action => 'view', :id => folder.id %> <%= folder.class.short_description %> <%= button_without_text :edit, _('Properties'), :action => 'edit', :id => folder.id %> <%= button_without_text :eyes, _('Public view'), folder.url %> <% if !environment.enabled?('cant_change_homepage') %> <%= button_without_text :home, _('Use as homepage'), { :action => 'set_home_page', :id => folder.id }, :method => :post %> <% end %> <%= button_without_text :delete, _('Delete'), { :action => 'destroy', :id => folder.id }, :method => :post, :confirm => _('Are you sure that you want to remove this folder? Note that all the items inside it will also be removed!') %>
<%= image_tag(icon_for_article(item)) %> <%= link_to item.name, :action => 'edit', :id => item.id %> <%= item.class.short_description %> <%= button_without_text :edit, _('Edit'), :action => 'edit', :id => item.id %> <%= button_without_text :eyes, _('Public view'), item.url %> <% if profile.person? %> <%= button_without_text :spread, _('Spread this'), :action => 'publish', :id => item.id %> <% end %> <% if !environment.enabled?('cant_change_homepage') %> <%= button_without_text :home, _('Use as homepage'), { :action => 'set_home_page', :id => item.id }, :method => :post %> <% end %> <%= button_without_text :delete, _('Delete'), { :action => 'destroy', :id => item.id }, :method => :post, :confirm => _('Are you sure that you want to remove this item?') %>