locomotive_cms 0.0.4 → 1.0.0.beta

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 +15 -13
  2. data/README.textile +5 -4
  3. data/app/controllers/admin/api_contents_controller.rb +10 -1
  4. data/app/controllers/admin/base_controller.rb +2 -2
  5. data/app/controllers/admin/cross_domain_sessions_controller.rb +7 -4
  6. data/app/controllers/admin/current_sites_controller.rb +2 -0
  7. data/app/controllers/admin/imports_controller.rb +13 -19
  8. data/app/controllers/admin/installation_controller.rb +79 -0
  9. data/app/controllers/admin/pages_controller.rb +1 -1
  10. data/app/controllers/admin/passwords_controller.rb +2 -2
  11. data/app/controllers/admin/sessions_controller.rb +2 -2
  12. data/app/controllers/admin/sites_controller.rb +2 -0
  13. data/app/controllers/admin/theme_assets_controller.rb +1 -1
  14. data/app/controllers/application_controller.rb +1 -1
  15. data/app/helpers/admin/assets_helper.rb +0 -6
  16. data/app/helpers/admin/{login_helper.rb → box_helper.rb} +7 -3
  17. data/app/helpers/admin/custom_fields_helper.rb +2 -2
  18. data/app/models/asset_collection.rb +15 -3
  19. data/app/models/content_instance.rb +19 -0
  20. data/app/models/content_type.rb +21 -3
  21. data/app/models/extensions/page/tree.rb +63 -7
  22. data/app/models/page.rb +2 -0
  23. data/app/models/site.rb +15 -3
  24. data/app/uploaders/asset_uploader.rb +1 -1
  25. data/app/uploaders/theme_asset_uploader.rb +12 -1
  26. data/app/uploaders/theme_uploader.rb +19 -0
  27. data/app/views/admin/asset_collections/edit.html.haml +2 -2
  28. data/app/views/admin/asset_collections/new.html.haml +1 -1
  29. data/app/views/admin/assets/_form.html.haml +2 -2
  30. data/app/views/admin/content_types/_form.html.haml +2 -2
  31. data/app/views/admin/content_types/new.html.haml +1 -1
  32. data/app/views/admin/contents/_form.html.haml +2 -2
  33. data/app/views/admin/contents/index.html.haml +1 -1
  34. data/app/views/admin/cross_domain_sessions/new.html.haml +1 -1
  35. data/app/views/admin/current_sites/_form.html.haml +3 -3
  36. data/app/views/admin/current_sites/edit.html.haml +1 -1
  37. data/app/views/admin/errors/no_page.html.haml +1 -0
  38. data/app/views/admin/errors/no_site.html.haml +1 -0
  39. data/app/views/admin/imports/new.html.haml +11 -0
  40. data/app/views/admin/imports/show.html.haml +1 -1
  41. data/app/views/admin/installation/step_1.html.haml +24 -0
  42. data/app/views/admin/installation/step_2.html.haml +26 -0
  43. data/app/views/admin/installation/step_3.html.haml +23 -0
  44. data/app/views/{layouts/admin → admin/layouts}/application.html.haml +0 -0
  45. data/app/views/admin/layouts/box.html.haml +21 -0
  46. data/app/views/admin/layouts/error.html.haml +1 -0
  47. data/app/views/admin/my_accounts/edit.html.haml +1 -1
  48. data/app/views/admin/pages/_form.html.haml +2 -3
  49. data/app/views/admin/pages/_page.html.haml +4 -2
  50. data/app/views/admin/pages/index.html.haml +1 -1
  51. data/app/views/admin/passwords/edit.html.haml +2 -2
  52. data/app/views/admin/passwords/new.html.haml +2 -2
  53. data/app/views/admin/sessions/new.html.haml +2 -2
  54. data/app/views/admin/shared/_head.html.haml +4 -5
  55. data/app/views/admin/shared/menu/_contents.html.haml +1 -1
  56. data/app/views/admin/sites/_form.html.haml +3 -3
  57. data/app/views/admin/snippets/_form.html.haml +2 -2
  58. data/app/views/admin/theme_assets/_form.html.haml +2 -2
  59. data/app/views/admin/theme_assets/index.html.haml +1 -1
  60. data/config/application.rb +1 -3
  61. data/config/assets.yml +96 -0
  62. data/config/environments/development.rb +1 -6
  63. data/config/environments/production.rb +1 -1
  64. data/config/environments/test.rb +1 -5
  65. data/config/initializers/carrierwave.rb +17 -0
  66. data/config/initializers/locomotive.rb +14 -0
  67. data/config/locales/admin_ui_en.yml +33 -1
  68. data/config/locales/admin_ui_fr.yml +34 -1
  69. data/config/locales/default_en.yml +1 -0
  70. data/config/locales/default_fr.yml +1 -0
  71. data/config/locales/flash.en.yml +1 -0
  72. data/config/locales/flash.fr.yml +1 -0
  73. data/config/mongoid.yml +13 -5
  74. data/config/routes.rb +6 -1
  75. data/lib/generators/locomotive/install/install_generator.rb +18 -10
  76. data/lib/generators/locomotive/install/templates/README +23 -13
  77. data/lib/generators/locomotive/install/templates/locomotive.rb +15 -1
  78. data/lib/locomotive/carrierwave.rb +1 -0
  79. data/lib/locomotive/configuration.rb +3 -1
  80. data/lib/locomotive/custom_fields.rb +0 -1
  81. data/lib/locomotive/delayed_job.rb +1 -2
  82. data/lib/locomotive/engine.rb +24 -7
  83. data/lib/locomotive/heroku.rb +1 -0
  84. data/lib/locomotive/httparty/webservice.rb +12 -1
  85. data/lib/locomotive/import.rb +2 -0
  86. data/lib/locomotive/import/asset_collections.rb +40 -8
  87. data/lib/locomotive/import/assets.rb +20 -12
  88. data/lib/locomotive/import/base.rb +46 -0
  89. data/lib/locomotive/import/content_types.rb +51 -15
  90. data/lib/locomotive/import/job.rb +106 -11
  91. data/lib/locomotive/import/logger.rb +13 -0
  92. data/lib/locomotive/import/pages.rb +79 -26
  93. data/lib/locomotive/import/site.rb +3 -5
  94. data/lib/locomotive/import/snippets.rb +6 -8
  95. data/lib/locomotive/inherited_resources.rb +1 -0
  96. data/lib/locomotive/liquid/drops/asset_collections.rb +4 -4
  97. data/lib/locomotive/liquid/drops/contents.rb +21 -16
  98. data/lib/locomotive/liquid/drops/page.rb +4 -0
  99. data/lib/locomotive/liquid/filters/html.rb +15 -29
  100. data/lib/locomotive/liquid/tags/consume.rb +1 -1
  101. data/lib/locomotive/liquid/tags/nav.rb +48 -17
  102. data/lib/locomotive/liquid/tags/paginate.rb +3 -3
  103. data/lib/locomotive/middlewares/fonts.rb +3 -11
  104. data/lib/locomotive/misc_form_builder.rb +2 -7
  105. data/lib/locomotive/railties/tasks.rake +16 -0
  106. data/lib/locomotive/regexps.rb +1 -1
  107. data/lib/locomotive/render.rb +9 -3
  108. data/lib/locomotive/routing/site_dispatcher.rb +10 -6
  109. data/lib/locomotive/version.rb +1 -1
  110. data/public/images/admin/box/buttons/right_bg.png +0 -0
  111. data/public/javascripts/admin/aloha/VERSION.txt +1 -1
  112. data/public/javascripts/admin/aloha/aloha-nodeps.js +140 -101
  113. data/public/javascripts/admin/aloha/aloha.js +193 -105
  114. data/public/javascripts/admin/aloha/css/aloha.css +65 -4
  115. data/public/javascripts/admin/aloha/deps/prettyPhoto/resources/css/prettyPhoto.css +2 -2
  116. data/public/javascripts/admin/aloha/i18n/de.dict +2 -0
  117. data/public/javascripts/admin/aloha/i18n/en.dict +2 -0
  118. data/public/javascripts/admin/aloha/i18n/pl.dict +5 -0
  119. data/public/javascripts/admin/aloha/images/base.png +0 -0
  120. data/public/javascripts/admin/aloha/images/base_big.png +0 -0
  121. data/public/javascripts/admin/aloha/images/base_multi.png +0 -0
  122. data/public/javascripts/admin/aloha/images/fade_in.png +0 -0
  123. data/public/javascripts/admin/aloha/images/fade_out.png +0 -0
  124. data/public/javascripts/admin/aloha/images/gentics_logo.png +0 -0
  125. data/public/javascripts/admin/aloha/images/grabhandle.png +0 -0
  126. data/public/javascripts/admin/aloha/images/maximize.png +0 -0
  127. data/public/javascripts/admin/aloha/images/pin.png +0 -0
  128. data/public/javascripts/admin/aloha/images/removeformat.png +0 -0
  129. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/examples/triSports.css +86 -0
  130. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/examples/triSports.html +44 -0
  131. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/i18n/de.dict +4 -0
  132. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/i18n/en.dict +4 -0
  133. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/i18n/fr.dict +4 -0
  134. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/plugin.js +1 -0
  135. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/product.js +1 -0
  136. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/2xu-wetsuit.jpg +0 -0
  137. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/asics-noosa.jpg +0 -0
  138. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/fivefingers-kso.jpg +0 -0
  139. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/kuota-kueen-k.jpg +0 -0
  140. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/mizuno-wave-musha2.jpg +0 -0
  141. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/product.css +69 -0
  142. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/product_button.gif +0 -0
  143. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/simplon-mrt.jpg +0 -0
  144. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/trek-fuel-ex.jpg +0 -0
  145. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/trisports.jpg +0 -0
  146. data/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product/resources/zoggs-predator.jpg +0 -0
  147. data/public/javascripts/admin/aloha/plugins/{com.example.aloha.DummySave → com.example.aloha.plugins.Save}/i18n/de.dict +0 -0
  148. data/public/javascripts/admin/aloha/plugins/{com.example.aloha.DummySave → com.example.aloha.plugins.Save}/i18n/en.dict +0 -0
  149. data/public/javascripts/admin/aloha/plugins/{com.example.aloha.DummySave → com.example.aloha.plugins.Save}/i18n/fi.dict +0 -0
  150. data/public/javascripts/admin/aloha/plugins/{com.example.aloha.DummySave → com.example.aloha.plugins.Save}/i18n/fr.dict +0 -0
  151. data/public/javascripts/admin/aloha/plugins/{com.example.aloha.DummySave → com.example.aloha.plugins.Save}/i18n/it.dict +0 -0
  152. data/public/javascripts/admin/aloha/plugins/{com.example.aloha.DummySave → com.example.aloha.plugins.Save}/plugin.js +0 -0
  153. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/examples/AlohaAbbr.css +48 -0
  154. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/examples/AlohaAbbr.html +69 -0
  155. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/i18n/de.dict +4 -0
  156. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/i18n/en.dict +4 -0
  157. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/plugin.js +7 -0
  158. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/pl.dict +30 -0
  159. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/plugin.js +1 -1
  160. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.HighlightEditables/plugin.js +1 -1
  161. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/LinkList.js +7 -0
  162. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/delicious.js +7 -0
  163. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/i18n/pl.dict +4 -0
  164. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/plugin.js +1 -1
  165. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/css/LinkChecker.css +14 -0
  166. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/examples/AlohaLinkChecker.css +49 -0
  167. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/examples/AlohaLinkChecker.html +82 -0
  168. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/i18n/en.dict +27 -0
  169. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/plugin.js +7 -0
  170. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/proxy.php +235 -0
  171. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/plugin.js +1 -1
  172. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Paste/plugin.js +7 -0
  173. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Paste/wordpastehandler.js +7 -0
  174. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/i18n/de.dict +1 -0
  175. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/i18n/en.dict +1 -0
  176. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/plugin.js +1 -1
  177. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/de.dict +2 -0
  178. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/en.dict +2 -0
  179. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/pl.dict +12 -0
  180. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/plugin.js +1 -1
  181. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/resources/table.css +28 -110
  182. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/resources/wai_green.png +0 -0
  183. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/resources/wai_red.png +0 -0
  184. data/public/javascripts/admin/asset_collections.js +11 -7
  185. data/public/javascripts/admin/contents.js +3 -1
  186. data/public/javascripts/admin/site.js +9 -3
  187. data/public/javascripts/admin/snippets.js +1 -1
  188. data/public/javascripts/admin/utils.js +5 -3
  189. data/public/stylesheets/admin/application.css +1 -1
  190. data/public/stylesheets/admin/box.css +5 -5
  191. data/public/stylesheets/admin/buttons.css +0 -5
  192. data/public/stylesheets/admin/formtastic_changes.css +5 -12
  193. data/public/stylesheets/admin/inline_editor.css +22 -5
  194. data/public/stylesheets/admin/installation.css +50 -0
  195. data/public/stylesheets/admin/layout.css +9 -4
  196. data/public/stylesheets/admin/safari.css +15 -0
  197. metadata +188 -131
  198. data/app/controllers/home_controller.rb +0 -7
  199. data/app/views/admin/snippets/index.html.haml +0 -15
  200. data/app/views/home/show.html.haml +0 -4
  201. data/app/views/layouts/admin/box.html.haml +0 -19
  202. data/app/views/layouts/application.html.haml +0 -7
  203. data/lib/generators/locomotive/copy_assets/copy_assets_generator.rb +0 -14
  204. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/de.dict +0 -2
  205. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/en.dict +0 -2
  206. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/eo.dict +0 -2
  207. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/fi.dict +0 -2
  208. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/fr.dict +0 -2
  209. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/i18n/it.dict +0 -2
  210. data/public/javascripts/admin/aloha/plugins/com.example.aloha.DummyDC/plugin.js +0 -7
  211. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/de.dict +0 -20
  212. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/en.dict +0 -20
  213. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/eo.dict +0 -16
  214. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/fi.dict +0 -20
  215. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/fr.dict +0 -16
  216. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/i18n/it.dict +0 -20
  217. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.GCN/plugin.js +0 -7
  218. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/css/jquery.autocomplete.css +0 -48
  219. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/deps/jquery.autocomplete.js +0 -1
  220. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/ressource.js +0 -7
  221. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/ressourcedummy.js +0 -7
  222. data/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/ressourceregistry.js +0 -7
  223. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Loader/plugin.js +0 -1
  224. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/i18n/en.dict +0 -2
  225. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/i18n/fi.dict +0 -2
  226. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/i18n/fr.dict +0 -2
  227. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/person.css +0 -3
  228. data/public/javascripts/admin/aloha/plugins/eu.iksproject.plugins.Person/plugin.js +0 -1
  229. data/public/javascripts/admin/aloha/plugins/simpletable/plugin.js.deactivated +0 -2330
