constructor-cms 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (305) hide show
  1. data/.idea/.name +1 -0
  2. data/.idea/constructor.iml +62 -0
  3. data/.idea/encodings.xml +5 -0
  4. data/.idea/misc.xml +5 -0
  5. data/.idea/modules.xml +9 -0
  6. data/.idea/scopes/scope_settings.xml +5 -0
  7. data/.idea/vcs.xml +7 -0
  8. data/.idea/workspace.xml +873 -0
  9. data/.rspec +2 -0
  10. data/cap/app/assets/images/constructor_cap/cross.png +0 -0
  11. data/cap/app/assets/images/constructor_cap/page_white_edit.png +0 -0
  12. data/cap/app/controllers/constructor_cap/emails_controller.rb +71 -0
  13. data/cap/app/models/constructor_cap/email.rb +15 -0
  14. data/cap/app/views/constructor_cap/emails/_form.haml +17 -0
  15. data/cap/app/views/constructor_cap/emails/edit.haml +5 -0
  16. data/cap/app/views/constructor_cap/emails/index.haml +27 -0
  17. data/cap/app/views/constructor_cap/emails/new.haml +5 -0
  18. data/cap/app/views/constructor_cap/emails/show.haml +54 -0
  19. data/cap/config/initializers/admin_menu.rb +4 -0
  20. data/cap/config/locales/ru.yml +23 -0
  21. data/cap/config/routes.rb +9 -0
  22. data/cap/constructor-cap.gemspec +19 -0
  23. data/cap/db/migrate/20110510182404_create_emails.rb +12 -0
  24. data/cap/lib/constructor-cap.rb +2 -0
  25. data/cap/lib/constructor_cap/engine.rb +6 -0
  26. data/config/routes.rb +4 -0
  27. data/constructor-cms.gemspec +21 -0
  28. data/core/app/assets/images/constructor_core/glyphicons-halflings-white.png +0 -0
  29. data/core/app/assets/images/constructor_core/glyphicons-halflings.png +0 -0
  30. data/core/app/assets/images/constructor_core/minus.gif +0 -0
  31. data/core/app/assets/images/constructor_core/plus.gif +0 -0
  32. data/core/app/assets/images/constructor_core/rss.png +0 -0
  33. data/core/app/assets/images/constructor_core/treeview-black-line.gif +0 -0
  34. data/core/app/assets/images/constructor_core/treeview-black.gif +0 -0
  35. data/core/app/assets/images/constructor_core/treeview-default-line.gif +0 -0
  36. data/core/app/assets/images/constructor_core/treeview-default.gif +0 -0
  37. data/core/app/assets/images/constructor_core/treeview-famfamfam-line.gif +0 -0
  38. data/core/app/assets/images/constructor_core/treeview-famfamfam.gif +0 -0
  39. data/core/app/assets/images/constructor_core/treeview-gray-line.gif +0 -0
  40. data/core/app/assets/images/constructor_core/treeview-gray.gif +0 -0
  41. data/core/app/assets/images/constructor_core/treeview-red-line.gif +0 -0
  42. data/core/app/assets/images/constructor_core/treeview-red.gif +0 -0
  43. data/core/app/assets/images/constructor_core/twitter.png +0 -0
  44. data/core/app/assets/images/constructor_core/widgets.png +0 -0
  45. data/core/app/assets/javascripts/constructor_core/application.js.coffee +57 -0
  46. data/core/app/assets/javascripts/constructor_core/bootstrap.js +2276 -0
  47. data/core/app/assets/javascripts/constructor_core/jquery.cookie.js +92 -0
  48. data/core/app/assets/javascripts/constructor_core/jquery.treeview.js +256 -0
  49. data/core/app/assets/javascripts/constructor_core/jquery_bundle.js.coffee +4 -0
  50. data/core/app/assets/javascripts/constructor_core/urlify.js +82 -0
  51. data/core/app/assets/stylesheets/constructor_core/application.css.scss +57 -0
  52. data/core/app/assets/stylesheets/constructor_core/bootstrap-responsive.css +1109 -0
  53. data/core/app/assets/stylesheets/constructor_core/bootstrap.css +6158 -0
  54. data/core/app/assets/stylesheets/constructor_core/jquery.treeview.css +73 -0
  55. data/core/app/controllers/constructor_core/admin_controller.rb +6 -0
  56. data/core/app/controllers/constructor_core/sessions_controller.rb +15 -0
  57. data/core/app/helpers/constructor_core/devise_helper.rb +24 -0
  58. data/core/app/models/constructor_core/user.rb +10 -0
  59. data/core/app/views/constructor_core/devise/confirmations/new.html.haml +10 -0
  60. data/core/app/views/constructor_core/devise/mailer/confirmation_instructions.html.haml +5 -0
  61. data/core/app/views/constructor_core/devise/mailer/reset_password_instructions.html.haml +7 -0
  62. data/core/app/views/constructor_core/devise/mailer/unlock_instructions.html.haml +5 -0
  63. data/core/app/views/constructor_core/devise/passwords/edit.html.haml +21 -0
  64. data/core/app/views/constructor_core/devise/passwords/new.html.haml +13 -0
  65. data/core/app/views/constructor_core/devise/registrations/edit.html.haml +28 -0
  66. data/core/app/views/constructor_core/devise/registrations/new.html.haml +20 -0
  67. data/core/app/views/constructor_core/devise/shared/_links.html.haml +19 -0
  68. data/core/app/views/constructor_core/devise/unlocks/new.html.haml +9 -0
  69. data/core/app/views/constructor_core/sessions/new.html.haml +24 -0
  70. data/core/app/views/layouts/constructor_core/application_admin.haml +65 -0
  71. data/core/config/environments/production.rb +3 -0
  72. data/core/config/initializers/devise.rb +223 -0
  73. data/core/config/locales/devise.en.yml +56 -0
  74. data/core/config/locales/devise.ru.yml +52 -0
  75. data/core/config/locales/ru.yml +12 -0
  76. data/core/config/routes.rb +9 -0
  77. data/core/constructor-core.gemspec +16 -0
  78. data/core/db/migrate/1_devise_users.rb +56 -0
  79. data/core/db/migrate/2_add_default_user.rb +9 -0
  80. data/core/lib/constructor-core.rb +23 -0
  81. data/core/lib/constructor_core/engine.rb +6 -0
  82. data/core/spec/factories.rb +2 -0
  83. data/core/spec/lib/nav/group_spec.rb +61 -0
  84. data/core/spec/lib/nav/item_spec.rb +151 -0
  85. data/core/spec/lib/nav_lib_spec.rb +60 -0
  86. data/core/spec/spec_helper.rb +34 -0
  87. data/core/vendor/assets/javascripts/.gitkeep +0 -0
  88. data/core/vendor/assets/javascripts/ckeditor/ckeditor.js +913 -0
  89. data/core/vendor/assets/javascripts/ckeditor/config.js +38 -0
  90. data/core/vendor/assets/javascripts/ckeditor/lang/en.js +5 -0
  91. data/core/vendor/assets/javascripts/ckeditor/lang/ru.js +5 -0
  92. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
  93. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
  94. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +9 -0
  95. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +9 -0
  96. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +9 -0
  97. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +10 -0
  98. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +9 -0
  99. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +9 -0
  100. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +10 -0
  101. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +10 -0
  102. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +9 -0
  103. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +10 -0
  104. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +10 -0
  105. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +9 -0
  106. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +9 -0
  107. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +10 -0
  108. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +10 -0
  109. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +9 -0
  110. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +9 -0
  111. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +9 -0
  112. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +9 -0
  113. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +9 -0
  114. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +10 -0
  115. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
  116. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +9 -0
  117. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +10 -0
  118. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +9 -0
  119. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +10 -0
  120. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +9 -0
  121. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +9 -0
  122. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +9 -0
  123. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +10 -0
  124. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +9 -0
  125. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +10 -0
  126. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +9 -0
  127. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +9 -0
  128. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +9 -0
  129. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +9 -0
  130. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +10 -0
  131. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +9 -0
  132. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +10 -0
  133. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +9 -0
  134. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +10 -0
  135. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +9 -0
  136. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +9 -0
  137. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +9 -0
  138. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +7 -0
  139. data/core/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +6 -0
  140. data/core/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  141. data/core/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
  142. data/core/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +13 -0
  143. data/core/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  144. data/core/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +9 -0
  145. data/core/vendor/assets/javascripts/ckeditor/plugins/fakeobjects/images/spacer.gif +0 -0
  146. data/core/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +24 -0
  147. data/core/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
  148. data/core/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +10 -0
  149. data/core/vendor/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png +0 -0
  150. data/core/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +43 -0
  151. data/core/vendor/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
  152. data/core/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +8 -0
  153. data/core/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +36 -0
  154. data/core/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
  155. data/core/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +10 -0
  156. data/core/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
  157. data/core/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +31 -0
  158. data/core/vendor/assets/javascripts/ckeditor/plugins/preview/preview.html +10 -0
  159. data/core/vendor/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +28 -0
  160. data/core/vendor/assets/javascripts/ckeditor/plugins/scayt/README.md +25 -0
  161. data/core/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +20 -0
  162. data/core/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
  163. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  164. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  165. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  166. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  167. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  168. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  169. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  170. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  171. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  172. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  173. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  174. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
  175. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +13 -0
  176. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
  177. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
  178. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
  179. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
  180. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
  181. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
  182. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
  183. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
  184. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
  185. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +11 -0
  186. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +13 -0
  187. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
  188. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
  189. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
  190. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
  191. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
  192. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
  193. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
  194. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
  195. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
  196. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
  197. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
  198. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
  199. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
  200. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
  201. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
  202. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
  203. data/core/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +21 -0
  204. data/core/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +16 -0
  205. data/core/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +84 -0
  206. data/core/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +10 -0
  207. data/core/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +6 -0
  208. data/core/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  209. data/core/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  210. data/core/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  211. data/core/vendor/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +28 -0
  212. data/core/vendor/assets/javascripts/ckeditor/plugins/wsc/README.md +25 -0
  213. data/core/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +49 -0
  214. data/core/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  215. data/core/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
  216. data/core/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +11 -0
  217. data/core/vendor/assets/javascripts/ckeditor/styles.js +111 -0
  218. data/core/vendor/assets/stylesheets/.gitkeep +0 -0
  219. data/core/vendor/assets/stylesheets/ckeditor/contents.css +103 -0
  220. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/dialog.css +5 -0
  221. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/dialog_ie.css +5 -0
  222. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/dialog_ie7.css +5 -0
  223. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/dialog_ie8.css +5 -0
  224. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/dialog_opera.css +5 -0
  225. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/editor.css +5 -0
  226. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/editor_gecko.css +5 -0
  227. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/editor_ie.css +5 -0
  228. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/editor_ie7.css +5 -0
  229. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/editor_ie8.css +5 -0
  230. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/icons.png +0 -0
  231. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/images/arrow.png +0 -0
  232. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/images/close.png +0 -0
  233. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/images/mini.png +0 -0
  234. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/readme.md +51 -0
  235. data/lib/constructor/engine.rb +6 -0
  236. data/lib/constructor-cms.rb +3 -0
  237. data/pages/app/assets/images/constructor_pages/arrow_down.png +0 -0
  238. data/pages/app/assets/images/constructor_pages/arrow_up.png +0 -0
  239. data/pages/app/assets/images/constructor_pages/information.png +0 -0
  240. data/pages/app/assets/images/constructor_pages/page_white_edit.png +0 -0
  241. data/pages/app/assets/images/constructor_pages/photos.png +0 -0
  242. data/pages/app/controllers/constructor_pages/fields_controller.rb +60 -0
  243. data/pages/app/controllers/constructor_pages/pages_controller.rb +207 -0
  244. data/pages/app/controllers/constructor_pages/templates_controller.rb +71 -0
  245. data/pages/app/helpers/constructor_pages/fields_helper.rb +18 -0
  246. data/pages/app/helpers/constructor_pages/pages_helper.rb +15 -0
  247. data/pages/app/helpers/constructor_pages/templates_helper.rb +11 -0
  248. data/pages/app/models/constructor_pages/field.rb +60 -0
  249. data/pages/app/models/constructor_pages/page.rb +117 -0
  250. data/pages/app/models/constructor_pages/template.rb +30 -0
  251. data/pages/app/models/constructor_pages/types/boolean_type.rb +12 -0
  252. data/pages/app/models/constructor_pages/types/date_type.rb +16 -0
  253. data/pages/app/models/constructor_pages/types/float_type.rb +12 -0
  254. data/pages/app/models/constructor_pages/types/html_type.rb +12 -0
  255. data/pages/app/models/constructor_pages/types/image_type.rb +18 -0
  256. data/pages/app/models/constructor_pages/types/integer_type.rb +12 -0
  257. data/pages/app/models/constructor_pages/types/string_type.rb +12 -0
  258. data/pages/app/models/constructor_pages/types/text_type.rb +12 -0
  259. data/pages/app/views/constructor_pages/fields/_form.haml +28 -0
  260. data/pages/app/views/constructor_pages/fields/edit.haml +6 -0
  261. data/pages/app/views/constructor_pages/fields/new.haml +6 -0
  262. data/pages/app/views/constructor_pages/fields/types/_boolean.haml +1 -0
  263. data/pages/app/views/constructor_pages/fields/types/_date.haml +1 -0
  264. data/pages/app/views/constructor_pages/fields/types/_float.haml +1 -0
  265. data/pages/app/views/constructor_pages/fields/types/_html.haml +1 -0
  266. data/pages/app/views/constructor_pages/fields/types/_image.haml +4 -0
  267. data/pages/app/views/constructor_pages/fields/types/_integer.haml +1 -0
  268. data/pages/app/views/constructor_pages/fields/types/_string.haml +1 -0
  269. data/pages/app/views/constructor_pages/fields/types/_text.haml +1 -0
  270. data/pages/app/views/constructor_pages/pages/_breadcrumbs.haml +7 -0
  271. data/pages/app/views/constructor_pages/pages/_form.haml +98 -0
  272. data/pages/app/views/constructor_pages/pages/_menu.haml +8 -0
  273. data/pages/app/views/constructor_pages/pages/_submenu.haml +6 -0
  274. data/pages/app/views/constructor_pages/pages/edit.haml +6 -0
  275. data/pages/app/views/constructor_pages/pages/error_404.haml +23 -0
  276. data/pages/app/views/constructor_pages/pages/index.haml +50 -0
  277. data/pages/app/views/constructor_pages/pages/new.haml +6 -0
  278. data/pages/app/views/constructor_pages/pages/show.haml +5 -0
  279. data/pages/app/views/constructor_pages/pages/sitemap.haml +12 -0
  280. data/pages/app/views/constructor_pages/templates/_form.haml +48 -0
  281. data/pages/app/views/constructor_pages/templates/edit.haml +6 -0
  282. data/pages/app/views/constructor_pages/templates/index.haml +38 -0
  283. data/pages/app/views/constructor_pages/templates/new.haml +6 -0
  284. data/pages/config/initializers/dragonfly.rb +9 -0
  285. data/pages/config/locales/ru.yml +39 -0
  286. data/pages/config/routes.rb +34 -0
  287. data/pages/constructor-pages.gemspec +21 -0
  288. data/pages/db/migrate/10_create_html_types.rb +15 -0
  289. data/pages/db/migrate/11_create_image_types.rb +16 -0
  290. data/pages/db/migrate/12_add_default_template.rb +13 -0
  291. data/pages/db/migrate/1_create_pages.rb +27 -0
  292. data/pages/db/migrate/2_create_templates.rb +18 -0
  293. data/pages/db/migrate/3_create_fields.rb +17 -0
  294. data/pages/db/migrate/4_create_string_types.rb +15 -0
  295. data/pages/db/migrate/5_create_float_types.rb +15 -0
  296. data/pages/db/migrate/6_create_boolean_types.rb +15 -0
  297. data/pages/db/migrate/7_create_integer_types.rb +15 -0
  298. data/pages/db/migrate/8_create_text_types.rb +15 -0
  299. data/pages/db/migrate/9_create_date_types.rb +15 -0
  300. data/pages/lib/constructor-pages.rb +7 -0
  301. data/pages/lib/constructor_pages/engine.rb +6 -0
  302. data/pages/public/hello.txt +1 -0
  303. data/pages/spec/factories.rb +7 -0
  304. data/pages/spec/models/page_model_spec.rb +113 -0
  305. metadata +396 -0
