51 lines
1.6 KiB
Text
51 lines
1.6 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= t '.edit'
|
|
.well.well-small
|
|
%ul.nav.nav-list
|
|
%li
|
|
%li= link_to t('.versions', count: @page.versions.count), "#versions", 'data-toggle-this' => '#versions'
|
|
- unless @page.children.empty?
|
|
%li= link_to t('.subpages'), "#subpages", 'data-toggle-this' => '#subpages'
|
|
|
|
#versions.well.well-small{:style => "display:none"}
|
|
%h3= t '.title_versions'
|
|
%ul.unstyled
|
|
- @page.versions.reverse.each do |version|
|
|
%li
|
|
= link_to I18n.l(version.updated_at, :format => t('.date_format')), version_page_path(@page, :version => version.lock_version)
|
|
= "(#{show_user(User.find_by_id(version.updated_by))})"
|
|
|
|
- unless @page.children.empty?
|
|
#subpages.well.well-small{:style => "display:none"}
|
|
%h3= t '.subpages'
|
|
%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= t '.edit'
|
|
= link_to t('.delete'), @page, class: 'btn btn-danger', :method => :delete,
|
|
:confirm => t('.delete_confirm')
|
|
!= '| ' + t('.last_updated', user: show_user(@page.user), when: format_datetime(@page.updated_at))
|