foodsoft/app/views/pages/show.html.haml
2012-10-18 23:43:31 +02:00

56 lines
1.7 KiB
Text

- title @page.title, false
- content_for :sidebar do
%p
= link_to edit_page_path(@page), class: 'btn btn-primary' do
%i.icon-edit
Seite bearbeiten
.well.well-small
%ul.nav.nav-list
%li
%li= link_to "Versionen (#{@page.versions.count})", "#versions", 'data-toggle-this' => '#versions'
- unless @page.children.empty?
%li= link_to "Unterseiten", "#subpages", 'data-toggle-this' => '#subpages'
#versions.well.well-small{:style => "display:none"}
%h3 Versionen
%ul.unstyled
- @page.versions.reverse.each do |version|
%li
= link_to I18n.l(version.updated_at, :format => "%d.%m.%y %H:%M"), version_page_path(@page, :version => version.lock_version)
= "(#{User.find_by_id(version.updated_by).try(:nick)})"
- unless @page.children.empty?
#subpages.well.well-small{:style => "display:none"}
%h3 Unterseiten
%ul.unstyled
- @page.children.each do |page|
%li= link_to_wikipage(page)
%ul.breadcrumb
%li
= link_to_wikipage_by_permalink("Home", "Foodcoop-Wiki")
%span.divider /
- for page in @page.ancestors.reverse
%li
= link_to_wikipage(page)
%span.divider /
%li.active= @page.title
#wikiContent
.page-header
%h1= @page.title
= render :partial => 'body'
%hr.clear/
%p
= link_to edit_page_path(@page), class: 'btn btn-primary' do
%i.icon-edit
Seite bearbeiten
= link_to "Seite löschen", @page, class: 'btn btn-danger', :method => :delete,
:confirm => "Achtung, auch alle Unterseiten werden gelöscht. Bist Du sicher?"
| Zuletzt bearbeitet von
%b
= "#{@page.user.try(:nick)}"
= "am #{format_datetime @page.updated_at}"