%h2 Seiten %div#pages - @pages.each do |page| - if page.public - klass = "grid0 public" - else - klass = "grid0" %article{:class=>klass} %div.metas %h5 = link_to page.title, page %p %strong = page.subtitle - if page.public (Veröffentlicht) - else (Versteckt) %p - if page.content.length > 300 #{page.content[0..300]}... - else = page.content[0..300] - if current_user.has_role? :admin %div.actions %p - if page.public = link_to 'Verstecken', unpublish_page_path(page), :class=>"button" - else = link_to 'Veröffentlichen', publish_page_path(page), :class=>"button" %p = link_to 'Bearbeiten', edit_page_path(page), :class=>"button" %hr.clear %article#admin_panel %p = link_to 'Neue Seite', new_page_path, :class=>"button"