Merge remote-tracking branch 'origin/master' into rails_3_1
Conflicts: Gemfile Gemfile.lock app/cells/locomotive/menu_cell.rb app/helpers/admin/content_types_helper.rb app/models/content_instance.rb app/models/page.rb app/views/admin/shared/menu/_contents.html.haml config/initializers/locomotive.rb config/locales/admin_ui.de.yml config/locales/admin_ui.en.yml config/locales/admin_ui.es.yml config/locales/admin_ui.fr.yml config/locales/admin_ui.it.yml config/locales/admin_ui.nl.yml config/locales/admin_ui.no.yml config/locales/admin_ui.pt-BR.yml config/locales/admin_ui.ru.yml lib/generators/locomotive/install/templates/locomotive.rb lib/locomotive/configuration.rb locomotive_cms.gemspec spec/models/locomotive/account_spec.rb
This commit is contained in:
commit
840609cbce
6
Gemfile
6
Gemfile
@ -13,8 +13,8 @@ gem 'mongo', '~> 1.5.2'
|
|||||||
gem 'bson_ext', '~> 1.5.2'
|
gem 'bson_ext', '~> 1.5.2'
|
||||||
gem 'mongoid', '~> 2.4.0'
|
gem 'mongoid', '~> 2.4.0'
|
||||||
gem 'locomotive_mongoid_acts_as_tree', '~> 0.1.5.8'
|
gem 'locomotive_mongoid_acts_as_tree', '~> 0.1.5.8'
|
||||||
gem 'custom_fields', :path => '../gems/custom_fields' # DEV
|
# gem 'custom_fields', :path => '../gems/custom_fields' # DEV
|
||||||
# gem 'custom_fields', :git => 'git://github.com/locomotivecms/custom_fields.git', :branch => 'experimental'
|
gem 'custom_fields', :git => 'git://github.com/locomotivecms/custom_fields.git', :ref => '472101ade7b4815ec977ee121442cfe28f4db285'
|
||||||
gem 'kaminari'
|
gem 'kaminari'
|
||||||
|
|
||||||
gem 'haml', '~> 3.1.3'
|
gem 'haml', '~> 3.1.3'
|
||||||
@ -44,7 +44,6 @@ gem 'dragonfly', '~> 0.9.8'
|
|||||||
gem 'rack-cache', '~> 1.1', :require => 'rack/cache'
|
gem 'rack-cache', '~> 1.1', :require => 'rack/cache'
|
||||||
gem 'mimetype-fu', '~> 0.1.2'
|
gem 'mimetype-fu', '~> 0.1.2'
|
||||||
gem 'rubyzip'
|
gem 'rubyzip'
|
||||||
|
|
||||||
gem 'actionmailer-with-request', '~> 0.3.0', :require => 'actionmailer_with_request'
|
gem 'actionmailer-with-request', '~> 0.3.0', :require => 'actionmailer_with_request'
|
||||||
gem 'httparty', '~> 0.8.1'
|
gem 'httparty', '~> 0.8.1'
|
||||||
gem 'delayed_job_mongoid', '~> 1.0.8'
|
gem 'delayed_job_mongoid', '~> 1.0.8'
|
||||||
@ -69,6 +68,7 @@ group :test do
|
|||||||
gem 'xpath', '~> 0.1.4'
|
gem 'xpath', '~> 0.1.4'
|
||||||
gem 'capybara'
|
gem 'capybara'
|
||||||
gem 'database_cleaner'
|
gem 'database_cleaner'
|
||||||
|
gem 'shoulda-matchers'
|
||||||
|
|
||||||
gem 'launchy'
|
gem 'launchy'
|
||||||
gem 'mocha', '0.9.12' # :git => 'git://github.com/floehopper/mocha.git'
|
gem 'mocha', '0.9.12' # :git => 'git://github.com/floehopper/mocha.git'
|
||||||
|
52
Gemfile.lock
52
Gemfile.lock
@ -1,23 +1,13 @@
|
|||||||
PATH
|
GIT
|
||||||
remote: ../gems/aloha-rails
|
remote: git://github.com/locomotivecms/custom_fields.git
|
||||||
specs:
|
revision: 472101ade7b4815ec977ee121442cfe28f4db285
|
||||||
locomotive-aloha-rails (0.20.1)
|
ref: 472101ade7b4815ec977ee121442cfe28f4db285
|
||||||
actionpack (~> 3.1.3)
|
|
||||||
|
|
||||||
PATH
|
|
||||||
remote: ../gems/custom_fields
|
|
||||||
specs:
|
specs:
|
||||||
custom_fields (2.0.0.rc1)
|
custom_fields (2.0.0.rc1)
|
||||||
activesupport (~> 3.1.3)
|
activesupport (~> 3.1.3)
|
||||||
carrierwave-mongoid (~> 0.1.3)
|
carrierwave-mongoid (~> 0.1.3)
|
||||||
mongoid (~> 2.4.0)
|
mongoid (~> 2.4.0)
|
||||||
|
|
||||||
PATH
|
|
||||||
remote: ../gems/tinymce-rails
|
|
||||||
specs:
|
|
||||||
locomotive-tinymce-rails (3.4.7)
|
|
||||||
actionpack (~> 3.1.3)
|
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: http://rubygems.org/
|
remote: http://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
@ -103,12 +93,12 @@ GEM
|
|||||||
gherkin (~> 2.7.1)
|
gherkin (~> 2.7.1)
|
||||||
json (>= 1.4.6)
|
json (>= 1.4.6)
|
||||||
term-ansicolor (>= 1.0.6)
|
term-ansicolor (>= 1.0.6)
|
||||||
cucumber-rails (1.2.0)
|
cucumber-rails (1.2.1)
|
||||||
capybara (>= 1.1.1)
|
capybara (>= 1.1.2)
|
||||||
cucumber (>= 1.1.1)
|
cucumber (>= 1.1.3)
|
||||||
nokogiri (>= 1.5.0)
|
nokogiri (>= 1.5.0)
|
||||||
database_cleaner (0.7.0)
|
database_cleaner (0.7.1)
|
||||||
delayed_job (3.0.0)
|
delayed_job (3.0.1)
|
||||||
activesupport (~> 3.0)
|
activesupport (~> 3.0)
|
||||||
delayed_job_mongoid (1.0.8)
|
delayed_job_mongoid (1.0.8)
|
||||||
delayed_job (~> 3.0.0)
|
delayed_job (~> 3.0.0)
|
||||||
@ -123,7 +113,7 @@ GEM
|
|||||||
ejs (1.0.0)
|
ejs (1.0.0)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
excon (0.7.12)
|
excon (0.7.12)
|
||||||
execjs (1.2.13)
|
execjs (1.3.0)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
factory_girl (2.2.0)
|
factory_girl (2.2.0)
|
||||||
activesupport
|
activesupport
|
||||||
@ -147,11 +137,11 @@ GEM
|
|||||||
formtastic (2.0.2)
|
formtastic (2.0.2)
|
||||||
rails (~> 3.0)
|
rails (~> 3.0)
|
||||||
fssm (0.2.8.1)
|
fssm (0.2.8.1)
|
||||||
gherkin (2.7.3)
|
gherkin (2.7.4)
|
||||||
json (>= 1.4.6)
|
json (>= 1.4.6)
|
||||||
growl-glue (1.0.7)
|
growl-glue (1.0.7)
|
||||||
haml (3.1.4)
|
haml (3.1.4)
|
||||||
highline (1.6.9)
|
highline (1.6.11)
|
||||||
hike (1.2.1)
|
hike (1.2.1)
|
||||||
httparty (0.8.1)
|
httparty (0.8.1)
|
||||||
multi_json
|
multi_json
|
||||||
@ -160,7 +150,7 @@ GEM
|
|||||||
jquery-rails (1.0.19)
|
jquery-rails (1.0.19)
|
||||||
railties (~> 3.0)
|
railties (~> 3.0)
|
||||||
thor (~> 0.14)
|
thor (~> 0.14)
|
||||||
json (1.6.4)
|
json (1.6.5)
|
||||||
kaminari (0.13.0)
|
kaminari (0.13.0)
|
||||||
actionpack (>= 3.0.0)
|
actionpack (>= 3.0.0)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
@ -168,6 +158,10 @@ GEM
|
|||||||
kgio (2.7.2)
|
kgio (2.7.2)
|
||||||
launchy (2.0.5)
|
launchy (2.0.5)
|
||||||
addressable (~> 2.2.6)
|
addressable (~> 2.2.6)
|
||||||
|
locomotive-aloha-rails (0.20.1)
|
||||||
|
actionpack (~> 3.1.3)
|
||||||
|
locomotive-tinymce-rails (3.4.7)
|
||||||
|
actionpack (~> 3.1.3)
|
||||||
locomotive_liquid (2.2.2)
|
locomotive_liquid (2.2.2)
|
||||||
locomotive_mongoid_acts_as_tree (0.1.5.8)
|
locomotive_mongoid_acts_as_tree (0.1.5.8)
|
||||||
mail (2.3.0)
|
mail (2.3.0)
|
||||||
@ -179,7 +173,7 @@ GEM
|
|||||||
mocha (0.9.12)
|
mocha (0.9.12)
|
||||||
mongo (1.5.2)
|
mongo (1.5.2)
|
||||||
bson (= 1.5.2)
|
bson (= 1.5.2)
|
||||||
mongoid (2.4.0)
|
mongoid (2.4.2)
|
||||||
activemodel (~> 3.1)
|
activemodel (~> 3.1)
|
||||||
mongo (~> 1.3)
|
mongo (~> 1.3)
|
||||||
tzinfo (~> 0.3.22)
|
tzinfo (~> 0.3.22)
|
||||||
@ -226,7 +220,7 @@ GEM
|
|||||||
rake (0.9.2)
|
rake (0.9.2)
|
||||||
rdoc (3.12)
|
rdoc (3.12)
|
||||||
json (~> 1.4)
|
json (~> 1.4)
|
||||||
responders (0.6.4)
|
responders (0.6.5)
|
||||||
rest-client (1.6.7)
|
rest-client (1.6.7)
|
||||||
mime-types (>= 1.16)
|
mime-types (>= 1.16)
|
||||||
rmagick (2.12.2)
|
rmagick (2.12.2)
|
||||||
@ -256,11 +250,12 @@ GEM
|
|||||||
railties (~> 3.1.0)
|
railties (~> 3.1.0)
|
||||||
sass (~> 3.1.10)
|
sass (~> 3.1.10)
|
||||||
tilt (~> 1.3.2)
|
tilt (~> 1.3.2)
|
||||||
selenium-webdriver (2.16.0)
|
selenium-webdriver (2.17.0)
|
||||||
childprocess (>= 0.2.5)
|
childprocess (>= 0.2.5)
|
||||||
ffi (~> 1.0.9)
|
ffi (~> 1.0.9)
|
||||||
multi_json (~> 1.0.4)
|
multi_json (~> 1.0.4)
|
||||||
rubyzip
|
rubyzip
|
||||||
|
shoulda-matchers (1.0.0)
|
||||||
sprockets (2.0.3)
|
sprockets (2.0.3)
|
||||||
hike (~> 1.2)
|
hike (~> 1.2)
|
||||||
rack (~> 1.0)
|
rack (~> 1.0)
|
||||||
@ -319,8 +314,8 @@ DEPENDENCIES
|
|||||||
jquery-rails (~> 1.0.16)
|
jquery-rails (~> 1.0.16)
|
||||||
kaminari
|
kaminari
|
||||||
launchy
|
launchy
|
||||||
locomotive-aloha-rails!
|
locomotive-aloha-rails (~> 0.20.1)
|
||||||
locomotive-tinymce-rails!
|
locomotive-tinymce-rails (~> 3.4.7)
|
||||||
locomotive_liquid (= 2.2.2)
|
locomotive_liquid (= 2.2.2)
|
||||||
locomotive_mongoid_acts_as_tree (~> 0.1.5.8)
|
locomotive_mongoid_acts_as_tree (~> 0.1.5.8)
|
||||||
mimetype-fu (~> 0.1.2)
|
mimetype-fu (~> 0.1.2)
|
||||||
@ -339,6 +334,7 @@ DEPENDENCIES
|
|||||||
rubyzip
|
rubyzip
|
||||||
sanitize (~> 2.0.3)
|
sanitize (~> 2.0.3)
|
||||||
sass-rails (~> 3.1.4)
|
sass-rails (~> 3.1.4)
|
||||||
|
shoulda-matchers
|
||||||
uglifier (~> 1.0.4)
|
uglifier (~> 1.0.4)
|
||||||
unicorn
|
unicorn
|
||||||
xpath (~> 0.1.4)
|
xpath (~> 0.1.4)
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
class Locomotive::MenuCell < Cell::Base
|
class Locomotive::MenuCell < Cell::Base
|
||||||
|
|
||||||
include ::Locomotive::Engine.routes.url_helpers
|
include ::Locomotive::Engine.routes.url_helpers
|
||||||
|
|
||||||
delegate :sections, :to => :parent_controller
|
delegate :sections, :to => :parent_controller
|
||||||
@ -97,4 +96,4 @@ class Locomotive::MenuCell < Cell::Base
|
|||||||
I18n.t("locomotive.shared.menu.#{label}")
|
I18n.t("locomotive.shared.menu.#{label}")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -27,7 +27,7 @@ module Locomotive
|
|||||||
|
|
||||||
## named scopes ##
|
## named scopes ##
|
||||||
scope :visible, :where => { :_visible => true }
|
scope :visible, :where => { :_visible => true }
|
||||||
scope :latest_updated, :order_by => :updated_at.desc, :limit => Locomotive.config.ui.lastest_entries_nb
|
scope :latest_updated, :order_by => :updated_at.desc, :limit => Locomotive.config.ui.latest_entries_nb
|
||||||
|
|
||||||
## methods ##
|
## methods ##
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ module Locomotive
|
|||||||
validates_exclusion_of :slug, :in => Locomotive.config.reserved_slugs, :if => Proc.new { |p| p.depth == 0 }
|
validates_exclusion_of :slug, :in => Locomotive.config.reserved_slugs, :if => Proc.new { |p| p.depth == 0 }
|
||||||
|
|
||||||
## named scopes ##
|
## named scopes ##
|
||||||
scope :latest_updated, :order_by => [[:updated_at, :desc]], :limit => Locomotive.config.ui.lastest_entries_nb
|
scope :latest_updated, :order_by => [[:updated_at, :desc]], :limit => Locomotive.config.ui.latest_entries_nb
|
||||||
scope :root, :where => { :slug => 'index', :depth => 0 }
|
scope :root, :where => { :slug => 'index', :depth => 0 }
|
||||||
scope :not_found, :where => { :slug => '404', :depth => 0 }
|
scope :not_found, :where => { :slug => '404', :depth => 0 }
|
||||||
scope :published, :where => { :published => true }
|
scope :published, :where => { :published => true }
|
||||||
@ -114,4 +114,4 @@ module Locomotive
|
|||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.header
|
.header
|
||||||
%p= link_to t('locomotive.pages.index.new'), new_page_url
|
%p= link_to t('locomotive.pages.index.new'), new_page_url
|
||||||
.inner
|
.inner
|
||||||
%h2!= t('locomotive.pages.index.lastest_entries')
|
%h2!= t('locomotive.pages.index.latest_entries')
|
||||||
%ul
|
%ul
|
||||||
- current_site.pages.latest_updated.minimal_attributes.each do |page|
|
- current_site.pages.latest_updated.minimal_attributes.each do |page|
|
||||||
%li
|
%li
|
||||||
@ -32,9 +32,9 @@
|
|||||||
%p.edit= link_to t('locomotive.content_types.index.edit'), edit_content_type_url(content_type)
|
%p.edit= link_to t('locomotive.content_types.index.edit'), edit_content_type_url(content_type)
|
||||||
|
|
||||||
.inner
|
.inner
|
||||||
%h2!= t('locomotive.content_entries.index.lastest_entries')
|
%h2!= t('locomotive.content_entries.index.latest_entries')
|
||||||
%ul
|
%ul
|
||||||
- content_type.entries.latest_updated.each do |entry|
|
- content_type.entries.latest_updated.each do |entry|
|
||||||
%li
|
%li
|
||||||
= link_to truncate(entry._label(content_type), :length => 20), edit_content_entry_url(content_type.slug, entry)
|
= link_to truncate(entry._label(content_type), :length => 20), edit_content_entry_url(content_type.slug, entry)
|
||||||
%span= time_ago_in_words(entry.updated_at)
|
%span= time_ago_in_words(entry.updated_at)
|
||||||
|
@ -93,7 +93,7 @@ de:
|
|||||||
help: "Seiten sind als Baum organisiert. Du kannst die Seiten also wie Ordner sortieren und verschachteln."
|
help: "Seiten sind als Baum organisiert. Du kannst die Seiten also wie Ordner sortieren und verschachteln."
|
||||||
no_items: "Momentan gibt es keine Seiten. Klicke einfach <a href='%{url}'>hier</a>, um die erste Seite zu erstellen."
|
no_items: "Momentan gibt es keine Seiten. Klicke einfach <a href='%{url}'>hier</a>, um die erste Seite zu erstellen."
|
||||||
new: neue Seite
|
new: neue Seite
|
||||||
lastest_entries: Neueste Seiten
|
latest_entries: Neueste Seiten
|
||||||
new:
|
new:
|
||||||
title: Neue Seite
|
title: Neue Seite
|
||||||
help: "Fülle das folgende Formular aus, um eine neue Seite zu erstellen. Nur zur Info: Die Seite wird nicht standardmäßig publiziert!"
|
help: "Fülle das folgende Formular aus, um eine neue Seite zu erstellen. Nur zur Info: Die Seite wird nicht standardmäßig publiziert!"
|
||||||
@ -252,7 +252,7 @@ de:
|
|||||||
download: Elemente herunterladen
|
download: Elemente herunterladen
|
||||||
new: neues Element
|
new: neues Element
|
||||||
category_noname: "Kein Name"
|
category_noname: "Kein Name"
|
||||||
lastest_entries: "Neueste Elemente"
|
latest_entries: "Neueste Elemente"
|
||||||
updated_at: "Aktualisiert am"
|
updated_at: "Aktualisiert am"
|
||||||
list:
|
list:
|
||||||
no_entries: "Momentan gibt es keine Elemente. Klicke einfach <a href='%{url}'>hier</a>, um das erste Element zu erstellen."
|
no_entries: "Momentan gibt es keine Elemente. Klicke einfach <a href='%{url}'>hier</a>, um das erste Element zu erstellen."
|
||||||
|
@ -101,7 +101,7 @@ en:
|
|||||||
help: "Pages are organized as a tree. You can order pages as well as folders"
|
help: "Pages are organized as a tree. You can order pages as well as folders"
|
||||||
no_items: "There are no pages for now. Just click <a href=\"%{url}\">here</a> to create the first one."
|
no_items: "There are no pages for now. Just click <a href=\"%{url}\">here</a> to create the first one."
|
||||||
new: new page
|
new: new page
|
||||||
lastest_entries: Lastest pages
|
latest_entries: Lastest pages
|
||||||
new:
|
new:
|
||||||
title: New page
|
title: New page
|
||||||
help: "Please fill in the below form to create your page. Be careful, by default, the page is not published."
|
help: "Please fill in the below form to create your page. Be careful, by default, the page is not published."
|
||||||
@ -249,7 +249,7 @@ en:
|
|||||||
download: download entries
|
download: download entries
|
||||||
new: new entry
|
new: new entry
|
||||||
category_noname: "No name"
|
category_noname: "No name"
|
||||||
lastest_entries: "Lastest entries"
|
latest_entries: "Lastest entries"
|
||||||
updated_at: "Updated at"
|
updated_at: "Updated at"
|
||||||
list:
|
list:
|
||||||
no_items: "There are no entries for now. Just click <a href=\"%{url}\">here</a> to create the first one."
|
no_items: "There are no entries for now. Just click <a href=\"%{url}\">here</a> to create the first one."
|
||||||
|
@ -91,7 +91,7 @@ es:
|
|||||||
no_items: "No se ha creado ninguna página aún. Pulse <a href=\"%{url}\">aquí</a> to para crear la primera."
|
no_items: "No se ha creado ninguna página aún. Pulse <a href=\"%{url}\">aquí</a> to para crear la primera."
|
||||||
|
|
||||||
new: Nueva página
|
new: Nueva página
|
||||||
lastest_entries: Últimas páginas
|
latest_entries: Últimas páginas
|
||||||
new:
|
new:
|
||||||
title: Nueva página
|
title: Nueva página
|
||||||
help: "Por favor rellene el formulario de más abajo para crear su página. ¡Atención! Las páginas, por defecto, están 'no publicadas'."
|
help: "Por favor rellene el formulario de más abajo para crear su página. ¡Atención! Las páginas, por defecto, están 'no publicadas'."
|
||||||
@ -236,7 +236,7 @@ es:
|
|||||||
download: descargar elementos
|
download: descargar elementos
|
||||||
new: nuevo elemento
|
new: nuevo elemento
|
||||||
category_noname: "Sin nombre"
|
category_noname: "Sin nombre"
|
||||||
lastest_entries: "Últimos elementos"
|
latest_entries: "Últimos elementos"
|
||||||
updated_at: "Última actualización"
|
updated_at: "Última actualización"
|
||||||
list:
|
list:
|
||||||
no_entries: "No hay ningún elemento. Haga click <a href=\"%{url}\">aquí</a> para crear el primero."
|
no_entries: "No hay ningún elemento. Haga click <a href=\"%{url}\">aquí</a> para crear el primero."
|
||||||
|
@ -93,7 +93,7 @@ fr:
|
|||||||
help: "Les pages sont organisées sous forme d'un arbre. Vous pouvez classes les pages ainsi que les dossiers."
|
help: "Les pages sont organisées sous forme d'un arbre. Vous pouvez classes les pages ainsi que les dossiers."
|
||||||
no_items: "Il n'existe pas de page. Vous pouvez commencer par créer une <a href='%{url}'>ici</a>."
|
no_items: "Il n'existe pas de page. Vous pouvez commencer par créer une <a href='%{url}'>ici</a>."
|
||||||
new: nouvelle page
|
new: nouvelle page
|
||||||
lastest_entries: Dernières pages
|
latest_entries: Dernières pages
|
||||||
new:
|
new:
|
||||||
title: Nouvelle page
|
title: Nouvelle page
|
||||||
help: "Remplissez le formulaire ci-dessous pour créer votre page. Attention, par défaut, la page n'est pas publiée."
|
help: "Remplissez le formulaire ci-dessous pour créer votre page. Attention, par défaut, la page n'est pas publiée."
|
||||||
@ -240,7 +240,7 @@ fr:
|
|||||||
download: télécharger éléments
|
download: télécharger éléments
|
||||||
new: nouvel élément
|
new: nouvel élément
|
||||||
category_noname: "Pas de nom"
|
category_noname: "Pas de nom"
|
||||||
lastest_entries: "Eléments récents"
|
latest_entries: "Eléments récents"
|
||||||
updated_at: "Mis à jour le"
|
updated_at: "Mis à jour le"
|
||||||
list:
|
list:
|
||||||
no_entries: "Il n'existe pas d'éléments. Vous pouvez commencer par créer un <a href='%{url}'>ici</a>"
|
no_entries: "Il n'existe pas d'éléments. Vous pouvez commencer par créer un <a href='%{url}'>ici</a>"
|
||||||
|
@ -91,7 +91,7 @@ it:
|
|||||||
help: "Le pagine sono organizzate ad albero. Puoi ordinarle come se fossero delle cartelle"
|
help: "Le pagine sono organizzate ad albero. Puoi ordinarle come se fossero delle cartelle"
|
||||||
no_items: "Per ora non ci sono pagine. Clicca <a href=\"%{url}\">qui</a> per creare la prima pagina."
|
no_items: "Per ora non ci sono pagine. Clicca <a href=\"%{url}\">qui</a> per creare la prima pagina."
|
||||||
new: nuova pagina
|
new: nuova pagina
|
||||||
lastest_entries: Ultime pagine
|
latest_entries: Ultime pagine
|
||||||
new:
|
new:
|
||||||
title: Nuova pagina
|
title: Nuova pagina
|
||||||
help: "Prego, compila il seguente modulo per creare la tua pagina. Fai attenzione, per default, la pagina non è pubblicata."
|
help: "Prego, compila il seguente modulo per creare la tua pagina. Fai attenzione, per default, la pagina non è pubblicata."
|
||||||
@ -235,7 +235,7 @@ it:
|
|||||||
download: scarica elementi
|
download: scarica elementi
|
||||||
new: nuovo elemento
|
new: nuovo elemento
|
||||||
category_noname: "Senza nome"
|
category_noname: "Senza nome"
|
||||||
lastest_entries: "Ultimi elementi"
|
latest_entries: "Ultimi elementi"
|
||||||
updated_at: "modificato il"
|
updated_at: "modificato il"
|
||||||
list:
|
list:
|
||||||
no_entries: "Per ora non ci sono elementi. Clicca <a href=\"%{url}\">qui</a> per creare il primo."
|
no_entries: "Per ora non ci sono elementi. Clicca <a href=\"%{url}\">qui</a> per creare il primo."
|
||||||
|
@ -84,7 +84,7 @@ nl:
|
|||||||
help: "Pagina's zijn georganiseerd als een boom. U kunt zowel pagina's als mappen ordenen"
|
help: "Pagina's zijn georganiseerd als een boom. U kunt zowel pagina's als mappen ordenen"
|
||||||
no_items: "Er zijn momenteel geen pagina's. Klik <a href=\"%{url}\">hier</a> om de eerste pagina te maken."
|
no_items: "Er zijn momenteel geen pagina's. Klik <a href=\"%{url}\">hier</a> om de eerste pagina te maken."
|
||||||
new: Nieuwe pagina
|
new: Nieuwe pagina
|
||||||
lastest_entries: Laatste pagina's
|
latest_entries: Laatste pagina's
|
||||||
new:
|
new:
|
||||||
title: Nieuwe pagina
|
title: Nieuwe pagina
|
||||||
help: "Voer onderstaande formulier in om uw pagina te maken. Opgelet, de pagina is niet gepubliseerd"
|
help: "Voer onderstaande formulier in om uw pagina te maken. Opgelet, de pagina is niet gepubliseerd"
|
||||||
@ -220,7 +220,7 @@ nl:
|
|||||||
download: download items
|
download: download items
|
||||||
new: nieuw item
|
new: nieuw item
|
||||||
category_noname: "Geen naam"
|
category_noname: "Geen naam"
|
||||||
lastest_entries: "Laatste items"
|
latest_entries: "Laatste items"
|
||||||
updated_at: "Gewijzigd op"
|
updated_at: "Gewijzigd op"
|
||||||
list:
|
list:
|
||||||
no_entries: "Er zijn momenteel geen items. Klik hier <a href=\"%{url}\">here</a> om de eerste te maken."
|
no_entries: "Er zijn momenteel geen items. Klik hier <a href=\"%{url}\">here</a> om de eerste te maken."
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
help: "Sidene er organisert i en trestruktur. Du kan sortere både sider og mapper."
|
help: "Sidene er organisert i en trestruktur. Du kan sortere både sider og mapper."
|
||||||
no_items: "Det har ikke blitt opprettet noen sider ennå. Klikk <a href=\"%{url}\">her</a> for lage den første."
|
no_items: "Det har ikke blitt opprettet noen sider ennå. Klikk <a href=\"%{url}\">her</a> for lage den første."
|
||||||
new: ny side
|
new: ny side
|
||||||
lastest_entries: Siste sider
|
latest_entries: Siste sider
|
||||||
new:
|
new:
|
||||||
title: Ny side
|
title: Ny side
|
||||||
help: "Fyll ut skjemaet nedenfor for å opprette en ny side. Publisering er skrudd av som standard."
|
help: "Fyll ut skjemaet nedenfor for å opprette en ny side. Publisering er skrudd av som standard."
|
||||||
@ -237,7 +237,7 @@
|
|||||||
download: last ned elementer
|
download: last ned elementer
|
||||||
new: nytt element
|
new: nytt element
|
||||||
category_noname: "Navn mangler"
|
category_noname: "Navn mangler"
|
||||||
lastest_entries: "Siste elementer"
|
latest_entries: "Siste elementer"
|
||||||
updated_at: "Sist oppdatert"
|
updated_at: "Sist oppdatert"
|
||||||
list:
|
list:
|
||||||
no_entries: "Det har ikke blitt opprettet noen elementer her ennå. Klikk <a href=\"%{url}\">her</a> for å opprette det første."
|
no_entries: "Det har ikke blitt opprettet noen elementer her ennå. Klikk <a href=\"%{url}\">her</a> for å opprette det første."
|
||||||
|
@ -82,7 +82,7 @@ pt-BR:
|
|||||||
help: "As páginas são organizadas como uma árvore. Você pode reordenar as páginas como se fossem pastas"
|
help: "As páginas são organizadas como uma árvore. Você pode reordenar as páginas como se fossem pastas"
|
||||||
no_items: "Não existe nenhuma página ainda. Clique <a href=\"%{url}\">aqui</a> para criar a primeira."
|
no_items: "Não existe nenhuma página ainda. Clique <a href=\"%{url}\">aqui</a> para criar a primeira."
|
||||||
new: nova página
|
new: nova página
|
||||||
lastest_entries: Últmas páginas
|
latest_entries: Últmas páginas
|
||||||
new:
|
new:
|
||||||
title: Nova página
|
title: Nova página
|
||||||
help: "Por favor, preencha o formulário a seguir para criar sua página. Atenção: Por padrão a página não é publicada."
|
help: "Por favor, preencha o formulário a seguir para criar sua página. Atenção: Por padrão a página não é publicada."
|
||||||
@ -215,7 +215,7 @@ pt-BR:
|
|||||||
download: download dos itens
|
download: download dos itens
|
||||||
new: novo item
|
new: novo item
|
||||||
category_noname: "Sem nome"
|
category_noname: "Sem nome"
|
||||||
lastest_entries: "Últimos itens"
|
latest_entries: "Últimos itens"
|
||||||
updated_at: "Atualizado em"
|
updated_at: "Atualizado em"
|
||||||
list:
|
list:
|
||||||
no_entries: "Não existem itens ainda. Clique <a href=\"%{url}\">aqui</a> para criar o primeiro."
|
no_entries: "Não existem itens ainda. Clique <a href=\"%{url}\">aqui</a> para criar o primeiro."
|
||||||
|
@ -93,7 +93,7 @@ ru:
|
|||||||
help: "Страницы организованы в виде дерева. Вы можете сортировать как страницы, так и папки"
|
help: "Страницы организованы в виде дерева. Вы можете сортировать как страницы, так и папки"
|
||||||
no_items: "There are no pages for now. Just click <a href=\"%{url}\">here</a> to create the first one."
|
no_items: "There are no pages for now. Just click <a href=\"%{url}\">here</a> to create the first one."
|
||||||
new: новая страница
|
new: новая страница
|
||||||
lastest_entries: Страницы за последнее время
|
latest_entries: Страницы за последнее время
|
||||||
new:
|
new:
|
||||||
title: Новая страница
|
title: Новая страница
|
||||||
help: "Заполните форму, приведенную ниже, для создания страницы. Будьте осторожны, по умолчанию, страница не опубликована."
|
help: "Заполните форму, приведенную ниже, для создания страницы. Будьте осторожны, по умолчанию, страница не опубликована."
|
||||||
@ -236,7 +236,7 @@ ru:
|
|||||||
download: скачать элементы
|
download: скачать элементы
|
||||||
new: новый элемент
|
new: новый элемент
|
||||||
category_noname: "Без имени"
|
category_noname: "Без имени"
|
||||||
lastest_entries: "Элементы за последнее время"
|
latest_entries: "Элементы за последнее время"
|
||||||
updated_at: "Обновлено"
|
updated_at: "Обновлено"
|
||||||
list:
|
list:
|
||||||
no_entries: "На данный момент нет ни одного элемента. Нажмите <a href=\"%{url}\">здесь</a> для создания первого элемента."
|
no_entries: "На данный момент нет ни одного элемента. Нажмите <a href=\"%{url}\">здесь</a> для создания первого элемента."
|
||||||
|
@ -45,7 +45,7 @@ Locomotive.configure do |config|
|
|||||||
|
|
||||||
# configure how many items we display in sub menu in the "Contents" section.
|
# configure how many items we display in sub menu in the "Contents" section.
|
||||||
# config.ui = {
|
# config.ui = {
|
||||||
# :lastest_entries_nb => 5,
|
# :latest_entries_nb => 5,
|
||||||
# :max_content_types => 4
|
# :max_content_types => 4
|
||||||
# }
|
# }
|
||||||
|
|
||||||
@ -83,4 +83,4 @@ Locomotive.configure do |config|
|
|||||||
#
|
#
|
||||||
# Note: by default, rack/cache is disabled in the Heroku platform
|
# Note: by default, rack/cache is disabled in the Heroku platform
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -18,7 +18,7 @@ module Locomotive
|
|||||||
:manage_subdomain => false,
|
:manage_subdomain => false,
|
||||||
:manage_manage_domains => false,
|
:manage_manage_domains => false,
|
||||||
:ui => {
|
:ui => {
|
||||||
:lastest_entries_nb => 5,
|
:latest_entries_nb => 5,
|
||||||
:max_content_types => 2
|
:max_content_types => 2
|
||||||
},
|
},
|
||||||
:rack_cache => {
|
:rack_cache => {
|
||||||
|
@ -31,7 +31,7 @@ namespace :locomotive do
|
|||||||
|
|
||||||
desc 'Import a remote template described by its URL -- 2 options: SITE=name or id, RESET=by default false'
|
desc 'Import a remote template described by its URL -- 2 options: SITE=name or id, RESET=by default false'
|
||||||
task :import => :environment do
|
task :import => :environment do
|
||||||
url, site_name_or_id, reset = ENV['URL'], ENV['SITE'], Boolean.set(ENV['RESET']) || false
|
url, site_name_or_id, samples, reset = ENV['URL'], ENV['SITE'], (Boolean.set(ENV['SAMPLES']) || false), (Boolean.set(ENV['RESET']) || false)
|
||||||
|
|
||||||
if url.blank? || (url =~ /https?:\/\//).nil?
|
if url.blank? || (url =~ /https?:\/\//).nil?
|
||||||
raise "URL is missing or it is not a valid http url."
|
raise "URL is missing or it is not a valid http url."
|
||||||
@ -43,9 +43,10 @@ namespace :locomotive do
|
|||||||
raise "No site found. Please give a correct value (name or id) for the SITE env variable."
|
raise "No site found. Please give a correct value (name or id) for the SITE env variable."
|
||||||
end
|
end
|
||||||
|
|
||||||
::Locomotive::Import::Job.run!(url, site, { :samples => true, :reset => reset })
|
::Locomotive::Import::Job.run!(url, site, { :samples => samples, :reset => reset })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
desc 'Add a new admin user (NOTE: currently only supports adding user to first site)'
|
desc 'Add a new admin user (NOTE: currently only supports adding user to first site)'
|
||||||
task :add_admin => :environment do
|
task :add_admin => :environment do
|
||||||
name = ask('Display name: ') { |q| q.echo = true }
|
name = ask('Display name: ') { |q| q.echo = true }
|
||||||
|
@ -46,7 +46,7 @@ Gem::Specification.new do |s|
|
|||||||
s.add_dependency 'locomotive_liquid', '2.2.2'
|
s.add_dependency 'locomotive_liquid', '2.2.2'
|
||||||
s.add_dependency 'formtastic', '~> 2.0.2'
|
s.add_dependency 'formtastic', '~> 2.0.2'
|
||||||
s.add_dependency 'responders', '~> 0.6.4'
|
s.add_dependency 'responders', '~> 0.6.4'
|
||||||
s.add_dependency 'cells', '~> 3.7.1'
|
s.add_dependency 'cells', '~> 3.8.0'
|
||||||
s.add_dependency 'RedCloth', '~> 4.2.8'
|
s.add_dependency 'RedCloth', '~> 4.2.8'
|
||||||
s.add_dependency 'sanitize', '~> 2.0.3'
|
s.add_dependency 'sanitize', '~> 2.0.3'
|
||||||
s.add_dependency 'highline', '~> 1.6.2'
|
s.add_dependency 'highline', '~> 1.6.2'
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe Locomotive::Account do
|
describe Locomotive::Account do
|
||||||
|
let!(:existing_account) { Factory(:account, :email => 'another@email.com') }
|
||||||
|
|
||||||
it 'should have a valid factory' do
|
it 'should have a valid factory' do
|
||||||
FactoryGirl.build(:account).should be_valid
|
FactoryGirl.build(:account).should be_valid
|
||||||
end
|
end
|
||||||
|
|
||||||
## Validations ##
|
## Validations ##
|
||||||
|
it { should validate_presence_of :name }
|
||||||
%w{name email password}.each do |attr|
|
it { should validate_presence_of :email }
|
||||||
it "should validate presence of #{attr}" do
|
it { should validate_presence_of :password }
|
||||||
account = FactoryGirl.build(:account, attr.to_sym => nil)
|
it { should validate_uniqueness_of(:email).with_message(/is already taken/) }
|
||||||
account.should_not be_valid
|
it { should allow_value('valid@email.com').for(:email) }
|
||||||
account.errors[attr.to_sym].should include("can't be blank")
|
it { should allow_value('prefix+suffix@email.com').for(:email) }
|
||||||
end
|
it { should_not allow_value('not-an-email').for(:email) }
|
||||||
end
|
|
||||||
|
|
||||||
it "should have a default locale" do
|
it "should have a default locale" do
|
||||||
account = Locomotive::Account.new
|
account = Locomotive::Account.new
|
||||||
|
Loading…
Reference in New Issue
Block a user