refinerycms 0.9.9 → 0.9.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -1
- data/Gemfile +8 -24
- data/Gemfile.lock +94 -69
- data/Rakefile +1 -1
- data/bin/refinerycms +118 -109
- data/changelog.md +13 -2
- data/config/cucumber.yml +3 -7
- data/config/settings.rb +0 -1
- data/lib/refinery.rb +14 -1
- data/lib/refinerycms.rb +2 -9
- data/refinerycms.gemspec +15 -855
- data/spec/spec_helper.rb +3 -2
- metadata +27 -907
- data/authentication/app/controllers/admin/users_controller.rb +0 -90
- data/authentication/app/controllers/passwords_controller.rb +0 -43
- data/authentication/app/controllers/registrations_controller.rb +0 -67
- data/authentication/app/controllers/sessions_controller.rb +0 -23
- data/authentication/app/helpers/sessions_helper.rb +0 -2
- data/authentication/app/helpers/users_helper.rb +0 -2
- data/authentication/app/mailers/user_mailer.rb +0 -20
- data/authentication/app/models/role.rb +0 -16
- data/authentication/app/models/roles_users.rb +0 -6
- data/authentication/app/models/user.rb +0 -58
- data/authentication/app/models/user_plugin.rb +0 -5
- data/authentication/app/views/admin/users/_form.html.erb +0 -92
- data/authentication/app/views/admin/users/_user.html.erb +0 -19
- data/authentication/app/views/admin/users/_users.html.erb +0 -4
- data/authentication/app/views/admin/users/edit.html.erb +0 -1
- data/authentication/app/views/admin/users/index.html.erb +0 -12
- data/authentication/app/views/admin/users/new.html.erb +0 -1
- data/authentication/app/views/layouts/login.html.erb +0 -21
- data/authentication/app/views/passwords/edit.html.erb +0 -31
- data/authentication/app/views/passwords/new.html.erb +0 -18
- data/authentication/app/views/registrations/new.html.erb +0 -41
- data/authentication/app/views/sessions/new.html.erb +0 -29
- data/authentication/app/views/user_mailer/reset_notification.html.erb +0 -12
- data/authentication/app/views/user_mailer/reset_notification.text.plain.erb +0 -7
- data/authentication/config/locales/cs.yml +0 -75
- data/authentication/config/locales/da.yml +0 -72
- data/authentication/config/locales/de.yml +0 -72
- data/authentication/config/locales/el.yml +0 -72
- data/authentication/config/locales/en.yml +0 -72
- data/authentication/config/locales/es.yml +0 -100
- data/authentication/config/locales/fr.yml +0 -72
- data/authentication/config/locales/it.yml +0 -97
- data/authentication/config/locales/lolcat.yml +0 -55
- data/authentication/config/locales/lt.yml +0 -55
- data/authentication/config/locales/lv.yml +0 -72
- data/authentication/config/locales/nb.yml +0 -72
- data/authentication/config/locales/nl.yml +0 -70
- data/authentication/config/locales/pl.yml +0 -100
- data/authentication/config/locales/pt-BR.yml +0 -68
- data/authentication/config/locales/rs.yml +0 -72
- data/authentication/config/locales/ru.yml +0 -97
- data/authentication/config/locales/sl.yml +0 -61
- data/authentication/config/locales/sv.yml +0 -64
- data/authentication/config/locales/zh-CN.yml +0 -72
- data/authentication/config/locales/zh-TW.yml +0 -72
- data/authentication/config/routes.rb +0 -31
- data/authentication/db/migrate/20100913234705_create_refinerycms_authentication_schema.rb +0 -43
- data/authentication/db/migrate/20100929035252_add_missing_indexes_to_roles_users.rb +0 -11
- data/authentication/db/migrate/20101206013505_change_to_devise_users_table.rb +0 -27
- data/authentication/db/migrate/20110106184757_add_remember_created_at_to_users.rb +0 -9
- data/authentication/features/lost_password.feature +0 -49
- data/authentication/features/manage_users.feature +0 -61
- data/authentication/features/step_definitions/lost_password.rb +0 -8
- data/authentication/features/step_definitions/user_steps.rb +0 -36
- data/authentication/features/support/factories.rb +0 -18
- data/authentication/features/support/paths.rb +0 -24
- data/authentication/lib/authenticated_system.rb +0 -29
- data/authentication/lib/authentication.rb +0 -30
- data/authentication/lib/generators/refinerycms_authentication_generator.rb +0 -8
- data/authentication/license.md +0 -21
- data/authentication/readme.md +0 -17
- data/authentication/refinerycms-authentication.gemspec +0 -20
- data/authentication/spec/models/user_spec.rb +0 -159
- data/base/db/migrate/20100913234706_create_refinerycms_core_schema.rb +0 -23
- data/base/db/migrate/20101217113424_add_locale_to_slugs.rb +0 -13
- data/base/features/step_definitions/web_steps.rb +0 -219
- data/base/features/support/env.rb +0 -84
- data/base/features/support/factories.rb +0 -1
- data/base/features/support/negative_expectations_helper.rb +0 -57
- data/base/features/support/paths.rb +0 -91
- data/base/lib/base.rb +0 -32
- data/base/lib/generators/refinerycms_base_generator.rb +0 -8
- data/base/lib/refinery.rb +0 -32
- data/base/lib/refinery/version.rb +0 -16
- data/base/license.md +0 -21
- data/base/refinerycms-base.gemspec +0 -18
- data/core/app/controllers/admin/base_controller.rb +0 -10
- data/core/app/controllers/admin/dialogs_controller.rb +0 -26
- data/core/app/controllers/admin/refinery_core_controller.rb +0 -12
- data/core/app/controllers/application_controller.rb +0 -6
- data/core/app/controllers/refinery/fast_controller.rb +0 -9
- data/core/app/controllers/sitemap_controller.rb +0 -14
- data/core/app/helpers/application_helper.rb +0 -5
- data/core/app/views/admin/_head.html.erb +0 -43
- data/core/app/views/admin/_javascripts.html.erb +0 -32
- data/core/app/views/admin/_menu.html.erb +0 -17
- data/core/app/views/admin/dialogs/show.html.erb +0 -19
- data/core/app/views/layouts/admin.html.erb +0 -24
- data/core/app/views/layouts/admin_dialog.html.erb +0 -14
- data/core/app/views/layouts/application.html.erb +0 -21
- data/core/app/views/shared/_content_page.html.erb +0 -63
- data/core/app/views/shared/_draft_page_message.html.erb +0 -3
- data/core/app/views/shared/_footer.html.erb +0 -4
- data/core/app/views/shared/_google_analytics.html.erb +0 -8
- data/core/app/views/shared/_head.html.erb +0 -42
- data/core/app/views/shared/_header.html.erb +0 -8
- data/core/app/views/shared/_html_tag.html.erb +0 -6
- data/core/app/views/shared/_ie6check.html.erb +0 -63
- data/core/app/views/shared/_javascripts.html.erb +0 -10
- data/core/app/views/shared/_menu.html.erb +0 -30
- data/core/app/views/shared/_menu_branch.html.erb +0 -26
- data/core/app/views/shared/_message.html.erb +0 -10
- data/core/app/views/shared/_no_script.html.erb +0 -9
- data/core/app/views/shared/_site_bar.html.erb +0 -25
- data/core/app/views/shared/admin/_continue_editing.html.erb +0 -3
- data/core/app/views/shared/admin/_error_messages.html.erb +0 -16
- data/core/app/views/shared/admin/_form_actions.html.erb +0 -77
- data/core/app/views/shared/admin/_image_picker.html.erb +0 -60
- data/core/app/views/shared/admin/_make_sortable.html.erb +0 -13
- data/core/app/views/shared/admin/_resource_picker.html.erb +0 -66
- data/core/app/views/shared/admin/_search.html.erb +0 -6
- data/core/app/views/shared/admin/_sortable_list.html.erb +0 -7
- data/core/app/views/shared/admin/_tabbed_fields.html.erb +0 -42
- data/core/app/views/welcome.html.erb +0 -17
- data/core/app/views/wymiframe.html.erb +0 -15
- data/core/config/locales/cs.yml +0 -77
- data/core/config/locales/da.yml +0 -75
- data/core/config/locales/de.yml +0 -75
- data/core/config/locales/el.yml +0 -75
- data/core/config/locales/en.yml +0 -75
- data/core/config/locales/es.yml +0 -68
- data/core/config/locales/fr.yml +0 -72
- data/core/config/locales/it.yml +0 -96
- data/core/config/locales/lolcat.yml +0 -68
- data/core/config/locales/lt.yml +0 -75
- data/core/config/locales/lv.yml +0 -72
- data/core/config/locales/nb.yml +0 -75
- data/core/config/locales/nl.yml +0 -75
- data/core/config/locales/pl.yml +0 -75
- data/core/config/locales/pt-BR.yml +0 -72
- data/core/config/locales/rs.yml +0 -76
- data/core/config/locales/ru.yml +0 -71
- data/core/config/locales/sl.yml +0 -72
- data/core/config/locales/sv.yml +0 -75
- data/core/config/locales/zh-CN.yml +0 -75
- data/core/config/locales/zh-TW.yml +0 -75
- data/core/config/routes.rb +0 -19
- data/core/crud.md +0 -197
- data/core/doc/included-jquery-ui-packages.jpg +0 -0
- data/core/engines.md +0 -179
- data/core/features/search.feature +0 -55
- data/core/features/site_bar.feature +0 -24
- data/core/features/step_definitions/core_steps.rb +0 -61
- data/core/features/support/paths.rb +0 -14
- data/core/features/uploads/beach.jpeg +0 -0
- data/core/features/uploads/refinery_is_awesome.txt +0 -1
- data/core/lib/core.rb +0 -143
- data/core/lib/generators/refinerycms_generator.rb +0 -107
- data/core/lib/generators/templates/.gitignore +0 -83
- data/core/lib/generators/templates/.rspec +0 -2
- data/core/lib/generators/templates/app/views/sitemap/index.xml.builder +0 -22
- data/core/lib/generators/templates/autotest/autotest.rb +0 -17
- data/core/lib/generators/templates/autotest/discover.rb +0 -2
- data/core/lib/generators/templates/config/cucumber.yml +0 -15
- data/core/lib/generators/templates/config/database.yml.mysql +0 -20
- data/core/lib/generators/templates/config/database.yml.postgresql +0 -57
- data/core/lib/generators/templates/config/database.yml.sqlite3 +0 -26
- data/core/lib/generators/templates/config/i18n-js.yml +0 -6
- data/core/lib/generators/templates/config/initializers/devise.rb +0 -142
- data/core/lib/generators/templates/config/settings.rb +0 -3
- data/core/lib/generators/templates/db/seeds.rb +0 -5
- data/core/lib/generators/templates/spec/rcov.opts +0 -2
- data/core/lib/generators/templates/spec/spec_helper.rb +0 -76
- data/core/lib/refinery/activity.rb +0 -45
- data/core/lib/refinery/admin/base_controller.rb +0 -111
- data/core/lib/refinery/admin_base_controller.rb +0 -5
- data/core/lib/refinery/application.rb +0 -76
- data/core/lib/refinery/application_controller.rb +0 -116
- data/core/lib/refinery/application_helper.rb +0 -19
- data/core/lib/refinery/base_presenter.rb +0 -27
- data/core/lib/refinery/catch_all_routes.rb +0 -11
- data/core/lib/refinery/crud.rb +0 -295
- data/core/lib/refinery/helpers/form_helper.rb +0 -66
- data/core/lib/refinery/helpers/head_helper.rb +0 -17
- data/core/lib/refinery/helpers/html_truncation_helper.rb +0 -25
- data/core/lib/refinery/helpers/image_helper.rb +0 -49
- data/core/lib/refinery/helpers/menu_helper.rb +0 -68
- data/core/lib/refinery/helpers/meta_helper.rb +0 -67
- data/core/lib/refinery/helpers/pagination_helper.rb +0 -16
- data/core/lib/refinery/helpers/script_helper.rb +0 -36
- data/core/lib/refinery/helpers/site_bar_helper.rb +0 -24
- data/core/lib/refinery/helpers/tag_helper.rb +0 -21
- data/core/lib/refinery/helpers/translation_helper.rb +0 -17
- data/core/lib/refinery/link_renderer.rb +0 -55
- data/core/lib/refinery/plugin.rb +0 -134
- data/core/lib/refinery/plugins.rb +0 -75
- data/core/lib/tasks/cucumber.rake +0 -53
- data/core/lib/tasks/doc.rake +0 -29
- data/core/lib/tasks/refinery.rake +0 -231
- data/core/lib/tasks/yard.rake +0 -30
- data/core/license.md +0 -21
- data/core/public/404.html +0 -26
- data/core/public/422.html +0 -26
- data/core/public/500.html +0 -26
- data/core/public/favicon.ico +0 -0
- data/core/public/images/refinery/add.png +0 -0
- data/core/public/images/refinery/admin_bg.png +0 -0
- data/core/public/images/refinery/ajax-loader.gif +0 -0
- data/core/public/images/refinery/branch-end.gif +0 -0
- data/core/public/images/refinery/branch-start.gif +0 -0
- data/core/public/images/refinery/branch.gif +0 -0
- data/core/public/images/refinery/carousel-left.png +0 -0
- data/core/public/images/refinery/carousel-right.png +0 -0
- data/core/public/images/refinery/cross.png +0 -0
- data/core/public/images/refinery/dialogLoadingAnimation.gif +0 -0
- data/core/public/images/refinery/header_background.png +0 -0
- data/core/public/images/refinery/hover-gradient.jpg +0 -0
- data/core/public/images/refinery/icons/accept.png +0 -0
- data/core/public/images/refinery/icons/add.png +0 -0
- data/core/public/images/refinery/icons/ajax-loader.gif +0 -0
- data/core/public/images/refinery/icons/application_edit.png +0 -0
- data/core/public/images/refinery/icons/application_go.png +0 -0
- data/core/public/images/refinery/icons/arrow_left.png +0 -0
- data/core/public/images/refinery/icons/arrow_switch.png +0 -0
- data/core/public/images/refinery/icons/arrow_up.png +0 -0
- data/core/public/images/refinery/icons/bin.png +0 -0
- data/core/public/images/refinery/icons/bin_closed.png +0 -0
- data/core/public/images/refinery/icons/cancel.png +0 -0
- data/core/public/images/refinery/icons/cog_add.png +0 -0
- data/core/public/images/refinery/icons/cog_edit.png +0 -0
- data/core/public/images/refinery/icons/cross.png +0 -0
- data/core/public/images/refinery/icons/delete.png +0 -0
- data/core/public/images/refinery/icons/doc.png +0 -0
- data/core/public/images/refinery/icons/down.gif +0 -0
- data/core/public/images/refinery/icons/edit.png +0 -0
- data/core/public/images/refinery/icons/email.png +0 -0
- data/core/public/images/refinery/icons/email_edit.png +0 -0
- data/core/public/images/refinery/icons/email_go.png +0 -0
- data/core/public/images/refinery/icons/email_open.png +0 -0
- data/core/public/images/refinery/icons/eye.png +0 -0
- data/core/public/images/refinery/icons/folder_page_white.png +0 -0
- data/core/public/images/refinery/icons/image_add.png +0 -0
- data/core/public/images/refinery/icons/image_edit.png +0 -0
- data/core/public/images/refinery/icons/img.png +0 -0
- data/core/public/images/refinery/icons/information.png +0 -0
- data/core/public/images/refinery/icons/layout_add.png +0 -0
- data/core/public/images/refinery/icons/layout_edit.png +0 -0
- data/core/public/images/refinery/icons/music.png +0 -0
- data/core/public/images/refinery/icons/page_add.png +0 -0
- data/core/public/images/refinery/icons/page_edit.png +0 -0
- data/core/public/images/refinery/icons/page_white_edit.png +0 -0
- data/core/public/images/refinery/icons/page_white_gear.png +0 -0
- data/core/public/images/refinery/icons/page_white_put.png +0 -0
- data/core/public/images/refinery/icons/pdf.png +0 -0
- data/core/public/images/refinery/icons/ppt.png +0 -0
- data/core/public/images/refinery/icons/star.png +0 -0
- data/core/public/images/refinery/icons/tick.png +0 -0
- data/core/public/images/refinery/icons/up.gif +0 -0
- data/core/public/images/refinery/icons/user_add.png +0 -0
- data/core/public/images/refinery/icons/user_comment.png +0 -0
- data/core/public/images/refinery/icons/user_edit.png +0 -0
- data/core/public/images/refinery/icons/xls.png +0 -0
- data/core/public/images/refinery/icons/zip.png +0 -0
- data/core/public/images/refinery/icons/zoom.png +0 -0
- data/core/public/images/refinery/logo-large.png +0 -0
- data/core/public/images/refinery/logo-medium.png +0 -0
- data/core/public/images/refinery/logo-site-bar.png +0 -0
- data/core/public/images/refinery/logo-small-medium.png +0 -0
- data/core/public/images/refinery/logo-small.png +0 -0
- data/core/public/images/refinery/logo-tiny.png +0 -0
- data/core/public/images/refinery/logo.png +0 -0
- data/core/public/images/refinery/nav-3-background.gif +0 -0
- data/core/public/images/refinery/nav_inactive_background.png +0 -0
- data/core/public/images/refinery/orange_button.png +0 -0
- data/core/public/images/refinery/page_bg.png +0 -0
- data/core/public/images/refinery/resolve_digital_footer_logo.png +0 -0
- data/core/public/images/refinery/text_field_background.png +0 -0
- data/core/public/images/refinery/tooltip-nib.gif +0 -0
- data/core/public/images/refinery/tooltip-nib.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/arrow_redo.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/arrow_undo.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/eye.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-blockquote.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h1.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h2.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h3.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h4.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h5.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h6.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-p.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-pre.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/link_add.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/link_break.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/page_code.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/page_paste.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/photo_add.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/right.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/style.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/table_add.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_align_center.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_align_justify.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_align_left.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_align_right.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_bold.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_heading_1.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_heading_2.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_heading_3.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_heading_4.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_heading_5.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_heading_6.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_indent.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_indent_remove.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_italic.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_list_bullets.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_list_numbers.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_paragraph.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_strikethrough.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_subscript.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_superscript.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_underline.png +0 -0
- data/core/public/images/wymeditor/skins/wymeditor_icon.png +0 -0
- data/core/public/javascripts/admin.js +0 -7
- data/core/public/javascripts/application.js +0 -1
- data/core/public/javascripts/dd_belatedpng.js +0 -13
- data/core/public/javascripts/i18n-messages.js +0 -2
- data/core/public/javascripts/jquery-min.js +0 -154
- data/core/public/javascripts/jquery-ui-custom-min.js +0 -249
- data/core/public/javascripts/jquery.js +0 -6240
- data/core/public/javascripts/jquery/GPL-LICENSE.txt +0 -278
- data/core/public/javascripts/jquery/MIT-LICENSE.txt +0 -20
- data/core/public/javascripts/jquery/jquery.corner.js +0 -345
- data/core/public/javascripts/jquery/jquery.html5-placeholder-shim.js +0 -88
- data/core/public/javascripts/jquery/jquery.jcarousel.js +0 -900
- data/core/public/javascripts/jquery/jquery.textTruncate.js +0 -174
- data/core/public/javascripts/jquery/jquery.timers.js +0 -138
- data/core/public/javascripts/modernizr-min.js +0 -30
- data/core/public/javascripts/rails.js +0 -152
- data/core/public/javascripts/refinery/admin.js +0 -1114
- data/core/public/javascripts/refinery/boot_wym.js +0 -285
- data/core/public/javascripts/refinery/core.js +0 -18
- data/core/public/javascripts/refinery/i18n.js +0 -340
- data/core/public/javascripts/refinery/nestedsortables.js +0 -164
- data/core/public/javascripts/refinery/serializelist.js +0 -66
- data/core/public/javascripts/refinery/site_bar.js +0 -16
- data/core/public/javascripts/refinery/submenu.js +0 -49
- data/core/public/javascripts/wymeditor/jquery.refinery.wymeditor.js +0 -5142
- data/core/public/javascripts/wymeditor/lang/ca.js +0 -45
- data/core/public/javascripts/wymeditor/lang/cs.js +0 -45
- data/core/public/javascripts/wymeditor/lang/da.js +0 -48
- data/core/public/javascripts/wymeditor/lang/de.js +0 -45
- data/core/public/javascripts/wymeditor/lang/en.js +0 -47
- data/core/public/javascripts/wymeditor/lang/es.js +0 -45
- data/core/public/javascripts/wymeditor/lang/fa.js +0 -46
- data/core/public/javascripts/wymeditor/lang/fr.js +0 -45
- data/core/public/javascripts/wymeditor/lang/he.js +0 -45
- data/core/public/javascripts/wymeditor/lang/hu.js +0 -45
- data/core/public/javascripts/wymeditor/lang/it.js +0 -45
- data/core/public/javascripts/wymeditor/lang/lv.js +0 -47
- data/core/public/javascripts/wymeditor/lang/nb.js +0 -48
- data/core/public/javascripts/wymeditor/lang/nl.js +0 -47
- data/core/public/javascripts/wymeditor/lang/nn.js +0 -45
- data/core/public/javascripts/wymeditor/lang/pl.js +0 -45
- data/core/public/javascripts/wymeditor/lang/pt-BR.js +0 -47
- data/core/public/javascripts/wymeditor/lang/pt.js +0 -45
- data/core/public/javascripts/wymeditor/lang/rs.js +0 -47
- data/core/public/javascripts/wymeditor/lang/ru.js +0 -45
- data/core/public/javascripts/wymeditor/lang/sl.js +0 -47
- data/core/public/javascripts/wymeditor/lang/sv.js +0 -45
- data/core/public/javascripts/wymeditor/lang/tr.js +0 -45
- data/core/public/javascripts/wymeditor/lang/zh_cn.js +0 -47
- data/core/public/javascripts/wymeditor/skins/refinery/skin.js +0 -48
- data/core/public/robots.txt +0 -3
- data/core/public/stylesheets/application.css +0 -4
- data/core/public/stylesheets/formatting.css +0 -4
- data/core/public/stylesheets/home.css +0 -4
- data/core/public/stylesheets/refinery/application.css +0 -72
- data/core/public/stylesheets/refinery/formatting.css +0 -57
- data/core/public/stylesheets/refinery/home.css +0 -0
- data/core/public/stylesheets/refinery/refinery.css +0 -1572
- data/core/public/stylesheets/refinery/site_bar.css +0 -87
- data/core/public/stylesheets/refinery/submenu.css +0 -22
- data/core/public/stylesheets/refinery/theme.css +0 -36
- data/core/public/stylesheets/refinery/tooltips.css +0 -34
- data/core/public/stylesheets/refinery/ui.css +0 -107
- data/core/public/stylesheets/theme.css +0 -4
- data/core/public/stylesheets/wymeditor/skins/refinery/skin.css +0 -528
- data/core/public/stylesheets/wymeditor/skins/refinery/wymiframe.css +0 -96
- data/core/public/wymeditor/GPL-license.txt +0 -278
- data/core/public/wymeditor/MIT-license.txt +0 -20
- data/core/public/wymeditor/README +0 -35
- data/core/refinerycms-core.gemspec +0 -20
- data/core/spec/lib/refinery/plugins_spec.rb +0 -90
- data/dashboard/app/controllers/admin/dashboard_controller.rb +0 -38
- data/dashboard/app/helpers/admin/dashboard_helper.rb +0 -24
- data/dashboard/app/views/admin/dashboard/_additional_dashboard_menu_items.html.erb +0 -1
- data/dashboard/app/views/admin/dashboard/_recent_activity.html.erb +0 -14
- data/dashboard/app/views/admin/dashboard/_recent_inquiries.html.erb +0 -11
- data/dashboard/app/views/admin/dashboard/index.html.erb +0 -70
- data/dashboard/app/views/admin/dashboard/index.rss.builder +0 -26
- data/dashboard/config/locales/cs.yml +0 -25
- data/dashboard/config/locales/da.yml +0 -25
- data/dashboard/config/locales/de.yml +0 -25
- data/dashboard/config/locales/el.yml +0 -25
- data/dashboard/config/locales/en.yml +0 -25
- data/dashboard/config/locales/es.yml +0 -28
- data/dashboard/config/locales/fr.yml +0 -25
- data/dashboard/config/locales/it.yml +0 -27
- data/dashboard/config/locales/lolcat.yml +0 -24
- data/dashboard/config/locales/lt.yml +0 -25
- data/dashboard/config/locales/lv.yml +0 -27
- data/dashboard/config/locales/nb.yml +0 -25
- data/dashboard/config/locales/nl.yml +0 -25
- data/dashboard/config/locales/pl.yml +0 -29
- data/dashboard/config/locales/pt-BR.yml +0 -29
- data/dashboard/config/locales/rs.yml +0 -26
- data/dashboard/config/locales/ru.yml +0 -29
- data/dashboard/config/locales/sl.yml +0 -24
- data/dashboard/config/locales/sv.yml +0 -25
- data/dashboard/config/locales/zh-CN.yml +0 -25
- data/dashboard/config/locales/zh-TW.yml +0 -25
- data/dashboard/config/routes.rb +0 -11
- data/dashboard/features/dashboard.feature +0 -35
- data/dashboard/features/support/paths.rb +0 -14
- data/dashboard/lib/dashboard.rb +0 -19
- data/dashboard/license.md +0 -21
- data/dashboard/readme.md +0 -22
- data/dashboard/refinerycms-dashboard.gemspec +0 -20
- data/images/app/controllers/admin/images_controller.rb +0 -108
- data/images/app/helpers/admin/images_helper.rb +0 -27
- data/images/app/models/image.rb +0 -72
- data/images/app/views/admin/images/_existing_image.html.erb +0 -73
- data/images/app/views/admin/images/_form.html.erb +0 -54
- data/images/app/views/admin/images/_grid_view.html.erb +0 -19
- data/images/app/views/admin/images/_images.html.erb +0 -2
- data/images/app/views/admin/images/_list_view.html.erb +0 -10
- data/images/app/views/admin/images/_list_view_image.html.erb +0 -17
- data/images/app/views/admin/images/edit.html.erb +0 -1
- data/images/app/views/admin/images/index.html.erb +0 -38
- data/images/app/views/admin/images/insert.html.erb +0 -47
- data/images/app/views/admin/images/new.html.erb +0 -1
- data/images/config/locales/cs.yml +0 -41
- data/images/config/locales/da.yml +0 -41
- data/images/config/locales/de.yml +0 -41
- data/images/config/locales/el.yml +0 -41
- data/images/config/locales/en.yml +0 -41
- data/images/config/locales/es.yml +0 -40
- data/images/config/locales/fr.yml +0 -41
- data/images/config/locales/it.yml +0 -47
- data/images/config/locales/lolcat.yml +0 -41
- data/images/config/locales/lt.yml +0 -41
- data/images/config/locales/lv.yml +0 -41
- data/images/config/locales/nb.yml +0 -42
- data/images/config/locales/nl.yml +0 -40
- data/images/config/locales/pl.yml +0 -42
- data/images/config/locales/pt-BR.yml +0 -42
- data/images/config/locales/rs.yml +0 -42
- data/images/config/locales/ru.yml +0 -41
- data/images/config/locales/sl.yml +0 -40
- data/images/config/locales/sv.yml +0 -41
- data/images/config/locales/zh-CN.yml +0 -41
- data/images/config/locales/zh-TW.yml +0 -41
- data/images/config/routes.rb +0 -11
- data/images/db/migrate/20100913234707_create_refinerycms_images_schema.rb +0 -23
- data/images/features/manage_images.feature +0 -49
- data/images/features/step_definitions/image_steps.rb +0 -40
- data/images/features/support/factories.rb +0 -5
- data/images/features/support/paths.rb +0 -17
- data/images/features/uploads/beach.jpeg +0 -0
- data/images/features/uploads/id-rather-be-here.jpg +0 -0
- data/images/features/uploads/refinery_is_awesome.txt +0 -1
- data/images/lib/generators/refinerycms_images_generator.rb +0 -8
- data/images/lib/images.rb +0 -59
- data/images/license.md +0 -21
- data/images/readme.md +0 -34
- data/images/refinerycms-images.gemspec +0 -20
- data/images/spec/models/image_spec.rb +0 -87
- data/images/spec/uploads/beach.jpeg +0 -0
- data/pages/app/controllers/admin/page_parts_controller.rb +0 -24
- data/pages/app/controllers/admin/pages_controller.rb +0 -37
- data/pages/app/controllers/admin/pages_dialogs_controller.rb +0 -87
- data/pages/app/controllers/pages_controller.rb +0 -32
- data/pages/app/helpers/pages_helper.rb +0 -2
- data/pages/app/models/page.rb +0 -290
- data/pages/app/models/page_part.rb +0 -23
- data/pages/app/presenters/page_presenter.rb +0 -7
- data/pages/app/views/admin/pages/_form.html.erb +0 -61
- data/pages/app/views/admin/pages/_form_advanced_options.html.erb +0 -79
- data/pages/app/views/admin/pages/_form_advanced_options_seo.html.erb +0 -24
- data/pages/app/views/admin/pages/_form_fields_after_title.html.erb +0 -1
- data/pages/app/views/admin/pages/_form_new_page_parts.html.erb +0 -14
- data/pages/app/views/admin/pages/_form_page_parts.html.erb +0 -47
- data/pages/app/views/admin/pages/_locale_picker.html.erb +0 -11
- data/pages/app/views/admin/pages/_page.html.erb +0 -33
- data/pages/app/views/admin/pages/_page_part_field.html.erb +0 -5
- data/pages/app/views/admin/pages/_sortable_list.html.erb +0 -5
- data/pages/app/views/admin/pages/edit.html.erb +0 -1
- data/pages/app/views/admin/pages/index.html.erb +0 -40
- data/pages/app/views/admin/pages/new.html.erb +0 -1
- data/pages/app/views/admin/pages_dialogs/_page_link.html.erb +0 -13
- data/pages/app/views/admin/pages_dialogs/link_to.html.erb +0 -141
- data/pages/app/views/pages/home.html.erb +0 -1
- data/pages/app/views/pages/show.html.erb +0 -1
- data/pages/config/locales/cs.yml +0 -84
- data/pages/config/locales/da.yml +0 -84
- data/pages/config/locales/de.yml +0 -84
- data/pages/config/locales/el.yml +0 -84
- data/pages/config/locales/en.yml +0 -84
- data/pages/config/locales/es.yml +0 -83
- data/pages/config/locales/fr.yml +0 -84
- data/pages/config/locales/it.yml +0 -98
- data/pages/config/locales/lolcat.yml +0 -83
- data/pages/config/locales/lt.yml +0 -85
- data/pages/config/locales/lv.yml +0 -86
- data/pages/config/locales/nb.yml +0 -85
- data/pages/config/locales/nl.yml +0 -81
- data/pages/config/locales/pl.yml +0 -85
- data/pages/config/locales/pt-BR.yml +0 -85
- data/pages/config/locales/rs.yml +0 -84
- data/pages/config/locales/ru.yml +0 -108
- data/pages/config/locales/sl.yml +0 -83
- data/pages/config/locales/sv.yml +0 -84
- data/pages/config/locales/zh-CN.yml +0 -84
- data/pages/config/locales/zh-TW.yml +0 -84
- data/pages/config/routes.rb +0 -21
- data/pages/db/migrate/20100913234708_create_refinerycms_pages_schema.rb +0 -53
- data/pages/db/migrate/20101214040815_translate_page_plugin.rb +0 -29
- data/pages/db/migrate/20101216194133_remove_cached_slug_from_pages.rb +0 -9
- data/pages/db/seeds/pages.rb +0 -43
- data/pages/features/manage_pages.feature +0 -47
- data/pages/features/step_definitions/page_steps.rb +0 -53
- data/pages/features/support/paths.rb +0 -26
- data/pages/features/visit_pages.feature +0 -47
- data/pages/lib/generators/refinerycms_pages_generator.rb +0 -8
- data/pages/lib/pages.rb +0 -36
- data/pages/lib/pages/marketable_routes.rb +0 -3
- data/pages/lib/pages/tabs.rb +0 -30
- data/pages/license.md +0 -21
- data/pages/readme.md +0 -156
- data/pages/refinerycms-pages.gemspec +0 -21
- data/pages/spec/models/page_spec.rb +0 -155
- data/resources/app/controllers/admin/resources_controller.rb +0 -89
- data/resources/app/models/resource.rb +0 -53
- data/resources/app/views/admin/resources/_existing_resource.html.erb +0 -32
- data/resources/app/views/admin/resources/_form.html.erb +0 -55
- data/resources/app/views/admin/resources/_resource.html.erb +0 -17
- data/resources/app/views/admin/resources/_resources.html.erb +0 -10
- data/resources/app/views/admin/resources/edit.html.erb +0 -1
- data/resources/app/views/admin/resources/index.html.erb +0 -31
- data/resources/app/views/admin/resources/insert.html.erb +0 -54
- data/resources/app/views/admin/resources/new.html.erb +0 -1
- data/resources/config/locales/cs.yml +0 -34
- data/resources/config/locales/da.yml +0 -34
- data/resources/config/locales/de.yml +0 -34
- data/resources/config/locales/el.yml +0 -34
- data/resources/config/locales/en.yml +0 -34
- data/resources/config/locales/es.yml +0 -33
- data/resources/config/locales/fr.yml +0 -34
- data/resources/config/locales/it.yml +0 -43
- data/resources/config/locales/lolcat.yml +0 -34
- data/resources/config/locales/lt.yml +0 -34
- data/resources/config/locales/lv.yml +0 -34
- data/resources/config/locales/nb.yml +0 -34
- data/resources/config/locales/nl.yml +0 -33
- data/resources/config/locales/pl.yml +0 -35
- data/resources/config/locales/pt-BR.yml +0 -34
- data/resources/config/locales/rs.yml +0 -35
- data/resources/config/locales/ru.yml +0 -34
- data/resources/config/locales/sl.yml +0 -33
- data/resources/config/locales/sv.yml +0 -34
- data/resources/config/locales/zh-CN.yml +0 -34
- data/resources/config/locales/zh-TW.yml +0 -34
- data/resources/config/routes.rb +0 -11
- data/resources/db/migrate/20100913234709_create_refinerycms_resources_schema.rb +0 -21
- data/resources/features/manage_files.feature +0 -43
- data/resources/features/step_definitions/file_steps.rb +0 -21
- data/resources/features/support/paths.rb +0 -17
- data/resources/features/uploads/beach.jpeg +0 -0
- data/resources/features/uploads/refinery_is_awesome.txt +0 -1
- data/resources/lib/generators/refinerycms_resources_generator.rb +0 -8
- data/resources/lib/resources.rb +0 -58
- data/resources/license.md +0 -21
- data/resources/readme.md +0 -9
- data/resources/refinerycms-resources.gemspec +0 -20
- data/resources/spec/models/resource_spec.rb +0 -91
- data/resources/spec/uploads/refinery_is_awesome.txt +0 -1
- data/settings/app/controllers/admin/refinery_settings_controller.rb +0 -77
- data/settings/app/helpers/refinery_settings_helper.rb +0 -25
- data/settings/app/models/refinery_setting.rb +0 -212
- data/settings/app/views/admin/refinery_settings/_form.html.erb +0 -62
- data/settings/app/views/admin/refinery_settings/_refinery_setting.html.erb +0 -23
- data/settings/app/views/admin/refinery_settings/_refinery_settings.html.erb +0 -5
- data/settings/app/views/admin/refinery_settings/edit.html.erb +0 -1
- data/settings/app/views/admin/refinery_settings/index.html.erb +0 -49
- data/settings/app/views/admin/refinery_settings/new.html.erb +0 -1
- data/settings/config/locales/cs.yml +0 -45
- data/settings/config/locales/da.yml +0 -46
- data/settings/config/locales/de.yml +0 -46
- data/settings/config/locales/el.yml +0 -46
- data/settings/config/locales/en.yml +0 -46
- data/settings/config/locales/es.yml +0 -43
- data/settings/config/locales/fr.yml +0 -44
- data/settings/config/locales/it.yml +0 -36
- data/settings/config/locales/lolcat.yml +0 -43
- data/settings/config/locales/lt.yml +0 -46
- data/settings/config/locales/lv.yml +0 -46
- data/settings/config/locales/nb.yml +0 -47
- data/settings/config/locales/nl.yml +0 -46
- data/settings/config/locales/pl.yml +0 -46
- data/settings/config/locales/pt-BR.yml +0 -44
- data/settings/config/locales/rs.yml +0 -46
- data/settings/config/locales/ru.yml +0 -43
- data/settings/config/locales/sl.yml +0 -25
- data/settings/config/locales/sv.yml +0 -45
- data/settings/config/locales/zh-CN.yml +0 -46
- data/settings/config/locales/zh-TW.yml +0 -46
- data/settings/config/routes.rb +0 -8
- data/settings/db/migrate/20100913234710_create_refinerycms_settings_schema.rb +0 -24
- data/settings/db/migrate/20100926142529_add_value_type_to_refinery_settings.rb +0 -9
- data/settings/features/manage_refinery_settings.feature +0 -5
- data/settings/features/step_definitions/setting_steps.rb +0 -9
- data/settings/features/support/paths.rb +0 -14
- data/settings/lib/generators/refinerycms_settings_generator.rb +0 -8
- data/settings/lib/settings.rb +0 -16
- data/settings/license.md +0 -21
- data/settings/readme.md +0 -55
- data/settings/refinerycms-settings.gemspec +0 -20
- data/settings/spec/models/refinery_setting_spec.rb +0 -101
@@ -1,49 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
module Helpers
|
3
|
-
module ImageHelper
|
4
|
-
|
5
|
-
# replace all system images with a thumbnail version of them (handy for all images inside a page part)
|
6
|
-
# for example, <%= content_fu(@page[:body], '96x96#c') %> converts all /system/images to a 96x96 cropped thumbnail
|
7
|
-
def content_fu(content, thumbnail)
|
8
|
-
content.gsub(%r{<img.+?src=['"](/system/images/.+?)/.+?/>}) do |image_match|
|
9
|
-
begin
|
10
|
-
uid = Dragonfly::Job.from_path(
|
11
|
-
"#{image_match.match(%r{(/system/images/.+?)/})[1]}", Dragonfly[:images]
|
12
|
-
).uid
|
13
|
-
|
14
|
-
image_fu Image.where(:image_uid => uid).first, thumbnail
|
15
|
-
rescue
|
16
|
-
# FAIL, don't care why but return what we found initially.
|
17
|
-
image_match
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
# image_fu is a helper for inserting an image that has been uploaded into a template.
|
23
|
-
# Say for example that we had a @model.image (@model having a belongs_to :image relationship)
|
24
|
-
# and we wanted to display a thumbnail cropped to 200x200 then we can use image_fu like this:
|
25
|
-
# <%= image_fu @model.image, '200x200' %> or with no thumbnail: <%= image_fu @model.image %>
|
26
|
-
def image_fu(image, geometry = nil, options={})
|
27
|
-
if image.present?
|
28
|
-
# call rails' image tag function with default alt tag.
|
29
|
-
# if any other options were supplied these are merged in and can replace the defaults.
|
30
|
-
# if the geomtry is nil, then we know the image height and width already.
|
31
|
-
# detect nil geometry or cropping presence which is where we can guess the dimensions
|
32
|
-
unless geometry.nil? or !(split_geometry = geometry.to_s.split('#')).many? or !(split_geometry = split_geometry.first.split('x')).many?
|
33
|
-
image_width, image_height = split_geometry.first.split('x')
|
34
|
-
else
|
35
|
-
image_with = nil
|
36
|
-
image_height = nil
|
37
|
-
end
|
38
|
-
|
39
|
-
image_tag(image.thumbnail(geometry).url, {
|
40
|
-
:alt => image.respond_to?(:title) ? image.title : image.image_name,
|
41
|
-
:width => image_width,
|
42
|
-
:height => image_height
|
43
|
-
}.merge(options))
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
@@ -1,68 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
module Helpers
|
3
|
-
module MenuHelper
|
4
|
-
|
5
|
-
# Adds conditional caching
|
6
|
-
def cache_if(condition, name = {}, &block)
|
7
|
-
if condition
|
8
|
-
cache(name, &block)
|
9
|
-
else
|
10
|
-
yield
|
11
|
-
end
|
12
|
-
|
13
|
-
# for <%= style helpers vs <% style
|
14
|
-
nil
|
15
|
-
end
|
16
|
-
|
17
|
-
# This was extracted from app/views/shared/_menu_branch.html.erb
|
18
|
-
# to remove the complexity of that template by reducing logic in the view.
|
19
|
-
def css_for_menu_branch(menu_branch, menu_branch_counter, sibling_count = nil, collection = [], selected_item = nil)
|
20
|
-
css = []
|
21
|
-
css << "selected" if selected_page_or_descendant_page_selected?(menu_branch, collection, selected_item)
|
22
|
-
css << "first" if menu_branch_counter == 0
|
23
|
-
css << "last" if menu_branch_counter == (sibling_count ||= menu_branch.shown_siblings.size)
|
24
|
-
css
|
25
|
-
end
|
26
|
-
|
27
|
-
# Determines whether any page underneath the supplied page is the current page according to rails.
|
28
|
-
# Just calls selected_page? for each descendant of the supplied page.
|
29
|
-
# if you pass a collection it won't check its own descendants but use the collection supplied.
|
30
|
-
def descendant_page_selected?(page, collection = [], selected_item = nil)
|
31
|
-
return false unless page.has_descendants? or (selected_item && !selected_item.in_menu?)
|
32
|
-
|
33
|
-
descendants = if collection.present? and (!selected_item or (selected_item && selected_item.in_menu?))
|
34
|
-
collection.select{ |item| item.parent_id == page.id }
|
35
|
-
else
|
36
|
-
page.descendants
|
37
|
-
end
|
38
|
-
|
39
|
-
descendants.any? do |descendant|
|
40
|
-
selected_item ? selected_item == descendant : selected_page?(descendant)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def selected_page_or_descendant_page_selected?(page, collection = [], selected_item = nil)
|
45
|
-
selected = false
|
46
|
-
selected = selected_item ? selected_item === page : selected_page?(page)
|
47
|
-
selected = descendant_page_selected?(page, collection, selected_item) unless selected
|
48
|
-
selected
|
49
|
-
end
|
50
|
-
|
51
|
-
# Determine whether the supplied page is the currently open page according to Refinery.
|
52
|
-
# Also checks whether Rails thinks it is selected after that using current_page?
|
53
|
-
def selected_page?(page)
|
54
|
-
# ensure we match the path without the locale.
|
55
|
-
path = request.path
|
56
|
-
if defined?(::Refinery::I18n) and ::Refinery::I18n.enabled?
|
57
|
-
path = path.split("/#{::I18n.locale}").last
|
58
|
-
end
|
59
|
-
|
60
|
-
(path =~ Regexp.new(page.menu_match) if page.menu_match.present?) or
|
61
|
-
(path == page.link_url) or
|
62
|
-
(path == page.nested_path) or
|
63
|
-
current_page?(page)
|
64
|
-
end
|
65
|
-
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
@@ -1,67 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
module Helpers
|
3
|
-
module MetaHelper
|
4
|
-
|
5
|
-
# This is used to display the title of the current object (normally a page) in the browser's titlebar.
|
6
|
-
#
|
7
|
-
def browser_title(yield_title=nil)
|
8
|
-
[
|
9
|
-
(yield_title if yield_title.present?),
|
10
|
-
@meta.browser_title.present? ? @meta.browser_title : @meta.path,
|
11
|
-
RefinerySetting.find_or_set(:site_name, "Company Name")
|
12
|
-
].compact.join(" - ")
|
13
|
-
end
|
14
|
-
|
15
|
-
# you can override the object used for the title by supplying options[:object]
|
16
|
-
# this object must support custom_title_type if you want custom titles.
|
17
|
-
def page_title(options = {})
|
18
|
-
object = options.fetch(:object, @meta)
|
19
|
-
options.delete(:object)
|
20
|
-
options = RefinerySetting.find_or_set(:page_title, {
|
21
|
-
:chain_page_title => false,
|
22
|
-
:ancestors => {
|
23
|
-
:separator => " | ",
|
24
|
-
:class => 'ancestors',
|
25
|
-
:tag => 'span'
|
26
|
-
},
|
27
|
-
:page_title => {
|
28
|
-
:class => nil,
|
29
|
-
:tag => nil,
|
30
|
-
:wrap_if_not_chained => false
|
31
|
-
}
|
32
|
-
}).merge(options)
|
33
|
-
|
34
|
-
title = []
|
35
|
-
objects = (options[:chain_page_title] and object.respond_to?(:ancestors)) ? [object.ancestors, object] : [object]
|
36
|
-
|
37
|
-
objects.flatten.compact.each do |obj|
|
38
|
-
if obj.respond_to?(:custom_title_type)
|
39
|
-
title << case obj.custom_title_type
|
40
|
-
when "text"
|
41
|
-
obj.custom_title
|
42
|
-
when "image"
|
43
|
-
image_fu(obj.custom_title_image, nil, {:alt => obj.title}) rescue obj.title
|
44
|
-
else
|
45
|
-
obj.title
|
46
|
-
end
|
47
|
-
else
|
48
|
-
title << obj.title
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
final_title = title.pop
|
53
|
-
if (options[:page_title][:wrap_if_not_chained] and title.empty?) and options[:page_title][:tag].present?
|
54
|
-
css = " class='#{options[:page_title][:class]}'" if options[:page_title][:class].present?
|
55
|
-
final_title = "<#{options[:page_title][:tag]}#{css}>#{final_title}</#{options[:page_title][:tag]}>"
|
56
|
-
end
|
57
|
-
|
58
|
-
if title.empty?
|
59
|
-
return final_title.to_s.html_safe
|
60
|
-
else
|
61
|
-
return "<#{options[:ancestors][:tag]} class='#{options[:ancestors][:class]}'>#{title.join options[:ancestors][:separator]}#{options[:ancestors][:separator]}</#{options[:ancestors][:tag]}>#{final_title}".html_safe
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
module Helpers
|
3
|
-
module PaginationHelper
|
4
|
-
|
5
|
-
# Figures out the CSS classname to apply to your pagination list for animations.
|
6
|
-
def pagination_css_class
|
7
|
-
if request.xhr? and params[:from_page].present? and params[:page].present?
|
8
|
-
"frame_#{params[:from_page].to_s > params[:page].to_s ? 'left' : 'right'}"
|
9
|
-
else
|
10
|
-
"frame_center"
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
module Helpers
|
3
|
-
module ScriptHelper
|
4
|
-
|
5
|
-
# This function helps when including both the jquery and jqueryui libraries.
|
6
|
-
# If you use this function then whenever we update or relocate the version of jquery or jquery ui in use
|
7
|
-
# we will update the reference here and your existing application starts to use it.
|
8
|
-
# Use <%= jquery_include_tags %> to include it in your <head> section.
|
9
|
-
def jquery_include_tags(options={})
|
10
|
-
# Merge in options
|
11
|
-
options = {
|
12
|
-
:caching => (Rails.root.writable? and RefinerySetting.find_or_set(:use_resource_caching, true)),
|
13
|
-
:google => RefinerySetting.find_or_set(:use_google_ajax_libraries, false),
|
14
|
-
:jquery_ui => true
|
15
|
-
}.merge(options)
|
16
|
-
|
17
|
-
# render the tags normally unless
|
18
|
-
unless options[:google] and !local_request?
|
19
|
-
if options[:jquery_ui]
|
20
|
-
javascript_include_tag "jquery#{"-min" if Rails.env.production?}", "jquery-ui-custom-min",
|
21
|
-
:cache => ("cache/jquery" if options[:caching])
|
22
|
-
else
|
23
|
-
javascript_include_tag "jquery#{"-min" if Rails.env.production?}"
|
24
|
-
end
|
25
|
-
else
|
26
|
-
"#{javascript_include_tag("http://www.google.com/jsapi").gsub(".js", "")}
|
27
|
-
<script>
|
28
|
-
google.load('jquery', '1.4.2');
|
29
|
-
#{"google.load('jqueryui', '1.8.5');" if options[:jquery_ui]}
|
30
|
-
</script>".html_safe
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
module Helpers
|
3
|
-
module SiteBarHelper
|
4
|
-
|
5
|
-
# Generates the link to determine where the site bar switch button returns to.
|
6
|
-
def site_bar_switch_link
|
7
|
-
link_to_if(admin?, t('.switch_to_your_website'),
|
8
|
-
(if session.keys.include?(:website_return_to) and session[:website_return_to].present?
|
9
|
-
session[:website_return_to]
|
10
|
-
else
|
11
|
-
root_path
|
12
|
-
end)) do
|
13
|
-
link_to t('.switch_to_your_website_editor'),
|
14
|
-
(if session.keys.include?(:refinery_return_to) and session[:refinery_return_to].present?
|
15
|
-
session[:refinery_return_to]
|
16
|
-
else
|
17
|
-
admin_root_path
|
18
|
-
end rescue admin_root_path)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
module Helpers
|
3
|
-
module TagHelper
|
4
|
-
|
5
|
-
# Returns <span class='help' title='Your Input'>(help)</span>
|
6
|
-
# Remember to wrap your block with <span class='label_with_help'></span> if you're using a label next to the help tag.
|
7
|
-
def refinery_help_tag(title='')
|
8
|
-
title = h(title) unless title.html_safe?
|
9
|
-
|
10
|
-
"<span class=\"help\" title=\"#{title}\">(#{t('help', :scope => 'shared.admin')})</span>".html_safe
|
11
|
-
end
|
12
|
-
|
13
|
-
# This is just a quick wrapper to render an image tag that lives inside refinery/icons.
|
14
|
-
# They are all 16x16 so this is the default but is able to be overriden with supplied options.
|
15
|
-
def refinery_icon_tag(filename, options = {})
|
16
|
-
image_tag "refinery/icons/#{filename}", {:width => 16, :height => 16}.merge(options)
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
module Helpers
|
3
|
-
module TranslationHelper
|
4
|
-
|
5
|
-
# Overrides Rails' core I18n.t() function to produce a more helpful error message.
|
6
|
-
# The default one wreaks havoc with CSS and makes it hard to understand the problem.
|
7
|
-
def t(key, options = {})
|
8
|
-
if (val = super) =~ /class.+?translation_missing/
|
9
|
-
val = val.to_s.gsub(/<span[^>]*>/, 'i18n: ').gsub('</span>', '').gsub(', ', '.')
|
10
|
-
end
|
11
|
-
|
12
|
-
val
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,55 +0,0 @@
|
|
1
|
-
class Refinery::LinkRenderer < WillPaginate::ViewHelpers::LinkRenderer
|
2
|
-
|
3
|
-
# TODO: Rewrite for WillPaginate 3 API
|
4
|
-
|
5
|
-
=begin
|
6
|
-
|
7
|
-
attr_accessor :url
|
8
|
-
|
9
|
-
def url_for(page)
|
10
|
-
# extract any url parameter and store it for subsequent requests but delete it
|
11
|
-
# this is so that we don't end up with it being an attribute of the resulting HTML.
|
12
|
-
@url ||= @options.delete(:url) || {}
|
13
|
-
page_one = page == 1
|
14
|
-
@url_params = {}
|
15
|
-
# page links should preserve GET parameters
|
16
|
-
stringified_merge @url_params, @template.params if @template.request.get?
|
17
|
-
stringified_merge @url_params, @options[:params] if @options[:params]
|
18
|
-
|
19
|
-
if complex = param_name.index(/[^\w-]/)
|
20
|
-
page_param = parse_query_parameters("#{param_name}=#{page}")
|
21
|
-
|
22
|
-
stringified_merge @url_params, page_param
|
23
|
-
else
|
24
|
-
@url_params[param_name] = page_one ? 1 : 2
|
25
|
-
end
|
26
|
-
|
27
|
-
url = @template.url_for(@url_params.merge!(@url).to_options)
|
28
|
-
return url if page_one
|
29
|
-
|
30
|
-
if complex
|
31
|
-
@url_string = url.sub(%r!((?:\?|&)#{CGI.escape param_name}=)#{page}!, '\1@')
|
32
|
-
return url
|
33
|
-
else
|
34
|
-
@url_string = url
|
35
|
-
@url_params[param_name] = 3
|
36
|
-
@template.url_for(@url_params).split(//).each_with_index do |char, i|
|
37
|
-
if char == '3' and url[i, 1] == '2'
|
38
|
-
@url_string[i] = '@'
|
39
|
-
break
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
# finally!
|
44
|
-
@url_string.sub '@', page.to_s
|
45
|
-
end
|
46
|
-
|
47
|
-
private
|
48
|
-
|
49
|
-
def param_name
|
50
|
-
@options[:param_name].to_s
|
51
|
-
end
|
52
|
-
|
53
|
-
=end
|
54
|
-
|
55
|
-
end
|
data/core/lib/refinery/plugin.rb
DELETED
@@ -1,134 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
module Engines; end;
|
3
|
-
|
4
|
-
class Plugin
|
5
|
-
|
6
|
-
def self.register(&block)
|
7
|
-
plugin = self.new
|
8
|
-
|
9
|
-
yield plugin
|
10
|
-
|
11
|
-
if defined?(Page) && (reserved_word = plugin.controller.nil? ? plugin.name : plugin.controller)
|
12
|
-
# Prevent page slugs from being this plugin's controller name
|
13
|
-
Page.friendly_id_config.reserved_words << reserved_word
|
14
|
-
end
|
15
|
-
|
16
|
-
raise "A plugin MUST have a name!: #{plugin.inspect}" if plugin.name.blank?
|
17
|
-
|
18
|
-
# Set the root as Rails::Engine.called_from will always be
|
19
|
-
# vendor/engines/refinery/lib/refinery
|
20
|
-
new_called_from = begin
|
21
|
-
# Remove the line number from backtraces making sure we don't leave anything behind
|
22
|
-
call_stack = caller.map { |p| p.split(':')[0..-2].join(':') }
|
23
|
-
File.dirname(call_stack.detect { |p| p !~ %r[railties[\w\-\.]*/lib/rails|rack[\w\-\.]*/lib/rack] })
|
24
|
-
end
|
25
|
-
|
26
|
-
klass = Class.new(Rails::Engine)
|
27
|
-
klass.class_eval <<-RUBY
|
28
|
-
def self.called_from; "#{new_called_from}"; end
|
29
|
-
RUBY
|
30
|
-
Object.const_set(plugin.class_name.to_sym, klass)
|
31
|
-
end
|
32
|
-
|
33
|
-
attr_accessor :name, :class_name, :controller, :directory, :url,
|
34
|
-
:version, :dashboard, :always_allow_access,
|
35
|
-
:menu_match, :hide_from_menu,
|
36
|
-
:pathname, :plugin_activity
|
37
|
-
attr_reader :description
|
38
|
-
|
39
|
-
# Returns the class name of the plugin
|
40
|
-
def class_name
|
41
|
-
@class_name ||= name.camelize
|
42
|
-
end
|
43
|
-
|
44
|
-
# Returns the internationalized version of the title
|
45
|
-
def title
|
46
|
-
::I18n.translate("plugins.#{name}.title")
|
47
|
-
end
|
48
|
-
|
49
|
-
# Returns the internationalized version of the description
|
50
|
-
def description
|
51
|
-
::I18n.translate("plugins.#{name}.description")
|
52
|
-
end
|
53
|
-
|
54
|
-
# Depreciation warning
|
55
|
-
def title=(title)
|
56
|
-
warn('title', caller)
|
57
|
-
end
|
58
|
-
|
59
|
-
# Depreciation warning
|
60
|
-
def description=(description)
|
61
|
-
warn('description', caller)
|
62
|
-
end
|
63
|
-
|
64
|
-
# Retrieve information about how to access the latest activities of this plugin.
|
65
|
-
def activity
|
66
|
-
self.plugin_activity ||= []
|
67
|
-
end
|
68
|
-
|
69
|
-
# Stores information that can be used to retrieve the latest activities of this plugin
|
70
|
-
def activity=(activities)
|
71
|
-
[activities].flatten.each { |activity| add_activity(activity) }
|
72
|
-
end
|
73
|
-
|
74
|
-
# Returns true, if the user doesn't require plugin access
|
75
|
-
def always_allow_access?
|
76
|
-
@always_allow_access ||= false
|
77
|
-
end
|
78
|
-
|
79
|
-
# Special property to indicate that this plugin is the dashboard plugin.
|
80
|
-
def dashboard?
|
81
|
-
@dashboard ||= false
|
82
|
-
end
|
83
|
-
|
84
|
-
# Used to highlight the current tab in the admin interface
|
85
|
-
def highlighted?(params)
|
86
|
-
(params[:controller] =~ self.menu_match) or (self.dashboard? and params[:action] == 'error_404')
|
87
|
-
end
|
88
|
-
|
89
|
-
# Returns a RegExp that matches, if the current page is part of the plugin.
|
90
|
-
def menu_match
|
91
|
-
@menu_match ||= /(admin|refinery)\/#{self.name}$/
|
92
|
-
end
|
93
|
-
|
94
|
-
# Returns a hash that can be used to create a url that points to the administration part of the plugin.
|
95
|
-
def url
|
96
|
-
return @url if defined?(@url)
|
97
|
-
|
98
|
-
if self.controller.present?
|
99
|
-
@url = {:controller => "/admin/#{self.controller}"}
|
100
|
-
elsif self.directory.present?
|
101
|
-
@url = {:controller => "/admin/#{self.directory.split('/').pop}"}
|
102
|
-
else
|
103
|
-
@url = {:controller => "/admin/#{self.name}"}
|
104
|
-
end
|
105
|
-
end
|
106
|
-
|
107
|
-
# Make this protected, so that only Plugin.register can use it.
|
108
|
-
protected
|
109
|
-
|
110
|
-
def add_activity(options)
|
111
|
-
(self.plugin_activity ||= []) << Activity::new(options)
|
112
|
-
end
|
113
|
-
|
114
|
-
def initialize
|
115
|
-
# save the pathname to where this plugin is using its lib directory which is standard now.
|
116
|
-
depth = RUBY_VERSION >= "1.9.2" ? 4 : 3
|
117
|
-
self.pathname = Pathname.new(caller(depth).first.match("(.*)#{File::SEPARATOR}lib")[1])
|
118
|
-
Refinery::Plugins.registered << self # add me to the collection of registered plugins
|
119
|
-
end
|
120
|
-
|
121
|
-
private
|
122
|
-
def warn(what, caller)
|
123
|
-
warning = ["\n*** DEPRECATION WARNING ***"]
|
124
|
-
warning << "You cannot use plugin.#{what} anymore."
|
125
|
-
warning << "#{what.pluralize.titleize} will be internationalized by the I18n api."
|
126
|
-
warning << ""
|
127
|
-
warning << "See http://github.com/resolve/refinerycms/blob/master/core/engines.md#readme"
|
128
|
-
warning << "Section: 'The Structure of a Plugin'"
|
129
|
-
warning << ""
|
130
|
-
warning << "Called from: #{caller.first.inspect}\n\n"
|
131
|
-
$stdout.puts warning.join("\n")
|
132
|
-
end
|
133
|
-
end
|
134
|
-
end
|