Use configured available locales

This commit is contained in:
2015-01-13 16:56:06 +01:00
parent 525d942d3d
commit 978832bf25
4 changed files with 15 additions and 9 deletions
@@ -2,8 +2,8 @@
tr
td= link_to ' - '*page.tree_depth + page.name, cmtool.edit_page_path(page)
td= page.title
td.locale class: "locale-#{page.locale}" = page.locale
td= boolean_text controller.template_exists?("pages/# page.name ")
td.locale class="locale-#{page.locale}" = page.locale
td= boolean_text controller.template_exists?("pages/#{page.name}")
td= boolean_text page.in_menu?
th= page.tree_path.map(&:position).map(&:to_s).join('.')
- if children = page.children.presence
+2 -4
View File
@@ -11,10 +11,8 @@ table.index-table.table.table-striped.table-hover
th
th
tbody
= render 'nested_pages', pages: Page.full_tree(:nl)
= render 'nested_pages', pages: Page.full_tree(:en)
= render 'nested_pages', pages: Page.full_tree(:de)
= render 'nested_pages', pages: Page.full_tree(:es)
- Rails.configuration.available_locales.each do |locale|
= render 'nested_pages', pages: Page.full_tree(locale)
- content_for :page_links do
ul