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.
Files changed (229) hide show
  1. data/Gemfile +13 -15
  2. data/README.textile +4 -5
  3. data/app/controllers/admin/api_contents_controller.rb +1 -10
  4. data/app/controllers/admin/base_controller.rb +2 -2
  5. data/app/controllers/admin/cross_domain_sessions_controller.rb +4 -7
  6. data/app/controllers/admin/current_sites_controller.rb +0 -2
  7. data/app/controllers/admin/imports_controller.rb +19 -13
  8. data/app/controllers/admin/pages_controller.rb +1 -1
  9. data/app/controllers/admin/passwords_controller.rb +2 -2
  10. data/app/controllers/admin/sessions_controller.rb +2 -2
  11. data/app/controllers/admin/sites_controller.rb +0 -2
  12. data/app/controllers/admin/theme_assets_controller.rb +1 -1
  13. data/app/controllers/application_controller.rb +1 -1
  14. data/app/controllers/home_controller.rb +7 -0
  15. data/app/helpers/admin/assets_helper.rb +6 -0
  16. data/app/helpers/admin/custom_fields_helper.rb +2 -2
  17. data/app/helpers/admin/{box_helper.rb → login_helper.rb} +3 -7
  18. data/app/models/asset_collection.rb +3 -15
  19. data/app/models/content_instance.rb +0 -19
  20. data/app/models/content_type.rb +3 -21
  21. data/app/models/extensions/page/tree.rb +7 -63
  22. data/app/models/page.rb +0 -2
  23. data/app/models/site.rb +3 -15
  24. data/app/uploaders/asset_uploader.rb +1 -1
  25. data/app/uploaders/theme_asset_uploader.rb +1 -12
  26. data/app/views/admin/asset_collections/edit.html.haml +2 -2
  27. data/app/views/admin/asset_collections/new.html.haml +1 -1
  28. data/app/views/admin/assets/_form.html.haml +2 -2
  29. data/app/views/admin/content_types/_form.html.haml +2 -2
  30. data/app/views/admin/content_types/new.html.haml +1 -1
  31. data/app/views/admin/contents/_form.html.haml +2 -2
  32. data/app/views/admin/contents/index.html.haml +1 -1
  33. data/app/views/admin/cross_domain_sessions/new.html.haml +1 -1
  34. data/app/views/admin/current_sites/_form.html.haml +3 -3
  35. data/app/views/admin/current_sites/edit.html.haml +1 -1
  36. data/app/views/admin/imports/new.html.haml +0 -11
  37. data/app/views/admin/imports/show.html.haml +1 -1
  38. data/app/views/admin/my_accounts/edit.html.haml +1 -1
  39. data/app/views/admin/pages/_form.html.haml +3 -2
  40. data/app/views/admin/pages/_page.html.haml +2 -4
  41. data/app/views/admin/pages/index.html.haml +1 -1
  42. data/app/views/admin/passwords/edit.html.haml +2 -2
  43. data/app/views/admin/passwords/new.html.haml +2 -2
  44. data/app/views/admin/sessions/new.html.haml +2 -2
  45. data/app/views/admin/shared/_head.html.haml +5 -4
  46. data/app/views/admin/shared/menu/_contents.html.haml +1 -1
  47. data/app/views/admin/sites/_form.html.haml +3 -3
  48. data/app/views/admin/snippets/_form.html.haml +2 -2
  49. data/app/views/admin/snippets/index.html.haml +15 -0
  50. data/app/views/admin/theme_assets/_form.html.haml +2 -2
  51. data/app/views/admin/theme_assets/index.html.haml +1 -1
  52. data/app/views/home/show.html.haml +4 -0
  53. data/app/views/{admin/layouts → layouts/admin}/application.html.haml +0 -0
  54. data/app/views/layouts/admin/box.html.haml +19 -0
  55. data/app/views/layouts/application.html.haml +7 -0
  56. data/config/application.rb +3 -1
  57. data/config/environments/development.rb +6 -1
  58. data/config/environments/production.rb +1 -1
  59. data/config/environments/test.rb +5 -1
  60. data/config/initializers/locomotive.rb +0 -14
  61. data/config/locales/admin_ui_en.yml +1 -33
  62. data/config/locales/admin_ui_fr.yml +1 -34
  63. data/config/locales/default_en.yml +0 -1
  64. data/config/locales/default_fr.yml +0 -1
  65. data/config/locales/flash.en.yml +0 -1
  66. data/config/locales/flash.fr.yml +0 -1
  67. data/config/mongoid.yml +5 -13
  68. data/config/routes.rb +1 -6
  69. data/lib/generators/locomotive/copy_assets/copy_assets_generator.rb +14 -0
  70. data/lib/generators/locomotive/install/install_generator.rb +10 -18
  71. data/lib/generators/locomotive/install/templates/README +13 -23
  72. data/lib/generators/locomotive/install/templates/locomotive.rb +1 -15
  73. data/lib/locomotive/carrierwave.rb +0 -1
  74. data/lib/locomotive/configuration.rb +1 -3
  75. data/lib/locomotive/custom_fields.rb +1 -0
  76. data/lib/locomotive/delayed_job.rb +2 -1
  77. data/lib/locomotive/engine.rb +7 -24
  78. data/lib/locomotive/heroku.rb +0 -1
  79. data/lib/locomotive/httparty/webservice.rb +1 -12
  80. data/lib/locomotive/import.rb +0 -2
  81. data/lib/locomotive/import/asset_collections.rb +8 -40
  82. data/lib/locomotive/import/assets.rb +12 -20
  83. data/lib/locomotive/import/content_types.rb +15 -51
  84. data/lib/locomotive/import/job.rb +11 -106
  85. data/lib/locomotive/import/pages.rb +26 -79
  86. data/lib/locomotive/import/site.rb +5 -3
  87. data/lib/locomotive/import/snippets.rb +8 -6
  88. data/lib/locomotive/inherited_resources.rb +0 -1
  89. data/lib/locomotive/liquid/drops/asset_collections.rb +4 -4
  90. data/lib/locomotive/liquid/drops/contents.rb +16 -21
  91. data/lib/locomotive/liquid/drops/page.rb +0 -4
  92. data/lib/locomotive/liquid/filters/html.rb +29 -15
  93. data/lib/locomotive/liquid/tags/consume.rb +1 -1
  94. data/lib/locomotive/liquid/tags/nav.rb +17 -48
  95. data/lib/locomotive/liquid/tags/paginate.rb +3 -3
  96. data/lib/locomotive/middlewares/fonts.rb +11 -3
  97. data/lib/locomotive/misc_form_builder.rb +7 -2
  98. data/lib/locomotive/regexps.rb +1 -1
  99. data/lib/locomotive/render.rb +3 -9
  100. data/lib/locomotive/routing/site_dispatcher.rb +6 -10
  101. data/lib/locomotive/version.rb +1 -2
  102. data/public/images/admin/box/buttons/right_bg.png +0 -0
  103. data/public/javascripts/admin/aloha/VERSION.txt +1 -1
  104. data/public/javascripts/admin/aloha/aloha-nodeps.js +101 -140
  105. data/public/javascripts/admin/aloha/aloha.js +105 -193
  106. data/public/javascripts/admin/aloha/css/aloha.css +4 -65
  107. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/css/prettyPhoto.css +2 -2
  108. data/public/javascripts/admin/aloha/i18n/de.dict +0 -2
  109. data/public/javascripts/admin/aloha/i18n/en.dict +0 -2
  110. data/public/javascripts/admin/aloha/images/base.png +0 -0
  111. data/public/javascripts/admin/aloha/images/base_multi.png +0 -0
  112. data/public/javascripts/admin/aloha/images/fade_in.png +0 -0
  113. data/public/javascripts/admin/aloha/images/fade_out.png +0 -0
  114. data/public/javascripts/admin/aloha/images/gentics_logo.png +0 -0
  115. data/public/javascripts/admin/aloha/images/grabhandle.png +0 -0
  116. data/public/javascripts/admin/aloha/images/maximize.png +0 -0
  117. data/public/javascripts/admin/aloha/images/pin.png +0 -0
  118. data/public/javascripts/admin/aloha/images/removeformat.png +0 -0
  119. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/de.dict +2 -0
  120. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/en.dict +2 -0
  121. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/eo.dict +2 -0
  122. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/fi.dict +2 -0
  123. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/fr.dict +2 -0
  124. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/it.dict +2 -0
  125. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/plugin.js +7 -0
  126. data/public/javascripts/admin/aloha/plugins/{com.example.aloha.plugins.Save → com.example.aloha.DummySave}/i18n/de.dict +0 -0
  127. data/public/javascripts/admin/aloha/plugins/{com.example.aloha.plugins.Save → com.example.aloha.DummySave}/i18n/en.dict +0 -0
  128. data/public/javascripts/admin/aloha/plugins/{com.example.aloha.plugins.Save → com.example.aloha.DummySave}/i18n/fi.dict +0 -0
  129. data/public/javascripts/admin/aloha/plugins/{com.example.aloha.plugins.Save → com.example.aloha.DummySave}/i18n/fr.dict +0 -0
  130. data/public/javascripts/admin/aloha/plugins/{com.example.aloha.plugins.Save → com.example.aloha.DummySave}/i18n/it.dict +0 -0
  131. data/public/javascripts/admin/aloha/plugins/{com.example.aloha.plugins.Save → com.example.aloha.DummySave}/plugin.js +0 -0
  132. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/plugin.js +1 -1
  133. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/de.dict +20 -0
  134. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/en.dict +20 -0
  135. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/eo.dict +16 -0
  136. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/fi.dict +20 -0
  137. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/fr.dict +16 -0
  138. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/it.dict +20 -0
  139. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/plugin.js +7 -0
  140. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.HighlightEditables/plugin.js +1 -1
  141. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/css/jquery.autocomplete.css +48 -0
  142. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/deps/jquery.autocomplete.js +1 -0
  143. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/plugin.js +1 -1
  144. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/ressource.js +7 -0
  145. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/ressourcedummy.js +7 -0
  146. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/ressourceregistry.js +7 -0
  147. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/plugin.js +1 -1
  148. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/plugin.js +1 -1
  149. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/de.dict +0 -2
  150. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/en.dict +0 -2
  151. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/plugin.js +1 -1
  152. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/resources/table.css +110 -28
  153. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Loader/plugin.js +1 -0
  154. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/i18n/en.dict +2 -0
  155. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/i18n/fi.dict +2 -0
  156. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/i18n/fr.dict +2 -0
  157. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/person.css +3 -0
  158. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/plugin.js +1 -0
  159. data/public/javascripts/admin/aloha/plugins/simpletable/plugin.js.deactivated +2330 -0
  160. data/public/javascripts/admin/asset_collections.js +7 -11
  161. data/public/javascripts/admin/contents.js +1 -3
  162. data/public/javascripts/admin/site.js +3 -9
  163. data/public/javascripts/admin/snippets.js +1 -1
  164. data/public/javascripts/admin/utils.js +3 -5
  165. data/public/stylesheets/admin/application.css +1 -1
  166. data/public/stylesheets/admin/box.css +5 -5
  167. data/public/stylesheets/admin/buttons.css +5 -0
  168. data/public/stylesheets/admin/formtastic_changes.css +12 -5
  169. data/public/stylesheets/admin/inline_editor.css +5 -22
  170. data/public/stylesheets/admin/layout.css +4 -9
  171. metadata +130 -187
  172. data/app/controllers/admin/installation_controller.rb +0 -79
  173. data/app/uploaders/theme_uploader.rb +0 -19
  174. data/app/views/admin/errors/no_page.html.haml +0 -1
  175. data/app/views/admin/errors/no_site.html.haml +0 -1
  176. data/app/views/admin/installation/step_1.html.haml +0 -24
  177. data/app/views/admin/installation/step_2.html.haml +0 -26
  178. data/app/views/admin/installation/step_3.html.haml +0 -23
  179. data/app/views/admin/layouts/box.html.haml +0 -21
  180. data/app/views/admin/layouts/error.html.haml +0 -1
  181. data/config/assets.yml +0 -96
  182. data/config/initializers/carrierwave.rb +0 -17
  183. data/lib/locomotive/import/base.rb +0 -46
  184. data/lib/locomotive/import/logger.rb +0 -13
  185. data/lib/locomotive/railties/tasks.rake +0 -16
  186. data/public/javascripts/admin/aloha/i18n/pl.dict +0 -5
  187. data/public/javascripts/admin/aloha/images/base_big.png +0 -0
  188. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/examples/triSports.css +0 -86
  189. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/examples/triSports.html +0 -44
  190. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/i18n/de.dict +0 -4
  191. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/i18n/en.dict +0 -4
  192. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/i18n/fr.dict +0 -4
  193. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/plugin.js +0 -1
  194. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/product.js +0 -1
  195. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/2xu-wetsuit.jpg +0 -0
  196. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/asics-noosa.jpg +0 -0
  197. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/fivefingers-kso.jpg +0 -0
  198. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/kuota-kueen-k.jpg +0 -0
  199. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/mizuno-wave-musha2.jpg +0 -0
  200. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/product.css +0 -69
  201. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/product_button.gif +0 -0
  202. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/simplon-mrt.jpg +0 -0
  203. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/trek-fuel-ex.jpg +0 -0
  204. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/trisports.jpg +0 -0
  205. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/zoggs-predator.jpg +0 -0
  206. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/examples/AlohaAbbr.css +0 -48
  207. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/examples/AlohaAbbr.html +0 -69
  208. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/i18n/de.dict +0 -4
  209. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/i18n/en.dict +0 -4
  210. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/plugin.js +0 -7
  211. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/pl.dict +0 -30
  212. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/LinkList.js +0 -7
  213. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/delicious.js +0 -7
  214. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/i18n/pl.dict +0 -4
  215. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/css/LinkChecker.css +0 -14
  216. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/examples/AlohaLinkChecker.css +0 -49
  217. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/examples/AlohaLinkChecker.html +0 -82
  218. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/i18n/en.dict +0 -27
  219. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/plugin.js +0 -7
  220. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/proxy.php +0 -235
  221. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Paste/plugin.js +0 -7
  222. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Paste/wordpastehandler.js +0 -7
  223. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/i18n/de.dict +0 -1
  224. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/i18n/en.dict +0 -1
  225. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/pl.dict +0 -12
  226. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/resources/wai_green.png +0 -0
  227. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/resources/wai_red.png +0 -0
  228. data/public/stylesheets/admin/installation.css +0 -50
  229. data/public/stylesheets/admin/safari.css +0 -15
