releaf 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (323) hide show
  1. data/LICENSE +24 -0
  2. data/README.md +74 -0
  3. data/Rakefile +62 -0
  4. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  5. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_flat_75_ffffff_40x100.png +0 -0
  6. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  7. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_65_ffffff_1x400.png +0 -0
  8. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_75_dadada_1x400.png +0 -0
  9. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  10. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  11. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  12. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_222222_256x240.png +0 -0
  13. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_2e83ff_256x240.png +0 -0
  14. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_454545_256x240.png +0 -0
  15. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_888888_256x240.png +0 -0
  16. data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_cd0a0a_256x240.png +0 -0
  17. data/app/assets/images/releaf/3rd_party/lightbox/close.png +0 -0
  18. data/app/assets/images/releaf/3rd_party/lightbox/loading.gif +0 -0
  19. data/app/assets/images/releaf/3rd_party/lightbox/next.png +0 -0
  20. data/app/assets/images/releaf/3rd_party/lightbox/prev.png +0 -0
  21. data/app/assets/images/releaf/add.png +0 -0
  22. data/app/assets/images/releaf/background.jpg +0 -0
  23. data/app/assets/images/releaf/button/button_bgr.gif +0 -0
  24. data/app/assets/images/releaf/button/button_hover_bgr.png +0 -0
  25. data/app/assets/images/releaf/controllers/content/close.gif +0 -0
  26. data/app/assets/images/releaf/controllers/content/close_active.gif +0 -0
  27. data/app/assets/images/releaf/controllers/content/close_hover.gif +0 -0
  28. data/app/assets/images/releaf/controllers/content/global_fields_bgr.png +0 -0
  29. data/app/assets/images/releaf/controllers/content/open.gif +0 -0
  30. data/app/assets/images/releaf/controllers/content/open_2.gif +0 -0
  31. data/app/assets/images/releaf/controllers/content/open_active.gif +0 -0
  32. data/app/assets/images/releaf/controllers/content/open_hover.gif +0 -0
  33. data/app/assets/images/releaf/controllers/sessions/background.jpg +0 -0
  34. data/app/assets/images/releaf/controllers/sessions/logo.jpg +0 -0
  35. data/app/assets/images/releaf/expand_tool/close.png +0 -0
  36. data/app/assets/images/releaf/expand_tool/close_hover.png +0 -0
  37. data/app/assets/images/releaf/expand_tool/close_hover_shim.png +0 -0
  38. data/app/assets/images/releaf/expand_tool/close_shim.png +0 -0
  39. data/app/assets/images/releaf/expand_tool/loader.gif +0 -0
  40. data/app/assets/images/releaf/expand_tool/open.png +0 -0
  41. data/app/assets/images/releaf/expand_tool/open_hover.png +0 -0
  42. data/app/assets/images/releaf/expand_tool/open_hover_shim.png +0 -0
  43. data/app/assets/images/releaf/expand_tool/open_shim.png +0 -0
  44. data/app/assets/images/releaf/favicon.ico +0 -0
  45. data/app/assets/images/releaf/globalFieldContainerBgr.png +0 -0
  46. data/app/assets/images/releaf/icons/129.png +0 -0
  47. data/app/assets/images/releaf/icons/130.png +0 -0
  48. data/app/assets/images/releaf/icons/accept.png +0 -0
  49. data/app/assets/images/releaf/icons/add.png +0 -0
  50. data/app/assets/images/releaf/icons/arrow_down.png +0 -0
  51. data/app/assets/images/releaf/icons/arrow_left.png +0 -0
  52. data/app/assets/images/releaf/icons/arrow_refresh.png +0 -0
  53. data/app/assets/images/releaf/icons/arrow_up.png +0 -0
  54. data/app/assets/images/releaf/icons/bin_empty.png +0 -0
  55. data/app/assets/images/releaf/icons/bullet_black.png +0 -0
  56. data/app/assets/images/releaf/icons/bullet_connect.png +0 -0
  57. data/app/assets/images/releaf/icons/bullet_start.png +0 -0
  58. data/app/assets/images/releaf/icons/bullet_tick.png +0 -0
  59. data/app/assets/images/releaf/icons/chrome.png +0 -0
  60. data/app/assets/images/releaf/icons/control_play.png +0 -0
  61. data/app/assets/images/releaf/icons/date.png +0 -0
  62. data/app/assets/images/releaf/icons/delete.png +0 -0
  63. data/app/assets/images/releaf/icons/disk.png +0 -0
  64. data/app/assets/images/releaf/icons/drag-handle.png +0 -0
  65. data/app/assets/images/releaf/icons/error.png +0 -0
  66. data/app/assets/images/releaf/icons/eye.png +0 -0
  67. data/app/assets/images/releaf/icons/firefox.png +0 -0
  68. data/app/assets/images/releaf/icons/google-not-available.gif +0 -0
  69. data/app/assets/images/releaf/icons/google.gif +0 -0
  70. data/app/assets/images/releaf/icons/keyboard.png +0 -0
  71. data/app/assets/images/releaf/icons/left_16.png +0 -0
  72. data/app/assets/images/releaf/icons/link.png +0 -0
  73. data/app/assets/images/releaf/icons/magnifier.png +0 -0
  74. data/app/assets/images/releaf/icons/notAllowed.png +0 -0
  75. data/app/assets/images/releaf/icons/page_white_add.png +0 -0
  76. data/app/assets/images/releaf/icons/page_white_edit.png +0 -0
  77. data/app/assets/images/releaf/icons/page_white_put.png +0 -0
  78. data/app/assets/images/releaf/icons/page_white_text.png +0 -0
  79. data/app/assets/images/releaf/icons/pencil.png +0 -0
  80. data/app/assets/images/releaf/icons/picture.png +0 -0
  81. data/app/assets/images/releaf/icons/right_16.png +0 -0
  82. data/app/assets/images/releaf/icons/tick.png +0 -0
  83. data/app/assets/images/releaf/icons/warning.png +0 -0
  84. data/app/assets/images/releaf/icons/world_go.png +0 -0
  85. data/app/assets/images/releaf/icons/world_link.png +0 -0
  86. data/app/assets/images/releaf/input/autocompleteExpandIcon.png +0 -0
  87. data/app/assets/images/releaf/input/input_bgr.gif +0 -0
  88. data/app/assets/images/releaf/language_root.png +0 -0
  89. data/app/assets/images/releaf/loader.gif +0 -0
  90. data/app/assets/images/releaf/logout.png +0 -0
  91. data/app/assets/images/releaf/main_menu/active_bgr.png +0 -0
  92. data/app/assets/images/releaf/main_menu/bgr.png +0 -0
  93. data/app/assets/images/releaf/main_menu/hover_bgr.png +0 -0
  94. data/app/assets/images/releaf/module.png +0 -0
  95. data/app/assets/images/releaf/panel_layout/active_bgr.png +0 -0
  96. data/app/assets/images/releaf/panel_layout/secondary_panel_horizontal_bgr.png +0 -0
  97. data/app/assets/images/releaf/panel_layout/secondary_panel_vertical_bgr.png +0 -0
  98. data/app/assets/images/releaf/releaf_table/selected_bgr.png +0 -0
  99. data/app/assets/images/releaf/releaf_table/th_bgr.gif +0 -0
  100. data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/README.md +73 -0
  101. data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/jquery.cookie.js +47 -0
  102. data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/server.js +24 -0
  103. data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/test.html +19 -0
  104. data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/test.js +80 -0
  105. data/app/assets/javascripts/releaf/3rd_party/jquery-ui-timepicker-addon.js +1882 -0
  106. data/app/assets/javascripts/releaf/3rd_party/lightbox.js.erb +379 -0
  107. data/app/assets/javascripts/releaf/application.js +14 -0
  108. data/app/assets/javascripts/releaf/controllers/base.js +170 -0
  109. data/app/assets/javascripts/releaf/controllers/releaf/content.js +90 -0
  110. data/app/assets/javascripts/releaf/controllers/releaf/translations.js +31 -0
  111. data/app/assets/javascripts/releaf/include/continuous_scroll.js +321 -0
  112. data/app/assets/javascripts/releaf/include/field.type_autocomplete.js +58 -0
  113. data/app/assets/javascripts/releaf/include/field.type_richtext.js +90 -0
  114. data/app/assets/javascripts/releaf/include/localization.js +12 -0
  115. data/app/assets/javascripts/releaf/include/nested_fields.js +71 -0
  116. data/app/assets/javascripts/releaf/include/sortable.js +27 -0
  117. data/app/assets/javascripts/releaf/lib/request_url.js +183 -0
  118. data/app/assets/stylesheets/releaf/3rd_party/jquery-ui-1.9.2.custom.css.erb +464 -0
  119. data/app/assets/stylesheets/releaf/3rd_party/jquery-ui-timepicker-addon.css +10 -0
  120. data/app/assets/stylesheets/releaf/3rd_party/lightbox.css.erb +157 -0
  121. data/app/assets/stylesheets/releaf/application.css.erb +122 -0
  122. data/app/assets/stylesheets/releaf/controllers/base.css.erb +205 -0
  123. data/app/assets/stylesheets/releaf/controllers/releaf/content.css.erb +416 -0
  124. data/app/assets/stylesheets/releaf/controllers/releaf/sessions.css.scss.erb +116 -0
  125. data/app/assets/stylesheets/releaf/controllers/releaf/translations.css.erb +205 -0
  126. data/app/assets/stylesheets/releaf/include/button.css.erb +176 -0
  127. data/app/assets/stylesheets/releaf/include/field.css.erb +257 -0
  128. data/app/assets/stylesheets/releaf/include/input.css.erb +40 -0
  129. data/app/assets/stylesheets/releaf/include/main_menu.css.erb +66 -0
  130. data/app/assets/stylesheets/releaf/include/pagination.css.erb +29 -0
  131. data/app/assets/stylesheets/releaf/include/panel_layout.css.erb +251 -0
  132. data/app/assets/stylesheets/releaf/include/releaf_table.css.erb +112 -0
  133. data/app/assets/stylesheets/releaf/include/sortable.css.erb +12 -0
  134. data/app/controllers/releaf/admins_controller.rb +48 -0
  135. data/app/controllers/releaf/application_controller.rb +11 -0
  136. data/app/controllers/releaf/base_application_controller.rb +15 -0
  137. data/app/controllers/releaf/base_controller.rb +310 -0
  138. data/app/controllers/releaf/content_controller.rb +166 -0
  139. data/app/controllers/releaf/roles_controller.rb +36 -0
  140. data/app/controllers/releaf/sessions_controller.rb +5 -0
  141. data/app/controllers/releaf/tinymce_assets_controller.rb +26 -0
  142. data/app/controllers/releaf/translations_controller.rb +121 -0
  143. data/app/helpers/releaf/admin_helper.rb +79 -0
  144. data/app/helpers/releaf/application_helper.rb +4 -0
  145. data/app/helpers/releaf/pagination_renderer.rb +44 -0
  146. data/app/helpers/releaf/releaf_devise_helper.rb +8 -0
  147. data/app/models/releaf/admin.rb +51 -0
  148. data/app/models/releaf/node.rb +221 -0
  149. data/app/models/releaf/node_base.rb +25 -0
  150. data/app/models/releaf/role.rb +119 -0
  151. data/app/models/releaf/tinymce_asset.rb +6 -0
  152. data/app/views/layouts/releaf/admin.html.haml +51 -0
  153. data/app/views/releaf/aliases/_edit.body.haml +50 -0
  154. data/app/views/releaf/aliases/_edit.header.haml +19 -0
  155. data/app/views/releaf/aliases/_index.row.haml +5 -0
  156. data/app/views/releaf/aliases/_secondary_panel.haml +13 -0
  157. data/app/views/releaf/base/_edit.body.haml +19 -0
  158. data/app/views/releaf/base/_edit.field.haml +96 -0
  159. data/app/views/releaf/base/_edit.field.type_autocomplete.haml +15 -0
  160. data/app/views/releaf/base/_edit.field.type_checkbox.haml +5 -0
  161. data/app/views/releaf/base/_edit.field.type_date.haml +8 -0
  162. data/app/views/releaf/base/_edit.field.type_datetime.haml +8 -0
  163. data/app/views/releaf/base/_edit.field.type_delete_nested.haml +3 -0
  164. data/app/views/releaf/base/_edit.field.type_file.haml +10 -0
  165. data/app/views/releaf/base/_edit.field.type_image.haml +14 -0
  166. data/app/views/releaf/base/_edit.field.type_link.haml +4 -0
  167. data/app/views/releaf/base/_edit.field.type_password.haml +4 -0
  168. data/app/views/releaf/base/_edit.field.type_richtext.haml +4 -0
  169. data/app/views/releaf/base/_edit.field.type_richtext_i18n.haml +27 -0
  170. data/app/views/releaf/base/_edit.field.type_select.haml +11 -0
  171. data/app/views/releaf/base/_edit.field.type_text.haml +4 -0
  172. data/app/views/releaf/base/_edit.field.type_text_i18n.haml +27 -0
  173. data/app/views/releaf/base/_edit.field.type_textarea.haml +4 -0
  174. data/app/views/releaf/base/_edit.field.type_textarea_i18n.haml +27 -0
  175. data/app/views/releaf/base/_edit.field.type_time.haml +8 -0
  176. data/app/views/releaf/base/_edit.footer.haml +14 -0
  177. data/app/views/releaf/base/_edit.form.haml +4 -0
  178. data/app/views/releaf/base/_edit.has_many_associations.haml +45 -0
  179. data/app/views/releaf/base/_edit.header.haml +3 -0
  180. data/app/views/releaf/base/_index.body.haml +6 -0
  181. data/app/views/releaf/base/_index.cell.haml +19 -0
  182. data/app/views/releaf/base/_index.footer.haml +22 -0
  183. data/app/views/releaf/base/_index.header.haml +4 -0
  184. data/app/views/releaf/base/_index.row.haml +6 -0
  185. data/app/views/releaf/base/_index.search.haml +5 -0
  186. data/app/views/releaf/base/_index.table.haml +8 -0
  187. data/app/views/releaf/base/_secondary_panel.haml +9 -0
  188. data/app/views/releaf/base/_show.body.haml +7 -0
  189. data/app/views/releaf/base/_show.field.haml +78 -0
  190. data/app/views/releaf/base/_show.field.type_html.haml +1 -0
  191. data/app/views/releaf/base/_show.footer.haml +16 -0
  192. data/app/views/releaf/base/_show.header.haml +3 -0
  193. data/app/views/releaf/base/confirm_destroy.haml +10 -0
  194. data/app/views/releaf/base/edit.haml +1 -0
  195. data/app/views/releaf/base/index.haml +3 -0
  196. data/app/views/releaf/base/new.haml +1 -0
  197. data/app/views/releaf/base/show.haml +3 -0
  198. data/app/views/releaf/content/_edit.body.haml +45 -0
  199. data/app/views/releaf/content/_edit.content_fields.haml +19 -0
  200. data/app/views/releaf/content/_edit.slug.haml +12 -0
  201. data/app/views/releaf/content/_get_content_form.haml +7 -0
  202. data/app/views/releaf/content/_secondary_panel.haml +3 -0
  203. data/app/views/releaf/content/_show.field.content.haml +11 -0
  204. data/app/views/releaf/content/_tree_level.haml +16 -0
  205. data/app/views/releaf/content/ajax.new.haml +3 -0
  206. data/app/views/releaf/content/index.haml +0 -0
  207. data/app/views/releaf/roles/_edit.field.admins.haml +0 -0
  208. data/app/views/releaf/roles/_edit.field.permissions.haml +5 -0
  209. data/app/views/releaf/roles/_show.field.default.haml +6 -0
  210. data/app/views/releaf/roles/_show.field.permissions.haml +11 -0
  211. data/app/views/releaf/sessions/new.html.haml +17 -0
  212. data/app/views/releaf/translations/_edit.body.haml +50 -0
  213. data/app/views/releaf/translations/_edit.header.haml +19 -0
  214. data/app/views/releaf/translations/_index.row.haml +5 -0
  215. data/app/views/releaf/translations/_secondary_panel.haml +13 -0
  216. data/bin/releaf +25 -0
  217. data/lib/generators/releaf/install_generator.rb +87 -0
  218. data/lib/generators/releaf/templates/config/common_fields.yml.example +17 -0
  219. data/lib/generators/releaf/templates/controllers/home_controller.rb +4 -0
  220. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  221. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_flat_75_ffffff_40x100.png +0 -0
  222. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  223. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_65_ffffff_1x400.png +0 -0
  224. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_75_dadada_1x400.png +0 -0
  225. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  226. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  227. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  228. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_222222_256x240.png +0 -0
  229. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_2e83ff_256x240.png +0 -0
  230. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_454545_256x240.png +0 -0
  231. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_888888_256x240.png +0 -0
  232. data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_cd0a0a_256x240.png +0 -0
  233. data/lib/generators/releaf/templates/images/3rd_party/lightbox/close.png +0 -0
  234. data/lib/generators/releaf/templates/images/3rd_party/lightbox/loading.gif +0 -0
  235. data/lib/generators/releaf/templates/images/3rd_party/lightbox/next.png +0 -0
  236. data/lib/generators/releaf/templates/images/3rd_party/lightbox/prev.png +0 -0
  237. data/lib/generators/releaf/templates/initializers/releaf.rb +59 -0
  238. data/lib/generators/releaf/templates/initializers/releaf_i18n.rb +8 -0
  239. data/lib/generators/releaf/templates/initializers/releaf_store_current_template.rb +25 -0
  240. data/lib/generators/releaf/templates/javascripts/3rd_party/jquery_ui.js +14850 -0
  241. data/lib/generators/releaf/templates/javascripts/3rd_party/lightbox.js.erb +379 -0
  242. data/lib/generators/releaf/templates/javascripts/application.js +15 -0
  243. data/lib/generators/releaf/templates/javascripts/lib/js_check.js +8 -0
  244. data/lib/generators/releaf/templates/javascripts/lib/request_url.js +169 -0
  245. data/lib/generators/releaf/templates/javascripts/lib/sortable.js +29 -0
  246. data/lib/generators/releaf/templates/migrations/create_releaf_admins.rb +53 -0
  247. data/lib/generators/releaf/templates/migrations/create_releaf_nodes.rb +25 -0
  248. data/lib/generators/releaf/templates/migrations/create_releaf_roles.rb +11 -0
  249. data/lib/generators/releaf/templates/migrations/create_releaf_tinymce_assets.rb +10 -0
  250. data/lib/generators/releaf/templates/migrations/create_releaf_translations.rb +31 -0
  251. data/lib/generators/releaf/templates/models/admin_ability.rb +51 -0
  252. data/lib/generators/releaf/templates/seeds.rb +64 -0
  253. data/lib/generators/releaf/templates/stylesheets/3rd_party/jquery_ui/smoothness.css.erb +1174 -0
  254. data/lib/generators/releaf/templates/stylesheets/3rd_party/lightbox.css.erb +157 -0
  255. data/lib/generators/releaf/templates/stylesheets/3rd_party/reset.css +48 -0
  256. data/lib/generators/releaf/templates/stylesheets/application.scss +15 -0
  257. data/lib/generators/releaf/templates/stylesheets/style.scss +45 -0
  258. data/lib/generators/releaf/templates/views/home/index.html.haml +1 -0
  259. data/lib/generators/releaf/templates/views/layouts/application.html.haml +26 -0
  260. data/lib/i18n/backend/releaf.rb +96 -0
  261. data/lib/i18n/backend/releaf/translation.rb +56 -0
  262. data/lib/i18n/backend/releaf/translation_data.rb +32 -0
  263. data/lib/i18n/backend/releaf/translation_group.rb +30 -0
  264. data/lib/i18n/releaf.rb +1 -0
  265. data/lib/releaf.rb +30 -0
  266. data/lib/releaf/engine.rb +4 -0
  267. data/lib/releaf/slug.rb +79 -0
  268. data/lib/releaf/version.rb +3 -0
  269. data/lib/tasks/releaf_tasks.rake +4 -0
  270. data/spec/dummy/README.rdoc +261 -0
  271. data/spec/dummy/Rakefile +7 -0
  272. data/spec/dummy/app/assets/images/rails.png +0 -0
  273. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  274. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  275. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  276. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  277. data/spec/dummy/app/models/admin_ability.rb +51 -0
  278. data/spec/dummy/app/models/settings.rb +2 -0
  279. data/spec/dummy/app/views/layouts/application.html.haml +10 -0
  280. data/spec/dummy/config.ru +4 -0
  281. data/spec/dummy/config/application.rb +68 -0
  282. data/spec/dummy/config/boot.rb +6 -0
  283. data/spec/dummy/config/common_fields.yml.example +17 -0
  284. data/spec/dummy/config/database.yml +42 -0
  285. data/spec/dummy/config/environment.rb +5 -0
  286. data/spec/dummy/config/environments/development.rb +37 -0
  287. data/spec/dummy/config/environments/production.rb +67 -0
  288. data/spec/dummy/config/environments/test.rb +37 -0
  289. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  290. data/spec/dummy/config/initializers/devise.rb +232 -0
  291. data/spec/dummy/config/initializers/dragonfly.rb +1 -0
  292. data/spec/dummy/config/initializers/inflections.rb +15 -0
  293. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  294. data/spec/dummy/config/initializers/releaf.rb +59 -0
  295. data/spec/dummy/config/initializers/releaf_i18n.rb +8 -0
  296. data/spec/dummy/config/initializers/releaf_store_current_template.rb +25 -0
  297. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  298. data/spec/dummy/config/initializers/session_store.rb +8 -0
  299. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  300. data/spec/dummy/config/locales/devise.en.yml +58 -0
  301. data/spec/dummy/config/locales/en.yml +5 -0
  302. data/spec/dummy/config/routes.rb +11 -0
  303. data/spec/dummy/db/migrate/20130204164516_create_settings.rb +17 -0
  304. data/spec/dummy/db/migrate/20130204164523_create_releaf_nodes.rb +25 -0
  305. data/spec/dummy/db/migrate/20130204164524_create_releaf_roles.rb +11 -0
  306. data/spec/dummy/db/migrate/20130204164525_create_releaf_translations.rb +31 -0
  307. data/spec/dummy/db/migrate/20130204164526_create_releaf_admins.rb +53 -0
  308. data/spec/dummy/db/schema.rb +112 -0
  309. data/spec/dummy/db/seeds.rb +64 -0
  310. data/spec/dummy/doc/README_FOR_APP +2 -0
  311. data/spec/dummy/log/development.log +74 -0
  312. data/spec/dummy/log/test.log +129 -0
  313. data/spec/dummy/public/404.html +26 -0
  314. data/spec/dummy/public/422.html +26 -0
  315. data/spec/dummy/public/500.html +25 -0
  316. data/spec/dummy/public/favicon.ico +0 -0
  317. data/spec/dummy/script/rails +6 -0
  318. data/spec/dummy/tmp/cache/9C5/660/settings%3Ai18n_updated_at +1 -0
  319. data/spec/factories/factories.rb +24 -0
  320. data/spec/features/admin_spec.rb +41 -0
  321. data/spec/spec_helper.rb +23 -0
  322. data/templates/releaf/installer.rb +196 -0
  323. metadata +777 -0
