<%= @article ? _('Subitems') : _('Articles') %>
<% unless @subitems.empty? %>
<% @subitems.each do |item| %>
-
<%= file_manager_button(item.name, icon_for_article(item), :action => 'view', :id => item.id) %>
<% end %>
<% end %>
<% if @article %>
<% button_bar(:class => 'file-manager-controls') do %>
<% if @article.allow_children? %>
<%= lightbox_button('new', _('New subitem'), :action => 'new', :parent_id => @article.id) %>
<% end %>
<%= button('up', _('Go up one level'), :action => (@article.parent ? 'view' : 'index'), :id => @article.parent) %>
<% end %>
<% end %>
<%# display the article content %>
<% if @article %>
<%= @article.name %>
<%= image_tag(icon_for_article(@article)) %>
<% button_bar(:id => 'article-controls') do %>
-
<%= _('"%{article}", last changed by %{author}') % { :article => @article.name, :author => (@article.last_changed_by ? @article.last_changed_by.name : _('Unknown User')) } %>
-
<%= _('Public address of this article: %s') % link_to(url_for(@article.url), @article.url) %>
-
<%= _('Tags:') %> <%= @article.tag_list %>
<%= _('Categories:') %> <%= @article.categories.map { |item| item.name }.join(', ') %>
<%= button('edit', _('Edit'), { :action => 'edit', :id => @article}) %>
<%= button('home', _('Use as homepage'), { :action => 'set_home_page', :id => @article }, { :method => :post }) %>
<%= button('delete', _('Delete'), { :action => 'destroy', :id => @article }, :method => :post, :confirm => _('Are you sure you wan to remove this article?')) %>
<% end %>
<%= @article.to_html %>
<% end %>