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,6 +0,0 @@
1
- module Releaf
2
- class TinymceAsset < ActiveRecord::Base
3
- self.table_name = 'releaf_tinymce_assets'
4
- file_accessor :file
5
- end
6
- end
@@ -1,57 +0,0 @@
1
- !!! 5
2
- %html
3
- %head
4
- %title re:leaf
5
- = csrf_meta_tags
6
- %link{ :rel =>"icon", :href => asset_path("releaf/favicon.ico"), :type => "image/x-icon" }
7
-
8
- = stylesheet_link_tag "releaf/application"
9
-
10
- - _assets_path = __FILE__.split('/')[0...-1].join('/') + "/../../../assets"
11
-
12
- - controller_asset = params[:controller]
13
- - %w[css.scss.erb scss.erb css.scss scss css.erb css].each do |ext|
14
- - if File.exists?(_assets_path + "/stylesheets/releaf/controllers/#{controller_asset}.#{ext}")
15
- = stylesheet_link_tag "releaf/controllers/#{controller_asset}"
16
- - if File.exists?(Rails.root.to_s + "/app/assets/stylesheets/controllers/#{controller_asset}.#{ext}")
17
- = stylesheet_link_tag "controllers/#{controller_asset}"
18
-
19
- %body.yui3-skin-sam
20
- - if self.send(:"#{Releaf::ReleafDeviseHelper.devise_admin_model_name}_signed_in?")
21
- .main_menu
22
- .user
23
- %a{:href => self.send(:"destroy_#{Releaf::ReleafDeviseHelper.devise_admin_model_name}_session_path"), "data-method" => "delete"}
24
- %span.image_container
25
- = image_tag("releaf/logout.png")
26
- %span.name_wrap= t("logout")
27
- %ul
28
- - Releaf.main_menu.each do |item|
29
- %li><
30
- %a{:href => main_menu_item_url(item), :class => is_this_main_menu_item_active?(item) ? :active : nil}
31
- %span.image_container
32
- = image_tag("releaf/module.png")
33
- %span.name_wrap= t(item, :scope => "admin.main_menu")
34
-
35
- #body_wrap{:class => "#{current_feature}-feature module-#{controller.controller_name} method-#{controller.action_name} controller-#{params[:controller].tr( '/', '-' )} action-#{controller.action_name} view-#{ controller.active_template.virtual_path.split('/').pop() if controller.active_template }"}
36
- - if self.send(:"#{Releaf::ReleafDeviseHelper.devise_admin_model_name}_signed_in?")
37
- - if @panel_layout
38
- .panel_layout
39
- .secondary_panel
40
- = controller.secondary_panel.html_safe
41
- .primary_panel
42
- = yield
43
- - else
44
- = yield
45
- - else
46
- = yield
47
-
48
- #preload_wrap
49
- #preload
50
- .loading_icon
51
-
52
- = javascript_include_tag "releaf/application"
53
- - %w[js js.erb].each do |ext|
54
- - if File.exists?(_assets_path + "/javascripts/releaf/controllers/#{controller_asset}.#{ext}")
55
- = javascript_include_tag "releaf/controllers/#{controller_asset}"
56
- - if File.exists?(Rails.root.to_s + "/app/assets/javascripts/controllers/#{controller_asset}.#{ext}")
57
- = javascript_include_tag "controllers/#{controller_asset}"
@@ -1,32 +0,0 @@
1
- !!! 5
2
- %html
3
- %head
4
- %title re:leaf
5
- = csrf_meta_tags
6
- %link{ :rel =>"icon", :href => asset_path("releaf/favicon.ico"), :type => "image/x-icon" }
7
-
8
- = stylesheet_link_tag "releaf/application"
9
-
10
- - _assets_path = __FILE__.split('/')[0...-1].join('/') + "/../../../assets"
11
-
12
- - controller_asset = params[:controller]
13
- - %w[css.scss.erb scss.erb css.scss scss css.erb css].each do |ext|
14
- - if File.exists?(_assets_path + "/stylesheets/releaf/controllers/#{controller_asset}.#{ext}")
15
- = stylesheet_link_tag "releaf/controllers/#{controller_asset}"
16
- - if File.exists?(Rails.root.to_s + "/app/assets/stylesheets/controllers/#{controller_asset}.#{ext}")
17
- = stylesheet_link_tag "controllers/#{controller_asset}"
18
-
19
- %body.yui3-skin-sam
20
- #body_wrap{:class => "module-#{controller.controller_name} method-#{controller.action_name} controller-#{params[:controller].tr( '/', '-' )} action-#{controller.action_name} view-#{ controller.active_template.virtual_path.split('/').pop() if controller.active_template }"}
21
- = yield
22
-
23
- #preload_wrap
24
- #preload
25
- .loading_icon
26
-
27
- = javascript_include_tag "releaf/application"
28
- - %w[js js.erb].each do |ext|
29
- - if File.exists?(_assets_path + "/javascripts/releaf/controllers/#{controller_asset}.#{ext}")
30
- = javascript_include_tag "releaf/controllers/#{controller_asset}"
31
- - if File.exists?(Rails.root.to_s + "/app/assets/javascripts/controllers/#{controller_asset}.#{ext}")
32
- = javascript_include_tag "controllers/#{controller_asset}"
@@ -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.aliases.aliasesTable.list{:cellpadding => "0", :cellspacing => "0"}
13
- %thead
14
- %tr
15
- %th.codeHeader Nosaukums
16
- - Settings.i18n_locales.each do |locale|
17
- %th.languageHeader{"data-locale" => locale}
18
- %span.name= locale
19
- %th.deleteHeader  
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
- .aliasesTable.aliasesTableHead
16
- .th.codeHeader{:style => "width: 208px; "}>< Nosaukums
17
- - Settings.i18n_locales.each do |locale|
18
- .th.languageHeader.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
@@ -1,11 +0,0 @@
1
- .body.inset_box
2
- .section
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
- = render 'edit.fields', :f => f, :fields => fields_to_display, :view_prefix => 'edit.field'
@@ -1,23 +0,0 @@
1
- - name_without_id_or_type = name.sub(/_(id|type)$/, '')
2
-
3
- - if f.object.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}", :f => f, :name => name, :view_prefix => view_prefix
8
-
9
- - else
10
- - if has_template? "_#{view_prefix}.#{name}"
11
- = render "#{view_prefix}.#{name}", :f => f, :name => name, :view_prefix => view_prefix
12
- - else
13
-
14
- - render_field_type, use_i18n = render_field_type(f.object, name)
15
-
16
- - if use_i18n and has_template?( "_edit.field_type_#{render_field_type}_i18n" )
17
- = render "edit.field_type_#{render_field_type}_i18n", :f => f, :name => name
18
-
19
- - elsif has_template? "_edit.field_type_#{render_field_type}"
20
- = render "edit.field_type_#{render_field_type}", :f => f, :name => name
21
-
22
- - else
23
- = render "edit.field_type_text", :f => f, :name => name
@@ -1,15 +0,0 @@
1
- - query_field = 'name' unless query_field
2
- - can_create = false unless can_create
3
- - autocomplete_url = url_for(:action => "autocomplete", :field => name, :query_field => query_field, :format => :json)
4
-
5
- .field.type_autocomplete{ 'data-name' => name }
6
- .label_wrap><= f.label name, name.to_s.humanize + ':'
7
- .value><
8
- - if can_create == true
9
- = f.text_field :"#{name}_text", :'data-autocomplete-url' => autocomplete_url
10
- - else
11
- %input{:type => :text, :name => "_tmp_field_#{f.object.object_id}_#{rand(999999999)}", :'data-autocomplete-url' => autocomplete_url, :value => resource_to_text(f.object.send(name.sub(/_id$/, ''))) }/
12
- = image_tag 'releaf/input/autocompleteExpandIcon.png', :alt => '', :class => :autocomplete_expand_icon
13
- = f.hidden_field name
14
-
15
- .clear
@@ -1,5 +0,0 @@
1
- .field.type_boolean{ 'data-name' => name }
2
- .value
3
- = f.check_box name
4
- = f.label name, name.to_s.humanize
5
- .clear
@@ -1,8 +0,0 @@
1
- .field.type_date{ '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.date", :default => 'yyyy-mm-dd'))
5
- -# FIXME
6
- -# .value><= f.text_field name, l(f.object.send(name), :format => :date_picker), :class => 'date_picker', :data => {:date_format => I18n.t("format.jquery.datepicker.date", :default => 'yy-mm-dd') }
7
- .value><= f.text_field name, :class => 'date_picker', :data => {:date_format => I18n.t("format.jquery.datepicker.date", :default => 'yy-mm-dd') }
8
- .clear
@@ -1,8 +0,0 @@
1
- .field.type_datetime{ '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.datetime", :default => 'yyyy-mm-dd hh:mm:ss'))
5
- -# FIXME
6
- -# .value><= f.text_field name, l(f.object.send(name), :format => :datetime_picker), :class => 'datetime_picker', :data => {:date_format => I18n.t("format.jquery.datepicker.date", :default => 'yy-mm-dd'), :time_format => I18n.t("format.jquery.datepicker.time", :default => 'HH:mm:ss') }
7
- .value><= f.text_field name, :class => 'datetime_picker', :data => {:date_format => I18n.t("format.jquery.datepicker.date", :default => 'yy-mm-dd'), :time_format => I18n.t("format.jquery.datepicker.time", :default => 'HH:mm:ss') }
8
- .clear
@@ -1,3 +0,0 @@
1
- .field.type_delete_nested
2
- = f.hidden_field :_destroy, :class => :destroy unless f.object.new_record?
3
- %span.remove= image_tag("releaf/icons/delete.png", :alt => "delete", :title => :delete)
@@ -1,10 +0,0 @@
1
- .field.type_file{ 'data-name' => name }
2
- - field_name = name.sub(/_uid$/, '')
3
-
4
- .label_wrap><= f.label field_name, field_name.to_s.humanize + ':'
5
- .value><
6
- = f.file_field field_name
7
- - unless f.object.send(name).blank?
8
- = f.hidden_field "retained_#{field_name}"
9
- = link_to I18n.t("common.Download current"), f.object.send(field_name).url, :target => :_blank
10
- .clear
@@ -1,12 +0,0 @@
1
- .field.type_text{ 'data-name' => name }
2
- - field_name = name.sub(/_uid$/, '')
3
-
4
- .label_wrap><= f.label field_name, field_name.to_s.humanize + ':'
5
- .value><
6
- = f.file_field field_name, :accept => 'image/png,image/jpeg,image/bmp,image/gif'
7
- - unless f.object.send(name).blank?
8
- .value_preview
9
- = f.hidden_field "retained_#{field_name}"
10
- - img_object = f.object.send(field_name)
11
- = link_to image_tag(img_object.thumb('x128>').url, :alt => ''), img_object.url, :target => :_blank, :data => {:lightbox => true }
12
- .clear
@@ -1,31 +0,0 @@
1
- :ruby
2
- select_params = [name]
3
-
4
-
5
- if local_assigns.key? :select_options
6
- select_params.push select_options
7
- else
8
- collection = f.object.class.reflect_on_association(name.sub(/_id$/, '').to_sym).try(:klass).try(:all)
9
- select_params.push options_from_collection_for_select(collection, :id, resource_to_text_method(collection.first), f.object.send(name))
10
- end
11
-
12
- if local_assigns.key? :options
13
- select_params.push options
14
- end
15
- if local_assigns.key? :html_options
16
- select_params.push html_options
17
- end
18
-
19
- include_blank = true
20
- f.object.class.validators_on(name).each do |validator|
21
- if validator.is_a? ActiveModel::Validations::PresenceValidator
22
- include_blank = f.object.new_record?
23
- break
24
- end
25
- end
26
- select_params.push Hash[:include_blank, include_blank]
27
-
28
- .field.type_item{ 'data-name' => name }
29
- .label_wrap><= f.label name, name.to_s.humanize + ':'
30
- .value><= f.select *select_params
31
- .clear
@@ -1,4 +0,0 @@
1
- .field.type_link{ 'data-name' => name }
2
- .label_wrap><= f.label name, name.to_s.humanize + ':'
3
- .value><= f.text_field name
4
- .clear
@@ -1,26 +0,0 @@
1
- - default_locale = Settings.i18n_locales.first
2
- .field.type_link.i18n{ :'data-name' => name }
3
- - Settings.i18n_locales.each_with_index do |locale, i|
4
- - translation = f.object.translations.find_or_initialize_by_locale(locale)
5
- - is_default_locale = locale == default_locale
6
-
7
- .localization{:"data-locale" => locale, :style => is_default_locale ? nil : 'display:none'}
8
- = f.fields_for :"translations", translation, :child_index => i do |ff|
9
- .label_wrap
10
- = ff.label name, name.to_s.humanize + ':'
11
- .value
12
- - unless translation.new_record?
13
- = ff.hidden_field :id
14
- = ff.hidden_field :locale
15
-
16
- - if is_default_locale
17
- = f.hidden_field name, :class => :sync_field
18
- = ff.text_field name, :class => :sync_field
19
- - else
20
- = ff.text_field name
21
- .clear
22
-
23
- .localization_buttons
24
- - Settings.i18n_locales.each_with_index do |locale, i|
25
- - is_default_locale = locale == default_locale
26
- %button{:type => :button, :"data-locale" => locale, :class => is_default_locale ? :active : nil}= locale
@@ -1,4 +0,0 @@
1
- .field.type_text{ 'data-name' => name }
2
- .label_wrap><= f.label name, name.to_s.humanize + ':'
3
- .value><= f.password_field name, :autocomplete => 'off'
4
- .clear
@@ -1,4 +0,0 @@
1
- .field.type_richtext{ 'data-name' => name }
2
- .label_wrap><= f.label name, name.sub(/_html$/, '').to_s.humanize + ':'
3
- .value><= f.text_area name, :rows => 5, :cols => 50, :class => "richtext"
4
- .clear
@@ -1,27 +0,0 @@
1
- - default_locale = Settings.i18n_locales.first
2
-
3
- .field.type_richtext.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.sub(/_html$/, '').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 => "richtext sync_field"
20
- - else
21
- = ff.text_area name, :rows => 5, :cols => 75, :class => "richtext"
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,4 +0,0 @@
1
- .field.type_text{ 'data-name' => name }
2
- .label_wrap><= f.label name, name.to_s.humanize + ':'
3
- .value><= f.text_field name
4
- .clear
@@ -1,27 +0,0 @@
1
- - default_locale = Settings.i18n_locales.first
2
-
3
- .field.type_text.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_field name, :class => :sync_field
20
- - else
21
- = ff.text_field name
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,4 +0,0 @@
1
- .field.type_textarea{ 'data-name' => name }
2
- .label_wrap><= f.label name, name.to_s.humanize + ':'
3
- .value><= f.text_area name, :rows => 5, :cols => 75
4
- .clear