@@ -0,0 +1,73 @@
1
+ .treeview, .treeview ul {
2
+ padding: 0;
3
+ margin: 0;
4
+ list-style: none;
5
+ }
6
+
7
+ .treeview ul {
8
+ margin-top: 4px;
9
+ }
10
+
11
+ .treeview .hitarea {
12
+ background: url(/assets/constructor_core/treeview-default.gif) -64px -25px no-repeat;
13
+ height: 16px;
14
+ width: 16px;
15
+ margin-left: -16px;
16
+ float: left;
17
+ cursor: pointer;
18
+ }
19
+ /* fix for IE6 */
20
+ * html .hitarea {
21
+ display: inline;
22
+ float:none;
23
+ }
24
+
25
+ .treeview li {
26
+ margin: 0;
27
+ padding: 3px 0pt 10px 16px;
28
+ }
29
+
30
+ .treeview a.selected {
31
+ background-color: #eee;
32
+ }
33
+
34
+ #treecontrol { margin: 1em 0; display: none; }
35
+
36
+ .treeview .hover { cursor: pointer; }
37
+
38
+ .treeview li { background: url(/assets/constructor_core/treeview-default-line.gif) 0 0 no-repeat; }
39
+ .treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; }
40
+
41
+ .treeview .expandable-hitarea { background-position: -80px -3px; }
42
+
43
+ .treeview li.last { background-position: 0 -1766px }
44
+ .treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(/assets/constructor_core/treeview-default.gif); }
45
+ .treeview li.lastCollapsable { background-position: 0 -111px }
46
+ .treeview li.lastExpandable { background-position: -32px -67px }
47
+
48
+ .treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; }
49
+
50
+ .treeview-red li { background-image: url(/assets/constructor_core/treeview-red-line.gif); }
51
+ .treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(/assets/constructor_core/treeview-red.gif); }
52
+
53
+ .treeview-black li { background-image: url(/assets/constructor_core/treeview-black-line.gif); }
54
+ .treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(/assets/constructor_core/treeview-black.gif); }
55
+
56
+ .treeview-gray li { background-image: url(/assets/constructor_core/treeview-gray-line.gif); }
57
+ .treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(/assets/constructor_core/treeview-gray.gif); }
58
+
59
+ .treeview-famfamfam li { background-image: url(/assets/constructor_core/treeview-famfamfam-line.gif); }
60
+ .treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(/assets/constructor_core/treeview-famfamfam.gif); }
61
+
62
+ .treeview .placeholder {
63
+ background: url(/assets/constructor_core/ajax-loader.gif) 0 0 no-repeat;
64
+ height: 16px;
65
+ width: 16px;
66
+ display: block;
67
+ }
68
+
69
+ .filetree li { padding: 3px 0 2px 16px; }
70
+ .filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; }
71
+ .filetree span.folder { background: url(/assets/constructor_core/folder.gif) 0 0 no-repeat; }
72
+ .filetree li.expandable span.folder { background: url(/assets/constructor_core/folder-closed.gif) 0 0 no-repeat; }
73
+ .filetree span.file { background: url(/assets/constructor_core/file.gif) 0 0 no-repeat; }
@@ -0,0 +1,6 @@
1
+ # encoding: utf-8
2
+
3
+ module ConstructorCore
4
+ class AdminController < ApplicationController
5
+ end
6
+ end
@@ -0,0 +1,15 @@
1
+ # encoding: utf-8
2
+
3
+ module ConstructorCore
4
+ class SessionsController < Devise::SessionsController
5
+ layout 'constructor_core/application_admin'
6
+
7
+ def after_sign_in_path_for(resource)
8
+ return '/admin/pages'
9
+ end
10
+
11
+ def after_sign_out_path_for(resource)
12
+ return '/'
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,24 @@
1
+ module ConstructorCore
2
+ # TODO
3
+ module DeviseHelper
4
+ def authenticate_user!
5
+ warden.authenticate!
6
+ end
7
+
8
+ def user_signed_in?
9
+ !!current_user
10
+ end
11
+
12
+ def current_user
13
+ @current_user ||= warden.authenticate(:scope => :constructor_auth_user)
14
+ end
15
+
16
+ def user_session
17
+ current_user && warden.session(:constructor_auth_user)
18
+ end
19
+
20
+ def warden
21
+ request.env['warden']
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,10 @@
1
+ # encoding: utf-8
2
+
3
+ module ConstructorCore
4
+ class User < ActiveRecord::Base
5
+ # Include default devise modules. Others available are:
6
+ devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable, :token_authenticatable, :timeoutable #:confirmable, :registerable, :omniauthable, :lockable, :encryptable
7
+ # Setup accessible (or protected) attributes for your model
8
+ attr_accessible :email, :password, :password_confirmation, :remember_me
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ %h2 Отправить инструкцию активации
2
+ = form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f|
3
+ = devise_error_messages!
4
+ %p
5
+ = f.label :email
6
+ %br/
7
+ = f.email_field :email
8
+ %p= f.submit "Отправить"
9
+ = render :partial => "devise/shared/links"
10
+
@@ -0,0 +1,5 @@
1
+ %p
2
+ Добро пожаловать, #{@resource.email}!
3
+ %p Для того чтобы подтвердить ваш аккаунт, пройдите по следующей ссылке:
4
+ %p= link_to 'Подтвердить аккаунт', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token)
5
+
@@ -0,0 +1,7 @@
1
+ %p
2
+ Привет, #{@resource.email}!
3
+ %p Вы сделали запрос на смену пароля. Для того чтобы изменить пароль пройдите по следующей ссылке:
4
+ %p= link_to 'Изменить пароль', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token)
5
+ %p Если Вы не делали запрос на изменение пароля, то проигнорируйте это письмо.
6
+ %p Ваш пароль останется прежним до тех пор пока вы не пройдете по ссылке.
7
+
@@ -0,0 +1,5 @@
1
+ %p
2
+ Hello #{@resource.email}!
3
+ %p Your account has been locked due to an excessive amount of unsuccessful sign in attempts.
4
+ %p Click the link below to unlock your account:
5
+ %p= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token)
@@ -0,0 +1,21 @@
1
+ - content_for :page_title do
2
+ Смена пароля
3
+
4
+ = form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f|
5
+ = devise_error_messages!
6
+ = f.hidden_field :reset_password_token
7
+ .clearfix
8
+ = f.label :password, "Новый пароль"
9
+ .input
10
+ = f.password_field :password
11
+ .clearfix
12
+ = f.label :password_confirmation, "Еще раз"
13
+ .input
14
+ = f.password_field :password_confirmation
15
+ .clearfix
16
+ .input
17
+ = f.submit "Сменить пароль", :class => "btn primary"
18
+
19
+ - content_for :sidebar do
20
+ = render :partial => "devise/shared/links"
21
+
@@ -0,0 +1,13 @@
1
+ - content_for :page_title do
2
+ Восстановить пароль
3
+
4
+ = form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f|
5
+ = devise_error_messages!
6
+ .clearfix
7
+ = f.label :email, "Электропочта"
8
+ .input
9
+ = f.email_field :email
10
+ .clearfix
11
+ .input
12
+ = f.submit "Отправить", :class => "btn primary"
13
+
@@ -0,0 +1,28 @@
1
+ %h2
2
+ Редактивароние аккаунта #{resource_name.to_s.humanize}
3
+ = form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f|
4
+ = devise_error_messages!
5
+ %p
6
+ = f.label :email
7
+ %br/
8
+ = f.email_field :email
9
+ %p
10
+ = f.label :password
11
+ %i (оставьте пустым, если хотите сохранить пароль прежним)
12
+ %br/
13
+ = f.password_field :password
14
+ %p
15
+ = f.label :password_confirmation
16
+ %br/
17
+ = f.password_field :password_confirmation
18
+ %p
19
+ = f.label :current_password
20
+ %i (необходимо ввести ваш текущий пароль для подтверждения изменений)
21
+ %br/
22
+ = f.password_field :current_password
23
+ %p= f.submit "Сохранить"
24
+ %h3 Удалить мой аккаунт
25
+ %p
26
+ #{link_to "Удалить", registration_path(resource_name), :confirm => "Вы уверены?", :method => :delete}.
27
+ = link_to "Назад", :back
28
+
@@ -0,0 +1,20 @@
1
+ .register_form
2
+ %h2 Регистрация
3
+ = form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f|
4
+ = devise_error_messages!
5
+ %p.email
6
+ = f.label :email
7
+ %br/
8
+ = f.email_field :email
9
+ %p
10
+ = f.label :password
11
+ %br/
12
+ = f.password_field :password
13
+ %p
14
+ = f.label :password_confirmation
15
+ %br/
16
+ = f.password_field :password_confirmation
17
+ %p.button= f.submit "Зарегистрироваться"
18
+
19
+ .links
20
+ = render :partial => "devise/shared/links"
@@ -0,0 +1,19 @@
1
+ - if controller_name != 'sessions'
2
+ = link_to "Вход с паролем", auth.new_session_path(resource_name)
3
+ %br/
4
+ - if devise_mapping.registerable? && controller_name != 'registrations'
5
+ = link_to "Регистрация", auth.new_registration_path(resource_name)
6
+ %br/
7
+ - if devise_mapping.recoverable? && controller_name != 'passwords'
8
+ = link_to "Восстановление пароля", auth.new_password_path(resource_name)
9
+ %br/
10
+ - if devise_mapping.confirmable? && controller_name != 'confirmations'
11
+ = link_to "Если вы не получили инструкцию о том как подтвердить адрес электронной почты", new_confirmation_path(resource_name)
12
+ %br/
13
+ - if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
14
+ = link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name)
15
+ %br/
16
+ - if devise_mapping.omniauthable?
17
+ - resource_class.omniauth_providers.each do |provider|
18
+ = link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider)
19
+ %br/
@@ -0,0 +1,9 @@
1
+ %h2 Resend unlock instructions
2
+ = form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f|
3
+ = devise_error_messages!
4
+ %p
5
+ = f.label :email
6
+ %br/
7
+ = f.email_field :email
8
+ %p= f.submit "Resend unlock instructions"
9
+ = render :partial => "devise/shared/links"
@@ -0,0 +1,24 @@
1
+ - content_for :page_title do
2
+ Вход на сайт
3
+
4
+ = form_for(resource, :as => resource_name, :url => '/login') do |f|
5
+ .form-horizontal
6
+ .control-group
7
+ = f.label :email, :class => 'control-label'
8
+ .controls
9
+ = f.email_field :email
10
+ .control-group
11
+ = f.label :password, :class => 'control-label'
12
+ .controls
13
+ = f.password_field :password
14
+ - if devise_mapping.rememberable?
15
+ .control-group
16
+ .controls
17
+ %label.checkbox.inline{:for => 'remember_me'}
18
+ = f.check_box :remember_me
19
+ Запомнить меня
20
+ .controls
21
+ = f.submit "Войти", :class => "btn btn-primary"
22
+
23
+ - content_for :sidebar do
24
+ //= render :partial => "devise/shared/links"
@@ -0,0 +1,65 @@
1
+ !!!
2
+ %html{:lang => 'ru'}
3
+ %head
4
+ %meta{:charset => 'utf-8'}/
5
+ %meta{'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1'}/
6
+ %title Панель управления
7
+
8
+ %meta{:name => 'viewport', :content => 'width=device-width,initial-scale=1'}/
9
+
10
+ / [if lt IE 9]
11
+ %script{:src => "http://html5shim.googlecode.com/svn/trunk/html5.js"}
12
+
13
+ :javascript
14
+ var CKEDITOR_BASEPATH = '/assets/ckeditor/'
15
+
16
+ = stylesheet_link_tag "constructor_core/application"
17
+ = javascript_include_tag "constructor_core/application"
18
+ = csrf_meta_tag
19
+ = favicon_link_tag
20
+
21
+ %link{:rel => "apple-touch-icon", :href => "images/apple-touch-icon.png"}
22
+ %link{:rel => "apple-touch-icon", :sizes => "72x72", :href => "images/apple-touch-icon-72x72.png"}
23
+ %link{:rel => "apple-touch-icon", :sizes => "114x114", :href => "images/apple-touch-icon-114x114.png"}
24
+
25
+ %body
26
+ .navbar.navbar-fixed-top
27
+ .navbar-inner
28
+ .container-fluid
29
+ = link_to "Главная страница", "/", :class => "brand"
30
+ %a.btn.btn-navbar{'data-toggle' => "collapse", 'data-target' => ".nav-collapse"}
31
+ %span.icon-bar
32
+ %span.icon-bar
33
+ %span.icon-bar
34
+ .nav-collapse
35
+ %ul.nav
36
+ %li= link_to "Структура", "/admin/pages"
37
+ %li= link_to "Шаблоны", "/admin/templates"
38
+ %ul.nav.pull-right
39
+ %li
40
+ = link_to "Выйти", "/logout"
41
+
42
+ .container-fluid
43
+ .page-header
44
+ .row-fluid
45
+ .span4
46
+ %h3.muted= yield :page_title
47
+ .span4
48
+ - unless notice.nil?
49
+ .alert.fade.in
50
+ = link_to "×", "#", :class => "close", 'data-dismiss' => "alert"
51
+ = notice
52
+ - unless alert.nil?
53
+ .alert.alert-error.fade.in
54
+ = link_to "×", "#", :class => "close", 'data-dismiss' => "alert"
55
+ = alert
56
+
57
+ = yield :actions
58
+ .content
59
+ .row-fluid
60
+ = yield
61
+
62
+ / [if lt IE 7 ]
63
+ %script{:src => '//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js'}
64
+ %script
65
+ window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})
@@ -0,0 +1,3 @@
1
+ Rails.application.class.configure do
2
+ config.assets.precompile += ['ckeditor/*']
3
+ end
@@ -0,0 +1,223 @@
1
+ # Use this hook to configure devise mailer, warden hooks and so forth.
2
+ # Many of these configuration options can be set straight in your model.
3
+ Devise.setup do |config|
4
+ # ==> Mailer Configuration
5
+ # Configure the e-mail address which will be shown in Devise::Mailer,
6
+ # note that it will be overwritten if you use your own mailer class with default "from" parameter.
7
+ config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
8
+
9
+ # Configure the class responsible to send e-mails.
10
+ # config.mailer = "Devise::Mailer"
11
+
12
+ # Automatically apply schema changes in tableless databases
13
+ config.apply_schema = false
14
+
15
+ # ==> ORM configuration
16
+ # Load and configure the ORM. Supports :active_record (default) and
17
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
18
+ # available as additional gems.
19
+ require 'devise/orm/active_record'
20
+
21
+ # ==> Configuration for any authentication mechanism
22
+ # Configure which keys are used when authenticating a user. The default is
23
+ # just :email. You can configure it to use [:username, :subdomain], so for
24
+ # authenticating a user, both parameters are required. Remember that those
25
+ # parameters are used only when authenticating and not when retrieving from
26
+ # session. If you need permissions, you should implement that in a before filter.
27
+ # You can also supply a hash where the value is a boolean determining whether
28
+ # or not authentication should be aborted when the value is not present.
29
+ # config.authentication_keys = [ :email ]
30
+
31
+ # Configure parameters from the request object used for authentication. Each entry
32
+ # given should be a request method and it will automatically be passed to the
33
+ # find_for_authentication method and considered in your model lookup. For instance,
34
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
35
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
36
+ # config.request_keys = []
37
+
38
+ # Configure which authentication keys should be case-insensitive.
39
+ # These keys will be downcased upon creating or modifying a user and when used
40
+ # to authenticate or find a user. Default is :email.
41
+ config.case_insensitive_keys = [ :email ]
42
+
43
+ # Configure which authentication keys should have whitespace stripped.
44
+ # These keys will have whitespace before and after removed upon creating or
45
+ # modifying a user and when used to authenticate or find a user. Default is :email.
46
+ config.strip_whitespace_keys = [ :email ]
47
+
48
+ # Tell if authentication through request.params is enabled. True by default.
49
+ # It can be set to an array that will enable params authentication only for the
50
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
51
+ # enable it only for database (email + password) authentication.
52
+ # config.params_authenticatable = true
53
+
54
+ # Tell if authentication through HTTP Basic Auth is enabled. False by default.
55
+ # It can be set to an array that will enable http authentication only for the
56
+ # given strategies, for example, `config.http_authenticatable = [:token]` will
57
+ # enable it only for token authentication.
58
+ # config.http_authenticatable = false
59
+
60
+ # If http headers should be returned for AJAX requests. True by default.
61
+ # config.http_authenticatable_on_xhr = true
62
+
63
+ # The realm used in Http Basic Authentication. "Application" by default.
64
+ # config.http_authentication_realm = "Application"
65
+
66
+ # It will change confirmation, password recovery and other workflows
67
+ # to behave the same regardless if the e-mail provided was right or wrong.
68
+ # Does not affect registerable.
69
+ # config.paranoid = true
70
+
71
+ # By default Devise will store the user in session. You can skip storage for
72
+ # :http_auth and :token_auth by adding those symbols to the array below.
73
+ # Notice that if you are skipping storage for all authentication paths, you
74
+ # may want to disable generating routes to Devise's sessions controller by
75
+ # passing :skip => :sessions to `devise_for` in your config/routes.rb
76
+ config.skip_session_storage = [:http_auth]
77
+
78
+ # ==> Configuration for :database_authenticatable
79
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
80
+ # using other encryptors, it sets how many times you want the password re-encrypted.
81
+ #
82
+ # Limiting the stretches to just one in testing will increase the performance of
83
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
84
+ # a value less than 10 in other environments.
85
+ config.stretches = Rails.env.test? ? 1 : 10
86
+
87
+ # Setup a pepper to generate the encrypted password.
88
+ # config.pepper = "8101638e8d8142db6ce79325617afe094d9a69ca35fcdb1f7aacf4b0ba25bfacb0a57783d93a11829c309a3d4f05d104e22c4cd305ceec9f3f8a61d2389bb59b"
89
+
90
+ # ==> Configuration for :confirmable
91
+ # A period that the user is allowed to access the website even without
92
+ # confirming his account. For instance, if set to 2.days, the user will be
93
+ # able to access the website for two days without confirming his account,
94
+ # access will be blocked just in the third day. Default is 0.days, meaning
95
+ # the user cannot access the website without confirming his account.
96
+ # config.allow_unconfirmed_access_for = 2.days
97
+
98
+ # If true, requires any email changes to be confirmed (exctly the same way as
99
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
100
+ # db field (see migrations). Until confirmed new email is stored in
101
+ # unconfirmed email column, and copied to email column on successful confirmation.
102
+ config.reconfirmable = true
103
+
104
+ # Defines which key will be used when confirming an account
105
+ # config.confirmation_keys = [ :email ]
106
+
107
+ # ==> Configuration for :rememberable
108
+ # The time the user will be remembered without asking for credentials again.
109
+ # config.remember_for = 2.weeks
110
+
111
+ # If true, extends the user's remember period when remembered via cookie.
112
+ # config.extend_remember_period = false
113
+
114
+ # If true, uses the password salt as remember token. This should be turned
115
+ # to false if you are not using database authenticatable.
116
+ config.use_salt_as_remember_token = true
117
+
118
+ # Options to be passed to the created cookie. For instance, you can set
119
+ # :secure => true in order to force SSL only cookies.
120
+ # config.cookie_options = {}
121
+
122
+ # ==> Configuration for :validatable
123
+ # Range for password length. Default is 6..128.
124
+ # config.password_length = 6..128
125
+
126
+ # Email regex used to validate email formats. It simply asserts that
127
+ # an one (and only one) @ exists in the given string. This is mainly
128
+ # to give user feedback and not to assert the e-mail validity.
129
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
130
+
131
+ # ==> Configuration for :timeoutable
132
+ # The time you want to timeout the user session without activity. After this
133
+ # time the user will be asked for credentials again. Default is 30 minutes.
134
+ # config.timeout_in = 30.minutes
135
+
136
+ # ==> Configuration for :lockable
137
+ # Defines which strategy will be used to lock an account.
138
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
139
+ # :none = No lock strategy. You should handle locking by yourself.
140
+ # config.lock_strategy = :failed_attempts
141
+
142
+ # Defines which key will be used when locking and unlocking an account
143
+ # config.unlock_keys = [ :email ]
144
+
145
+ # Defines which strategy will be used to unlock an account.
146
+ # :email = Sends an unlock link to the user email
147
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
148
+ # :both = Enables both strategies
149
+ # :none = No unlock strategy. You should handle unlocking by yourself.
150
+ # config.unlock_strategy = :both
151
+
152
+ # Number of authentication tries before locking an account if lock_strategy
153
+ # is failed attempts.
154
+ # config.maximum_attempts = 20
155
+
156
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
157
+ # config.unlock_in = 1.hour
158
+
159
+ # ==> Configuration for :recoverable
160
+ #
161
+ # Defines which key will be used when recovering the password for an account
162
+ # config.reset_password_keys = [ :email ]
163
+
164
+ # Time interval you can reset your password with a reset password key.
165
+ # Don't put a too small interval or your users won't have the time to
166
+ # change their passwords.
167
+ config.reset_password_within = 6.hours
168
+
169
+ # ==> Configuration for :encryptable
170
+ # Allow you to use another encryption algorithm besides bcrypt (default). You can use
171
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
172
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
173
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
174
+ # REST_AUTH_SITE_KEY to pepper)
175
+ # config.encryptor = :sha512
176
+
177
+ # ==> Configuration for :token_authenticatable
178
+ # Defines name of the authentication token params key
179
+ # config.token_authentication_key = :auth_token
180
+
181
+ # ==> Scopes configuration
182
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
183
+ # "users/sessions/new". It's turned off by default because it's slower if you
184
+ # are using only default views.
185
+ # config.scoped_views = false
186
+
187
+ # Configure the default scope given to Warden. By default it's the first
188
+ # devise role declared in your routes (usually :user).
189
+ # config.default_scope = :user
190
+
191
+ # Configure sign_out behavior.
192
+ # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
193
+ # The default is true, which means any logout action will sign out all active scopes.
194
+ # config.sign_out_all_scopes = true
195
+
196
+ # ==> Navigation configuration
197
+ # Lists the formats that should be treated as navigational. Formats like
198
+ # :html, should redirect to the sign in page when the user does not have
199
+ # access, but formats like :xml or :json, should return 401.
200
+ #
201
+ # If you have any extra navigational formats, like :iphone or :mobile, you
202
+ # should add them to the navigational formats lists.
203
+ #
204
+ # The "*/*" below is required to match Internet Explorer requests.
205
+ # config.navigational_formats = ["*/*", :html]
206
+
207
+ # The default HTTP method used to sign out a resource. Default is :delete.
208
+ config.sign_out_via = :delete
209
+
210
+ # ==> OmniAuth
211
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
212
+ # up on your models and hooks.
213
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
214
+
215
+ # ==> Warden configuration
216
+ # If you want to use other strategies, that are not supported by Devise, or
217
+ # change the failure app, you can configure them inside the config.warden block.
218
+ #
219
+ # config.warden do |manager|
220
+ # manager.intercept_401 = false
221
+ # manager.default_strategies(:scope => :user).unshift :some_external_strategy
222
+ # end
223
+ end
@@ -0,0 +1,56 @@
1
+ # Additional translations at https://github.com/plataformatec/devise/wiki/I18n
2
+
3
+ en:
4
+ errors:
5
+ messages:
6
+ expired: "has expired, please request a new one"
7
+ not_found: "not found"
8
+ already_confirmed: "was already confirmed, please try signing in"
9
+ not_locked: "was not locked"
10
+ not_saved:
11
+ one: "1 error prohibited this %{resource} from being saved:"
12
+ other: "%{count} errors prohibited this %{resource} from being saved:"
13
+
14
+ devise:
15
+ failure:
16
+ already_authenticated: 'You are already signed in.'
17
+ unauthenticated: 'You need to sign in or sign up before continuing.'
18
+ unconfirmed: 'You have to confirm your account before continuing.'
19
+ locked: 'Your account is locked.'
20
+ invalid: 'Invalid email or password.'
21
+ invalid_token: 'Invalid authentication token.'
22
+ timeout: 'Your session expired, please sign in again to continue.'
23
+ inactive: 'Your account was not activated yet.'
24
+ sessions:
25
+ signed_in: 'Signed in successfully.'
26
+ signed_out: 'Signed out successfully.'
27
+ passwords:
28
+ send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
29
+ updated: 'Your password was changed successfully. You are now signed in.'
30
+ updated_not_active: 'Your password was changed successfully.'
31
+ send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail"
32
+ confirmations:
33
+ send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
34
+ send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
35
+ confirmed: 'Your account was successfully confirmed. You are now signed in.'
36
+ registrations:
37
+ signed_up: 'Welcome! You have signed up successfully.'
38
+ updated: 'You updated your account successfully.'
39
+ destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
40
+ signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
41
+ signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.'
42
+ signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.'
43
+ unlocks:
44
+ send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
45
+ unlocked: 'Your account was successfully unlocked. You are now signed in.'
46
+ send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.'
47
+ omniauth_callbacks:
48
+ success: 'Successfully authorized from %{kind} account.'
49
+ failure: 'Could not authorize you from %{kind} because "%{reason}".'
50
+ mailer:
51
+ confirmation_instructions:
52
+ subject: 'Confirmation instructions'
53
+ reset_password_instructions:
54
+ subject: 'Reset password instructions'
55
+ unlock_instructions:
56
+ subject: 'Unlock Instructions'