@@ -0,0 +1,26 @@
1
+ - content_for :head_title do
2
+ = t('admin.installation.common.title')
3
+
4
+ - title t('.title')
5
+
6
+ - content_for :head do
7
+ = include_stylesheets :installation
8
+
9
+ - if @step_done.blank?
10
+ = semantic_form_for(@account, :url => admin_installation_step_url(2)) do |f|
11
+ .inner
12
+ = f.inputs do
13
+ = f.input :name, :label => t('.name'), :required => false
14
+ = f.input :email, :label => t('.email'), :required => false
15
+ = f.input :password, :label => t('.password'), :required => false
16
+ = f.input :password_confirmation, :label => t('.password_confirmation'), :required => false
17
+
18
+ .footer
19
+ = box_button_tag t('.next')
20
+ - else
21
+ .inner
22
+ %p.done
23
+ != @step_done
24
+
25
+ .footer
26
+ = next_installation_step_link(3)
@@ -0,0 +1,23 @@
1
+ - content_for :head_title do
2
+ = t('admin.installation.common.title')
3
+
4
+ - title t('.title')
5
+
6
+ - content_for :head do
7
+ = include_stylesheets :installation
8
+
9
+ = semantic_form_for(@site, :url => admin_installation_step_url(3), :html => { :multipart => true }) do |f|
10
+ .inner
11
+ %p.explanations
12
+ != t('.explanations')
13
+
14
+ = f.inputs do
15
+ = f.input :name, :required => false
16
+ = f.input :subdomain, :required => false
17
+
18
+ %li{ :class => 'string optional', :id => 'zipfile_input' }
19
+ %label{ :for => 'zipfile' }= t('formtastic.labels.import.new.source')
20
+ = file_field_tag 'zipfile'
21
+
22
+ .footer
23
+ = box_button_tag t('.next')
@@ -0,0 +1,21 @@
1
+ !!! XML
2
+ !!!
3
+ %html{ :xmlns => 'http://www.w3.org/1999/xhtml' }
4
+ %head
5
+ %title= yield(:head_title) || escape_once("#{Locomotive.config.name} — #{current_site.name}")
6
+
7
+ = include_javascripts :box
8
+ = include_stylesheets :box, :media => 'screen'
9
+
10
+ / [if IE]
11
+ = include_stylesheets :ie, :media => 'screen'
12
+
13
+ = yield :head
14
+
15
+ %body{ :class => controller.controller_name }
16
+ #wrapper
17
+ #light.container
18
+ #panel.container
19
+ %h1!= title
20
+
21
+ = yield
@@ -1,7 +1,7 @@
1
1
  - title link_to(@account.name.blank? ? @account.name_was : @account.name, '#', :rel => 'my_account_name', :title => t('.ask_for_name'), :class => 'editable')
