locomotive_cms 0.0.4.beta12 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +13 -15
- data/README.textile +4 -5
- data/app/controllers/admin/api_contents_controller.rb +1 -10
- data/app/controllers/admin/base_controller.rb +2 -2
- data/app/controllers/admin/cross_domain_sessions_controller.rb +4 -7
- data/app/controllers/admin/current_sites_controller.rb +0 -2
- data/app/controllers/admin/imports_controller.rb +19 -13
- data/app/controllers/admin/pages_controller.rb +1 -1
- data/app/controllers/admin/passwords_controller.rb +2 -2
- data/app/controllers/admin/sessions_controller.rb +2 -2
- data/app/controllers/admin/sites_controller.rb +0 -2
- data/app/controllers/admin/theme_assets_controller.rb +1 -1
- data/app/controllers/application_controller.rb +1 -1
- data/app/controllers/home_controller.rb +7 -0
- data/app/helpers/admin/assets_helper.rb +6 -0
- data/app/helpers/admin/custom_fields_helper.rb +2 -2
- data/app/helpers/admin/{box_helper.rb → login_helper.rb} +3 -7
- data/app/models/asset_collection.rb +3 -15
- data/app/models/content_instance.rb +0 -19
- data/app/models/content_type.rb +3 -21
- data/app/models/extensions/page/tree.rb +7 -63
- data/app/models/page.rb +0 -2
- data/app/models/site.rb +3 -15
- data/app/uploaders/asset_uploader.rb +1 -1
- data/app/uploaders/theme_asset_uploader.rb +1 -12
- data/app/views/admin/asset_collections/edit.html.haml +2 -2
- data/app/views/admin/asset_collections/new.html.haml +1 -1
- data/app/views/admin/assets/_form.html.haml +2 -2
- data/app/views/admin/content_types/_form.html.haml +2 -2
- data/app/views/admin/content_types/new.html.haml +1 -1
- data/app/views/admin/contents/_form.html.haml +2 -2
- data/app/views/admin/contents/index.html.haml +1 -1
- data/app/views/admin/cross_domain_sessions/new.html.haml +1 -1
- data/app/views/admin/current_sites/_form.html.haml +3 -3
- data/app/views/admin/current_sites/edit.html.haml +1 -1
- data/app/views/admin/imports/new.html.haml +0 -11
- data/app/views/admin/imports/show.html.haml +1 -1
- data/app/views/admin/my_accounts/edit.html.haml +1 -1
- data/app/views/admin/pages/_form.html.haml +3 -2
- data/app/views/admin/pages/_page.html.haml +2 -4
- data/app/views/admin/pages/index.html.haml +1 -1
- data/app/views/admin/passwords/edit.html.haml +2 -2
- data/app/views/admin/passwords/new.html.haml +2 -2
- data/app/views/admin/sessions/new.html.haml +2 -2
- data/app/views/admin/shared/_head.html.haml +5 -4
- data/app/views/admin/shared/menu/_contents.html.haml +1 -1
- data/app/views/admin/sites/_form.html.haml +3 -3
- data/app/views/admin/snippets/_form.html.haml +2 -2
- data/app/views/admin/snippets/index.html.haml +15 -0
- data/app/views/admin/theme_assets/_form.html.haml +2 -2
- data/app/views/admin/theme_assets/index.html.haml +1 -1
- data/app/views/home/show.html.haml +4 -0
- data/app/views/{admin/layouts → layouts/admin}/application.html.haml +0 -0
- data/app/views/layouts/admin/box.html.haml +19 -0
- data/app/views/layouts/application.html.haml +7 -0
- data/config/application.rb +3 -1
- data/config/environments/development.rb +6 -1
- data/config/environments/production.rb +1 -1
- data/config/environments/test.rb +5 -1
- data/config/initializers/locomotive.rb +0 -14
- data/config/locales/admin_ui_en.yml +1 -33
- data/config/locales/admin_ui_fr.yml +1 -34
- data/config/locales/default_en.yml +0 -1
- data/config/locales/default_fr.yml +0 -1
- data/config/locales/flash.en.yml +0 -1
- data/config/locales/flash.fr.yml +0 -1
- data/config/mongoid.yml +5 -13
- data/config/routes.rb +1 -6
- data/lib/generators/locomotive/copy_assets/copy_assets_generator.rb +14 -0
- data/lib/generators/locomotive/install/install_generator.rb +10 -18
- data/lib/generators/locomotive/install/templates/README +13 -23
- data/lib/generators/locomotive/install/templates/locomotive.rb +1 -15
- data/lib/locomotive/carrierwave.rb +0 -1
- data/lib/locomotive/configuration.rb +1 -3
- data/lib/locomotive/custom_fields.rb +1 -0
- data/lib/locomotive/delayed_job.rb +2 -1
- data/lib/locomotive/engine.rb +7 -24
- data/lib/locomotive/heroku.rb +0 -1
- data/lib/locomotive/httparty/webservice.rb +1 -12
- data/lib/locomotive/import.rb +0 -2
- data/lib/locomotive/import/asset_collections.rb +8 -40
- data/lib/locomotive/import/assets.rb +12 -20
- data/lib/locomotive/import/content_types.rb +15 -51
- data/lib/locomotive/import/job.rb +11 -106
- data/lib/locomotive/import/pages.rb +26 -79
- data/lib/locomotive/import/site.rb +5 -3
- data/lib/locomotive/import/snippets.rb +8 -6
- data/lib/locomotive/inherited_resources.rb +0 -1
- data/lib/locomotive/liquid/drops/asset_collections.rb +4 -4
- data/lib/locomotive/liquid/drops/contents.rb +16 -21
- data/lib/locomotive/liquid/drops/page.rb +0 -4
- data/lib/locomotive/liquid/filters/html.rb +29 -15
- data/lib/locomotive/liquid/tags/consume.rb +1 -1
- data/lib/locomotive/liquid/tags/nav.rb +17 -48
- data/lib/locomotive/liquid/tags/paginate.rb +3 -3
- data/lib/locomotive/middlewares/fonts.rb +11 -3
- data/lib/locomotive/misc_form_builder.rb +7 -2
- data/lib/locomotive/regexps.rb +1 -1
- data/lib/locomotive/render.rb +3 -9
- data/lib/locomotive/routing/site_dispatcher.rb +6 -10
- data/lib/locomotive/version.rb +1 -2
- data/public/images/admin/box/buttons/right_bg.png +0 -0
- data/public/javascripts/admin/aloha/VERSION.txt +1 -1
- data/public/javascripts/admin/aloha/aloha-nodeps.js +101 -140
- data/public/javascripts/admin/aloha/aloha.js +105 -193
- data/public/javascripts/admin/aloha/css/aloha.css +4 -65
- data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/css/prettyPhoto.css +2 -2
- data/public/javascripts/admin/aloha/i18n/de.dict +0 -2
- data/public/javascripts/admin/aloha/i18n/en.dict +0 -2
- data/public/javascripts/admin/aloha/images/base.png +0 -0
- data/public/javascripts/admin/aloha/images/base_multi.png +0 -0
- data/public/javascripts/admin/aloha/images/fade_in.png +0 -0
- data/public/javascripts/admin/aloha/images/fade_out.png +0 -0
- data/public/javascripts/admin/aloha/images/gentics_logo.png +0 -0
- data/public/javascripts/admin/aloha/images/grabhandle.png +0 -0
- data/public/javascripts/admin/aloha/images/maximize.png +0 -0
- data/public/javascripts/admin/aloha/images/pin.png +0 -0
- data/public/javascripts/admin/aloha/images/removeformat.png +0 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/de.dict +2 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/en.dict +2 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/eo.dict +2 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/fi.dict +2 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/fr.dict +2 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/it.dict +2 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/plugin.js +7 -0
- data/public/javascripts/admin/aloha/plugins/{com.example.aloha.plugins.Save → com.example.aloha.DummySave}/i18n/de.dict +0 -0
- data/public/javascripts/admin/aloha/plugins/{com.example.aloha.plugins.Save → com.example.aloha.DummySave}/i18n/en.dict +0 -0
- data/public/javascripts/admin/aloha/plugins/{com.example.aloha.plugins.Save → com.example.aloha.DummySave}/i18n/fi.dict +0 -0
- data/public/javascripts/admin/aloha/plugins/{com.example.aloha.plugins.Save → com.example.aloha.DummySave}/i18n/fr.dict +0 -0
- data/public/javascripts/admin/aloha/plugins/{com.example.aloha.plugins.Save → com.example.aloha.DummySave}/i18n/it.dict +0 -0
- data/public/javascripts/admin/aloha/plugins/{com.example.aloha.plugins.Save → com.example.aloha.DummySave}/plugin.js +0 -0
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/plugin.js +1 -1
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/de.dict +20 -0
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/en.dict +20 -0
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/eo.dict +16 -0
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/fi.dict +20 -0
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/fr.dict +16 -0
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/it.dict +20 -0
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/plugin.js +7 -0
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.HighlightEditables/plugin.js +1 -1
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/css/jquery.autocomplete.css +48 -0
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/deps/jquery.autocomplete.js +1 -0
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/plugin.js +1 -1
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/ressource.js +7 -0
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/ressourcedummy.js +7 -0
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/ressourceregistry.js +7 -0
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/plugin.js +1 -1
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/plugin.js +1 -1
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/de.dict +0 -2
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/en.dict +0 -2
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/plugin.js +1 -1
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/resources/table.css +110 -28
- data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Loader/plugin.js +1 -0
- data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/i18n/en.dict +2 -0
- data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/i18n/fi.dict +2 -0
- data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/i18n/fr.dict +2 -0
- data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/person.css +3 -0
- data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/plugin.js +1 -0
- data/public/javascripts/admin/aloha/plugins/simpletable/plugin.js.deactivated +2330 -0
- data/public/javascripts/admin/asset_collections.js +7 -11
- data/public/javascripts/admin/contents.js +1 -3
- data/public/javascripts/admin/site.js +3 -9
- data/public/javascripts/admin/snippets.js +1 -1
- data/public/javascripts/admin/utils.js +3 -5
- data/public/stylesheets/admin/application.css +1 -1
- data/public/stylesheets/admin/box.css +5 -5
- data/public/stylesheets/admin/buttons.css +5 -0
- data/public/stylesheets/admin/formtastic_changes.css +12 -5
- data/public/stylesheets/admin/inline_editor.css +5 -22
- data/public/stylesheets/admin/layout.css +4 -9
- metadata +130 -187
- data/app/controllers/admin/installation_controller.rb +0 -79
- data/app/uploaders/theme_uploader.rb +0 -19
- data/app/views/admin/errors/no_page.html.haml +0 -1
- data/app/views/admin/errors/no_site.html.haml +0 -1
- data/app/views/admin/installation/step_1.html.haml +0 -24
- data/app/views/admin/installation/step_2.html.haml +0 -26
- data/app/views/admin/installation/step_3.html.haml +0 -23
- data/app/views/admin/layouts/box.html.haml +0 -21
- data/app/views/admin/layouts/error.html.haml +0 -1
- data/config/assets.yml +0 -96
- data/config/initializers/carrierwave.rb +0 -17
- data/lib/locomotive/import/base.rb +0 -46
- data/lib/locomotive/import/logger.rb +0 -13
- data/lib/locomotive/railties/tasks.rake +0 -16
- data/public/javascripts/admin/aloha/i18n/pl.dict +0 -5
- data/public/javascripts/admin/aloha/images/base_big.png +0 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/examples/triSports.css +0 -86
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/examples/triSports.html +0 -44
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/i18n/de.dict +0 -4
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/i18n/en.dict +0 -4
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/i18n/fr.dict +0 -4
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/plugin.js +0 -1
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/product.js +0 -1
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/2xu-wetsuit.jpg +0 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/asics-noosa.jpg +0 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/fivefingers-kso.jpg +0 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/kuota-kueen-k.jpg +0 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/mizuno-wave-musha2.jpg +0 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/product.css +0 -69
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/product_button.gif +0 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/simplon-mrt.jpg +0 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/trek-fuel-ex.jpg +0 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/trisports.jpg +0 -0
- data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/zoggs-predator.jpg +0 -0
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/examples/AlohaAbbr.css +0 -48
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/examples/AlohaAbbr.html +0 -69
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/i18n/de.dict +0 -4
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/i18n/en.dict +0 -4
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/plugin.js +0 -7
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/pl.dict +0 -30
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/LinkList.js +0 -7
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/delicious.js +0 -7
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/i18n/pl.dict +0 -4
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/css/LinkChecker.css +0 -14
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/examples/AlohaLinkChecker.css +0 -49
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/examples/AlohaLinkChecker.html +0 -82
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/i18n/en.dict +0 -27
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/plugin.js +0 -7
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/proxy.php +0 -235
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Paste/plugin.js +0 -7
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Paste/wordpastehandler.js +0 -7
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/i18n/de.dict +0 -1
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/i18n/en.dict +0 -1
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/pl.dict +0 -12
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/resources/wai_green.png +0 -0
- data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/resources/wai_red.png +0 -0
- data/public/stylesheets/admin/installation.css +0 -50
- data/public/stylesheets/admin/safari.css +0 -15
@@ -1,6 +1,6 @@
|
|
1
1
|
- content_for :head do
|
2
|
-
=
|
3
|
-
=
|
2
|
+
= javascript_include_tag 'admin/plugins/codemirror/codemirror', 'admin/snippets.js'
|
3
|
+
= image_picker_include_tags
|
4
4
|
|
5
5
|
= f.inputs :name => :information do
|
6
6
|
= f.input :name
|
@@ -0,0 +1,15 @@
|
|
1
|
+
- title t('.title')
|
2
|
+
|
3
|
+
- content_for :submenu do
|
4
|
+
= render 'admin/shared/menu/settings'
|
5
|
+
|
6
|
+
- content_for :buttons do
|
7
|
+
= admin_button_tag :new, new_admin_snippet_url, :class => 'new'
|
8
|
+
|
9
|
+
%p!= t('.help')
|
10
|
+
|
11
|
+
- if @snippets.empty?
|
12
|
+
%p.no-items!= t('.no_items', :url => new_admin_snippet_url)
|
13
|
+
- else
|
14
|
+
%ul#snippets-list.list
|
15
|
+
= render @snippets
|
@@ -1,6 +1,6 @@
|
|
1
1
|
- content_for :head do
|
2
|
-
=
|
3
|
-
=
|
2
|
+
= javascript_include_tag 'admin/plugins/codemirror/codemirror', 'admin/theme_assets.js'
|
3
|
+
= image_picker_include_tags
|
4
4
|
|
5
5
|
= f.hidden_field :performing_plain_text
|
6
6
|
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
!!! XML
|
2
|
+
!!!
|
3
|
+
%html{ :xmlns => 'http://www.w3.org/1999/xhtml' }
|
4
|
+
%head
|
5
|
+
%title= escape_once("#{Locomotive.config.name} — #{current_site.name}")
|
6
|
+
|
7
|
+
= javascript_include_tag 'admin/jquery'
|
8
|
+
|
9
|
+
= stylesheet_link_tag 'admin/blueprint/screen', 'admin/box', :media => 'screen', :cache => Rails.env.production? && !Locomotive.config.heroku
|
10
|
+
/ [if IE]
|
11
|
+
= stylesheet_link_tag('admin/blueprint/ie', :media => 'screen')
|
12
|
+
|
13
|
+
%body
|
14
|
+
#wrapper
|
15
|
+
#light.container
|
16
|
+
#panel.container
|
17
|
+
%h1= title
|
18
|
+
|
19
|
+
= yield
|
data/config/application.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require File.expand_path('../boot', __FILE__)
|
2
2
|
|
3
|
+
# require 'rails/all'
|
4
|
+
|
3
5
|
require "action_controller/railtie"
|
4
6
|
require "action_mailer/railtie"
|
5
7
|
require "active_resource/railtie"
|
@@ -45,6 +47,6 @@ module Locomotive
|
|
45
47
|
# Configure sensitive parameters which will be filtered from the log file.
|
46
48
|
config.filter_parameters << :password
|
47
49
|
|
48
|
-
config.middleware.insert_after
|
50
|
+
config.middleware.insert_after ::ActionDispatch::Static, '::Locomotive::Middlewares::Fonts', :path => %r{^/fonts}
|
49
51
|
end
|
50
52
|
end
|
data/config/environments/test.rb
CHANGED
@@ -4,12 +4,6 @@ Locomotive.configure do |config|
|
|
4
4
|
# if not defined, locomotive will use example.com as main domain name. Remove prefix www from your domain name.
|
5
5
|
# Ex:
|
6
6
|
# config.default_domain = Rails.env.production? ? 'mydomain.com' : 'example.com'
|
7
|
-
#
|
8
|
-
# If you use locomotive for a single site in Heroku, use "heroku.com" as default domain name.
|
9
|
-
# Your heroku app name (<app_name>.heroku.name) will be used as the sub domain name in Locomotive
|
10
|
-
# during the installation wizzard.
|
11
|
-
# Ex:
|
12
|
-
# config.default_domain = Rails.env.production? ? 'heroku.com' : 'example.com'
|
13
7
|
config.default_domain = 'example.com'
|
14
8
|
|
15
9
|
# configure how many items we display in sub menu in the "Contents" section.
|
@@ -31,12 +25,4 @@ Locomotive.configure do |config|
|
|
31
25
|
# Ex:
|
32
26
|
# config.heroku = { :name => '<my heroku app name>', :login => 'john@doe.net', :password => 'easy' }
|
33
27
|
config.heroku = false
|
34
|
-
|
35
|
-
# Locomotive uses the DelayedJob gem for the theme import module.
|
36
|
-
# In case you want to deploy to Heroku, you will have to pay for an extra dyno.
|
37
|
-
# If you do not mind about importing theme without DelayedJob, disable it.
|
38
|
-
config.delayed_job = false
|
39
|
-
|
40
|
-
# default locale (for now, only en and fr are supported)
|
41
|
-
config.default_locale = :en
|
42
28
|
end
|
@@ -174,7 +174,7 @@ en:
|
|
174
174
|
help: "You have the choice to either upload any file or to copy/paste a stylesheet or a javascript in plain text."
|
175
175
|
edit:
|
176
176
|
title: "Editing %{file}"
|
177
|
-
help: "This asset is accessible from the following url: <
|
177
|
+
help: "This asset is accessible from the following url: <strong>%{url}</strong>"
|
178
178
|
form:
|
179
179
|
picker_link: Insert a file into the code
|
180
180
|
choose_file: Choose file
|
@@ -220,7 +220,6 @@ en:
|
|
220
220
|
new_item: new item
|
221
221
|
form:
|
222
222
|
order_by:
|
223
|
-
created_at: 'By "created at" date'
|
224
223
|
updated_at: 'By "updated at" date'
|
225
224
|
position_in_list: Manually
|
226
225
|
|
@@ -267,33 +266,6 @@ en:
|
|
267
266
|
success: "Your site was successfully updated."
|
268
267
|
failure: "The import did not work."
|
269
268
|
|
270
|
-
installation:
|
271
|
-
common:
|
272
|
-
title: First Locomotive Installation
|
273
|
-
next: Next
|
274
|
-
step_1:
|
275
|
-
title: Step 1/3
|
276
|
-
explanations: Here is the first step of the Locomotive installation. Please read carefully what is written below.
|
277
|
-
database:
|
278
|
-
label: "Database name: <em>%{name}</em>"
|
279
|
-
notes: "All the mongodb connection settings can be found in the <b>config/mongoid.yml</b> file of your application."
|
280
|
-
default_domain:
|
281
|
-
label: "Default domain name: <em>%{name}</em>"
|
282
|
-
notes: "Basically, Locomotive is a multi websites platform. Each site instance has a default entry, also called subdomain and based on the default domain name. Obviously, you are free to map other domains to your site instance working like aliases. <br/>The default domain name value can be found in the <b>config/initializers/locomotive.rb</b> file."
|
283
|
-
step_2:
|
284
|
-
title: "Step 2/3 — Create account"
|
285
|
-
name: Account name
|
286
|
-
email: Email
|
287
|
-
password: Password
|
288
|
-
password_confirmation: Password confirmation
|
289
|
-
done: "You have already added an account:<br/><strong>%{name}</strong>, <em>%{email}</em>"
|
290
|
-
next: Create account
|
291
|
-
step_3:
|
292
|
-
title: "Step 3/3 — Create first site"
|
293
|
-
explanations: "This is the last step of the installation. You can upload a theme as a zip file. We have free available themes <a href=\"http://www.locomotivecms.com/support/themes\">here</a>."
|
294
|
-
next: Create site
|
295
|
-
|
296
|
-
|
297
269
|
formtastic:
|
298
270
|
titles:
|
299
271
|
information: General information
|
@@ -326,8 +298,6 @@ en:
|
|
326
298
|
import:
|
327
299
|
new:
|
328
300
|
source: File
|
329
|
-
samples: Copy samples
|
330
|
-
reset: Reset site
|
331
301
|
|
332
302
|
hints:
|
333
303
|
page:
|
@@ -350,6 +320,4 @@ en:
|
|
350
320
|
hint: "Text displayed in the model form just below the field"
|
351
321
|
import:
|
352
322
|
source: "A zipfile containing a database.yml along with assets and templates"
|
353
|
-
samples: "If enabled, the import process will also copy contents and assets"
|
354
|
-
reset: "If enabled, all the data of your site will be destroyed before importing the new site"
|
355
323
|
|
@@ -174,7 +174,7 @@ fr:
|
|
174
174
|
help: "Vous avez le choix de soit uploader n'importe quel fichier ou bien soit de copier/coller du code css ou javascript."
|
175
175
|
edit:
|
176
176
|
title: "Edition %{file}"
|
177
|
-
help: "
|
177
|
+
help: "Vous pouvez insérer le raccourci suivant dans vos feuilles de style: <strong>%{shortcut_url}</strong> OU utiliser directement l'url : %{url}"
|
178
178
|
form:
|
179
179
|
choose_file: Choisir fichier
|
180
180
|
choose_plain_text: Passer en mode texte
|
@@ -219,7 +219,6 @@ fr:
|
|
219
219
|
new_item: nouvel élément
|
220
220
|
form:
|
221
221
|
order_by:
|
222
|
-
created_at: 'Par date création'
|
223
222
|
updated_at: 'Par date de mise à jour'
|
224
223
|
position_in_list: Manuellement
|
225
224
|
|
@@ -266,34 +265,6 @@ fr:
|
|
266
265
|
success: "Votre site a été mis à jour avec succès."
|
267
266
|
failure: "L'import n'a pas fonctionné."
|
268
267
|
|
269
|
-
installation:
|
270
|
-
common:
|
271
|
-
title: Première installation de Locomotive
|
272
|
-
next: Suivant
|
273
|
-
step_1:
|
274
|
-
title: "Étape 1/3"
|
275
|
-
explanations: "Voici la première étape de l'installation de Locomotive. Veuillez lire attentivement ce qui est écrit ci-dessous."
|
276
|
-
database:
|
277
|
-
label: "Nom base de données: <em>%{name}</em>"
|
278
|
-
notes: "Les paramètres de la connection à MongoDB se trouvent dans le fichier <b>config/mongoid.yml</b> de votre application."
|
279
|
-
default_domain:
|
280
|
-
label: "Nom du domaine par défaut: <em>%{name}</em>"
|
281
|
-
notes:
|
282
|
-
"Locomotive est une plate-forme multi-sites. Chaque instance de site a une entrée par défaut appelée aussi sous-domaine et qui est aussi fonction du nom de domaine par défaut. Evidemment, vous êtes libres d'associer d'autres noms de domaines, sortes d'alias.
|
283
|
-
<br/>La valeur du nom de domaine par défaut se trouve dans le fichier <b>config/initializers/locomotive.rb</b>."
|
284
|
-
step_2:
|
285
|
-
title: "Étape 2/3 — Créer un compte"
|
286
|
-
name: Nom du compte
|
287
|
-
email: E-mail
|
288
|
-
password: Mot de passe
|
289
|
-
password_confirmation: Confirmation mot de passe
|
290
|
-
done: "Vous avez déjà ajouté un compte:<br/><strong>%{name}</strong>, <em>%{email}</em>"
|
291
|
-
next: Créer compte
|
292
|
-
step_3:
|
293
|
-
title: "Étape 3/3 — Créer premier site"
|
294
|
-
explanations: "C'est la dernière étape de l'installation. Vous pouvez uploader un theme sous forme d'un fichier zip. Nous avons quelques themes disponibles <a href=\"http://www.locomotivecms.com/support/themes\">ici</a>."
|
295
|
-
next: Créer site
|
296
|
-
|
297
268
|
formtastic:
|
298
269
|
titles:
|
299
270
|
information: Informations générales
|
@@ -326,8 +297,6 @@ fr:
|
|
326
297
|
import:
|
327
298
|
new:
|
328
299
|
source: Fichier
|
329
|
-
samples: Copier contenu
|
330
|
-
reset: Remettre à zéro
|
331
300
|
|
332
301
|
hints:
|
333
302
|
page:
|
@@ -350,5 +319,3 @@ fr:
|
|
350
319
|
hint: "Texte affiché dans le formulaire de l'élément juste en dessous du champ."
|
351
320
|
import:
|
352
321
|
source: "Un fichier zip contenant database.yml, les fichiers du thème et les templates de page"
|
353
|
-
samples: "Si activé, les contenus et les média seront aussi copiés lors de l'import"
|
354
|
-
reset: "Si activé, toutes les données de votre site seront détruites avant l'import du nouveau site"
|
@@ -13,7 +13,6 @@ en:
|
|
13
13
|
array_too_short: "is too small (minimum element number is %{count})"
|
14
14
|
liquid_syntax: "Liquid Syntax error, please check the syntax"
|
15
15
|
liquid_extend: "The page extends a template which does not exist"
|
16
|
-
invalid_theme_file: "can't be blank or isn't a zip file"
|
17
16
|
|
18
17
|
attributes:
|
19
18
|
defaults:
|
@@ -34,7 +34,6 @@ fr:
|
|
34
34
|
array_too_short: "est trop petit (le nombre minimum d'éléments est %{count})"
|
35
35
|
liquid_syntax: "Erreur de syntaxe dans les sections de page, veuillez vérifier la syntaxe"
|
36
36
|
liquid_extend: "La page étend le contenu d'une page qui n'existe pas"
|
37
|
-
invalid_theme_file: "doit être rempli ou n'est pas un fichier zip"
|
38
37
|
|
39
38
|
attributes:
|
40
39
|
defaults:
|
data/config/locales/flash.en.yml
CHANGED
data/config/locales/flash.fr.yml
CHANGED
data/config/mongoid.yml
CHANGED
@@ -17,16 +17,8 @@ test:
|
|
17
17
|
# set these environment variables on your prod server
|
18
18
|
production:
|
19
19
|
<<: *defaults
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
# port: <%= ENV['MONGOID_PORT'] %>
|
26
|
-
# username: <%= ENV['MONGOID_USERNAME'] %>
|
27
|
-
# password: <%= ENV['MONGOID_PASSWORD'] %>
|
28
|
-
# database: <%= ENV['MONGOID_DATABASE'] %>
|
29
|
-
|
30
|
-
# heroku
|
31
|
-
# uri: <%= ENV['MONGOHQ_URL'] %>
|
32
|
-
|
20
|
+
host: <%= ENV['MONGOID_HOST'] %>
|
21
|
+
port: <%= ENV['MONGOID_PORT'] %>
|
22
|
+
username: <%= ENV['MONGOID_USERNAME'] %>
|
23
|
+
password: <%= ENV['MONGOID_PASSWORD'] %>
|
24
|
+
database: <%= ENV['MONGOID_DATABASE'] %>
|
data/config/routes.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Rails.application.routes.draw do
|
3
3
|
|
4
4
|
constraints(Locomotive::Routing::DefaultConstraint) do
|
5
|
-
root :to => '
|
5
|
+
root :to => 'home#show'
|
6
6
|
end
|
7
7
|
|
8
8
|
# admin authentication
|
@@ -52,11 +52,6 @@ Rails.application.routes.draw do
|
|
52
52
|
resources :cross_domain_sessions, :only => [:new, :create]
|
53
53
|
|
54
54
|
resource :import, :only => [:new, :show, :create]
|
55
|
-
|
56
|
-
# installation guide
|
57
|
-
match '/installation' => 'installation#show', :defaults => { :step => 1 }, :as => :installation
|
58
|
-
match '/installation/:step' => 'installation#show', :as => :installation_step
|
59
|
-
|
60
55
|
end
|
61
56
|
|
62
57
|
# sitemap
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Locomotive
|
2
|
+
class CopyAssetsGenerator < Rails::Generators::Base
|
3
|
+
|
4
|
+
def self.source_root
|
5
|
+
@_locomotive_source_root ||= File.expand_path('../../../../../', __FILE__)
|
6
|
+
@_locomotive_source_root
|
7
|
+
end
|
8
|
+
|
9
|
+
def copy_public_files
|
10
|
+
directory 'public', 'public', :recursive => true
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
@@ -1,29 +1,21 @@
|
|
1
1
|
module Locomotive
|
2
2
|
class InstallGenerator < Rails::Generators::Base
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
def copy_mongoid_config
|
7
|
-
copy_file 'config/mongoid.yml', 'config/mongoid.yml'
|
8
|
-
end
|
9
|
-
|
10
|
-
def copy_assets
|
11
|
-
directory 'public', 'public', :recursive => true
|
12
|
-
copy_file 'config/assets.yml', 'config/assets.yml'
|
4
|
+
def self.source_root
|
5
|
+
@_locomotive_source_root ||= File.expand_path('../templates', __FILE__)
|
13
6
|
end
|
14
7
|
|
15
|
-
def
|
16
|
-
copy_file 'config/initializers/carrierwave.rb', 'config/initializers/carrierwave.rb'
|
17
|
-
|
18
|
-
@source_paths = nil # reset it for the find_in_source_paths method
|
19
|
-
|
20
|
-
Locomotive::InstallGenerator.source_root(File.expand_path('../templates', __FILE__))
|
21
|
-
|
8
|
+
def copy_initializer
|
22
9
|
template 'locomotive.rb', 'config/initializers/locomotive.rb'
|
23
10
|
end
|
24
11
|
|
25
|
-
def
|
26
|
-
|
12
|
+
def seed_db
|
13
|
+
append_file 'db/seeds.rb', %{
|
14
|
+
# Uncomment the following lines if you want to create the first website / account
|
15
|
+
#account = Account.create! :name => 'Admin', :email => 'admin@example.com', :password => 'locomotive', :password_confirmation => 'locomotive'
|
16
|
+
#site = Site.new :name => 'Locomotive test website', :subdomain => 'test'
|
17
|
+
#site.memberships.build :account => account, :admin => true
|
18
|
+
#site.save!}
|
27
19
|
end
|
28
20
|
|
29
21
|
def show_readme
|
@@ -1,27 +1,17 @@
|
|
1
1
|
===============================================================================
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
1.
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
> open localhost:8080
|
18
|
-
|
19
|
-
4. Follow the installation wizzard steps
|
20
|
-
|
21
|
-
5. Enjoy !
|
22
|
-
|
23
|
-
Note: If you want to use DelayedJob, be sure to launch it:
|
24
|
-
|
25
|
-
> rake jobs:work
|
3
|
+
Locomotive initializer has been added to your application. Your db/seeds.rb file has also been updated.
|
4
|
+
|
5
|
+
1. Take a look at this to match your environment.
|
6
|
+
|
7
|
+
2. Uncomment added code in db/seeds.rb if necessary
|
8
|
+
|
9
|
+
Note: do not forget to run rake db:seed if you modify your db/seeds.rb file.
|
10
|
+
|
11
|
+
Once it is done, the next step is to install assets:
|
12
|
+
|
13
|
+
bundle exec rails g locomotive:copy_assets
|
14
|
+
|
15
|
+
Fire your application server and launch a browser !
|
26
16
|
|
27
17
|
===============================================================================
|