@@ -1,6 +1,6 @@
1
1
  - content_for :head do
2
- = include_javascripts :image_picker, :snippets
3
- = include_stylesheets :fancybox
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
- = include_javascripts :image_picker, :theme_assets
3
- = include_stylesheets :fancybox
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
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  %h3!= t('.snippets')
14
14
  - if @snippets.empty?
15
- %p.no-items!= t('admin.snippets.index.no_items', :url => new_admin_snippet_url)
15
+ %p.no-items!= t('.no_items', :url => new_admin_snippet_url)
16
16
  - else
17
17
  %ul.list.theme-assets
18
18
  = render @snippets
@@ -0,0 +1,4 @@
1
+ %h2 Locomotive rocks !!!
2
+
3
+ %p
4
+ = flash[:error]
@@ -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
@@ -0,0 +1,7 @@
1
+ !!! XML
2
+ !!!
3
+ %html{ :xmlns => 'http://www.w3.org/1999/xhtml' }
4
+ %head
5
+ %body
6
+ %h1 Welcome to Locomotive
7
+ = yield
@@ -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 Rack::Lock, '::Locomotive::Middlewares::Fonts', :path => %r{^/fonts}
50
+ config.middleware.insert_after ::ActionDispatch::Static, '::Locomotive::Middlewares::Fonts', :path => %r{^/fonts}
49
51
  end