2
2
 
3
3
  - content_for :head do
4
- = javascript_include_tag 'admin/account'
4
+ = include_javascripts :account
5
5
 
6
6
  - content_for :submenu do
7
7
  = render 'admin/shared/menu/settings'
@@ -1,7 +1,6 @@
1
1
  - content_for :head do
2
- = javascript_include_tag 'admin/plugins/tiny_mce/tinymce', 'admin/plugins/codemirror/codemirror', 'admin/pages', 'admin/editable_elements'
3
- = stylesheet_link_tag 'admin/editable_elements'
4
- = image_picker_include_tags
2
+ = include_javascripts :image_picker, :edit_page
3
+ = include_stylesheets :editable_elements, :fancybox
5
4
 
6
5
  = f.foldable_inputs :name => :information do
7
6
 
@@ -1,5 +1,7 @@
1
1
  %li{ :id => "item-#{page.id}", :class => "#{'not-found' if page.not_found? } #{'templatized' if page.templatized?}"}
2
- - if not page.index? and not page.children.empty?
2
+ - with_children = !page.children.empty?
3
+
4
+ - if not page.index? and with_children
3
5
  = image_tag 'admin/list/icons/node_closed.png', :class => 'toggler'
4
6
  %em
5
7
  %strong= link_to truncate(page.title, :length => 80), edit_admin_page_url(page)
