Showing
2 changed files
with
5 additions
and
5 deletions
| @@ -31,7 +31,7 @@ module Kanjai | @@ -31,7 +31,7 @@ module Kanjai | ||
| 31 | content = item[:source] | 31 | content = item[:source] |
| 32 | if current_page | 32 | if current_page |
| 33 | content = content.gsub('###link###', current_page.menu_url('http://', lang = nil)) | 33 | content = content.gsub('###link###', current_page.menu_url('http://', lang = nil)) |
| 34 | - .gsub('###title###', current_page.lang_attributes($domain.page_langs.default, :title)) | 34 | + .gsub('###title###', current_page.lang_attributes(domain.page_langs.default, :title)) |
| 35 | end | 35 | end |
| 36 | subparts << content | 36 | subparts << content |
| 37 | when 'repeat' | 37 | when 'repeat' |
| @@ -68,7 +68,7 @@ module Kanjai | @@ -68,7 +68,7 @@ module Kanjai | ||
| 68 | end | 68 | end |
| 69 | 69 | ||
| 70 | 70 | ||
| 71 | - page_collection = Page.joins(:domain).where(kanjai_domains: {id: $domain.id}).order(:position) | 71 | + page_collection = Page.joins(:domain).where(kanjai_domains: {id: domain.id}).order(:position) |
| 72 | 72 | ||
| 73 | if item[:attributes]["ids"].present? | 73 | if item[:attributes]["ids"].present? |
| 74 | page_collection = page_collection.where('id in (?)', item[:attributes]["ids"]) | 74 | page_collection = page_collection.where('id in (?)', item[:attributes]["ids"]) |
| @@ -147,7 +147,7 @@ module Kanjai | @@ -147,7 +147,7 @@ module Kanjai | ||
| 147 | elements.each do |item| | 147 | elements.each do |item| |
| 148 | case item[:name] | 148 | case item[:name] |
| 149 | when 'text' | 149 | when 'text' |
| 150 | - lang = $domain.page_langs.find_by_code($current_locale) | 150 | + lang = domain.page_langs.find_by_code($current_locale) |
| 151 | content = item[:source] | 151 | content = item[:source] |
| 152 | content = content.gsub('###CURRENT_LANG_TITLE###', lang.title) | 152 | content = content.gsub('###CURRENT_LANG_TITLE###', lang.title) |
| 153 | .gsub('###CURRENT_LANG_CODE###', lang.code) | 153 | .gsub('###CURRENT_LANG_CODE###', lang.code) |
| @@ -178,7 +178,7 @@ module Kanjai | @@ -178,7 +178,7 @@ module Kanjai | ||
| 178 | if page_data | 178 | if page_data |
| 179 | page = page_data.page | 179 | page = page_data.page |
| 180 | end | 180 | end |
| 181 | - $domain.page_langs.all.each do |lang| | 181 | + domain.page_langs.all.each do |lang| |
| 182 | if lang.code.to_s == $current_locale.to_s && active_state_template | 182 | if lang.code.to_s == $current_locale.to_s && active_state_template |
| 183 | content = active_state_template.gsub('###LANG_CODE###', lang.code) | 183 | content = active_state_template.gsub('###LANG_CODE###', lang.code) |
| 184 | .gsub('###LANG_TITLE###', lang.title) | 184 | .gsub('###LANG_TITLE###', lang.title) |