50
52
  end
@@ -27,4 +27,9 @@ Locomotive::Application.configure do
27
27
  :port => 1025,
28
28
  :domain => "example.com"
29
29
  }
30
- end
30
+ end
31
+
32
+ CarrierWave.configure do |config|
33
+ config.storage = :file
34
+ config.root = File.join(Rails.root, 'public')
35
+ end
@@ -45,4 +45,4 @@ Locomotive::Application.configure do
45
45
  config.i18n.fallbacks = true
46
46
 
47
47
  config.active_support.deprecation = :notify
48
- end
48
+ end
@@ -32,4 +32,8 @@ Locomotive::Application.configure do
32
32
 
33
33
  # Print deprecation notices to the stderr
34
34
  config.active_support.deprecation = :stderr
35
- end
35
+ end
36
+
37
+ CarrierWave.configure do |config|
38
+ config.storage = :file
39
+ end
@@ -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: <a href='%{url}'>%{url}</a>"
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 &mdash; 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 &mdash; 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: "L'url du fichier est <a href='%{url}'>%{url}</a>"
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 &mdash; 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 &mdash; 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:
@@ -111,6 +111,5 @@ en:
111
111
 
112
112
  imports:
113
113
  create:
114
- done: "Your site was successfully updated."
115
114
  notice: "Your site is being updated."
116
115
  alert: "The import was not done."
@@ -111,6 +111,5 @@ fr:
111
111
 
112
112
  imports:
113
113
  create:
114
- done: "Votre site a été mis à jour"
115
114
  notice: "Votre site est en train d'être mis à jour"
116
115
  alert: "L'import n'a pas pu se faire"
@@ -17,16 +17,8 @@ test:
17
17
  # set these environment variables on your prod server
18
18
  production:
19
19
  <<: *defaults
20
- database: locomotive_prod
21
-
22
- # other settings for production
23
-
24
- # host: <%= ENV['MONGOID_HOST'] %>
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'] %>
@@ -2,7 +2,7 @@
2
2
  Rails.application.routes.draw do
3
3
 
4
4
  constraints(Locomotive::Routing::DefaultConstraint) do
5
- root :to => 'admin/sessions#new'
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
- source_root File.expand_path('../../../../../', __FILE__)
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 copy_initializers
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 remove_index_html
26
- remove_file 'public/index.html'
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
- The Locomotive Engine has been correctly installed in your Rails application.
4
-
5
- 1. Edit the main config files:
6
-
7
- - config/initializers/locomotive.rb
8
- - config/initializers/carrierwave.rb
9
- - config/mongoid.yml
10
-
11
- 2. Launch the server
12
-
13
- > unicorn_rails
14
-
15
- 3. Open your browser
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
  ===============================================================================