@@ -11,6 +13,6 @@
11
13
  - if not page.index? and not page.not_found?
12
14
  = link_to image_tag('admin/list/icons/trash.png'), admin_page_url(page), :class => 'remove', :confirm => t('admin.messages.confirm'), :method => :delete
13
15
 
14
- - if not page.children.empty?
16
+ - if with_children
15
17
  %ul{ :id => "folder-#{page._id}", :class => "folder depth-#{(page.depth || 0) + 1}", :data_url => sort_admin_page_url(page), :style => "display: #{cookies["folder-#{page._id}"] || 'block'}" }
16
18
  = render page.children
@@ -1,7 +1,7 @@
1
1
  - title t('.title')
2
2
 
3
3
  - content_for :head do
4
- = javascript_include_tag 'admin/pages'
4
+ = include_javascripts :pages
5
5
 
6
6
  - content_for :submenu do
7
7
  = render 'admin/shared/menu/contents'
@@ -5,7 +5,7 @@
5
5
  = f.hidden_field :reset_password_token
6
6
 
7
7
  .inner
8
- = login_flash_message
8
+ = box_flash_message
9
9
 
10
10
  = f.inputs do
11
11
  = f.input :password, :label => t('.password'), :required => false
@@ -15,4 +15,4 @@
15
15
  = link_to preserve(t('.link')), new_admin_session_path
16
16
 
17
17
  .footer
18
- = login_button_tag t('admin.buttons.change_password')
18
+ = box_button_tag t('admin.buttons.change_password')
@@ -5,7 +5,7 @@
5
5
  = f.hidden_field :reset_password_token
6
6
 
7
7
  .inner
8
- = login_flash_message
8
+ = box_flash_message
9
9
 
10
10
  = f.inputs do
11
11
  = f.input :email, :label => t('.email'), :required => false
@@ -14,4 +14,4 @@
14
14
  = link_to preserve(t('.link')), new_admin_session_path
15
15
 
16
16
  .footer
17
- = login_button_tag t('admin.buttons.send_password')
17
+ = box_button_tag t('admin.buttons.send_password')
@@ -4,7 +4,7 @@
4
4
  = f.hidden_field :remember_me, :value => 'true'
5
5
 
6
6
  .inner
7
- = login_flash_message
7
+ = box_flash_message
8
8
 
9
9
  = f.inputs do
10
10
  = f.input :email, :label => t('.email'), :required => false
@@ -14,4 +14,4 @@
14
14
  = link_to t('.link'), new_admin_password_path
15
15
 
16
16
  .footer
17
- = login_button_tag t('admin.buttons.login')
17
+ = box_button_tag t('admin.buttons.login')
@@ -4,13 +4,12 @@
4
4
 
5
5
  %meta{ :name => 'locale', :content => I18n.locale }
6
6
 
7
- = stylesheet_link_tag 'admin/blueprint/screen', :media => 'screen'
8
- / [if IE]
9
- = stylesheet_link_tag 'admin/blueprint/ie', :media => 'screen'
7
+ = include_javascripts :common
10
8
 
11
- = stylesheet_link_tag 'admin/layout', 'admin/jquery/ui', 'admin/plugins/toggle', 'admin/plugins/selectmenu', 'admin/menu', 'admin/plugins/toggle','admin/buttons', 'admin/formtastic', 'admin/formtastic_changes', 'admin/application', :media => 'screen', :cache => Rails.env.production? && !Locomotive.heroku?
9
+ = include_stylesheets :common, :media => 'screen'
12
10
 
13
- = javascript_include_tag 'admin/jquery', 'admin/jquery.ui', 'admin/rails', 'admin/utils', 'admin/plugins/subscribe', 'admin/plugins/shortcut', 'admin/plugins/toggle', 'admin/plugins/growl', 'admin/plugins/cookie', 'admin/plugins/selectmenu', 'admin/application', 'admin/locales/datepicker_fr', :cache => Rails.env.production? && !Locomotive.heroku?
11
+ / [if IE]
12
+ = include_stylesheets :ie, :media => 'screen'
14
13
 
15
14
  %script{ :type => 'text/javascript' }
16
15
  = find_and_preserve(growl_message)
@@ -5,7 +5,7 @@
5
5
  .inner
6
6
  %h2!= t('admin.pages.index.lastest_items')
7
7
  %ul
8
- - current_site.pages.latest_updated.each do |page|
8
+ - current_site.pages.latest_updated.minimal_attributes.each do |page|
9
9
  %li
10
10
  = link_to truncate(page.title, :length => 25), edit_admin_page_url(page)
11
11
  %span= time_ago_in_words(page.updated_at)
@@ -1,5 +1,5 @@
1
1
  - content_for :head do
2
- = javascript_include_tag 'admin/site'
2
+ = include_javascripts :site
3
3
 
4
4
  = f.foldable_inputs :name => :information, :style => "#{'display: none' unless @site.new_record?}" do
5
5
  = f.input :name, :required => false
@@ -18,7 +18,7 @@
18
18
  %li{ :class => "item added #{'last' if index == @site.domains.size - 1}"}
19
19
  %em
20
20
  http://
21
- = text_field_tag 'site[domains][]', name
21
+ = text_field_tag 'site[domains][]', name, :class => 'string label void domain'
22
22
   
23
23
  = error_on_domain(@site, name)
24
24
  %span.actions
@@ -27,7 +27,7 @@
27
27
  %li.item.template
28
28
  %em
29
29
  http://
30
- = text_field_tag 'label', t('formtastic.hints.site.domain_name'), :class => 'string label void'
30
+ = text_field_tag 'label', t('formtastic.hints.site.domain_name'), :class => 'string label void domain'
31
31
   
32
32
  %span.actions
33
33
  = link_to image_tag('admin/form/icons/trash.png'), '#', :class => 'remove first', :confirm => t('admin.messages.confirm')
@@ -1,6 +1,6 @@
1
1
  - content_for :head do
2
- = javascript_include_tag 'admin/plugins/codemirror/codemirror', 'admin/snippets.js'
3
- = image_picker_include_tags
2
+ = include_javascripts :image_picker, :snippets
3
+ = include_stylesheets :fancybox
4
4
 
5
5
  = f.inputs :name => :information do
6
6
  = f.input :name
@@ -1,6 +1,6 @@
1
1
  - content_for :head do
2
- = javascript_include_tag 'admin/plugins/codemirror/codemirror', 'admin/theme_assets.js'
3
- = image_picker_include_tags
2
+ = include_javascripts :image_picker, :theme_assets
3
+ = include_stylesheets :fancybox
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('.no_items', :url => new_admin_snippet_url)
15
+ %p.no-items!= t('admin.snippets.index.no_items', :url => new_admin_snippet_url)
16
16
  - else
17
17
  %ul.list.theme-assets
18
18
  = render @snippets
@@ -1,7 +1,5 @@
1
1
  require File.expand_path('../boot', __FILE__)
2
2
 
3
- # require 'rails/all'
4
-
5
3
  require "action_controller/railtie"
6
4
  require "action_mailer/railtie"
7
5
  require "active_resource/railtie"
@@ -47,6 +45,6 @@ module Locomotive
47
45
  # Configure sensitive parameters which will be filtered from the log file.
48
46
  config.filter_parameters << :password
49
47
 
50
- config.middleware.insert_after ::ActionDispatch::Static, '::Locomotive::Middlewares::Fonts', :path => %r{^/fonts}
48
+ config.middleware.insert_after Rack::Lock, '::Locomotive::Middlewares::Fonts', :path => %r{^/fonts}
51
49
  end
52
50
  end
@@ -0,0 +1,96 @@
1
+ embed_assets: off
2
+
3
+ s3_bucket: <%= ENV['S3_BUCKET'] %>
4
+ s3_access_key_id: <%= ENV['S3_KEY_ID'] %>
5
+ s3_secret_access_key: <%= ENV['S3_SECRET_KEY'] %>
6
+
7
+ javascripts:
8
+ box:
9
+ - public/javascripts/admin/jquery.js
10
+ common:
11
+ - public/javascripts/admin/jquery.js
12
+ - public/javascripts/admin/jquery.ui.js
13
+ - public/javascripts/admin/rails.js
14
+ - public/javascripts/admin/utils.js
15
+ - public/javascripts/admin/plugins/subscribe.js
16
+ - public/javascripts/admin/plugins/shortcut.js
17
+ - public/javascripts/admin/plugins/toggle.js
18
+ - public/javascripts/admin/plugins/growl.js
19
+ - public/javascripts/admin/plugins/cookie.js
20
+ - public/javascripts/admin/plugins/selectmenu.js
21
+ - public/javascripts/admin/locales/datepicker_fr.js
22
+ - public/javascripts/admin/application.js
23
+ custom_fields:
24
+ - public/javascripts/admin/plugins/fancybox.js
25
+ - public/javascripts/admin/custom_fields.js
26
+ edit_custom_fields:
27
+ - public/javascripts/admin/plugins/tiny_mce/tinymce.js
28
+ - public/javascripts/admin/plugins/json2.js
29
+ - public/javascripts/admin/plugins/fancybox.js
30
+ - public/javascripts/admin/custom_fields/category.js
31
+ asset_collections:
32
+ - public/javascripts/admin/plugins/fancybox.js
33
+ - public/javascripts/admin/custom_fields.js
34
+ - public/javascripts/admin/asset_collections.js
35
+ assets:
36
+ - public/javascripts/admin/assets.js
37
+ contents:
38
+ - public/javascripts/admin/plugins/tiny_mce/tinymce.js
39
+ - public/javascripts/admin/contents.js
40
+ content_types:
41
+ - public/javascripts/admin/content_types.js
42
+ site:
43
+ - public/javascripts/admin/site.js
44
+ import:
45
+ - public/javascripts/admin/plugins/json2.js
46
+ - public/javascripts/admin/plugins/smartupdater.js
47
+ - public/javascripts/admin/import.js
48
+ account:
49
+ - public/javascripts/admin/account.js
50
+ pages:
51
+ - public/javascripts/admin/pages.js
52
+ edit_page:
53
+ - public/javascripts/admin/plugins/tiny_mce/tinymce.js
54
+ - public/javascripts/admin/editable_elements.js
55
+ - public/javascripts/admin/pages.js
56
+ image_picker:
57
+ - public/javascripts/admin/plugins/json2.js
58
+ - public/javascripts/admin/plugins/scrollTo.js
59
+ - public/javascripts/admin/plugins/codemirror/codemirror.js
60
+ - public/javascripts/admin/plugins/fancybox.js
61
+ - public/javascripts/admin/plugins/plupload/plupload.full.js
62
+ - public/javascripts/admin/plugins/imagepicker.js
63
+ snippets:
64
+ - public/javascripts/admin/snippets.js
65
+ theme_assets:
66
+ - public/javascripts/admin/theme_assets.js
67
+
68
+ stylesheets:
69
+ ie:
70
+ - public/stylesheets/admin/blueprint/ie.css
71
+ box:
72
+ - public/stylesheets/admin/blueprint/screen.css
73
+ - public/stylesheets/admin/box.css
74
+ - public/stylesheets/admin/safari.css
75
+ common:
76
+ - public/stylesheets/admin/blueprint/screen.css
77
+ - public/stylesheets/admin/layout.css
78
+ - public/stylesheets/admin/jquery/ui.css
79
+ - public/stylesheets/admin/plugins/toggle.css
80
+ - public/stylesheets/admin/plugins/selectmenu.css
81
+ - public/stylesheets/admin/menu.css
82
+ - public/stylesheets/admin/buttons.css
83
+ - public/stylesheets/admin/formtastic.css
84
+ - public/stylesheets/admin/formtastic_changes.css
85
+ - public/stylesheets/admin/application.css
86
+ - public/stylesheets/admin/safari.css
87
+ fancybox:
88
+ - public/stylesheets/admin/plugins/fancybox.css
89
+ - public/stylesheets/admin/fancybox_changes.css
90
+ custom_fields:
91
+ - public/stylesheets/admin/plugins/fancybox.css
92
+ - public/stylesheets/admin/box.css
93
+ installation:
94
+ - public/stylesheets/admin/installation.css
95
+ editable_elements:
96
+ - public/stylesheets/admin/editable_elements.css
@@ -27,9 +27,4 @@ Locomotive::Application.configure do
27
27
  :port => 1025,
28
28
  :domain => "example.com"
29
29
  }