@@ -0,0 +1,40 @@
1
+ /* base input styling */
2
+ input,
3
+ select
4
+ {
5
+ font-size: 100%;
6
+ }
7
+ input,
8
+ select,
9
+ textarea
10
+ {
11
+ border: 1px solid #ABABAB;
12
+ border-top-color: #707070;
13
+ border-bottom-color: #CECECE;
14
+ padding: 2px 3px;
15
+ background: white url("<%= asset_path 'releaf/input/input_bgr.gif' %>") repeat-x 0 -1px;
16
+ margin: 0;
17
+ }
18
+ select
19
+ {
20
+ padding: 1px;
21
+ cursor: pointer;
22
+ }
23
+ input:focus,
24
+ select:focus,
25
+ textarea:focus,
26
+ .mceLayout.focus
27
+ {
28
+ border-color: #989ea4;
29
+ border-top-color: #7c8288;
30
+ border-bottom-color: #a8aeb4;
31
+ outline: none;
32
+ box-shadow: 0 0 4px 1px #2878D4;
33
+ }
34
+ input[disabled],
35
+ select[disabled],
36
+ textarea[disabled]
37
+ {
38
+ background: transparent none;
39
+ border-color: #CECECE;
40
+ }
@@ -0,0 +1,66 @@
1
+ .main_menu
2
+ {
3
+ background: #7B8A98 url("<%= asset_path 'releaf/main_menu/bgr.png' %>") repeat-x left bottom;
4
+ border-bottom: 1px solid white;
5
+ }
6
+ .main_menu ul
7
+ {
8
+ padding: 0 0 0 18px;
9
+ list-style: none;
10
+ margin: 0;
11
+ }
12
+ .main_menu li
13
+ {
14
+ display: inline-block;
15
+ vertical-align: top;
16
+ }
17
+ .main_menu a
18
+ {
19
+ display: block;
20
+ padding: 7px 12px 6px 12px;
21
+ font-size: 140%;
22
+ text-align: center;
23
+ text-decoration: none;
24
+ text-transform: uppercase;
25
+ min-height: 51px;
26
+ }
27
+ .main_menu .active
28
+ {
29
+ background: #a5b2bf url("<%= asset_path 'releaf/main_menu/active_bgr.png' %>") repeat-x top left;
30
+ }
31
+ .main_menu a:hover
32
+ {
33
+ background: #a5b2bf url("<%= asset_path 'releaf/main_menu/hover_bgr.png' %>") repeat-x top left;
34
+ text-decoration: none;
35
+ }
36
+ .main_menu .image_container
37
+ {
38
+ display: block;
39
+ min-height: 36px;
40
+ }
41
+ .main_menu .name_wrap
42
+ {
43
+ font-size: 0.63em;
44
+ color: #f2f2f2;
45
+ text-shadow: 0px 1px 0px black;
46
+ display: block;
47
+ }
48
+ .main_menu .active .name_wrap,
49
+ .main_menu a:hover .name_wrap
50
+ {
51
+ text-shadow: 0px 1px 0px rgba(255,255,255,.8);
52
+ color: black;
53
+ }
54
+ .main_menu a:hover .name_wrap
55
+ {
56
+ text-shadow: 0px 1px 0px rgba(255,255,255,1);
57
+ }
58
+ .main_menu .user
59
+ {
60
+ position:absolute;
61
+ top:0;
62
+ right: 10px;
63
+ text-transform:uppercase;
64
+ text-align: center;
65
+ }
66
+
@@ -0,0 +1,29 @@
1
+ .primary_panel .pagination
2
+ {
3
+ display: inline-block;
4
+ }
5
+ .primary_panel .pagination .current
6
+ {
7
+ font-style: normal;
8
+ cursor: default;
9
+ }
10
+ .primary_panel .pagination .previous_page,
11
+ .primary_panel .pagination .next_page
12
+ {
13
+ padding-left: 16px;
14
+ padding-right: 16px;
15
+ }
16
+ .primary_panel .pagination .previous_page
17
+ {
18
+ border-top-left-radius: 10px;
19
+ border-bottom-left-radius: 10px;
20
+ }
21
+ .primary_panel .pagination .next_page
22
+ {
23
+ border-top-right-radius: 10px;
24
+ border-bottom-right-radius: 10px;
25
+ }
26
+ .primary_panel .pagination .gap
27
+ {
28
+ opacity: 1;
29
+ }
@@ -0,0 +1,251 @@
1
+ /* panel layout */
2
+ .panel_layout
3
+ {
4
+ position: absolute;
5
+ top: 65px;
6
+ bottom: 0;
7
+ overflow: hidden;
8
+ width: 100%;
9
+ }
10
+ /* TODO: fix these paddings */
11
+ .panel_layout .header .padding,
12
+ .panel_layout .header.padding,
13
+ .panel_layout .footer .padding,
14
+ .panel_layout .footer.padding
15
+ {
16
+ padding: 5px 15px;
17
+ }
18
+ .panel_layout .primary_panel .footer .padding
19
+ {
20
+ padding-bottom: 20px;
21
+ }
22
+
23
+ /* primary and secondary panel common features */
24
+ .panel_layout .primary_panel,
25
+ .panel_layout .secondary_panel
26
+ {
27
+ height: 100%;
28
+ overflow: auto;
29
+ outline: none;
30
+ position: relative;
31
+ }
32
+ .panel_layout .secondary_panel,
33
+ .panel_layout .primary_panel,
34
+ .panel_layout .secondary_panel a,
35
+ .panel_layout .primary_panel a
36
+ {
37
+ color: black;
38
+ }
39
+ .panel_layout .primary_panel .inner,
40
+ .panel_layout .secondary_panel .inner
41
+ {
42
+ height: 100%;
43
+ }
44
+
45
+ /* header, body and footer */
46
+ .panel_layout .header,
47
+ .panel_layout .body,
48
+ .panel_layout .footer
49
+ {
50
+ position: absolute;
51
+ left: 0;
52
+ right: 0;
53
+ outline: none;
54
+ }
55
+
56
+ /* primary panel */
57
+ .panel_layout .primary_panel .header
58
+ {
59
+ top: 0;
60
+ }
61
+ .panel_layout .primary_panel .header h2
62
+ {
63
+ margin: 0;
64
+ display: inline;
65
+ text-shadow: 0px 1px 0px white;
66
+ }
67
+ .panel_layout .primary_panel .body
68
+ {
69
+ overflow: auto;
70
+ bottom: 49px;
71
+ top: 32px;
72
+ left: 10px;
73
+ right: 10px;
74
+ padding: 0;
75
+ }
76
+ .panel_layout .primary_panel .footer
77
+ {
78
+ bottom: 0;
79
+ height: 41px;
80
+ overflow: hidden;
81
+ }
82
+ .panel_layout .primary_panel .footer.center
83
+ {
84
+ text-align: center;
85
+ }
86
+
87
+ /* boxes */
88
+ .panel_layout .inset_box,
89
+ .panel_layout .outset_box
90
+ {
91
+ border-width: 0px;
92
+ border-style: solid;
93
+ border-radius: 5px;
94
+ }
95
+ .panel_layout .outset_box
96
+ {
97
+ padding: 15px 5px;
98
+ background-color: white;
99
+ border-color: #D0D0D0 #bfbfbf #a6a6a6 #bfbfbf;
100
+ box-shadow: 0px 1px 2px rgba(0,0,0,.5), 0px -1px 0px rgba(0,0,0,.05);
101
+ }
102
+ .panel_layout .inset_box
103
+ {
104
+ background-color: #e8e8e8;
105
+ padding-top: 20px;
106
+ border-color: #707070 #ABABAB #CECECE;
107
+ padding-right: 2px;
108
+ padding-left: 2px;
109
+ box-shadow: 0px 1px 3px rgba(0,0,0,.5) inset;
110
+ }
111
+ .panel_layout .inset_box.no_shadow,
112
+ .panel_layout .outset_box.no_shadow
113
+ {
114
+ box-shadow: none;
115
+ border-width: 1px;
116
+ }
117
+
118
+ /* secondary panel */
119
+ .panel_layout .secondary_panel
120
+ {
121
+ float: left;
122
+ width: 20%;
123
+ min-width: 200px;
124
+ max-width: 400px;
125
+ background: #d6d7da url("<%= asset_path 'releaf/panel_layout/secondary_panel_vertical_bgr.png' %>") repeat-y top left;
126
+ line-height: 150%;
127
+ soverflow: visible;
128
+ }
129
+ .panel_layout .secondary_panel .inner
130
+ {
131
+ background: transparent url("<%= asset_path 'releaf/panel_layout/secondary_panel_horizontal_bgr.png' %>") repeat-x top left;
132
+ }
133
+ .panel_layout .secondary_panel .inner:before,
134
+ .panel_layout .secondary_panel .inner:after
135
+ {
136
+ content: ".";
137
+ visibility: hidden;
138
+ display: block;
139
+ height: 0;
140
+ }
141
+ .panel_layout .secondary_panel .inner:after
142
+ {
143
+ height: 10px;
144
+ }
145
+ .panel_layout .secondary_panel .footer
146
+ {
147
+ bottom: 0;
148
+ height: 41px;
149
+ overflow: hidden;
150
+ }
151
+ .panel_layout .secondary_panel .standard_submenu ul ul
152
+ {
153
+ padding: 0;
154
+ }
155
+ .panel_layout .secondary_panel .standard_submenu .section_title
156
+ {
157
+ margin-top: 10px;
158
+ padding: 0 10px 0 15px;
159
+ text-transform: uppercase;
160
+ font-size: 85%;
161
+ font-weight: bold;
162
+ color: black;
163
+ text-shadow: 0px 1px 0px #f0f0f0;
164
+ }
165
+ .panel_layout .secondary_panel .standard_submenu a
166
+ {
167
+ color: inherit;
168
+ }
169
+ .panel_layout .secondary_panel .standard_submenu a,
170
+ .panel_layout .secondary_panel .standard_submenu li > span
171
+ {
172
+ text-decoration: none;
173
+ padding: 1px 7px 1px 23px;
174
+ display: block;
175
+ outline: none;
176
+ }
177
+ .panel_layout .secondary_panel .standard_submenu li.disabled
178
+ {
179
+ background-color: transparent;
180
+ color: #999999;
181
+ }
182
+ .panel_layout .secondary_panel .standard_submenu a:hover,
183
+ .panel_layout .secondary_panel .standard_submenu .active a
184
+ {
185
+ border-color: #a498b3;
186
+ background: #7c8ea0 url("<%= asset_path 'releaf/panel_layout/active_bgr.png' %>") repeat-x top left;
187
+ position: relative;
188
+ z-index: 2;
189
+ color: white;
190
+ }
191
+ .panel_layout .secondary_panel .standard_submenu a:hover,
192
+ .panel_layout .secondary_panel .standard_submenu .active a:hover
193
+ {
194
+ border-color: #a498b3;
195
+ background-color: #a5b2bf;
196
+ }
197
+ .panel_layout .secondary_panel .standard_submenu .active a
198
+ {
199
+ text-shadow: rgba(0, 0, 0, 0.4) 0 1px;
200
+ }
201
+ .panel_layout .secondary_panel .standard_submenu li li:hover a
202
+ {
203
+ text-shadow: rgba(0, 0, 0, .6) 0 1px 7px;
204
+ }
205
+ .panel_layout .secondary_panel .standard_submenu .active a,
206
+ .panel_layout .secondary_panel .standard_submenu .active:hover a
207
+ {
208
+ margin-bottom: -1px;
209
+ }
210
+ .panel_layout .secondary_panel .standard_submenu .active a
211
+ {
212
+ padding-top: 0px;
213
+ border-top: 1px solid #8595a5;
214
+ }
215
+ .panel_layout .secondary_panel .standard_submenu .active a,
216
+ .panel_layout .secondary_panel .standard_submenu .active:hover a
217
+ {
218
+ border-bottom: 1px solid #e3e3e5;
219
+ }
220
+
221
+ /* badge */
222
+ .panel_layout .secondary_panel .standard_submenu .badge
223
+ {
224
+ display: inline-block;
225
+ padding: 1px 8px;
226
+ line-height: 13px;
227
+ border: 1px solid #900;
228
+ font-weight: bold;
229
+ font-size: 80%;
230
+ opacity: 0.8;
231
+ border-radius: 18px;
232
+ background: #7C8EA0;
233
+ color: #fff;
234
+ position: relative;
235
+ top: -1px;
236
+ margin-left: 1em;
237
+ }
238
+ .panel_layout .secondary_panel .standard_submenu .badge.warning
239
+ {
240
+ background: #cc0033;
241
+ color: #fff;
242
+ }
243
+ .panel_layout .secondary_panel .standard_submenu .badge.ok
244
+ {
245
+ background: #05B81d;
246
+ border: 1px solid #080;
247
+ }
248
+
249
+
250
+
251
+
@@ -0,0 +1,112 @@
1
+ /* basic layout for non-html tables */
2
+ div.releaf_table
3
+ {
4
+ display: table;
5
+ }
6
+ .releaf_table .thead
7
+ {
8
+ display: table-header-group;
9
+ }
10
+ .releaf_table .tbody
11
+ {
12
+ display: table-row-group;
13
+ }
14
+ .releaf_table .thead > *,
15
+ .releaf_table .tbody > *
16
+ {
17
+ display: table-row;
18
+ }
19
+ .releaf_table .thead > * > *,
20
+ .releaf_table .tbody > * > *
21
+ {
22
+ display: table-cell;
23
+ }
24
+ .releaf_table .thead > a,
25
+ .releaf_table .tbody > a,
26
+ .releaf_table .tbody > * > a
27
+ {
28
+ text-decoration: none;
29
+ }
30
+ /* releaf_table */
31
+ .releaf_table
32
+ {
33
+ width: 100%;
34
+ line-height: normal;
35
+ background-color: white;
36
+ border: 1px solid #d0d0d0;
37
+ }
38
+ .releaf_table.no_border
39
+ {
40
+ border-width: 0px;
41
+ }
42
+ .releaf_table td,
43
+ .releaf_table th,
44
+ .releaf_table .thead > * > *,
45
+ .releaf_table .tbody > * > *
46
+ {
47
+ padding: 4px;
48
+ }
49
+ .releaf_table th,
50
+ .releaf_table .thead > * > *
51
+ {
52
+ background: #F9F9F9 url("<%= asset_path 'releaf/releaf_table/th_bgr.gif' %>") repeat-x 0px bottom;
53
+ border-left: 1px solid #EEEEEE;
54
+ border-right: 1px solid #D0D0D0;
55
+ padding: 6px 4px 6px 4px;
56
+ font-weight: bold;
57
+ text-align: left;
58
+ text-shadow: 0px 1px white;
59
+ }
60
+ .releaf_table td,
61
+ .releaf_table .tbody > * > *
62
+ {
63
+ border-right: 1px solid #f0f0f0;
64
+ }
65
+ .releaf_table tbody tr:nth-child(odd),
66
+ .releaf_table .tbody > *:nth-child(odd)
67
+ {
68
+ background-color: #F7F9FA;
69
+ }
70
+ .releaf_table tr > td:last-child,
71
+ .releaf_table tr > th:last-child,
72
+ .releaf_table .thead > * > *:last-child,
73
+ .releaf_table .tbody > * > *:last-child
74
+ {
75
+ border-right: none;
76
+ }
77
+ .releaf_table.selectable tr:not(.unselectable):hover,
78
+ .releaf_table.selectable .tbody > *:not(.unselectable):hover
79
+ {
80
+ cursor: pointer;
81
+ background-color: #e4e1f5;
82
+ }
83
+ .releaf_table.selectable tr:not(.unselectable):hover td,
84
+ .releaf_table.selectable .tbody > *:not(.unselectable):hover > *
85
+ {
86
+ border-color: transparent;
87
+ }
88
+ .releaf_table.selectable tr.selected,
89
+ .releaf_table.selectable tr.selected:hover,
90
+ .releaf_table.selectable .tbody > .selected,
91
+ .releaf_table.selectable .tbody > .selected:hover
92
+ {
93
+ background: #cac2fa url("<%= asset_path 'releaf/releaf_table/selected_bgr.png' %>") repeat-x left top;
94
+ }
95
+ .releaf_table.selectable .selected td,
96
+ .releaf_table.selectable .tbody > .selected > *
97
+ {
98
+ border-color: transparent;
99
+ }
100
+ .releaf_table.label_first_column tbody tr td:first-child,
101
+ .releaf_table.label_first_column tbody tr th:first-child,
102
+ .releaf_table.label_first_column tbody tr:hover td:first-child,
103
+ .releaf_table.label_first_column tbody tr:hover th:first-child,
104
+ .releaf_table.label_first_column .tbody > * > *:first-child,
105
+ .releaf_table.label_first_column .tbody > *:hover > *:first-child
106
+ {
107
+ background: #f5f7f8 none;
108
+ border-right: 1px solid #d0d0d0;
109
+ border-top-color: transparent;
110
+ border-bottom-color: transparent;
111
+ }
112
+