releaf 0.1.2 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (322) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +19 -21
  3. data/lib/releaf.rb +1 -34
  4. data/lib/releaf/all.rb +3 -0
  5. data/lib/releaf/rspec.rb +4 -0
  6. data/lib/releaf/rspec/features_matchers.rb +76 -0
  7. data/lib/releaf/rspec/helpers.rb +227 -0
  8. data/lib/releaf/rspec/matchers.rb +16 -0
  9. data/lib/releaf/test.rb +5 -0
  10. data/spec/factories/author.rb +6 -0
  11. data/spec/factories/book.rb +5 -0
  12. data/spec/factories/chapter.rb +7 -0
  13. data/spec/factories/common.rb +5 -0
  14. data/spec/factories/home_page.rb +5 -0
  15. data/spec/factories/node.rb +43 -0
  16. data/spec/factories/node_route.rb +7 -0
  17. data/spec/factories/publisher.rb +5 -0
  18. data/spec/factories/role.rb +21 -0
  19. data/spec/factories/text_page.rb +5 -0
  20. data/spec/factories/user.rb +22 -0
  21. data/spec/rails_helper.rb +122 -0
  22. data/spec/spec_helper.rb +81 -24
  23. data/spec/support/controller_macros.rb +8 -0
  24. data/spec/support/excel_helpers.rb +63 -0
  25. data/spec/support/shared/service_includer.rb +9 -0
  26. data/spec/support/wait_steps.rb +23 -0
  27. metadata +141 -499
  28. data/README.md +0 -77
  29. data/Rakefile +0 -70
  30. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  31. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_flat_75_ffffff_40x100.png +0 -0
  32. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  33. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_65_ffffff_1x400.png +0 -0
  34. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_75_dadada_1x400.png +0 -0
  35. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  36. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  37. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  38. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_222222_256x240.png +0 -0
  39. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_2e83ff_256x240.png +0 -0
  40. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_454545_256x240.png +0 -0
  41. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_888888_256x240.png +0 -0
  42. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_cd0a0a_256x240.png +0 -0
  43. data/app/assets/images/releaf/3rd_party/lightbox/close.png +0 -0
  44. data/app/assets/images/releaf/3rd_party/lightbox/loading.gif +0 -0
  45. data/app/assets/images/releaf/3rd_party/lightbox/next.png +0 -0
  46. data/app/assets/images/releaf/3rd_party/lightbox/prev.png +0 -0
  47. data/app/assets/images/releaf/add.png +0 -0
  48. data/app/assets/images/releaf/background.jpg +0 -0
  49. data/app/assets/images/releaf/button/button_bgr.gif +0 -0
  50. data/app/assets/images/releaf/button/button_hover_bgr.png +0 -0
  51. data/app/assets/images/releaf/controllers/content/close.gif +0 -0
  52. data/app/assets/images/releaf/controllers/content/close_active.gif +0 -0
  53. data/app/assets/images/releaf/controllers/content/close_hover.gif +0 -0
  54. data/app/assets/images/releaf/controllers/content/global_fields_bgr.png +0 -0
  55. data/app/assets/images/releaf/controllers/content/open.gif +0 -0
  56. data/app/assets/images/releaf/controllers/content/open_2.gif +0 -0
  57. data/app/assets/images/releaf/controllers/content/open_active.gif +0 -0
  58. data/app/assets/images/releaf/controllers/content/open_hover.gif +0 -0
  59. data/app/assets/images/releaf/controllers/sessions/background.jpg +0 -0
  60. data/app/assets/images/releaf/controllers/sessions/logo.jpg +0 -0
  61. data/app/assets/images/releaf/expand_tool/close.png +0 -0
  62. data/app/assets/images/releaf/expand_tool/close_hover.png +0 -0
  63. data/app/assets/images/releaf/expand_tool/close_hover_shim.png +0 -0
  64. data/app/assets/images/releaf/expand_tool/close_shim.png +0 -0
  65. data/app/assets/images/releaf/expand_tool/loader.gif +0 -0
  66. data/app/assets/images/releaf/expand_tool/open.png +0 -0
  67. data/app/assets/images/releaf/expand_tool/open_hover.png +0 -0
  68. data/app/assets/images/releaf/expand_tool/open_hover_shim.png +0 -0
  69. data/app/assets/images/releaf/expand_tool/open_shim.png +0 -0
  70. data/app/assets/images/releaf/favicon.ico +0 -0
  71. data/app/assets/images/releaf/globalFieldContainerBgr.png +0 -0
  72. data/app/assets/images/releaf/icons/129.png +0 -0
  73. data/app/assets/images/releaf/icons/130.png +0 -0
  74. data/app/assets/images/releaf/icons/accept.png +0 -0
  75. data/app/assets/images/releaf/icons/add.png +0 -0
  76. data/app/assets/images/releaf/icons/arrow_down.png +0 -0
  77. data/app/assets/images/releaf/icons/arrow_left.png +0 -0
  78. data/app/assets/images/releaf/icons/arrow_refresh.png +0 -0
  79. data/app/assets/images/releaf/icons/arrow_up.png +0 -0
  80. data/app/assets/images/releaf/icons/bin_empty.png +0 -0
  81. data/app/assets/images/releaf/icons/bullet_black.png +0 -0
  82. data/app/assets/images/releaf/icons/bullet_connect.png +0 -0
  83. data/app/assets/images/releaf/icons/bullet_start.png +0 -0
  84. data/app/assets/images/releaf/icons/bullet_tick.png +0 -0
  85. data/app/assets/images/releaf/icons/chrome.png +0 -0
  86. data/app/assets/images/releaf/icons/control_play.png +0 -0
  87. data/app/assets/images/releaf/icons/date.png +0 -0
  88. data/app/assets/images/releaf/icons/delete.png +0 -0
  89. data/app/assets/images/releaf/icons/disk.png +0 -0
  90. data/app/assets/images/releaf/icons/drag-handle.png +0 -0
  91. data/app/assets/images/releaf/icons/error.png +0 -0
  92. data/app/assets/images/releaf/icons/eye.png +0 -0
  93. data/app/assets/images/releaf/icons/firefox.png +0 -0
  94. data/app/assets/images/releaf/icons/google-not-available.gif +0 -0
  95. data/app/assets/images/releaf/icons/google.gif +0 -0
  96. data/app/assets/images/releaf/icons/keyboard.png +0 -0
  97. data/app/assets/images/releaf/icons/left_16.png +0 -0
  98. data/app/assets/images/releaf/icons/link.png +0 -0
  99. data/app/assets/images/releaf/icons/magnifier.png +0 -0
  100. data/app/assets/images/releaf/icons/notAllowed.png +0 -0
  101. data/app/assets/images/releaf/icons/page_white_add.png +0 -0
  102. data/app/assets/images/releaf/icons/page_white_edit.png +0 -0
  103. data/app/assets/images/releaf/icons/page_white_put.png +0 -0
  104. data/app/assets/images/releaf/icons/page_white_text.png +0 -0
  105. data/app/assets/images/releaf/icons/pencil.png +0 -0
  106. data/app/assets/images/releaf/icons/picture.png +0 -0
  107. data/app/assets/images/releaf/icons/right_16.png +0 -0
  108. data/app/assets/images/releaf/icons/tick.png +0 -0
  109. data/app/assets/images/releaf/icons/warning.png +0 -0
  110. data/app/assets/images/releaf/icons/world_go.png +0 -0
  111. data/app/assets/images/releaf/icons/world_link.png +0 -0
  112. data/app/assets/images/releaf/input/autocompleteExpandIcon.png +0 -0
  113. data/app/assets/images/releaf/input/input_bgr.gif +0 -0
  114. data/app/assets/images/releaf/language_root.png +0 -0
  115. data/app/assets/images/releaf/loader.gif +0 -0
  116. data/app/assets/images/releaf/logout.png +0 -0
  117. data/app/assets/images/releaf/main_menu/active_bgr.png +0 -0
  118. data/app/assets/images/releaf/main_menu/bgr.png +0 -0
  119. data/app/assets/images/releaf/main_menu/hover_bgr.png +0 -0
  120. data/app/assets/images/releaf/module.png +0 -0
  121. data/app/assets/images/releaf/panel_layout/active_bgr.png +0 -0
  122. data/app/assets/images/releaf/panel_layout/secondary_panel_horizontal_bgr.png +0 -0
  123. data/app/assets/images/releaf/panel_layout/secondary_panel_vertical_bgr.png +0 -0
  124. data/app/assets/images/releaf/releaf_table/selected_bgr.png +0 -0
  125. data/app/assets/images/releaf/releaf_table/th_bgr.gif +0 -0
  126. data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/README.md +0 -73
  127. data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/jquery.cookie.js +0 -47
  128. data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/server.js +0 -24
  129. data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/test.html +0 -19
  130. data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/test.js +0 -80
  131. data/app/assets/javascripts/releaf/3rd_party/jquery-ui-timepicker-addon.js +0 -1882
  132. data/app/assets/javascripts/releaf/3rd_party/lightbox.js.erb +0 -379
  133. data/app/assets/javascripts/releaf/application.js +0 -14
  134. data/app/assets/javascripts/releaf/controllers/base.js +0 -130
  135. data/app/assets/javascripts/releaf/controllers/releaf/content.js +0 -90
  136. data/app/assets/javascripts/releaf/controllers/releaf/translations.js +0 -31
  137. data/app/assets/javascripts/releaf/include/continuous_scroll.js +0 -321
  138. data/app/assets/javascripts/releaf/include/field.type_autocomplete.js +0 -58
  139. data/app/assets/javascripts/releaf/include/field.type_date_or_datetime_or_time.js +0 -43
  140. data/app/assets/javascripts/releaf/include/field.type_richtext.js +0 -90
  141. data/app/assets/javascripts/releaf/include/localization.js +0 -12
  142. data/app/assets/javascripts/releaf/include/nested_fields.js +0 -64
  143. data/app/assets/javascripts/releaf/include/sortable.js +0 -29
  144. data/app/assets/javascripts/releaf/lib/request_url.js +0 -183
  145. data/app/assets/stylesheets/releaf/3rd_party/jquery-ui-1.9.2.custom.css.erb +0 -464
  146. data/app/assets/stylesheets/releaf/3rd_party/jquery-ui-timepicker-addon.css +0 -10
  147. data/app/assets/stylesheets/releaf/3rd_party/lightbox.css.erb +0 -157
  148. data/app/assets/stylesheets/releaf/application.css.erb +0 -122
  149. data/app/assets/stylesheets/releaf/controllers/base.css.erb +0 -205
  150. data/app/assets/stylesheets/releaf/controllers/releaf/content.css.erb +0 -422
  151. data/app/assets/stylesheets/releaf/controllers/releaf/sessions.css.scss.erb +0 -116
  152. data/app/assets/stylesheets/releaf/controllers/releaf/translations.css.erb +0 -205
  153. data/app/assets/stylesheets/releaf/include/button.css.erb +0 -176
  154. data/app/assets/stylesheets/releaf/include/field.css.erb +0 -281
  155. data/app/assets/stylesheets/releaf/include/input.css.erb +0 -40
  156. data/app/assets/stylesheets/releaf/include/main_menu.css.erb +0 -66
  157. data/app/assets/stylesheets/releaf/include/pagination.css.erb +0 -29
  158. data/app/assets/stylesheets/releaf/include/panel_layout.css.erb +0 -251
  159. data/app/assets/stylesheets/releaf/include/releaf_table.css.erb +0 -112
  160. data/app/assets/stylesheets/releaf/include/sortable.css.erb +0 -12
  161. data/app/controllers/releaf/admins_controller.rb +0 -55
  162. data/app/controllers/releaf/application_controller.rb +0 -11
  163. data/app/controllers/releaf/base_application_controller.rb +0 -18
  164. data/app/controllers/releaf/base_controller.rb +0 -571
  165. data/app/controllers/releaf/content_controller.rb +0 -183
  166. data/app/controllers/releaf/roles_controller.rb +0 -38
  167. data/app/controllers/releaf/sessions_controller.rb +0 -27
  168. data/app/controllers/releaf/tinymce_assets_controller.rb +0 -26
  169. data/app/controllers/releaf/translations_controller.rb +0 -117
  170. data/app/helpers/releaf/admin_helper.rb +0 -59
  171. data/app/helpers/releaf/application_helper.rb +0 -4
  172. data/app/helpers/releaf/pagination_renderer.rb +0 -44
  173. data/app/helpers/releaf/releaf_devise_helper.rb +0 -8
  174. data/app/models/releaf/admin.rb +0 -60
  175. data/app/models/releaf/blank_node_base.rb +0 -29
  176. data/app/models/releaf/node.rb +0 -222
  177. data/app/models/releaf/node_base.rb +0 -31
  178. data/app/models/releaf/role.rb +0 -126
  179. data/app/models/releaf/tinymce_asset.rb +0 -6
  180. data/app/views/layouts/releaf/admin.html.haml +0 -57
  181. data/app/views/layouts/releaf/devise.html.haml +0 -32
  182. data/app/views/releaf/aliases/_edit.body.html.haml +0 -50
  183. data/app/views/releaf/aliases/_edit.header.html.haml +0 -19
  184. data/app/views/releaf/aliases/_index.row.html.haml +0 -5
  185. data/app/views/releaf/aliases/_secondary_panel.html.haml +0 -13
  186. data/app/views/releaf/base/_edit.body.html.haml +0 -11
  187. data/app/views/releaf/base/_edit.field.html.haml +0 -23
  188. data/app/views/releaf/base/_edit.field_type_autocomplete.html.haml +0 -15
  189. data/app/views/releaf/base/_edit.field_type_boolean.html.haml +0 -5
  190. data/app/views/releaf/base/_edit.field_type_date.html.haml +0 -8
  191. data/app/views/releaf/base/_edit.field_type_datetime.html.haml +0 -8
  192. data/app/views/releaf/base/_edit.field_type_delete_nested.html.haml +0 -3
  193. data/app/views/releaf/base/_edit.field_type_file.html.haml +0 -10
  194. data/app/views/releaf/base/_edit.field_type_image.html.haml +0 -12
  195. data/app/views/releaf/base/_edit.field_type_item.html.haml +0 -31
  196. data/app/views/releaf/base/_edit.field_type_link.html.haml +0 -4
  197. data/app/views/releaf/base/_edit.field_type_link_i18n.html.haml +0 -26
  198. data/app/views/releaf/base/_edit.field_type_password.html.haml +0 -4
  199. data/app/views/releaf/base/_edit.field_type_richtext.html.haml +0 -4
  200. data/app/views/releaf/base/_edit.field_type_richtext_i18n.html.haml +0 -27
  201. data/app/views/releaf/base/_edit.field_type_text.html.haml +0 -4
  202. data/app/views/releaf/base/_edit.field_type_text_i18n.html.haml +0 -27
  203. data/app/views/releaf/base/_edit.field_type_textarea.html.haml +0 -4
  204. data/app/views/releaf/base/_edit.field_type_textarea_i18n.html.haml +0 -27
  205. data/app/views/releaf/base/_edit.field_type_time.html.haml +0 -8
  206. data/app/views/releaf/base/_edit.fields.association.html.haml +0 -48
  207. data/app/views/releaf/base/_edit.fields.has_many_template.html.haml +0 -15
  208. data/app/views/releaf/base/_edit.fields.html.haml +0 -20
  209. data/app/views/releaf/base/_edit.footer.html.haml +0 -14
  210. data/app/views/releaf/base/_edit.form.html.haml +0 -4
  211. data/app/views/releaf/base/_edit.header.html.haml +0 -3
  212. data/app/views/releaf/base/_index.body.html.haml +0 -6
  213. data/app/views/releaf/base/_index.cell.html.haml +0 -20
  214. data/app/views/releaf/base/_index.footer.html.haml +0 -28
  215. data/app/views/releaf/base/_index.header.html.haml +0 -4
  216. data/app/views/releaf/base/_index.row.html.haml +0 -6
  217. data/app/views/releaf/base/_index.search.html.haml +0 -5
  218. data/app/views/releaf/base/_index.table.html.haml +0 -24
  219. data/app/views/releaf/base/_secondary_panel.html.haml +0 -10
  220. data/app/views/releaf/base/_show.body.html.haml +0 -3
  221. data/app/views/releaf/base/_show.field.html.haml +0 -20
  222. data/app/views/releaf/base/_show.field_type_date.html.haml +0 -9
  223. data/app/views/releaf/base/_show.field_type_date_time.html.haml +0 -9
  224. data/app/views/releaf/base/_show.field_type_email.html.haml +0 -6
  225. data/app/views/releaf/base/_show.field_type_file.html.haml +0 -7
  226. data/app/views/releaf/base/_show.field_type_image.html.haml +0 -10
  227. data/app/views/releaf/base/_show.field_type_item.html.haml +0 -11
  228. data/app/views/releaf/base/_show.field_type_link.html.haml +0 -14
  229. data/app/views/releaf/base/_show.field_type_password.html.haml +0 -6
  230. data/app/views/releaf/base/_show.field_type_richtext.html.haml +0 -6
  231. data/app/views/releaf/base/_show.field_type_text.html.haml +0 -6
  232. data/app/views/releaf/base/_show.field_type_textarea.html.haml +0 -6
  233. data/app/views/releaf/base/_show.field_type_time.html.haml +0 -9
  234. data/app/views/releaf/base/_show.field_type_url.html.haml +0 -7
  235. data/app/views/releaf/base/_show.fields.association.html.haml +0 -36
  236. data/app/views/releaf/base/_show.fields.has_many_template.html.haml +0 -12
  237. data/app/views/releaf/base/_show.fields.html.haml +0 -17
  238. data/app/views/releaf/base/_show.footer.html.haml +0 -18
  239. data/app/views/releaf/base/_show.header.html.haml +0 -3
  240. data/app/views/releaf/base/confirm_destroy.html.haml +0 -17
  241. data/app/views/releaf/base/edit.html.haml +0 -1
  242. data/app/views/releaf/base/index.html.haml +0 -3
  243. data/app/views/releaf/base/new.html.haml +0 -1
  244. data/app/views/releaf/base/show.html.haml +0 -3
  245. data/app/views/releaf/content/_edit.body.html.haml +0 -46
  246. data/app/views/releaf/content/_edit.content_fields.html.haml +0 -11
  247. data/app/views/releaf/content/_edit.fields.html.haml +0 -17
  248. data/app/views/releaf/content/_edit.slug.html.haml +0 -12
  249. data/app/views/releaf/content/_get_content_form.html.haml +0 -7
  250. data/app/views/releaf/content/_secondary_panel.html.haml +0 -3
  251. data/app/views/releaf/content/_tree_level.html.haml +0 -16
  252. data/app/views/releaf/content/ajax.new.html.haml +0 -3
  253. data/app/views/releaf/content/index.html.haml +0 -0
  254. data/app/views/releaf/roles/_edit.field.permissions.html.haml +0 -5
  255. data/app/views/releaf/roles/_show.field.default.html.haml +0 -6
  256. data/app/views/releaf/roles/_show.field.permissions.html.haml +0 -11
  257. data/app/views/releaf/sessions/new.html.haml +0 -17
  258. data/app/views/releaf/translations/_edit.body.html.haml +0 -50
  259. data/app/views/releaf/translations/_edit.header.html.haml +0 -19
  260. data/app/views/releaf/translations/_index.row.html.haml +0 -5
  261. data/app/views/releaf/translations/_secondary_panel.html.haml +0 -13
  262. data/bin/releaf +0 -25
  263. data/lib/generators/releaf/install_generator.rb +0 -87
  264. data/lib/generators/releaf/templates/config/common_fields.yml.example +0 -17
  265. data/lib/generators/releaf/templates/controllers/home_controller.rb +0 -4
  266. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  267. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_flat_75_ffffff_40x100.png +0 -0
  268. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  269. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_65_ffffff_1x400.png +0 -0
  270. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_75_dadada_1x400.png +0 -0
  271. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  272. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  273. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  274. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_222222_256x240.png +0 -0
  275. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_2e83ff_256x240.png +0 -0
  276. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_454545_256x240.png +0 -0
  277. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_888888_256x240.png +0 -0
  278. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_cd0a0a_256x240.png +0 -0
  279. data/lib/generators/releaf/templates/images/3rd_party/lightbox/close.png +0 -0
  280. data/lib/generators/releaf/templates/images/3rd_party/lightbox/loading.gif +0 -0
  281. data/lib/generators/releaf/templates/images/3rd_party/lightbox/next.png +0 -0
  282. data/lib/generators/releaf/templates/images/3rd_party/lightbox/prev.png +0 -0
  283. data/lib/generators/releaf/templates/initializers/releaf.rb +0 -20
  284. data/lib/generators/releaf/templates/initializers/releaf_i18n.rb +0 -25
  285. data/lib/generators/releaf/templates/initializers/releaf_store_current_template.rb +0 -25
  286. data/lib/generators/releaf/templates/javascripts/3rd_party/jquery.jcarousel.js +0 -1058
  287. data/lib/generators/releaf/templates/javascripts/3rd_party/jquery_ui.js +0 -14850
  288. data/lib/generators/releaf/templates/javascripts/3rd_party/lightbox.js.erb +0 -379
  289. data/lib/generators/releaf/templates/javascripts/application.js +0 -15
  290. data/lib/generators/releaf/templates/javascripts/lib/init_jcarousel.js +0 -40
  291. data/lib/generators/releaf/templates/javascripts/lib/js_check.js +0 -8
  292. data/lib/generators/releaf/templates/javascripts/lib/request_url.js +0 -169
  293. data/lib/generators/releaf/templates/javascripts/lib/sortable.js +0 -29
  294. data/lib/generators/releaf/templates/migrations/create_releaf_admins.rb +0 -53
  295. data/lib/generators/releaf/templates/migrations/create_releaf_nodes.rb +0 -25
  296. data/lib/generators/releaf/templates/migrations/create_releaf_roles.rb +0 -12
  297. data/lib/generators/releaf/templates/migrations/create_releaf_tinymce_assets.rb +0 -11
  298. data/lib/generators/releaf/templates/migrations/create_releaf_translations.rb +0 -31
  299. data/lib/generators/releaf/templates/models/admin_ability.rb +0 -51
  300. data/lib/generators/releaf/templates/seeds.rb +0 -64
  301. data/lib/generators/releaf/templates/stylesheets/3rd_party/jquery_ui/smoothness.css.erb +0 -1174
  302. data/lib/generators/releaf/templates/stylesheets/3rd_party/lightbox.css.erb +0 -157
  303. data/lib/generators/releaf/templates/stylesheets/3rd_party/reset.css +0 -48
  304. data/lib/generators/releaf/templates/stylesheets/application.scss +0 -15
  305. data/lib/generators/releaf/templates/stylesheets/style.scss +0 -45
  306. data/lib/generators/releaf/templates/views/home/index.html.haml +0 -1
  307. data/lib/generators/releaf/templates/views/layouts/application.html.haml +0 -26
  308. data/lib/i18n/backend/releaf.rb +0 -97
  309. data/lib/i18n/backend/releaf/translation.rb +0 -61
  310. data/lib/i18n/backend/releaf/translation_data.rb +0 -39
  311. data/lib/i18n/backend/releaf/translation_group.rb +0 -34
  312. data/lib/i18n/releaf.rb +0 -1
  313. data/lib/releaf/boolean_at.rb +0 -77
  314. data/lib/releaf/engine.rb +0 -4
  315. data/lib/releaf/globalize3/fallbacks.rb +0 -19
  316. data/lib/releaf/resources.rb +0 -101
  317. data/lib/releaf/slug.rb +0 -118
  318. data/lib/releaf/version.rb +0 -3
  319. data/lib/tasks/releaf_tasks.rake +0 -4
  320. data/spec/factories/factories.rb +0 -24
  321. data/spec/features/admin_spec.rb +0 -41
  322. data/templates/releaf/installer.rb +0 -207