30
- end
31
-
32
- CarrierWave.configure do |config|
33
- config.storage = :file
34
- config.root = File.join(Rails.root, 'public')
35
- end
30
+ 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,8 +32,4 @@ Locomotive::Application.configure do
32
32
 
33
33
  # Print deprecation notices to the stderr
34
34
  config.active_support.deprecation = :stderr
35
- end
36
-
37
- CarrierWave.configure do |config|
38
- config.storage = :file
39
- end
35
+ end
@@ -0,0 +1,17 @@
1
+ CarrierWave.configure do |config|
2
+
3
+ case Rails.env.to_sym
4
+
5
+ when :development
6
+ config.storage = :file
7
+ config.root = File.join(Rails.root, 'public')
8
+
9
+ when :production
10
+ config.storage = :s3
11
+ config.s3_access_key_id = ENV['S3_KEY_ID']
12
+ config.s3_secret_access_key = ENV['S3_SECRET_KEY']
13
+ config.s3_bucket = ENV['S3_BUCKET']
14
+ # config.s3_cname = 'ENV['S3_CNAME']
15
+ end
16
+
17
+ end
@@ -4,6 +4,12 @@ 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'
7
13
  config.default_domain = 'example.com'
8
14
 
9
15
  # configure how many items we display in sub menu in the "Contents" section.
