2009-08-12 18:41:25 +02:00
|
|
|
- title @page.title, false
|
2009-03-25 19:54:04 +01:00
|
|
|
|
2012-10-09 02:31:10 +02:00
|
|
|
- content_for :sidebar do
|
|
|
|
%p
|
|
|
|
= link_to edit_page_path(@page), class: 'btn btn-primary' do
|
2013-04-12 00:58:38 +02:00
|
|
|
%i.icon-edit= t '.edit'
|
2012-10-09 02:31:10 +02:00
|
|
|
.well.well-small
|
|
|
|
%ul.nav.nav-list
|
|
|
|
%li
|
2013-04-12 00:58:38 +02:00
|
|
|
%li= link_to t('.versions', count: @page.versions.count), "#versions", 'data-toggle-this' => '#versions'
|
2012-10-09 02:31:10 +02:00
|
|
|
- unless @page.children.empty?
|
2013-04-12 00:58:38 +02:00
|
|
|
%li= link_to t('.subpages'), "#subpages", 'data-toggle-this' => '#subpages'
|
2009-08-16 01:09:11 +02:00
|
|
|
|
2012-10-09 02:31:10 +02:00
|
|
|
#versions.well.well-small{:style => "display:none"}
|
2013-04-12 00:58:38 +02:00
|
|
|
%h3= t '.title_versions'
|
2012-10-09 02:31:10 +02:00
|
|
|
%ul.unstyled
|
|
|
|
- @page.versions.reverse.each do |version|
|
|
|
|
%li
|
2013-04-12 00:58:38 +02:00
|
|
|
= link_to I18n.l(version.updated_at, :format => t('.date_format')), version_page_path(@page, :version => version.lock_version)
|
2013-09-20 22:40:13 +02:00
|
|
|
= "(#{show_user(User.find_by_id(version.updated_by))})"
|
2009-08-16 01:09:11 +02:00
|
|
|
|
2012-10-09 02:31:10 +02:00
|
|
|
- unless @page.children.empty?
|
|
|
|
#subpages.well.well-small{:style => "display:none"}
|
2013-04-12 00:58:38 +02:00
|
|
|
%h3= t '.subpages'
|
2012-10-09 02:31:10 +02:00
|
|
|
%ul.unstyled
|
|
|
|
- @page.children.each do |page|
|
|
|
|
%li= link_to_wikipage(page)
|
2009-08-12 18:41:25 +02:00
|
|
|
|
2012-10-18 23:43:31 +02:00
|
|
|
%ul.breadcrumb
|
|
|
|
%li
|
|
|
|
= link_to_wikipage_by_permalink("Home", "Foodcoop-Wiki")
|
|
|
|
%span.divider /
|
2012-10-09 02:31:10 +02:00
|
|
|
- for page in @page.ancestors.reverse
|
2012-10-18 23:43:31 +02:00
|
|
|
%li
|
|
|
|
= link_to_wikipage(page)
|
|
|
|
%span.divider /
|
|
|
|
%li.active= @page.title
|
2009-05-15 17:32:45 +02:00
|
|
|
|
2009-03-25 19:54:04 +01:00
|
|
|
|
2012-10-09 02:31:10 +02:00
|
|
|
#wikiContent
|
|
|
|
.page-header
|
|
|
|
%h1= @page.title
|
|
|
|
= render :partial => 'body'
|
|
|
|
|
|
|
|
%hr.clear/
|
|
|
|
%p
|
|
|
|
= link_to edit_page_path(@page), class: 'btn btn-primary' do
|
2013-04-12 00:58:38 +02:00
|
|
|
%i.icon-edit= t '.edit'
|
|
|
|
= link_to t('.delete'), @page, class: 'btn btn-danger', :method => :delete,
|
2014-02-20 15:04:53 +01:00
|
|
|
:data => {:confirm => t('.delete_confirm')}
|
2013-09-20 22:40:13 +02:00
|
|
|
!= '| ' + t('.last_updated', user: show_user(@page.user), when: format_datetime(@page.updated_at))
|