@@ -1,12 +0,0 @@
1
- - if subfields.is_a? Array
2
- - subfields.each do |subfield|
3
- - if has_template? "_#{view_prefix}.#{field}"
4
- = render "#{view_prefix}.#{field}", :resource => resource, :name => field
5
- - else
6
- = render 'show.field', :resource => resource, :name => subfield, :view_prefix => view_prefix
7
-
8
- - elsif subfields.is_a? String or subfields.is_a? Symbol
9
- - if has_template? "_#{view_prefix}.#{field}"
10
- = render "#{view_prefix}.#{field}", :resource => resource, :name => field
11
- - else
12
- = render 'show.field', :resource => resource, :name => field, :view_prefix => view_prefix
@@ -1,17 +0,0 @@
1
- - fields.each do |field|
2
- - if field.is_a?(String) or field.is_a?(Symbol)
3
- - reflection = resource.class.reflections[field.to_sym]
4
-
5
- - if (field.is_a?(String) or field.is_a?(Symbol)) && !reflection
6
- - if has_template? "_#{view_prefix}.#{field}"
7
- = render "#{view_prefix}.#{field}", :resource => resource, :name => field
8
- - else
9
- = render 'show.field', :resource => resource, :name => field, :view_prefix => view_prefix
10
-
11
- - elsif field.is_a? Hash
12
- - field.each_pair do |field, subfields|
13
- - reflection = resource.class.reflections[field.to_sym]
14
- = render 'show.fields.association', :resource => resource, :field => field, :subfields => subfields, :reflection => reflection, :view_prefix => view_prefix
15
- - elsif reflection
16
- - subfields = reflection.klass.column_names - %w[id created_at updated_at password password_confirmation encrypted_password position]
17
- = render 'show.fields.association', :resource => resource, :field => field, :subfields => subfields, :reflection => reflection, :view_prefix => view_prefix
@@ -1,18 +0,0 @@
1
- .footer
2
- .padding
3
- .block.left_block
4
- %a.button{ :href => url_for( :action => 'index' ) }
5
- = image_tag 'releaf/icons/arrow_left.png', :alt => ''
6
- %span= t('back')
7
-
8
- - if @features[:edit]
9
- .block.center_block
10
- %a.button{ :href => url_for( :action => 'edit', :id => resource.id ) }
11
- = image_tag 'releaf/icons/page_white_edit.png', :alt => ''
12
- %span= t('edit')
13
-
14
- - if @features[:destroy]
15
- .block.right_block
16
- %a.button{ :href => url_for( :action => 'confirm_destroy', :id => resource.id ) }
17
- = image_tag('releaf/icons/bin_empty.png', :alt => '')
18
- %span= t('destroy')
@@ -1,3 +0,0 @@
1
- .header
2
- .padding
3
- %h2= resource_to_text(resource)
@@ -1,17 +0,0 @@
1
- .body.outset_box
2
- .question= t('confirm_destroy')
3
- .description= resource_to_text(@resource)
4
- .buttons
5
- = form_for @resource, :url => url_for( :action => 'destroy', :id => @resource.id ), :as => :resource, :method => :delete do |f|
6
- %button{ :type => 'submit' }
7
- = image_tag 'releaf/icons/bin_empty.png', :alt => ''
8
- %span= t('yes')
9
- - if @features[:show]
10
- %a.button{ :href => url_for( :action => 'show', :id => @resource.id ) }
11
- %span= t('no')
12
- - elsif @features[:edit]
13
- %a.button{ :href => url_for( :action => 'edit', :id => @resource.id ) }
14
- %span= t('no')
15
- - else
16
- %a.button{ :href => url_for( :action => 'index' ) }
17
- %span= t('no')
@@ -1 +0,0 @@
1
- = render "edit.form", :resource => @resource
@@ -1,3 +0,0 @@
1
- = render 'index.header', :resources => @resources
2
- = render 'index.body', :resources => @resources
3
- = render 'index.footer', :resources => @resources
@@ -1 +0,0 @@
1
- = render "edit.form", :resource => @resource
@@ -1,3 +0,0 @@
1
- = render 'show.header', :resource => @resource
2
- = render 'show.body', :resource => @resource
3
- = render 'show.footer', :resource => @resource
@@ -1,46 +0,0 @@
1
- .body.inset_box.no_shadow
2
- - if f.object.new_record?
3
- = f.hidden_field :parent_id, :value => params[:parent_id] || f.object.parent_id
4
-
5
-
6
- .globalFieldContainer.collapsableSection.global_fields
7
- = render 'edit.field', :name => 'name', :f => f, :view_prefix => 'edit.field'
8
-
9
- .field{ 'data-name' => 'template' }
10
- .label_wrap
11
- = f.label :content_type, 'Veids:', :title => f.object.content_type
12
- .value
13
- %span= (f.object.content_type || params[:content_type])
14
- - if f.object.new_record?
15
- = hidden_field(:resource, :content_type, {:value => params[:content_type]})
16
- .clear
17
-
18
-
19
- = render 'edit.slug', :name => 'slug', :f => f
20
-
21
- .field{ 'data-name' => 'position' }
22
- .label_wrap= f.label :position, t('position') + ':'
23
- .value
24
- :ruby
25
- opt_for_select = [[t('first'), 1]]
26
- @order_nodes.each do |node|
27
- # FIXME fix i18n usage
28
- opt_for_select.push [ t('after') + ' ' + node.name, node.lower_item ? node.lower_item.position : node.position ]
29
- end
30
-
31
- = f.select :position, options_for_select(opt_for_select, @position)
32
- .clear
33
-
34
- = render 'edit.field', :name => 'visible', :f => f, :view_prefix => 'edit.field'
35
- = render 'edit.field', :name => 'protected', :f => f, :view_prefix => 'edit.field'
36
- .clear
37
-
38
-
39
- %button.no_styling.toggleSection.collapse{:title => "Saīsināt sadaļu", :type => "button"}
40
- = image_tag("releaf/icons/130.png", :alt => "Saīsināt sadaļu")
41
- %button.no_styling.toggleSection.expand{:title => "Parādīt pilnu sadaļu", :type => "button"}
42
- = image_tag("releaf/icons/129.png", :alt => "Parādīt pilnu sadaļu")
43
- .clear.persistent
44
-
45
- = render 'edit.content_fields', :f => f
46
-
@@ -1,11 +0,0 @@
1
- .nested_object
2
- - f.object.common_field_names.each do |common_field_name|
3
- - if has_template? "_edit.field.#{common_field_name}"
4
- = render "edit.field.#{common_field_name}", :name => common_field_name, :f => f
5
- - else
6
- = render 'edit.field', :name => common_field_name, :f => f, :view_prefix => 'edit.field.content'
7
-
8
-
9
- - if f.object.content
10
- = f.fields_for :content_object, f.object.content_object do |ff|
11
- = render 'edit.fields', :f => ff, :fields => content_fields_to_display(ff.object.class), :view_prefix => 'edit.field.content'
@@ -1,17 +0,0 @@
1
- - fields.each do |field|
2
- - if field.is_a?(String) or field.is_a?(Symbol)
3
- - reflection = f.object.class.reflections[field.to_sym]
4
-
5
- - if (field.is_a?(String) or field.is_a?(Symbol)) && !reflection
6
- - if has_template? "_#{view_prefix}.#{field}"
7
- = render "#{view_prefix}.#{field}", :f => f, :name => field
8
- - else
9
- = render 'edit.field', :f => f, :name => field, :view_prefix => view_prefix
10
-
11
- - elsif field.is_a? Hash
12
- - field.each_pair do |field, subfields|
13
- - reflection = f.object.class.reflections[field.to_sym]
14
- = render 'edit.fields.association', :f => f, :field => field, :subfields => subfields, :reflection => reflection, :view_prefix => view_prefix
15
- - elsif reflection
16
- - subfields = content_fields_to_display(reflection.klass)
17
- = render 'edit.fields.association', :f => f, :field => field, :subfields => subfields, :reflection => reflection, :view_prefix => view_prefix
@@ -1,12 +0,0 @@
1
- .field.type_text{ 'data-name' => name }
2
- .label_wrap><= f.label name, name.humanize + ':'
3
- .value><
4
- = f.text_field name
5
- %button.no_styling.generate_slug{:type => 'button', :'data-new_slug_url' => generate_url_releaf_nodes_path(:parent_id => f.object.parent_id, :id => f.object.id), :title => t('.suggest_slug', :rescue_format => false)}><
6
- = image_tag('releaf/icons/keyboard.png', :alt => t('.suggest_slug', :rescue_format => false))
7
- .object_url><
8
- %a{:href => "/#{f.object.url}"}
9
- = "#{request.protocol}#{request.host_with_port}/#{f.object.parent.try(:url)}/"
10
- %span><= f.object.slug
11
- = "/"
12
- .clear
@@ -1,7 +0,0 @@
1
- = fields_for "resource[content_attributes]", @resource do |ff|
2
-
3
- - (ff.object.class.column_names - %w[id created_at updated_at]).each do |name|
4
- - if has_template? "_edit.field.#{name}"
5
- = render "edit.field.#{name}", :name => name, :f => ff
6
- - else
7
- = render 'edit.field', :name => name, :f => ff
@@ -1,3 +0,0 @@
1
- .tree_container
2
- .inner
3
- = render 'tree_level', :nodes => @nodes, :level => 0
@@ -1,16 +0,0 @@
1
- %ul.block
2
- - nodes.each do |node|
3
- %li
4
- .node{ :style => "background-color:rgba(188,224,178,#{[ 1-level.to_f/10, 0.3 ].max});", :class => params[:id].to_i == node.id ? :active : nil }
5
- %a.create{:href => url_for(:action => :new, :parent_id => node.id)}><
6
- = image_tag("releaf/add.png")
7
- %input{:name => "ids[]", :type => "checkbox", :value => node.id}/
8
- - if node.children.empty?
9
- .toggle{:style => "margin-left:#{15*level}px;"}><
10
- - else
11
- %button.no_styling.toggle.open{"data-id" => node.id, :type => "button", :style => "margin-left:#{15*level}px;"}>< Toggle
12
- %a.edit{:href => url_for(:action => :edit, :id => node.id), :title => node.url, :style=> "left: #{43+15*level}px;"}><
13
- = image_tag "releaf/language_root.png", :alt => ''
14
- %span= node.name
15
- - if !node.children.empty?
16
- = render 'tree_level', :nodes => node.children, :level => level + 1
@@ -1,3 +0,0 @@
1
- %ul.block
2
- - @base_models.each do |base_model|
3
- %li= link_to base_model, new_releaf_node_path(:parent_id => params[:parent_id], :content_type => base_model.name)
File without changes
@@ -1,5 +0,0 @@
1
- - AdminAbility::PERMISSIONS.each do |permissions|
2
- - if permissions.is_a? String
3
- = render 'edit.field_type_boolean', :name => "#{permissions}_permission", :f => f
4
- - elsif permissions.is_a? Array
5
- = render 'edit.field_type_item', :name => "#{permissions[0]}_permissions", :select_options => permissions[1], :f => f
@@ -1,6 +0,0 @@
1
- .field.no_label_wrap_padding
2
- .label_wrap
3
- .label= name.sub(/_(uid|html|id)$/, '').humanize + ':'
4
- .value
5
- = @resource.send("#{name}?") ? I18n.t("common.true") : I18n.t("common.false")
6
- .clear
@@ -1,11 +0,0 @@
1
- - AdminAbility::PERMISSIONS.each do |permissions|
2
- - if permissions.is_a? String
3
- .field.no_label_wrap_padding
4
- .label_wrap
5
- .label Manage #{permissions}:
6
- .value_wrap= @resource.send(:"#{permissions}_permission")
7
- - elsif permissions.is_a? Array
8
- .field.no_label_wrap_padding
9
- .label_wrap
10
- .label #{permissions[0]} permissions:
11
- .value_wrap= @resource.send(:"#{permissions[0]}_permissions")
@@ -1,17 +0,0 @@
1
- .login_form_container
2
- = form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "login_form" } ) do |f|
3
- .logo_container
4
- = image_tag("releaf/controllers/#{controller.controller_name}/logo.jpg")
5
- .inputs
6
- %label.login
7
- %span Email:
8
- = f.email_field :email, :autofocus => "autofocus"
9
- %label
10
- %span Password:
11
- = f.password_field :password
12
- .actions
13
- %button{:type => "submit"} Sign in
14
- %div.copy
15
- %span © 2012-#{Time.now.year} CubeSystems
16
- |
17
- = link_to "www.cubesystems.lv", "http://cubesystems.lv"
@@ -1,50 +0,0 @@
1
- .body.inset_box.no_shadow
2
-
3
- -#TODO: improve style/html
4
- -if f.object.errors.any?
5
- #error_explanation
6
- %strong= "#{pluralize(f.object.errors.count, "error")} prohibited this news from being saved:"
7
- %ul
8
- - f.object.errors.full_messages.each do |msg|
9
- %li= msg
10
-
11
- .nested_wrap
12
- %table.releaf_table.no_border.label_first_column.translations.translations_table.list{:cellpadding => "0", :cellspacing => "0"}
13
- %thead
14
- %tr
15
- %th.code_header Nosaukums
16
- - Settings.i18n_locales.each do |locale|
17
- %th.language_header{"data-locale" => locale}
18
- %span.name= locale
19
- %th.delete_header  
20
- %tbody#variables.list
21
- - f.object.translations.each do |translation|
22
- %tr.item{ :id => "translation_#{translation.id}" }
23
- %td.translation_name.codeColumn
24
- .wrap
25
- %input{:type=>"hidden", :name=>"translations[#{translation.id}][id]", :value=>"#{translation.id}"}/
26
- %input{:type=>"text", :name=>"translations[#{translation.id}][key]", :value=>"#{translation.plain_key}"}/
27
- - Settings.i18n_locales.each do |locale|
28
-
29
- %td.translationCell{"data-locale" => locale}
30
- .wrap
31
- %input{:type=>"text", :name=>"translations[#{translation.id}][localization][#{locale}]", :value=>translation.locales[locale]}/
32
- %td.delete_column
33
- %span.remove= image_tag("releaf/icons/delete.png", :alt => "delete", :title => :delete)
34
-
35
- %table{:style => "display:none;"}
36
- %tbody
37
- %tr.template.item{:id => "translation__template_" }
38
- %td.translation_name.codeColumn
39
- .wrap
40
- %input{:type=>"text", :name=>"translations[_template_][key]", :value=>""}/
41
- - Settings.i18n_locales.each do |locale|
42
- %td.translationCell{"data-locale" => locale}
43
- .wrap
44
- %input{:type=>"text", :name=>"translations[_template_][localization][#{locale}]", :value=>""}/
45
- %td.delete_column
46
- %span.remove= image_tag("releaf/icons/delete.png", :alt => "delete", :title => :delete)
47
-
48
- %button.add.new(type='button')
49
- = image_tag 'releaf/icons/add.png', :atl => ''
50
- %span New
@@ -1,19 +0,0 @@
1
- .visibleLanguagesSwitch
2
- %button{:type => "button"}
3
- Redzamās valodas
4
- =image_tag("releaf/expand_tool/close_hover_shim.png", :alt => "")
5
- %ul.block
6
- - Settings.i18n_locales.each do |locale|
7
- %li
8
- %label
9
- .header
10
- .padding
11
- .groupInfo
12
- .field
13
- %label{:for => "context"} Konteksts:
14
- %input#context{:name => "translation_group[scope]", :size => "50", :type => "text", :value => @resource.scope}/
15
- .translations_table.translations_table_head
16
- .th.code_header{:style => "width: 208px; "}>< Nosaukums
17
- - Settings.i18n_locales.each do |locale|
18
- .th.language_header.languageId-1.languageCode-lv{"data-languagecode" => locale, "data-languageid" => "1", :style => "width: 300px; "}><
19
- %span.name= locale
@@ -1,5 +0,0 @@
1
- %a.row{ 'data-id' => resource.id, :href => "#{url_for( :action => list_action, :id => resource.group_id )}#translation_#{resource.id}" }
2
- %span= resource.translation_group.scope
3
- %span= resource.key
4
- - Settings.i18n_locales.each do |locale|
5
- %span= resource.locales[locale]
@@ -1,13 +0,0 @@
1
- .inner.standard_submenu
2
- %ul.block
3
- %li
4
- .section_title= t('translations')
5
- %ul
6
- %li{:class=> params[:id].blank? ? "active" : ""}
7
- %a{:href => releaf_translation_groups_path}= t('all_translations')
8
- %li
9
- .section_title= t('groups')
10
- %ul
11
- - @groups.each do |group|
12
- %li{:class=> !params[:id].blank? && params[:id].to_i == group.id ? "active" : ""}
13
- %a{:href => edit_releaf_translation_group_path(group.id)}= group.scope
data/bin/releaf DELETED
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env ruby
2
- gem 'railties'
3
- require 'rails/generators'
4
- require 'rails/generators/rails/app/app_generator'
5
- template_path = File.expand_path('../../templates/releaf/installer.rb', __FILE__)
6
-
7
- if ARGV.size == 0 || ARGV[0] == "--help"
8
- puts "Usage:"
9
- puts " releaf APP_NAME [options]"
10
- puts ""
11
- puts "Options:"
12
- # Support when running locally
13
- relative_path = File.expand_path('../../lib/generators/releaf/install_generator.rb', __FILE__)
14
- require relative_path
15
- Releaf::Generators::InstallGenerator.class_options.each do |raw, option|
16
- dasherized = "--#{option.name.to_s.gsub('_', '-')}"
17
- dasherized = [option.aliases, "[#{dasherized}]"].flatten.join(', ') if option.aliases.any?
18
- puts " #{dasherized}".ljust(28) << "# #{option.description}"
19
- end
20
- exit 0
21
- end
22
-
23
- application_name = ARGV.shift
24
-
25
- result = Rails::Generators::AppGenerator.start [application_name, '-m', template_path, '--skip-gemfile', '--skip-bundle', '--database=mysql', '--skip-test-unit'] | ARGV
@@ -1,87 +0,0 @@
1
- module Releaf
2
- module Generators
3
- class InstallGenerator < Rails::Generators::Base
4
- include Rails::Generators::Migration
5
-
6
- class_option :rvm, :type => :boolean, :aliases => nil, :group => :runtime, :default => true,
7
- :desc => "Install with rvm gemset support"
8
-
9
- def self.next_migration_number(path)
10
- unless @prev_migration_nr
11
- @prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
12
- else
13
- @prev_migration_nr += 1
14
- end
15
- @prev_migration_nr.to_s
16
- end
17
-
18
- source_root File.expand_path('../templates', __FILE__)
19
-
20
- def install_initializer
21
- copy_files 'initializers', 'config/initializers'
22
- end
23
-
24
- def install_migrations
25
- get_file_list('migrations').each do |migration|
26
- migration_template "migrations/#{migration}", "db/migrate/#{migration}"
27
- end
28
- end
29
-
30
- def install_seeds
31
- copy_file "seeds.rb", "db/seeds.rb"
32
- end
33
-
34
- def install_models
35
- copy_files 'models', 'app/models'
36
- end
37
-
38
- def install_configs
39
- copy_files 'config', 'config'
40
- end
41
-
42
- def install_views
43
- copy_files 'views', 'app/views'
44
- end
45
-
46
- def install_controllers
47
- copy_files 'controllers', 'app/controllers'
48
- end
49
-
50
- def install_stylesheets
51
- copy_files 'stylesheets', 'app/assets/stylesheets'
52
- end
53
-
54
- def install_javascripts
55
- copy_files 'javascripts', 'app/assets/javascripts'
56
- end
57
-
58
- def install_images
59
- copy_files 'images', 'app/assets/images'
60
- end
61
-
62
- private
63
-
64
- def copy_files subdir, dest_dir
65
- raise ArgumEnterror unless subdir.is_a? String
66
- raise ArgumEnterror unless dest_dir.is_a? String
67
- raise ArgumetnError if subdir.blank?
68
- raise ArgumetnError if dest_dir.blank?
69
-
70
- get_file_list(subdir).each do |image|
71
- copy_file [subdir, image].join('/'), [dest_dir, image].join('/')
72
- end
73
- end
74
-
75
- def get_file_list subdir
76
- raise ArgumentError unless subdir.is_a? String
77
- raise ArgumetnError if subdir.blank?
78
- dir = File.dirname(__FILE__)
79
- search_path = [dir, 'templates', subdir].join('/') + '/'
80
- file_list = Dir.glob(search_path + '**/*').map { |filename| File.directory?(filename) ? nil : filename.sub(search_path, '') }
81
- file_list.delete nil
82
- return file_list
83
- end
84
-
85
- end
86
- end
87
- end