<% if @article %>

<%= icon('cms') %> <%= link_to profile.identifier, :action => 'index' %> <%= @article.hierarchy.map {|item| " / " + ((item == @article) ? item.name : link_to(item.name, :id => item.id)) } %>

<% else %>

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

<% button_bar(:style => 'margin-bottom: 1em;') do %> <%= lightbox_button('new', _('New article'), :action => 'new') %> <% end %> <% end %> <%# subitem %> <% if !@subitems.empty? && @article %> <%= toggle_panel(_('Hide subitems'), _('Show subitems'), 'article-subitems') %> <% end %>
<%= @article ? _('Subitems') : _('Articles') %>
<% unless @subitems.empty? %> <% 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 %> <%= 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 %>