releaf 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +24 -0
- data/README.md +74 -0
- data/Rakefile +62 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_222222_256x240.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_454545_256x240.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_888888_256x240.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/images/releaf/3rd_party/lightbox/close.png +0 -0
- data/app/assets/images/releaf/3rd_party/lightbox/loading.gif +0 -0
- data/app/assets/images/releaf/3rd_party/lightbox/next.png +0 -0
- data/app/assets/images/releaf/3rd_party/lightbox/prev.png +0 -0
- data/app/assets/images/releaf/add.png +0 -0
- data/app/assets/images/releaf/background.jpg +0 -0
- data/app/assets/images/releaf/button/button_bgr.gif +0 -0
- data/app/assets/images/releaf/button/button_hover_bgr.png +0 -0
- data/app/assets/images/releaf/controllers/content/close.gif +0 -0
- data/app/assets/images/releaf/controllers/content/close_active.gif +0 -0
- data/app/assets/images/releaf/controllers/content/close_hover.gif +0 -0
- data/app/assets/images/releaf/controllers/content/global_fields_bgr.png +0 -0
- data/app/assets/images/releaf/controllers/content/open.gif +0 -0
- data/app/assets/images/releaf/controllers/content/open_2.gif +0 -0
- data/app/assets/images/releaf/controllers/content/open_active.gif +0 -0
- data/app/assets/images/releaf/controllers/content/open_hover.gif +0 -0
- data/app/assets/images/releaf/controllers/sessions/background.jpg +0 -0
- data/app/assets/images/releaf/controllers/sessions/logo.jpg +0 -0
- data/app/assets/images/releaf/expand_tool/close.png +0 -0
- data/app/assets/images/releaf/expand_tool/close_hover.png +0 -0
- data/app/assets/images/releaf/expand_tool/close_hover_shim.png +0 -0
- data/app/assets/images/releaf/expand_tool/close_shim.png +0 -0
- data/app/assets/images/releaf/expand_tool/loader.gif +0 -0
- data/app/assets/images/releaf/expand_tool/open.png +0 -0
- data/app/assets/images/releaf/expand_tool/open_hover.png +0 -0
- data/app/assets/images/releaf/expand_tool/open_hover_shim.png +0 -0
- data/app/assets/images/releaf/expand_tool/open_shim.png +0 -0
- data/app/assets/images/releaf/favicon.ico +0 -0
- data/app/assets/images/releaf/globalFieldContainerBgr.png +0 -0
- data/app/assets/images/releaf/icons/129.png +0 -0
- data/app/assets/images/releaf/icons/130.png +0 -0
- data/app/assets/images/releaf/icons/accept.png +0 -0
- data/app/assets/images/releaf/icons/add.png +0 -0
- data/app/assets/images/releaf/icons/arrow_down.png +0 -0
- data/app/assets/images/releaf/icons/arrow_left.png +0 -0
- data/app/assets/images/releaf/icons/arrow_refresh.png +0 -0
- data/app/assets/images/releaf/icons/arrow_up.png +0 -0
- data/app/assets/images/releaf/icons/bin_empty.png +0 -0
- data/app/assets/images/releaf/icons/bullet_black.png +0 -0
- data/app/assets/images/releaf/icons/bullet_connect.png +0 -0
- data/app/assets/images/releaf/icons/bullet_start.png +0 -0
- data/app/assets/images/releaf/icons/bullet_tick.png +0 -0
- data/app/assets/images/releaf/icons/chrome.png +0 -0
- data/app/assets/images/releaf/icons/control_play.png +0 -0
- data/app/assets/images/releaf/icons/date.png +0 -0
- data/app/assets/images/releaf/icons/delete.png +0 -0
- data/app/assets/images/releaf/icons/disk.png +0 -0
- data/app/assets/images/releaf/icons/drag-handle.png +0 -0
- data/app/assets/images/releaf/icons/error.png +0 -0
- data/app/assets/images/releaf/icons/eye.png +0 -0
- data/app/assets/images/releaf/icons/firefox.png +0 -0
- data/app/assets/images/releaf/icons/google-not-available.gif +0 -0
- data/app/assets/images/releaf/icons/google.gif +0 -0
- data/app/assets/images/releaf/icons/keyboard.png +0 -0
- data/app/assets/images/releaf/icons/left_16.png +0 -0
- data/app/assets/images/releaf/icons/link.png +0 -0
- data/app/assets/images/releaf/icons/magnifier.png +0 -0
- data/app/assets/images/releaf/icons/notAllowed.png +0 -0
- data/app/assets/images/releaf/icons/page_white_add.png +0 -0
- data/app/assets/images/releaf/icons/page_white_edit.png +0 -0
- data/app/assets/images/releaf/icons/page_white_put.png +0 -0
- data/app/assets/images/releaf/icons/page_white_text.png +0 -0
- data/app/assets/images/releaf/icons/pencil.png +0 -0
- data/app/assets/images/releaf/icons/picture.png +0 -0
- data/app/assets/images/releaf/icons/right_16.png +0 -0
- data/app/assets/images/releaf/icons/tick.png +0 -0
- data/app/assets/images/releaf/icons/warning.png +0 -0
- data/app/assets/images/releaf/icons/world_go.png +0 -0
- data/app/assets/images/releaf/icons/world_link.png +0 -0
- data/app/assets/images/releaf/input/autocompleteExpandIcon.png +0 -0
- data/app/assets/images/releaf/input/input_bgr.gif +0 -0
- data/app/assets/images/releaf/language_root.png +0 -0
- data/app/assets/images/releaf/loader.gif +0 -0
- data/app/assets/images/releaf/logout.png +0 -0
- data/app/assets/images/releaf/main_menu/active_bgr.png +0 -0
- data/app/assets/images/releaf/main_menu/bgr.png +0 -0
- data/app/assets/images/releaf/main_menu/hover_bgr.png +0 -0
- data/app/assets/images/releaf/module.png +0 -0
- data/app/assets/images/releaf/panel_layout/active_bgr.png +0 -0
- data/app/assets/images/releaf/panel_layout/secondary_panel_horizontal_bgr.png +0 -0
- data/app/assets/images/releaf/panel_layout/secondary_panel_vertical_bgr.png +0 -0
- data/app/assets/images/releaf/releaf_table/selected_bgr.png +0 -0
- data/app/assets/images/releaf/releaf_table/th_bgr.gif +0 -0
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/README.md +73 -0
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/jquery.cookie.js +47 -0
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/server.js +24 -0
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/test.html +19 -0
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/test.js +80 -0
- data/app/assets/javascripts/releaf/3rd_party/jquery-ui-timepicker-addon.js +1882 -0
- data/app/assets/javascripts/releaf/3rd_party/lightbox.js.erb +379 -0
- data/app/assets/javascripts/releaf/application.js +14 -0
- data/app/assets/javascripts/releaf/controllers/base.js +170 -0
- data/app/assets/javascripts/releaf/controllers/releaf/content.js +90 -0
- data/app/assets/javascripts/releaf/controllers/releaf/translations.js +31 -0
- data/app/assets/javascripts/releaf/include/continuous_scroll.js +321 -0
- data/app/assets/javascripts/releaf/include/field.type_autocomplete.js +58 -0
- data/app/assets/javascripts/releaf/include/field.type_richtext.js +90 -0
- data/app/assets/javascripts/releaf/include/localization.js +12 -0
- data/app/assets/javascripts/releaf/include/nested_fields.js +71 -0
- data/app/assets/javascripts/releaf/include/sortable.js +27 -0
- data/app/assets/javascripts/releaf/lib/request_url.js +183 -0
- data/app/assets/stylesheets/releaf/3rd_party/jquery-ui-1.9.2.custom.css.erb +464 -0
- data/app/assets/stylesheets/releaf/3rd_party/jquery-ui-timepicker-addon.css +10 -0
- data/app/assets/stylesheets/releaf/3rd_party/lightbox.css.erb +157 -0
- data/app/assets/stylesheets/releaf/application.css.erb +122 -0
- data/app/assets/stylesheets/releaf/controllers/base.css.erb +205 -0
- data/app/assets/stylesheets/releaf/controllers/releaf/content.css.erb +416 -0
- data/app/assets/stylesheets/releaf/controllers/releaf/sessions.css.scss.erb +116 -0
- data/app/assets/stylesheets/releaf/controllers/releaf/translations.css.erb +205 -0
- data/app/assets/stylesheets/releaf/include/button.css.erb +176 -0
- data/app/assets/stylesheets/releaf/include/field.css.erb +257 -0
- data/app/assets/stylesheets/releaf/include/input.css.erb +40 -0
- data/app/assets/stylesheets/releaf/include/main_menu.css.erb +66 -0
- data/app/assets/stylesheets/releaf/include/pagination.css.erb +29 -0
- data/app/assets/stylesheets/releaf/include/panel_layout.css.erb +251 -0
- data/app/assets/stylesheets/releaf/include/releaf_table.css.erb +112 -0
- data/app/assets/stylesheets/releaf/include/sortable.css.erb +12 -0
- data/app/controllers/releaf/admins_controller.rb +48 -0
- data/app/controllers/releaf/application_controller.rb +11 -0
- data/app/controllers/releaf/base_application_controller.rb +15 -0
- data/app/controllers/releaf/base_controller.rb +310 -0
- data/app/controllers/releaf/content_controller.rb +166 -0
- data/app/controllers/releaf/roles_controller.rb +36 -0
- data/app/controllers/releaf/sessions_controller.rb +5 -0
- data/app/controllers/releaf/tinymce_assets_controller.rb +26 -0
- data/app/controllers/releaf/translations_controller.rb +121 -0
- data/app/helpers/releaf/admin_helper.rb +79 -0
- data/app/helpers/releaf/application_helper.rb +4 -0
- data/app/helpers/releaf/pagination_renderer.rb +44 -0
- data/app/helpers/releaf/releaf_devise_helper.rb +8 -0
- data/app/models/releaf/admin.rb +51 -0
- data/app/models/releaf/node.rb +221 -0
- data/app/models/releaf/node_base.rb +25 -0
- data/app/models/releaf/role.rb +119 -0
- data/app/models/releaf/tinymce_asset.rb +6 -0
- data/app/views/layouts/releaf/admin.html.haml +51 -0
- data/app/views/releaf/aliases/_edit.body.haml +50 -0
- data/app/views/releaf/aliases/_edit.header.haml +19 -0
- data/app/views/releaf/aliases/_index.row.haml +5 -0
- data/app/views/releaf/aliases/_secondary_panel.haml +13 -0
- data/app/views/releaf/base/_edit.body.haml +19 -0
- data/app/views/releaf/base/_edit.field.haml +96 -0
- data/app/views/releaf/base/_edit.field.type_autocomplete.haml +15 -0
- data/app/views/releaf/base/_edit.field.type_checkbox.haml +5 -0
- data/app/views/releaf/base/_edit.field.type_date.haml +8 -0
- data/app/views/releaf/base/_edit.field.type_datetime.haml +8 -0
- data/app/views/releaf/base/_edit.field.type_delete_nested.haml +3 -0
- data/app/views/releaf/base/_edit.field.type_file.haml +10 -0
- data/app/views/releaf/base/_edit.field.type_image.haml +14 -0
- data/app/views/releaf/base/_edit.field.type_link.haml +4 -0
- data/app/views/releaf/base/_edit.field.type_password.haml +4 -0
- data/app/views/releaf/base/_edit.field.type_richtext.haml +4 -0
- data/app/views/releaf/base/_edit.field.type_richtext_i18n.haml +27 -0
- data/app/views/releaf/base/_edit.field.type_select.haml +11 -0
- data/app/views/releaf/base/_edit.field.type_text.haml +4 -0
- data/app/views/releaf/base/_edit.field.type_text_i18n.haml +27 -0
- data/app/views/releaf/base/_edit.field.type_textarea.haml +4 -0
- data/app/views/releaf/base/_edit.field.type_textarea_i18n.haml +27 -0
- data/app/views/releaf/base/_edit.field.type_time.haml +8 -0
- data/app/views/releaf/base/_edit.footer.haml +14 -0
- data/app/views/releaf/base/_edit.form.haml +4 -0
- data/app/views/releaf/base/_edit.has_many_associations.haml +45 -0
- data/app/views/releaf/base/_edit.header.haml +3 -0
- data/app/views/releaf/base/_index.body.haml +6 -0
- data/app/views/releaf/base/_index.cell.haml +19 -0
- data/app/views/releaf/base/_index.footer.haml +22 -0
- data/app/views/releaf/base/_index.header.haml +4 -0
- data/app/views/releaf/base/_index.row.haml +6 -0
- data/app/views/releaf/base/_index.search.haml +5 -0
- data/app/views/releaf/base/_index.table.haml +8 -0
- data/app/views/releaf/base/_secondary_panel.haml +9 -0
- data/app/views/releaf/base/_show.body.haml +7 -0
- data/app/views/releaf/base/_show.field.haml +78 -0
- data/app/views/releaf/base/_show.field.type_html.haml +1 -0
- data/app/views/releaf/base/_show.footer.haml +16 -0
- data/app/views/releaf/base/_show.header.haml +3 -0
- data/app/views/releaf/base/confirm_destroy.haml +10 -0
- data/app/views/releaf/base/edit.haml +1 -0
- data/app/views/releaf/base/index.haml +3 -0
- data/app/views/releaf/base/new.haml +1 -0
- data/app/views/releaf/base/show.haml +3 -0
- data/app/views/releaf/content/_edit.body.haml +45 -0
- data/app/views/releaf/content/_edit.content_fields.haml +19 -0
- data/app/views/releaf/content/_edit.slug.haml +12 -0
- data/app/views/releaf/content/_get_content_form.haml +7 -0
- data/app/views/releaf/content/_secondary_panel.haml +3 -0
- data/app/views/releaf/content/_show.field.content.haml +11 -0
- data/app/views/releaf/content/_tree_level.haml +16 -0
- data/app/views/releaf/content/ajax.new.haml +3 -0
- data/app/views/releaf/content/index.haml +0 -0
- data/app/views/releaf/roles/_edit.field.admins.haml +0 -0
- data/app/views/releaf/roles/_edit.field.permissions.haml +5 -0
- data/app/views/releaf/roles/_show.field.default.haml +6 -0
- data/app/views/releaf/roles/_show.field.permissions.haml +11 -0
- data/app/views/releaf/sessions/new.html.haml +17 -0
- data/app/views/releaf/translations/_edit.body.haml +50 -0
- data/app/views/releaf/translations/_edit.header.haml +19 -0
- data/app/views/releaf/translations/_index.row.haml +5 -0
- data/app/views/releaf/translations/_secondary_panel.haml +13 -0
- data/bin/releaf +25 -0
- data/lib/generators/releaf/install_generator.rb +87 -0
- data/lib/generators/releaf/templates/config/common_fields.yml.example +17 -0
- data/lib/generators/releaf/templates/controllers/home_controller.rb +4 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_222222_256x240.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_2e83ff_256x240.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_454545_256x240.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_888888_256x240.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_cd0a0a_256x240.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/lightbox/close.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/lightbox/loading.gif +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/lightbox/next.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/lightbox/prev.png +0 -0
- data/lib/generators/releaf/templates/initializers/releaf.rb +59 -0
- data/lib/generators/releaf/templates/initializers/releaf_i18n.rb +8 -0
- data/lib/generators/releaf/templates/initializers/releaf_store_current_template.rb +25 -0
- data/lib/generators/releaf/templates/javascripts/3rd_party/jquery_ui.js +14850 -0
- data/lib/generators/releaf/templates/javascripts/3rd_party/lightbox.js.erb +379 -0
- data/lib/generators/releaf/templates/javascripts/application.js +15 -0
- data/lib/generators/releaf/templates/javascripts/lib/js_check.js +8 -0
- data/lib/generators/releaf/templates/javascripts/lib/request_url.js +169 -0
- data/lib/generators/releaf/templates/javascripts/lib/sortable.js +29 -0
- data/lib/generators/releaf/templates/migrations/create_releaf_admins.rb +53 -0
- data/lib/generators/releaf/templates/migrations/create_releaf_nodes.rb +25 -0
- data/lib/generators/releaf/templates/migrations/create_releaf_roles.rb +11 -0
- data/lib/generators/releaf/templates/migrations/create_releaf_tinymce_assets.rb +10 -0
- data/lib/generators/releaf/templates/migrations/create_releaf_translations.rb +31 -0
- data/lib/generators/releaf/templates/models/admin_ability.rb +51 -0
- data/lib/generators/releaf/templates/seeds.rb +64 -0
- data/lib/generators/releaf/templates/stylesheets/3rd_party/jquery_ui/smoothness.css.erb +1174 -0
- data/lib/generators/releaf/templates/stylesheets/3rd_party/lightbox.css.erb +157 -0
- data/lib/generators/releaf/templates/stylesheets/3rd_party/reset.css +48 -0
- data/lib/generators/releaf/templates/stylesheets/application.scss +15 -0
- data/lib/generators/releaf/templates/stylesheets/style.scss +45 -0
- data/lib/generators/releaf/templates/views/home/index.html.haml +1 -0
- data/lib/generators/releaf/templates/views/layouts/application.html.haml +26 -0
- data/lib/i18n/backend/releaf.rb +96 -0
- data/lib/i18n/backend/releaf/translation.rb +56 -0
- data/lib/i18n/backend/releaf/translation_data.rb +32 -0
- data/lib/i18n/backend/releaf/translation_group.rb +30 -0
- data/lib/i18n/releaf.rb +1 -0
- data/lib/releaf.rb +30 -0
- data/lib/releaf/engine.rb +4 -0
- data/lib/releaf/slug.rb +79 -0
- data/lib/releaf/version.rb +3 -0
- data/lib/tasks/releaf_tasks.rake +4 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/images/rails.png +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/admin_ability.rb +51 -0
- data/spec/dummy/app/models/settings.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.haml +10 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +68 -0
- data/spec/dummy/config/boot.rb +6 -0
- data/spec/dummy/config/common_fields.yml.example +17 -0
- data/spec/dummy/config/database.yml +42 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/devise.rb +232 -0
- data/spec/dummy/config/initializers/dragonfly.rb +1 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/releaf.rb +59 -0
- data/spec/dummy/config/initializers/releaf_i18n.rb +8 -0
- data/spec/dummy/config/initializers/releaf_store_current_template.rb +25 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/devise.en.yml +58 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +11 -0
- data/spec/dummy/db/migrate/20130204164516_create_settings.rb +17 -0
- data/spec/dummy/db/migrate/20130204164523_create_releaf_nodes.rb +25 -0
- data/spec/dummy/db/migrate/20130204164524_create_releaf_roles.rb +11 -0
- data/spec/dummy/db/migrate/20130204164525_create_releaf_translations.rb +31 -0
- data/spec/dummy/db/migrate/20130204164526_create_releaf_admins.rb +53 -0
- data/spec/dummy/db/schema.rb +112 -0
- data/spec/dummy/db/seeds.rb +64 -0
- data/spec/dummy/doc/README_FOR_APP +2 -0
- data/spec/dummy/log/development.log +74 -0
- data/spec/dummy/log/test.log +129 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/tmp/cache/9C5/660/settings%3Ai18n_updated_at +1 -0
- data/spec/factories/factories.rb +24 -0
- data/spec/features/admin_spec.rb +41 -0
- data/spec/spec_helper.rb +23 -0
- data/templates/releaf/installer.rb +196 -0
- metadata +777 -0
@@ -0,0 +1 @@
|
|
1
|
+
require 'dragonfly/rails/images'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# These inflection rules are supported but not enabled by default:
|
13
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
+
# inflect.acronym 'RESTful'
|
15
|
+
# end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
Releaf.setup do |conf|
|
2
|
+
# Default settings are commented out
|
3
|
+
|
4
|
+
### setup main menu
|
5
|
+
# conf.main_menu = [
|
6
|
+
# 'releaf/content',
|
7
|
+
# 'releaf/translations',
|
8
|
+
# '*permissions',
|
9
|
+
# ]
|
10
|
+
|
11
|
+
# conf.base_menu = {
|
12
|
+
# '*permissions' => [
|
13
|
+
# ['permissions', %w[releaf/admins releaf/roles]],
|
14
|
+
# ]
|
15
|
+
# }
|
16
|
+
|
17
|
+
# conf.layout = 'releaf/admin'
|
18
|
+
# conf.devise_for 'releaf/admin'
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
module ActionDispatch::Routing
|
24
|
+
class Mapper
|
25
|
+
def mount_releaf_at(mount_location)
|
26
|
+
|
27
|
+
post '/tinymce_assets' => 'releaf/tinymce_assets#create'
|
28
|
+
|
29
|
+
devise_for Releaf.devise_for, :path => mount_location, :controllers => { :sessions => "releaf/sessions" }
|
30
|
+
|
31
|
+
scope mount_location do
|
32
|
+
namespace :releaf, :path => nil do
|
33
|
+
|
34
|
+
resources :admins, :roles do
|
35
|
+
get :confirm_destroy, :on => :member
|
36
|
+
match :urls, :on => :collection
|
37
|
+
end
|
38
|
+
|
39
|
+
resources :nodes, :controller => "content", :path => "content" do
|
40
|
+
member do
|
41
|
+
get :confirm_destroy
|
42
|
+
get :get_content_form
|
43
|
+
end
|
44
|
+
|
45
|
+
get :generate_url, :on => :collection
|
46
|
+
end
|
47
|
+
|
48
|
+
resources :translation_groups, :controller => "translations", :path => "translations" do
|
49
|
+
get :confirm_destroy, :on => :member
|
50
|
+
match :urls, :on => :collection
|
51
|
+
end
|
52
|
+
root :to => "content#index"
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
I18N_CACHE = ActiveSupport::Cache::MemoryStore.new
|
2
|
+
require 'i18n/backend/releaf'
|
3
|
+
I18n.backend = I18n::Backend::Releaf.new
|
4
|
+
|
5
|
+
# skip cache loading for rake tasks and cucumber (ex. migrations)
|
6
|
+
if !($0.end_with?('rake') || $0.end_with?('cucumber'))
|
7
|
+
I18n.backend.reload_cache
|
8
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
class ActionController::Base
|
2
|
+
attr_accessor :active_template
|
3
|
+
|
4
|
+
def active_template_virtual_path
|
5
|
+
self.active_template.virtual_path if self.active_template
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
class ActionMailer::Base
|
10
|
+
attr_accessor :active_template
|
11
|
+
|
12
|
+
def active_template_virtual_path
|
13
|
+
self.active_template.virtual_path if self.active_template
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
class ActionView::TemplateRenderer
|
18
|
+
|
19
|
+
alias_method :_render_template_original, :render_template
|
20
|
+
|
21
|
+
def render_template(template, layout_name = nil, locals = {})
|
22
|
+
@view.controller.active_template = template if @view.controller && !@view.controller.active_template
|
23
|
+
return _render_template_original( template, layout_name, locals)
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = '60b8245a7315f6856f6699abaf2a94c7a7c814533b974de49cd0cfc6cd4e1ec43cb324960925f085cd9439ffcfd40eae40286b97f46229c46e386cb06c5ac3e5'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json]
|
9
|
+
end
|
10
|
+
|
11
|
+
# Disable root element in JSON by default.
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
13
|
+
self.include_root_in_json = false
|
14
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
|
2
|
+
|
3
|
+
en:
|
4
|
+
errors:
|
5
|
+
messages:
|
6
|
+
expired: "has expired, please request a new one"
|
7
|
+
not_found: "not found"
|
8
|
+
already_confirmed: "was already confirmed, please try signing in"
|
9
|
+
not_locked: "was not locked"
|
10
|
+
not_saved:
|
11
|
+
one: "1 error prohibited this %{resource} from being saved:"
|
12
|
+
other: "%{count} errors prohibited this %{resource} from being saved:"
|
13
|
+
|
14
|
+
devise:
|
15
|
+
failure:
|
16
|
+
already_authenticated: 'You are already signed in.'
|
17
|
+
unauthenticated: 'You need to sign in or sign up before continuing.'
|
18
|
+
unconfirmed: 'You have to confirm your account before continuing.'
|
19
|
+
locked: 'Your account is locked.'
|
20
|
+
invalid: 'Invalid email or password.'
|
21
|
+
invalid_token: 'Invalid authentication token.'
|
22
|
+
timeout: 'Your session expired, please sign in again to continue.'
|
23
|
+
inactive: 'Your account was not activated yet.'
|
24
|
+
sessions:
|
25
|
+
signed_in: 'Signed in successfully.'
|
26
|
+
signed_out: 'Signed out successfully.'
|
27
|
+
passwords:
|
28
|
+
send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
|
29
|
+
updated: 'Your password was changed successfully. You are now signed in.'
|
30
|
+
updated_not_active: 'Your password was changed successfully.'
|
31
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
|
32
|
+
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
|
33
|
+
confirmations:
|
34
|
+
send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
|
35
|
+
send_paranoid_instructions: 'If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
|
36
|
+
confirmed: 'Your account was successfully confirmed. You are now signed in.'
|
37
|
+
registrations:
|
38
|
+
signed_up: 'Welcome! You have signed up successfully.'
|
39
|
+
signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.'
|
40
|
+
signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
|
41
|
+
signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.'
|
42
|
+
updated: 'You updated your account successfully.'
|
43
|
+
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
|
44
|
+
destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
|
45
|
+
unlocks:
|
46
|
+
send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
|
47
|
+
unlocked: 'Your account has been unlocked successfully. Please sign in to continue.'
|
48
|
+
send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.'
|
49
|
+
omniauth_callbacks:
|
50
|
+
success: 'Successfully authenticated from %{kind} account.'
|
51
|
+
failure: 'Could not authenticate you from %{kind} because "%{reason}".'
|
52
|
+
mailer:
|
53
|
+
confirmation_instructions:
|
54
|
+
subject: 'Confirmation instructions'
|
55
|
+
reset_password_instructions:
|
56
|
+
subject: 'Reset password instructions'
|
57
|
+
unlock_instructions:
|
58
|
+
subject: 'Unlock Instructions'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateSettings < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :settings do |t|
|
4
|
+
t.string :var, :null => false
|
5
|
+
t.text :value, :null => true
|
6
|
+
t.integer :thing_id, :null => true
|
7
|
+
t.string :thing_type, :limit => 30, :null => true
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :settings, [ :thing_type, :thing_id, :var ], :unique => true
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.down
|
15
|
+
drop_table :settings
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
class CreateReleafNodes < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table "releaf_nodes", :force => true do |t|
|
4
|
+
t.string "name"
|
5
|
+
t.string "slug"
|
6
|
+
t.integer "parent_id"
|
7
|
+
t.integer "lft"
|
8
|
+
t.integer "rgt"
|
9
|
+
t.string "content_type"
|
10
|
+
t.integer "content_id"
|
11
|
+
t.text "data"
|
12
|
+
t.datetime "created_at", :null => false
|
13
|
+
t.datetime "updated_at", :null => false
|
14
|
+
t.string "content_string"
|
15
|
+
t.integer "position"
|
16
|
+
t.boolean 'visible', :null => false, :default => true
|
17
|
+
t.boolean 'protected', :null => false, :default => false
|
18
|
+
end
|
19
|
+
add_index :releaf_nodes, :parent_id
|
20
|
+
add_index :releaf_nodes, [:content_type, :content_id]
|
21
|
+
add_index :releaf_nodes, :lft
|
22
|
+
add_index :releaf_nodes, :rgt
|
23
|
+
add_index :releaf_nodes, :slug
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
class CreateReleafTranslations < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :releaf_translation_groups do |t|
|
4
|
+
t.string :scope, :null => false
|
5
|
+
t.timestamps
|
6
|
+
end
|
7
|
+
add_index :releaf_translation_groups, :scope, :unique => true
|
8
|
+
|
9
|
+
|
10
|
+
create_table :releaf_translations do |t|
|
11
|
+
t.integer :group_id, :null => false
|
12
|
+
t.string :key, :null => false
|
13
|
+
|
14
|
+
t.timestamps
|
15
|
+
end
|
16
|
+
add_index :releaf_translations, [:group_id, :key], :unique => true
|
17
|
+
add_index :releaf_translations, :group_id
|
18
|
+
|
19
|
+
|
20
|
+
create_table :releaf_translation_data do |t|
|
21
|
+
t.integer :translation_id, :null => false
|
22
|
+
t.string :lang, :null => false, :limit => 5
|
23
|
+
t.text :localization
|
24
|
+
|
25
|
+
t.timestamps
|
26
|
+
end
|
27
|
+
add_index :releaf_translation_data, :lang
|
28
|
+
add_index :releaf_translation_data, :translation_id
|
29
|
+
add_index :releaf_translation_data, [:lang, :translation_id], :unique => true
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
class CreateReleafAdmins < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :releaf_admins do |t|
|
4
|
+
t.string :name, :null => false
|
5
|
+
t.string :surname, :null => false
|
6
|
+
t.string :phone
|
7
|
+
t.string :avatar_uid
|
8
|
+
t.integer :role_id
|
9
|
+
|
10
|
+
|
11
|
+
## Database authenticatable
|
12
|
+
t.string :email, :null => false, :default => ""
|
13
|
+
t.string :encrypted_password, :null => false, :default => ""
|
14
|
+
|
15
|
+
## Recoverable
|
16
|
+
t.string :reset_password_token
|
17
|
+
t.datetime :reset_password_sent_at
|
18
|
+
|
19
|
+
## Rememberable
|
20
|
+
t.datetime :remember_created_at
|
21
|
+
|
22
|
+
## Trackable
|
23
|
+
t.integer :sign_in_count, :default => 0
|
24
|
+
t.datetime :current_sign_in_at
|
25
|
+
t.datetime :last_sign_in_at
|
26
|
+
t.string :current_sign_in_ip
|
27
|
+
t.string :last_sign_in_ip
|
28
|
+
|
29
|
+
## Confirmable
|
30
|
+
# t.string :confirmation_token
|
31
|
+
# t.datetime :confirmed_at
|
32
|
+
# t.datetime :confirmation_sent_at
|
33
|
+
# t.string :unconfirmed_email # Only if using reconfirmable
|
34
|
+
|
35
|
+
## Lockable
|
36
|
+
# t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
|
37
|
+
# t.string :unlock_token # Only if unlock strategy is :email or :both
|
38
|
+
# t.datetime :locked_at
|
39
|
+
|
40
|
+
## Token authenticatable
|
41
|
+
# t.string :authentication_token
|
42
|
+
|
43
|
+
t.timestamps
|
44
|
+
end
|
45
|
+
|
46
|
+
add_index :releaf_admins, :role_id
|
47
|
+
add_index :releaf_admins, :email, :unique => true
|
48
|
+
add_index :releaf_admins, :reset_password_token, :unique => true
|
49
|
+
# add_index :releaf_admins, :confirmation_token, :unique => true
|
50
|
+
# add_index :releaf_admins, :unlock_token, :unique => true
|
51
|
+
# add_index :releaf_admins, :authentication_token, :unique => true
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,112 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(:version => 20130204164526) do
|
15
|
+
|
16
|
+
create_table "releaf_admins", :force => true do |t|
|
17
|
+
t.string "name", :null => false
|
18
|
+
t.string "surname", :null => false
|
19
|
+
t.string "phone"
|
20
|
+
t.string "avatar_uid"
|
21
|
+
t.integer "role_id"
|
22
|
+
t.string "email", :default => "", :null => false
|
23
|
+
t.string "encrypted_password", :default => "", :null => false
|
24
|
+
t.string "reset_password_token"
|
25
|
+
t.datetime "reset_password_sent_at"
|
26
|
+
t.datetime "remember_created_at"
|
27
|
+
t.integer "sign_in_count", :default => 0
|
28
|
+
t.datetime "current_sign_in_at"
|
29
|
+
t.datetime "last_sign_in_at"
|
30
|
+
t.string "current_sign_in_ip"
|
31
|
+
t.string "last_sign_in_ip"
|
32
|
+
t.datetime "created_at", :null => false
|
33
|
+
t.datetime "updated_at", :null => false
|
34
|
+
end
|
35
|
+
|
36
|
+
add_index "releaf_admins", ["email"], :name => "index_releaf_admins_on_email", :unique => true
|
37
|
+
add_index "releaf_admins", ["reset_password_token"], :name => "index_releaf_admins_on_reset_password_token", :unique => true
|
38
|
+
add_index "releaf_admins", ["role_id"], :name => "index_releaf_admins_on_role_id"
|
39
|
+
|
40
|
+
create_table "releaf_nodes", :force => true do |t|
|
41
|
+
t.string "name"
|
42
|
+
t.string "slug"
|
43
|
+
t.integer "parent_id"
|
44
|
+
t.integer "lft"
|
45
|
+
t.integer "rgt"
|
46
|
+
t.string "content_type"
|
47
|
+
t.integer "content_id"
|
48
|
+
t.text "data"
|
49
|
+
t.datetime "created_at", :null => false
|
50
|
+
t.datetime "updated_at", :null => false
|
51
|
+
t.string "content_string"
|
52
|
+
t.integer "position"
|
53
|
+
t.boolean "visible", :default => true, :null => false
|
54
|
+
t.boolean "protected", :default => false, :null => false
|
55
|
+
end
|
56
|
+
|
57
|
+
add_index "releaf_nodes", ["content_type", "content_id"], :name => "index_releaf_nodes_on_content_type_and_content_id"
|
58
|
+
add_index "releaf_nodes", ["lft"], :name => "index_releaf_nodes_on_lft"
|
59
|
+
add_index "releaf_nodes", ["parent_id"], :name => "index_releaf_nodes_on_parent_id"
|
60
|
+
add_index "releaf_nodes", ["rgt"], :name => "index_releaf_nodes_on_rgt"
|
61
|
+
add_index "releaf_nodes", ["slug"], :name => "index_releaf_nodes_on_slug"
|
62
|
+
|
63
|
+
create_table "releaf_roles", :force => true do |t|
|
64
|
+
t.string "name", :null => false
|
65
|
+
t.text "permissions"
|
66
|
+
t.boolean "default", :default => false, :null => false
|
67
|
+
t.datetime "created_at", :null => false
|
68
|
+
t.datetime "updated_at", :null => false
|
69
|
+
end
|
70
|
+
|
71
|
+
create_table "releaf_translation_data", :force => true do |t|
|
72
|
+
t.integer "translation_id", :null => false
|
73
|
+
t.string "lang", :limit => 5, :null => false
|
74
|
+
t.text "localization"
|
75
|
+
t.datetime "created_at", :null => false
|
76
|
+
t.datetime "updated_at", :null => false
|
77
|
+
end
|
78
|
+
|
79
|
+
add_index "releaf_translation_data", ["lang", "translation_id"], :name => "index_releaf_translation_data_on_lang_and_translation_id", :unique => true
|
80
|
+
add_index "releaf_translation_data", ["lang"], :name => "index_releaf_translation_data_on_lang"
|
81
|
+
add_index "releaf_translation_data", ["translation_id"], :name => "index_releaf_translation_data_on_translation_id"
|
82
|
+
|
83
|
+
create_table "releaf_translation_groups", :force => true do |t|
|
84
|
+
t.string "scope", :null => false
|
85
|
+
t.datetime "created_at", :null => false
|
86
|
+
t.datetime "updated_at", :null => false
|
87
|
+
end
|
88
|
+
|
89
|
+
add_index "releaf_translation_groups", ["scope"], :name => "index_releaf_translation_groups_on_scope", :unique => true
|
90
|
+
|
91
|
+
create_table "releaf_translations", :force => true do |t|
|
92
|
+
t.integer "group_id", :null => false
|
93
|
+
t.string "key", :null => false
|
94
|
+
t.datetime "created_at", :null => false
|
95
|
+
t.datetime "updated_at", :null => false
|
96
|
+
end
|
97
|
+
|
98
|
+
add_index "releaf_translations", ["group_id", "key"], :name => "index_releaf_translations_on_group_id_and_key", :unique => true
|
99
|
+
add_index "releaf_translations", ["group_id"], :name => "index_releaf_translations_on_group_id"
|
100
|
+
|
101
|
+
create_table "settings", :force => true do |t|
|
102
|
+
t.string "var", :null => false
|
103
|
+
t.text "value"
|
104
|
+
t.integer "thing_id"
|
105
|
+
t.string "thing_type", :limit => 30
|
106
|
+
t.datetime "created_at", :null => false
|
107
|
+
t.datetime "updated_at", :null => false
|
108
|
+
end
|
109
|
+
|
110
|
+
add_index "settings", ["thing_type", "thing_id", "var"], :name => "index_settings_on_thing_type_and_thing_id_and_var", :unique => true
|
111
|
+
|
112
|
+
end
|