@@ -25,4 +31,12 @@ Locomotive.configure do |config|
25
31
  # Ex:
26
32
  # config.heroku = { :name => '<my heroku app name>', :login => 'john@doe.net', :password => 'easy' }
27
33
  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
28
42
  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: <strong>%{url}</strong>"
177
+ help: "This asset is accessible from the following url: <a href='%{url}'>%{url}</a>"
178
178
  form:
179
179
  picker_link: Insert a file into the code
180
180
  choose_file: Choose file
@@ -220,6 +220,7 @@ en:
220
220
  new_item: new item
221
221
  form:
222
222
  order_by:
223
+ created_at: 'By "created at" date'
223
224
  updated_at: 'By "updated at" date'
224
225
  position_in_list: Manually
225
226
 
@@ -266,6 +267,33 @@ en:
266
267
  success: "Your site was successfully updated."
267
268
  failure: "The import did not work."
268
269
 
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
+
269
297
  formtastic:
270
298
  titles:
271
299
  information: General information
@@ -298,6 +326,8 @@ en:
298
326
  import:
299
327
  new:
300
328
  source: File
329
+ samples: Copy samples
330
+ reset: Reset site
301
331
 
302
332
  hints:
303
333
  page:
@@ -320,4 +350,6 @@ en:
320
350
  hint: "Text displayed in the model form just below the field"
321
351
  import:
322
352
  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"
323
355