diff --git a/app/models/page.rb b/app/models/page.rb index 79ec7ef1..01bf3bf0 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -28,6 +28,7 @@ class Page index [[:fullpath, Mongo::ASCENDING], [:site_id, Mongo::ASCENDING]] ## callbacks ## + after_initialize :set_default_raw_template before_validation :normalize_slug before_save { |p| p.fullpath = p.fullpath(true) } before_destroy :do_not_remove_index_and_404_pages @@ -102,4 +103,8 @@ class Page self.slug.slugify!(:without_extension => true) if self.slug.present? end + def set_default_raw_template + self.raw_template ||= I18n.t('attributes.defaults.pages.other.body') + end + end diff --git a/app/views/admin/custom_fields/_index.html.haml b/app/views/admin/custom_fields/_index.html.haml index 87d49159..e8b91124 100644 --- a/app/views/admin/custom_fields/_index.html.haml +++ b/app/views/admin/custom_fields/_index.html.haml @@ -44,6 +44,5 @@ %button{ :class => 'button light add', :type => 'button' } %span!= t('admin.buttons.new_item') - %script{ :type => 'text/javascript', :name => 'data' } != collection_to_js(ordered_custom_fields, :template => field_klass.new(:label => t('.default_label'), :_alias => '', :kind => 'string').to_hash) diff --git a/config/locales/default.de.yml b/config/locales/default.de.yml index 931e4694..aff700b5 100644 --- a/config/locales/default.de.yml +++ b/config/locales/default.de.yml @@ -46,7 +46,7 @@ de: title: "Seite nicht gefunden" body: "Inhalt der 404 Seite" other: - body: "Inhalte kommen hier rein" + body: "{% extends 'parent' %}" mongoid: attributes: diff --git a/config/locales/default.en.yml b/config/locales/default.en.yml index 4a346137..9b892cbb 100644 --- a/config/locales/default.en.yml +++ b/config/locales/default.en.yml @@ -25,7 +25,7 @@ en: title: "Page not found" body: "Content of the 404 page" other: - body: "Content goes here" + body: "{% extends 'parent' %}" pagination: previous: "« Previous" diff --git a/config/locales/default.pt-BR.yml b/config/locales/default.pt-BR.yml index 1a61ef7a..73f422ee 100644 --- a/config/locales/default.pt-BR.yml +++ b/config/locales/default.pt-BR.yml @@ -50,7 +50,7 @@ pt-BR: title: "Página não encontrada" body: "Conteúdo da página de erro 404" other: - body: "Conteúdo vai aqui" + body: "{% extends 'parent' %}" mongoid: attributes: