foodsoft/lib/foodsoft_wiki/app/views/pages/show.html.haml

52 lines
1.6 KiB
Text
Raw Normal View History

- title @page.title, false
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'
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)
2012-10-09 02:31:10 +02:00
= "(#{User.find_by_id(version.updated_by).try(:nick)})"
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)
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
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,
:confirm => t('.delete_confirm')
!= '| ' + t('.last_updated', user: h(@page.user.try(:nick)), when: format_datetime(@page.updated_at))