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,27 +0,0 @@
1
- - default_locale = Settings.i18n_locales.first
2
-
3
- .field.type_textarea.i18n{ :'data-name' => name }
4
- - Settings.i18n_locales.each_with_index do |locale, i|
5
- - translation = f.object.translations.find_or_initialize_by_locale(locale)
6
- - is_default_locale = locale == default_locale
7
-
8
- .localization{:"data-locale" => locale, :style => is_default_locale ? nil : 'display:none'}
9
- = f.fields_for :"translations", translation, :child_index => i do |ff|
10
- .label_wrap
11
- = ff.label name, name.to_s.humanize + ':'
12
- .value
13
- - unless translation.new_record?
14
- = ff.hidden_field :id
15
- = ff.hidden_field :locale
16
-
17
- - if is_default_locale
18
- = f.hidden_field name, :class => :sync_field
19
- = ff.text_area name, :rows => 5, :cols => 75, :class => "sync_field"
20
- - else
21
- = ff.text_area name, :rows => 5, :cols => 75
22
- .clear
23
-
24
- .localization_buttons
25
- - Settings.i18n_locales.each_with_index do |locale, i|
26
- - is_default_locale = locale == default_locale
27
- %button{:type => :button, :"data-locale" => locale, :class => is_default_locale ? :active : nil}= locale
@@ -1,8 +0,0 @@
1
- .field.type_time{ 'data-name' => name }
2
- .label_wrap><
3
- = f.label name, name.to_s.humanize + ':'
4
- .description= I18n.t("field.Format %{_format}", :default => 'Format %{_format}', :_format => I18n.t("format.input.time", :default => 'hh:mm') )
5
- -# FIXME
6
- -# .value><= f.text_field name, l(f.object.send(name), :format => :time_picker), :class => 'time_picker', :format => I18n.t("format.jquery.datepicker.time", :default => 'HH:mm')
7
- .value><= f.text_field name, :class => 'time_picker', :format => I18n.t("format.jquery.datepicker.time", :default => 'HH:mm')
8
- .clear
@@ -1,48 +0,0 @@
1
- - if has_template? "_#{view_prefix}.#{field}"
2
- = render "#{view_prefix}.#{field}", :f => f, :name => field
3
-
4
- - else
5
- - new_view_prefix = "#{view_prefix}.#{field}"
6
-
7
-
8
- - case reflection.macro
9
- - when :has_many
10
- - sortable_objects = reflection.klass.column_names.include?('position')
11
- .nested_wrap{:'data-name' => field}
12
- .nested_title= I18n.t(field)
13
- .list{:'data-sortable' => sortable_objects ? '' : nil}
14
-
15
- .item.template{:style => 'display:none;'}
16
- = f.fields_for field, reflection.klass.new, :child_index => '_template_' do |ff|
17
- = render 'edit.fields.has_many_template', :ff => ff, :sortable_objects => sortable_objects, :subfields => subfields, :view_prefix => new_view_prefix, :field => field
18
-
19
- - f.object.send(field).each_with_index do |obj, i|
20
- .item
21
- = f.fields_for field, obj, :child_index => i do |ff|
22
- = render 'edit.fields.has_many_template', :ff => ff, :sortable_objects => sortable_objects, :subfields => subfields, :view_prefix => new_view_prefix, :field => field
23
-
24
-
25
- %button.add.new(type='button')
26
- = image_tag 'releaf/icons/add.png', :atl => ''
27
- %span= I18n.t("New")
28
-
29
-
30
- - when :belongs_to
31
- .nested_wrap{:'data-name' => field}
32
- .nested_title= I18n.t(field)
33
- .item
34
- = f.fields_for field, f.object.send(field) do |ff|
35
-
36
- - if subfields.is_a? Array
37
- - subfields.each do |subfield|
38
- - if has_template? "_#{new_view_prefix}.#{subfield}"
39
- = render "#{new_view_prefix}.#{subfield}", :f => ff, :name => subfield
40
- - else
41
- = render 'edit.fields', :f => ff, :fields => subfields, :view_prefix => new_view_prefix
42
-
43
- - elsif subfields.is_a? String or subfields.is_a? Symbol
44
- - if has_template? "_#{new_view_prefix}.#{field}"
45
- = render "_#{new_view_prefix}.#{field}", :f => ff, :name => field
46
- - else
47
- = render 'edit.field', :f => ff, :name => field
48
-
@@ -1,15 +0,0 @@
1
- - if sortable_objects
2
- = ff.hidden_field :position, :class => :position
3
- .handle &nbsp;
4
-
5
- - if subfields.is_a? Array
6
-
7
- = render 'edit.fields', :f => ff, :fields => subfields, :view_prefix => view_prefix
8
-
9
- - elsif subfields.is_a? String or subfields.is_a? Symbol
10
- - if has_template? "_#{view_prefix}.#{field}"
11
- = render "#{view_prefix}.#{field}", :f => ff, :name => field
12
- - else
13
- = render 'edit.field', :f => ff, :name => field, :view_prefix => view_prefix
14
-
15
- = render 'edit.field_type_delete_nested', :f => ff
@@ -1,20 +0,0 @@
1
- - fields.each do |field|
2
- - if field.is_a?(String) or field.is_a?(Symbol)
3
- -# = Rails.logger.debug "\n\n\n"
4
- -# = Rails.logger.debug f.object.class
5
- -# = Rails.logger.debug "\n\n\n"
6
- - reflection = f.object.class.reflections[field.to_sym]
7
-
8
- - if (field.is_a?(String) or field.is_a?(Symbol)) && !reflection
9
- - if has_template? "_#{view_prefix}.#{field}"
10
- = render "#{view_prefix}.#{field}", :f => f, :name => field
11
- - else
12
- = render 'edit.field', :f => f, :name => field, :view_prefix => view_prefix
13
-
14
- - elsif field.is_a? Hash
15
- - field.each_pair do |field, subfields|
16
- - reflection = f.object.class.reflections[field.to_sym]
17
- = render 'edit.fields.association', :f => f, :field => field, :subfields => subfields, :reflection => reflection, :view_prefix => view_prefix
18
- - elsif reflection
19
- - subfields = reflection.klass.column_names - %w[id created_at updated_at password password_confirmation encrypted_password position]
20
- = render 'edit.fields.association', :f => f, :field => field, :subfields => subfields, :reflection => reflection, :view_prefix => view_prefix
@@ -1,14 +0,0 @@
1
- .footer.center
2
- .block.left_block
3
- %a.button{:href => "./"}
4
- = image_tag("releaf/icons/arrow_left.png", :alt => "") \
5
- = t('cancel')
6
- .block.center_block
7
- %button{:type => "submit"}
8
- = image_tag("releaf/icons/disk.png", :alt => "") \
9
- = t('save')
10
- .block.right_block
11
- - if @features[:destroy] && !resource.new_record?
12
- %a.button{ :href => url_for( :action => 'confirm_destroy', :id => resource.id ) }
13
- = image_tag('releaf/icons/bin_empty.png', :alt => '')
14
- %span= t('destroy')
@@ -1,4 +0,0 @@
1
- = form_for resource, :as => :resource, :url => url_for( :action => resource.new_record? ? 'create' : 'update', :id => resource.id ), :validate => true, :class => "edit", :html => {:multipart => true} do |f|
2
- = render "edit.header", :resource => resource
3
- = render "edit.body", :f => f
4
- = render "edit.footer", :resource => resource
@@ -1,3 +0,0 @@
1
- .header
2
- .padding
3
- %h2= resource.new_record? ? t('create_new_resource') : resource_to_text(resource)
@@ -1,6 +0,0 @@
1
- .body.outset_box
2
- - if resources.empty?
3
- .releaf_table.no_border
4
- .nothing_found= t("nothing_found")
5
- - else
6
- = render "index.table", :resources => resources
@@ -1,20 +0,0 @@
1
- :ruby
2
- text = resource.send(name)
3
- if name =~ /_id$/
4
- if resource.class.respond_to?(:reflect_on_association)
5
- # FIXME what if association was set with :foreign_key option
6
- rel_name = name.sub(/_id$/, '').to_sym
7
- if resource.class.reflect_on_association(rel_name)
8
- text = resource_to_text(resource.send(rel_name))
9
- end
10
- end
11
- elsif name =~ /(thumbnail|image|photo|picture|avatar|logo|icon)_uid$/
12
- unless resource.send(name).blank?
13
- text = image_tag resource.send(name.sub(/_uid$/, '')).thumb('x16').url, :alt => ''
14
- else
15
- text = ""
16
- end
17
- end
18
-
19
-
20
- %a.main{ :href => url_for( :action => list_action, :id => resource.id ) }= text
@@ -1,28 +0,0 @@
1
- .footer.center
2
- .padding
3
- .stats
4
- %span.total= resources.count \
5
- = t("resourcesFound")
6
-
7
- %span.actions
8
- - if @features[:create]
9
- %a.button.create_new_item{:href => url_for(:controller => controller.controller_name, :action => "new")}
10
- = image_tag("releaf/icons/add.png", :alt => "add") \
11
- %span= t('create_new_item')
12
-
13
- %span.button_group.list_action_switch
14
- - if @features[:show]
15
- %button{:type => "button", :title => "switchToShow", "data-action" => "show", :class => list_action == "show" ? "active" : ""}>
16
- = image_tag("releaf/icons/eye.png", :alt => "switchToShow")
17
-
18
- - if @features[:edit]
19
- %button{:type => "button", :title => "switchToEdit", "data-action" => "edit", :class => list_action == "edit" ? "active" : ""}>
20
- = image_tag("releaf/icons/pencil.png", :alt => "switchToEdit")
21
-
22
- - if @features[:destroy]
23
- %button{:type => "button", :title => "switchToDelete", "data-action" => "confirm_destroy", :class => list_action == "confirm_destroy" ? "active" : ""}
24
- = image_tag("releaf/icons/bin_empty.png", :alt => "switchToDelete")
25
-
26
- - unless @continuous_scroll
27
- - if resources.respond_to?(:page)
28
- = will_paginate( resources, :class=> "button_group pagination", :link_separator => "", :renderer => "Releaf::PaginationRenderer::LinkRenderer", :previous_label => "<", :next_label => ">", :outer_window => 0, :inner_window => 2 )
@@ -1,4 +0,0 @@
1
- .header
2
- .padding
3
- = render :partial => "index.search", :resources => resources
4
- %h2= t("all_title")
@@ -1,6 +0,0 @@
1
- .row{ 'data-id' => resource.id }
2
- - fields_to_display.each do |name|
3
- - if has_template? "_index.cell.#{name}"
4
- = render "index.cell.#{name}", :resource => resource, :name => name
5
- - else
6
- = render 'index.cell', :resource => resource, :name => name
@@ -1,5 +0,0 @@
1
- %form.search_form{:action => url_for( :controller => controller_name, :action => :index ), :title => "#{ resource_class.respond_to?( :filter ) ? '' : 'Add :filter scope to ' + resource_class.to_s + ' to enable searching' }"}
2
- .special_field_wrap
3
- %input.search{:name => "search", :type => "text", :value => params[:search], :autofocus => true, :disabled => !resource_class.respond_to?( :filter ) }
4
- %button.no_styling{:type => "submit", :disabled => !resource_class.respond_to?( :filter )}>
5
- = image_tag("releaf/icons/magnifier.png", :alt => "submit")
@@ -1,24 +0,0 @@
1
- .releaf_table.no_border.selectable{"data-continuous" => @continuous_scroll ? "1" : "0", "data-items_per_page" => @resources_per_page, "data-loading" => t("loading"), "data-total" => resources.count}
2
- .thead
3
- %div
4
- - valid_order_by_fields = resource_class.column_names
5
-
6
- - fields_to_display.each do |name|
7
- - label = name.sub(/_(id|uid|html)$/, '').to_s.humanize
8
- %div
9
- - if valid_order_by_fields.include? name
10
-
11
- - if params[:order_by].blank? || params[:order_by].sub(/-reverse$/, '') != name
12
- = link_to label, url_for(:order_by => name)
13
-
14
- - else
15
- - if params[:order_by] == name
16
- = link_to label + ' ↑', url_for(:order_by => name + '-reverse')
17
- - else
18
- = link_to label + ' ↓', url_for(:order_by => name)
19
-
20
- - else
21
- = label
22
- .tbody
23
- - resources.each do |resource|
24
- = render 'index.row', :resource => resource
@@ -1,10 +0,0 @@
1
- .inner.standard_submenu
2
- - if local_assigns.key?(:menu)
3
- %ul.block
4
- - menu.each_pair do |section_key, section|
5
- %li
6
- .section_title= t(section_key, :scope => "admin.base_menu")
7
- %ul
8
- - section.each do |resource|
9
- %li{:class => ("active" if resource[:controller] == controller.class.name.underscore.sub(/_controller$/, '')) }
10
- %a{:href => url_for(:controller => resource[:controller], :action => "index") }=t(resource[:controller], :scope => "admin.base_menu")
@@ -1,3 +0,0 @@
1
- .body.outset_box
2
- .section
3
- = render 'show.fields', :resource => @resource, :view_prefix => 'show.field', :fields => fields_to_display
@@ -1,20 +0,0 @@
1
- - name_without_id_or_type = name.sub(/_(id|type)$/, '')
2
-
3
- - if resource.class.reflect_on_association(name_without_id_or_type).try(:options).try('[]', :polymorphic) == true
4
- -# name =~ /_id$/ is required to prevent user template from being renedred 2x times:
5
- -# first time for _id field, second time for _type field
6
- - if name =~ /_id$/ && has_template?( "_#{view_prefix}.#{name_without_id_or_type}" )
7
- = render "#{view_prefix}.#{name_without_id_or_type}", :resource => resource, :name => name, :view_prefix => view_prefix
8
-
9
- - elsif has_template? "_#{view_prefix}.#{name}"
10
- = render "#{view_prefix}.#{name}", :resource => resource, :name => name, :view_prefix => view_prefix
11
- - elsif resource.send(name).blank? == false
12
- - render_field_type, use_i18n = render_field_type(resource, name)
13
- - if use_i18n and has_template?( "_show.field_type_#{render_field_type}_i18n" )
14
- = render "show.field_type_#{render_field_type}_i18n", :resource => resource, :name => name
15
-
16
- - elsif has_template?( "_show.field_type_#{render_field_type}" )
17
- = render "show.field_type_#{render_field_type}", :resource => resource, :name => name
18
-
19
- - else
20
- = render "show.field_type_text", :resource => resource, :name => name
@@ -1,9 +0,0 @@
1
- .field.no_label_wrap_padding.type_date{:'data-name' => name}
2
- .label_wrap
3
- .label= I18n.t(name.humanize, :scope => "models.#{resource.class.name.underscore}") + ':'
4
- .value
5
- - value = resource.send(name)
6
- -# FIXME
7
- = value
8
- -# = I18n.l(value, :format => 'date_picker')
9
- .clear
@@ -1,9 +0,0 @@
1
- .field.no_label_wrap_padding.type_date_time{:'data-name' => name}
2
- .label_wrap
3
- .label= I18n.t(name.humanize, :scope => "models.#{resource.class.name.underscore}") + ':'
4
- .value
5
- - value = resource.send(name)
6
- -# FIXME
7
- = value
8
- -# = I18n.l(value, :format => 'datetime_picker')
9
- .clear
@@ -1,6 +0,0 @@
1
- .field.no_label_wrap_padding.type_email{:'data-name' => name}
2
- .label_wrap
3
- .label= I18n.t(name.humanize, :scope => "models.#{resource.class.name.underscore}") + ':'
4
- .value
5
- = mail_to resource.send(name)
6
- .clear
@@ -1,7 +0,0 @@
1
- - m = name.sub(/_uid$/, '').to_s
2
-
3
- .field.no_label_wrap_padding.type_file{:'data-name' => name}
4
- .label_wrap
5
- .label= I18n.t(m.humanize, :scope => "models.#{resource.class.name.underscore}") + ':'
6
- .value= link_to I18n.t("common.Download"), resource.send(m).url
7
- .clear
@@ -1,10 +0,0 @@
1
- - m = name.sub(/_uid$/, '').to_s
2
-
3
- .field.no_label_wrap_padding.type_image{:'data-name' => name}
4
- .label_wrap
5
- .label= I18n.t(m.humanize, :scope => "models.#{resource.class.name.underscore}") + ':'
6
- .value
7
- = link_to I18n.t("common.Download"), resource.send(m).url
8
- .preview
9
- = link_to image_tag(resource.send(m).thumb('x128').url, :alt => ''), resource.send(m).url, :target => :_blank, :data => { :lightbox => true }
10
- .clear
@@ -1,11 +0,0 @@
1
- - m = name.sub(/_id$/, '').to_s
2
-
3
- .field.no_label_wrap_padding.type_item{:'data-name' => name}
4
- .label_wrap
5
- .label= I18n.t(m.humanize, :scope => "models.#{resource.class.name.underscore}") + ':'
6
- .value
7
- - if resource.class.reflect_on_association(m.to_sym)
8
- = resource_to_text(resource.send(m))
9
- - else
10
- = resource.send(name)
11
- .clear
@@ -1,14 +0,0 @@
1
- .field.no_label_wrap_padding.type_link{:'data-name' => name}
2
- .label_wrap
3
- .label= I18n.t(name.humanize, :scope => "models.#{resource.class.name.underscore}") + ':'
4
- .value
5
- - value = resource.send(name)
6
- - if value =~ /\A\d+\z/
7
- - target = Releaf::Node.find_by_id(value)
8
- - if target
9
- = link_to resource_to_text(target), url_for(:action => :show, :id => value)
10
- - else
11
- = I18n.t("Link not found")
12
- - else
13
- = link_to value, value
14
- .clear
@@ -1,6 +0,0 @@
1
- .field.no_label_wrap_padding.type_password{:'data-name' => name}
2
- .label_wrap
3
- .label= I18n.t(name.humanize, :scope => "models.#{resource.class.name.underscore}") + ':'
4
- .value
5
- =I18n.t("Filtered")
6
- .clear
@@ -1,6 +0,0 @@
1
- .field.no_label_wrap_padding.type_richtext{:'data-name' => name}
2
- .label_wrap
3
- .label= I18n.t(name.humanize, :scope => "models.#{resource.class.name.underscore}") + ':'
4
- .value
5
- .raw_html= raw resource.send(name)
6
- .clear
@@ -1,6 +0,0 @@
1
- .field.no_label_wrap_padding.type_text{:'data-name' => name}
2
- .label_wrap
3
- .label= I18n.t(name.humanize, :scope => "models.#{resource.class.name.underscore}") + ':'
4
- .value
5
- = resource.send(name)
6
- .clear
@@ -1,6 +0,0 @@
1
- .field.no_label_wrap_padding.type_textarea{:'data-name' => name}
2
- .label_wrap
3
- .label= I18n.t(name.humanize, :scope => "models.#{resource.class.name.underscore}") + ':'
4
- .value
5
- = resource.send(name)
6
- .clear
@@ -1,9 +0,0 @@
1
- .field.no_label_wrap_padding.time_time{:'data-name' => name}
2
- .label_wrap
3
- .label= I18n.t(name.humanize, :scope => "models.#{resource.class.name.underscore}") + ':'
4
- .value
5
- - value = resource.send(name)
6
- -# FIXME
7
- = value
8
- -# = I18n.l(value, :format => 'time_picker')
9
- .clear
@@ -1,7 +0,0 @@
1
- .field.no_label_wrap_padding.type_url{:'data-name' => name}
2
- .label_wrap
3
- .label= I18n.t(name.humanize, :scope => "models.#{resource.class.name.underscore}") + ':'
4
- .value
5
- - value = resource.send(name)
6
- = link_to value, value
7
- .clear
@@ -1,36 +0,0 @@
1
- - if has_template? "_#{view_prefix}.#{field}"
2
- = render "#{view_prefix}.#{field}", :resource => resource, :name => field
3
-
4
- - else
5
- - new_view_prefix = view_prefix + '.' + field
6
-
7
-
8
- - case reflection.macro
9
- - when :has_many
10
- .nested_wrap{:'data-name' => field}
11
- .nested_title= I18n.t(field)
12
- .list
13
- - resource.send(field).each do |subresource|
14
- .resource
15
- = render 'show.fields.has_many_template', :resource => subresource, :subfields => subfields, :view_prefix => new_view_prefix, :field => field
16
-
17
- - when :belongs_to
18
- .nested_wrap{:'data-name' => field}
19
- .nested_title= I18n.t(field)
20
- .item
21
-
22
- - subitem = resource.send(field)
23
-
24
- - if subfields.is_a? Array
25
- - subfields.each do |subfield|
26
- - if has_template? "_#{new_view_prefix}.#{subfield}"
27
- = render "#{new_view_prefix}.#{subfield}", :resource => resource, :name => subfield
28
- - else
29
- = render 'show.fields', :resource => subresource, :fields => subfields, :view_prefix => new_view_prefix
30
-
31
- - elsif subfields.is_a? String or subfields.is_a? Symbol
32
- - if has_template? "_#{new_view_prefix}.#{field}"
33
- = render "#{new_view_prefix}.#{field}", :resource => resource, :name => field
34
- - else
35
- = render 'show.field', :resource => subresource, :name => field, :view_prefix => new_view_prefix
36
-