refinerycms 0.9.6.19 → 0.9.6.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gems +0 -8
- data/.gitignore +3 -1
- data/Rakefile +1 -5
- data/VERSION +1 -1
- data/bin/refinery-update-core +11 -2
- data/config/application.rb +6 -1
- data/config/environments/development.rb +10 -6
- data/config/settings.rb +3 -0
- data/db/migrate/20100305023036_change_users_columns_for_authlogic.rb +46 -0
- data/db/migrate/20100305023037_remove_unused_users_columns.rb +16 -0
- data/db/migrate/20100312155331_make_user_perishable_token_nullable.rb +13 -0
- data/db/migrate/20100312160327_make_user_persistence_token_nullable.rb +13 -0
- data/db/migrate/20100315203301_remove_state_from_users.rb +9 -0
- data/db/schema.rb +8 -21
- data/db/seeds.rb +5 -19
- data/lib/refinery/tasks/refinery.rb +1 -1
- data/public/javascripts/admin.js +6 -2
- data/public/javascripts/jquery-ui-1.8.min.js +374 -0
- data/public/javascripts/jquery.js +606 -444
- data/public/javascripts/refinery/admin.js +30 -9
- data/public/javascripts/refinery/boot_wym.js +4 -0
- data/public/javascripts/wymeditor/jquery.refinery.wymeditor.js +3 -4
- data/public/stylesheets/refinery/refinery.css +11 -0
- data/public/stylesheets/wymeditor/skins/refinery/skin.css +3 -1
- data/public/stylesheets/wymeditor/skins/refinery/wymiframe.css +5 -5
- data/readme.md +13 -10
- data/test/fixtures/users.yml +5 -5
- data/test/functional/dashboard_controller_test.rb +0 -4
- data/test/functional/images_controller_test.rb +0 -3
- data/test/test_helper.rb +7 -3
- data/themes/hemingway/views/layouts/application.html.erb +1 -12
- data/vendor/plugins/authentication/app/controllers/admin/users_controller.rb +1 -3
- data/vendor/plugins/authentication/app/controllers/sessions_controller.rb +3 -14
- data/vendor/plugins/authentication/app/controllers/users_controller.rb +26 -37
- data/vendor/plugins/authentication/app/models/user.rb +29 -112
- data/vendor/plugins/authentication/app/models/user_mailer.rb +8 -5
- data/vendor/plugins/authentication/app/models/user_session.rb +9 -0
- data/vendor/plugins/authentication/app/views/admin/users/index.html.erb +1 -1
- data/vendor/plugins/authentication/app/views/sessions/new.html.erb +5 -4
- data/vendor/plugins/authentication/lib/authenticated_system.rb +40 -30
- data/vendor/plugins/authentication/rails/init.rb +9 -0
- data/vendor/plugins/authlogic/CHANGELOG.rdoc +345 -0
- data/vendor/plugins/authlogic/LICENSE +20 -0
- data/vendor/plugins/authlogic/README.rdoc +246 -0
- data/vendor/plugins/authlogic/Rakefile +42 -0
- data/vendor/plugins/authlogic/VERSION.yml +5 -0
- data/vendor/plugins/authlogic/authlogic.gemspec +217 -0
- data/vendor/plugins/authlogic/generators/session/session_generator.rb +9 -0
- data/vendor/plugins/authlogic/generators/session/templates/session.rb +2 -0
- data/vendor/plugins/authlogic/init.rb +1 -0
- data/vendor/plugins/authlogic/lib/authlogic.rb +64 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/base.rb +107 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/email.rb +110 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/logged_in_status.rb +60 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/login.rb +141 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/magic_columns.rb +24 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/password.rb +355 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/perishable_token.rb +105 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/persistence_token.rb +68 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/restful_authentication.rb +61 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/session_maintenance.rb +139 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/single_access_token.rb +65 -0
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/validations_scope.rb +32 -0
- data/vendor/plugins/authlogic/lib/authlogic/authenticates_many/association.rb +42 -0
- data/vendor/plugins/authlogic/lib/authlogic/authenticates_many/base.rb +55 -0
- data/vendor/plugins/authlogic/lib/authlogic/controller_adapters/abstract_adapter.rb +67 -0
- data/vendor/plugins/authlogic/lib/authlogic/controller_adapters/merb_adapter.rb +30 -0
- data/vendor/plugins/authlogic/lib/authlogic/controller_adapters/rails_adapter.rb +48 -0
- data/vendor/plugins/authlogic/lib/authlogic/controller_adapters/sinatra_adapter.rb +61 -0
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/aes256.rb +43 -0
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/bcrypt.rb +90 -0
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/md5.rb +34 -0
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/sha1.rb +35 -0
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/sha256.rb +50 -0
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/sha512.rb +50 -0
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/wordpress.rb +43 -0
- data/vendor/plugins/authlogic/lib/authlogic/i18n.rb +83 -0
- data/vendor/plugins/authlogic/lib/authlogic/i18n/translator.rb +15 -0
- data/vendor/plugins/authlogic/lib/authlogic/random.rb +33 -0
- data/vendor/plugins/authlogic/lib/authlogic/regex.rb +25 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/activation.rb +58 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/active_record_trickery.rb +64 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/base.rb +37 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/brute_force_protection.rb +96 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/callbacks.rb +99 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/cookies.rb +130 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/existence.rb +93 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/foundation.rb +63 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/http_auth.rb +58 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/id.rb +41 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/klass.rb +78 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/magic_columns.rb +95 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/magic_states.rb +59 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/params.rb +101 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/password.rb +240 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/perishable_token.rb +18 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/persistence.rb +70 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/priority_record.rb +34 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/scopes.rb +101 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/session.rb +62 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/timeout.rb +82 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/unauthorized_record.rb +50 -0
- data/vendor/plugins/authlogic/lib/authlogic/session/validation.rb +82 -0
- data/vendor/plugins/authlogic/lib/authlogic/test_case.rb +120 -0
- data/vendor/plugins/authlogic/lib/authlogic/test_case/mock_controller.rb +45 -0
- data/vendor/plugins/authlogic/lib/authlogic/test_case/mock_cookie_jar.rb +14 -0
- data/vendor/plugins/authlogic/lib/authlogic/test_case/mock_logger.rb +10 -0
- data/vendor/plugins/authlogic/lib/authlogic/test_case/mock_request.rb +19 -0
- data/vendor/plugins/authlogic/lib/authlogic/test_case/rails_request_adapter.rb +30 -0
- data/vendor/plugins/authlogic/rails/init.rb +1 -0
- data/vendor/plugins/authlogic/shoulda_macros/authlogic.rb +69 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/base_test.rb +18 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/email_test.rb +97 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/logged_in_status_test.rb +36 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/login_test.rb +109 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/magic_columns_test.rb +27 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/password_test.rb +236 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/perishable_token_test.rb +90 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/persistence_token_test.rb +55 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/restful_authentication_test.rb +40 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/session_maintenance_test.rb +84 -0
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/single_access_test.rb +44 -0
- data/vendor/plugins/authlogic/test/authenticates_many_test.rb +16 -0
- data/vendor/plugins/authlogic/test/crypto_provider_test/aes256_test.rb +14 -0
- data/vendor/plugins/authlogic/test/crypto_provider_test/bcrypt_test.rb +14 -0
- data/vendor/plugins/authlogic/test/crypto_provider_test/sha1_test.rb +23 -0
- data/vendor/plugins/authlogic/test/crypto_provider_test/sha256_test.rb +14 -0
- data/vendor/plugins/authlogic/test/crypto_provider_test/sha512_test.rb +14 -0
- data/vendor/plugins/authlogic/test/fixtures/companies.yml +5 -0
- data/vendor/plugins/authlogic/test/fixtures/employees.yml +17 -0
- data/vendor/plugins/authlogic/test/fixtures/projects.yml +3 -0
- data/vendor/plugins/authlogic/test/fixtures/users.yml +24 -0
- data/vendor/plugins/authlogic/test/i18n_test.rb +33 -0
- data/vendor/plugins/authlogic/test/libs/affiliate.rb +7 -0
- data/vendor/plugins/authlogic/test/libs/company.rb +6 -0
- data/vendor/plugins/authlogic/test/libs/employee.rb +7 -0
- data/vendor/plugins/authlogic/test/libs/employee_session.rb +2 -0
- data/vendor/plugins/authlogic/test/libs/ldaper.rb +3 -0
- data/vendor/plugins/authlogic/test/libs/ordered_hash.rb +9 -0
- data/vendor/plugins/authlogic/test/libs/project.rb +3 -0
- data/vendor/plugins/authlogic/test/libs/user.rb +5 -0
- data/vendor/plugins/authlogic/test/libs/user_session.rb +6 -0
- data/vendor/plugins/authlogic/test/random_test.rb +49 -0
- data/vendor/plugins/authlogic/test/session_test/activation_test.rb +43 -0
- data/vendor/plugins/authlogic/test/session_test/active_record_trickery_test.rb +36 -0
- data/vendor/plugins/authlogic/test/session_test/brute_force_protection_test.rb +101 -0
- data/vendor/plugins/authlogic/test/session_test/callbacks_test.rb +6 -0
- data/vendor/plugins/authlogic/test/session_test/cookies_test.rb +112 -0
- data/vendor/plugins/authlogic/test/session_test/credentials_test.rb +0 -0
- data/vendor/plugins/authlogic/test/session_test/existence_test.rb +64 -0
- data/vendor/plugins/authlogic/test/session_test/http_auth_test.rb +28 -0
- data/vendor/plugins/authlogic/test/session_test/id_test.rb +17 -0
- data/vendor/plugins/authlogic/test/session_test/klass_test.rb +40 -0
- data/vendor/plugins/authlogic/test/session_test/magic_columns_test.rb +62 -0
- data/vendor/plugins/authlogic/test/session_test/magic_states_test.rb +60 -0
- data/vendor/plugins/authlogic/test/session_test/params_test.rb +53 -0
- data/vendor/plugins/authlogic/test/session_test/password_test.rb +106 -0
- data/vendor/plugins/authlogic/test/session_test/perishability_test.rb +15 -0
- data/vendor/plugins/authlogic/test/session_test/persistence_test.rb +21 -0
- data/vendor/plugins/authlogic/test/session_test/scopes_test.rb +60 -0
- data/vendor/plugins/authlogic/test/session_test/session_test.rb +59 -0
- data/vendor/plugins/authlogic/test/session_test/timeout_test.rb +52 -0
- data/vendor/plugins/authlogic/test/session_test/unauthorized_record_test.rb +13 -0
- data/vendor/plugins/authlogic/test/session_test/validation_test.rb +23 -0
- data/vendor/plugins/authlogic/test/test_helper.rb +182 -0
- data/vendor/plugins/dashboard/app/helpers/admin/dashboard_helper.rb +1 -1
- data/vendor/plugins/friendly_id/Changelog.md +243 -0
- data/vendor/plugins/friendly_id/Contributors.md +30 -0
- data/vendor/plugins/friendly_id/Gemfile +2 -0
- data/vendor/plugins/friendly_id/Guide.md +509 -0
- data/vendor/plugins/friendly_id/LICENSE +19 -0
- data/vendor/plugins/friendly_id/README.md +76 -0
- data/vendor/plugins/friendly_id/Rakefile +68 -0
- data/vendor/plugins/friendly_id/extras/README.txt +3 -0
- data/vendor/plugins/friendly_id/extras/bench.rb +59 -0
- data/vendor/plugins/friendly_id/extras/extras.rb +31 -0
- data/vendor/plugins/friendly_id/extras/prof.rb +14 -0
- data/vendor/plugins/friendly_id/extras/template-gem.rb +26 -0
- data/vendor/plugins/friendly_id/extras/template-plugin.rb +28 -0
- data/vendor/plugins/friendly_id/friendly_id.gemspec +40 -0
- data/vendor/plugins/friendly_id/generators/friendly_id/friendly_id_generator.rb +28 -0
- data/vendor/plugins/friendly_id/generators/friendly_id/templates/create_slugs.rb +18 -0
- data/vendor/plugins/friendly_id/lib/friendly_id.rb +67 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2.rb +47 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/configuration.rb +66 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/finders.rb +140 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/simple_model.rb +162 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/slug.rb +111 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/slugged_model.rb +323 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/tasks.rb +66 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/tasks/friendly_id.rake +19 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/configuration.rb +132 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/finders.rb +106 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/slug_string.rb +292 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/slugged.rb +91 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/status.rb +35 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/test.rb +175 -0
- data/vendor/plugins/friendly_id/lib/friendly_id/version.rb +8 -0
- data/vendor/plugins/friendly_id/rails/init.rb +2 -0
- data/vendor/plugins/friendly_id/test/active_record2/basic_slugged_model_test.rb +14 -0
- data/vendor/plugins/friendly_id/test/active_record2/cached_slug_test.rb +61 -0
- data/vendor/plugins/friendly_id/test/active_record2/core.rb +93 -0
- data/vendor/plugins/friendly_id/test/active_record2/custom_normalizer_test.rb +20 -0
- data/vendor/plugins/friendly_id/test/active_record2/custom_table_name_test.rb +22 -0
- data/vendor/plugins/friendly_id/test/active_record2/deprecated_test.rb +23 -0
- data/vendor/plugins/friendly_id/test/active_record2/scoped_model_test.rb +111 -0
- data/vendor/plugins/friendly_id/test/active_record2/simple_test.rb +59 -0
- data/vendor/plugins/friendly_id/test/active_record2/slug_test.rb +34 -0
- data/vendor/plugins/friendly_id/test/active_record2/slugged.rb +30 -0
- data/vendor/plugins/friendly_id/test/active_record2/slugged_status_test.rb +61 -0
- data/vendor/plugins/friendly_id/test/active_record2/sti_test.rb +22 -0
- data/vendor/plugins/friendly_id/test/active_record2/support/database.mysql.yml +4 -0
- data/vendor/plugins/friendly_id/test/active_record2/support/database.postgres.yml +6 -0
- data/vendor/plugins/friendly_id/test/active_record2/support/database.sqlite3.yml +2 -0
- data/vendor/plugins/friendly_id/test/active_record2/support/models.rb +78 -0
- data/vendor/plugins/friendly_id/test/active_record2/tasks_test.rb +82 -0
- data/vendor/plugins/friendly_id/test/active_record2/test_helper.rb +114 -0
- data/vendor/plugins/friendly_id/test/friendly_id_test.rb +60 -0
- data/vendor/plugins/friendly_id/test/slug_string_test.rb +78 -0
- data/vendor/plugins/friendly_id/test/test_helper.rb +9 -0
- data/vendor/plugins/hpricot/CHANGELOG +88 -0
- data/vendor/plugins/hpricot/COPYING +18 -0
- data/vendor/plugins/hpricot/README +275 -0
- data/vendor/plugins/hpricot/Rakefile +272 -0
- data/vendor/plugins/hpricot/ext/fast_xs/FastXsService.java +1030 -0
- data/vendor/plugins/hpricot/ext/fast_xs/extconf.rb +4 -0
- data/vendor/plugins/hpricot/ext/fast_xs/fast_xs.c +201 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/HpricotCss.java +831 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/HpricotScanService.java +2086 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/MANIFEST +0 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/extconf.rb +6 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_common.rl +76 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_css.c +3503 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_css.java.rl +155 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_css.rl +115 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_scan.c +6927 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_scan.h +79 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_scan.java.rl +1152 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_scan.rl +788 -0
- data/vendor/plugins/hpricot/extras/mingw-rbconfig.rb +176 -0
- data/vendor/plugins/hpricot/hpricot.gemspec +17 -0
- data/vendor/plugins/hpricot/lib/hpricot.rb +26 -0
- data/vendor/plugins/hpricot/lib/hpricot/blankslate.rb +63 -0
- data/vendor/plugins/hpricot/lib/hpricot/builder.rb +216 -0
- data/vendor/plugins/hpricot/lib/hpricot/elements.rb +510 -0
- data/vendor/plugins/hpricot/lib/hpricot/htmlinfo.rb +691 -0
- data/vendor/plugins/hpricot/lib/hpricot/inspect.rb +103 -0
- data/vendor/plugins/hpricot/lib/hpricot/modules.rb +40 -0
- data/vendor/plugins/hpricot/lib/hpricot/parse.rb +38 -0
- data/vendor/plugins/hpricot/lib/hpricot/tag.rb +219 -0
- data/vendor/plugins/hpricot/lib/hpricot/tags.rb +164 -0
- data/vendor/plugins/hpricot/lib/hpricot/traverse.rb +839 -0
- data/vendor/plugins/hpricot/lib/hpricot/xchar.rb +94 -0
- data/vendor/plugins/hpricot/setup.rb +1585 -0
- data/vendor/plugins/hpricot/test/files/basic.xhtml +17 -0
- data/vendor/plugins/hpricot/test/files/boingboing.html +2266 -0
- data/vendor/plugins/hpricot/test/files/cy0.html +3653 -0
- data/vendor/plugins/hpricot/test/files/immob.html +400 -0
- data/vendor/plugins/hpricot/test/files/pace_application.html +1320 -0
- data/vendor/plugins/hpricot/test/files/tenderlove.html +16 -0
- data/vendor/plugins/hpricot/test/files/uswebgen.html +220 -0
- data/vendor/plugins/hpricot/test/files/utf8.html +1054 -0
- data/vendor/plugins/hpricot/test/files/week9.html +1723 -0
- data/vendor/plugins/hpricot/test/files/why.xml +19 -0
- data/vendor/plugins/hpricot/test/load_files.rb +7 -0
- data/vendor/plugins/hpricot/test/nokogiri-bench.rb +64 -0
- data/vendor/plugins/hpricot/test/test_alter.rb +96 -0
- data/vendor/plugins/hpricot/test/test_builder.rb +37 -0
- data/vendor/plugins/hpricot/test/test_parser.rb +428 -0
- data/vendor/plugins/hpricot/test/test_paths.rb +25 -0
- data/vendor/plugins/hpricot/test/test_preserved.rb +88 -0
- data/vendor/plugins/hpricot/test/test_xml.rb +28 -0
- data/vendor/plugins/inquiries/app/controllers/admin/inquiries_controller.rb +1 -6
- data/vendor/plugins/inquiries/app/helpers/inquiries_helper.rb +0 -11
- data/vendor/plugins/inquiries/app/views/admin/inquiries/_inquiry.html.erb +10 -6
- data/vendor/plugins/inquiries/app/views/inquiry_mailer/confirmation.html.erb +1 -1
- data/vendor/plugins/inquiries/config/routes.rb +1 -1
- data/vendor/plugins/pages/app/controllers/admin/pages_controller.rb +16 -3
- data/vendor/plugins/pages/app/models/page_part.rb +9 -0
- data/vendor/plugins/rails_indexes/lib/indexer.rb +0 -2
- data/vendor/plugins/refinery/app/views/admin/_head.html.erb +2 -1
- data/vendor/plugins/refinery/app/views/shared/_head.html.erb +0 -1
- data/vendor/plugins/refinery/app/views/shared/_ie6check.html.erb +23 -11
- data/vendor/plugins/refinery/app/views/welcome.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/wymiframe.html.erb +2 -1
- data/vendor/plugins/refinery/lib/generators/refinery/USAGE +1 -1
- data/vendor/plugins/refinery/lib/generators/refinery/templates/migration.rb +2 -2
- data/vendor/plugins/refinery/lib/generators/refinery/templates/model.rb +4 -0
- data/vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb +6 -0
- data/vendor/plugins/refinery/lib/generators/refinery/templates/views/show.html.erb +5 -3
- data/vendor/plugins/refinery/lib/refinery/application_helper.rb +2 -2
- data/vendor/plugins/refinery/lib/refinery/initializer.rb +4 -41
- data/vendor/plugins/refinery_settings/app/models/refinery_setting.rb +7 -3
- data/vendor/plugins/slim_scrooge/README.textile +112 -0
- data/vendor/plugins/slim_scrooge/Rakefile +29 -0
- data/vendor/plugins/slim_scrooge/VERSION.yml +5 -0
- data/vendor/plugins/slim_scrooge/ext/Rakefile +42 -0
- data/vendor/plugins/slim_scrooge/ext/extconf.rb +5 -0
- data/vendor/plugins/slim_scrooge/lib/slim_scrooge.rb +16 -0
- data/vendor/plugins/slim_scrooge/lib/slim_scrooge/callsite.rb +96 -0
- data/vendor/plugins/slim_scrooge/lib/slim_scrooge/callsites.rb +70 -0
- data/vendor/plugins/slim_scrooge/lib/slim_scrooge/monitored_hash.rb +103 -0
- data/vendor/plugins/slim_scrooge/lib/slim_scrooge/result_set.rb +38 -0
- data/vendor/plugins/slim_scrooge/lib/slim_scrooge/simple_set.rb +34 -0
- data/vendor/plugins/slim_scrooge/lib/slim_scrooge/slim_scrooge.rb +46 -0
- data/vendor/plugins/slim_scrooge/rails/init.rb +8 -0
- data/vendor/plugins/slim_scrooge/slim_scrooge.gemspec +62 -0
- data/vendor/plugins/slim_scrooge/slim_scrooge_windows.gemspec +59 -0
- data/vendor/plugins/slim_scrooge/test/active_record_setup.rb +3 -0
- data/vendor/plugins/slim_scrooge/test/helper.rb +91 -0
- data/vendor/plugins/slim_scrooge/test/models/course.rb +2 -0
- data/vendor/plugins/slim_scrooge/test/schema/schema.rb +5 -0
- data/vendor/plugins/slim_scrooge/test/setup.rb +5 -0
- data/vendor/plugins/themes/app/models/theme.rb +7 -0
- data/vendor/plugins/themes/lib/theme_server.rb +3 -1
- data/vendor/plugins/themes/rails/init.rb +16 -13
- data/vendor/plugins/will_paginate/.manifest +43 -0
- data/vendor/plugins/will_paginate/CHANGELOG.rdoc +139 -0
- data/vendor/plugins/will_paginate/LICENSE +18 -0
- data/vendor/plugins/will_paginate/README.rdoc +107 -0
- data/vendor/plugins/will_paginate/Rakefile +53 -0
- data/vendor/plugins/will_paginate/examples/apple-circle.gif +0 -0
- data/vendor/plugins/will_paginate/examples/index.haml +69 -0
- data/vendor/plugins/will_paginate/examples/index.html +92 -0
- data/vendor/plugins/will_paginate/examples/pagination.css +90 -0
- data/vendor/plugins/will_paginate/examples/pagination.sass +91 -0
- data/vendor/plugins/will_paginate/init.rb +1 -0
- data/vendor/plugins/will_paginate/lib/will_paginate.rb +90 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/array.rb +16 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/collection.rb +146 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/core_ext.rb +43 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/finder.rb +264 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/named_scope.rb +170 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/named_scope_patch.rb +37 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/version.rb +9 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb +408 -0
- data/vendor/plugins/will_paginate/test/boot.rb +21 -0
- data/vendor/plugins/will_paginate/test/collection_test.rb +143 -0
- data/vendor/plugins/will_paginate/test/console +8 -0
- data/vendor/plugins/will_paginate/test/database.yml +22 -0
- data/vendor/plugins/will_paginate/test/finder_test.rb +473 -0
- data/vendor/plugins/will_paginate/test/fixtures/admin.rb +3 -0
- data/vendor/plugins/will_paginate/test/fixtures/developer.rb +14 -0
- data/vendor/plugins/will_paginate/test/fixtures/developers_projects.yml +13 -0
- data/vendor/plugins/will_paginate/test/fixtures/project.rb +15 -0
- data/vendor/plugins/will_paginate/test/fixtures/projects.yml +6 -0
- data/vendor/plugins/will_paginate/test/fixtures/replies.yml +29 -0
- data/vendor/plugins/will_paginate/test/fixtures/reply.rb +7 -0
- data/vendor/plugins/will_paginate/test/fixtures/schema.rb +38 -0
- data/vendor/plugins/will_paginate/test/fixtures/topic.rb +10 -0
- data/vendor/plugins/will_paginate/test/fixtures/topics.yml +30 -0
- data/vendor/plugins/will_paginate/test/fixtures/user.rb +2 -0
- data/vendor/plugins/will_paginate/test/fixtures/users.yml +35 -0
- data/vendor/plugins/will_paginate/test/helper.rb +37 -0
- data/vendor/plugins/will_paginate/test/lib/activerecord_test_case.rb +43 -0
- data/vendor/plugins/will_paginate/test/lib/activerecord_test_connector.rb +75 -0
- data/vendor/plugins/will_paginate/test/lib/load_fixtures.rb +11 -0
- data/vendor/plugins/will_paginate/test/lib/view_test_process.rb +179 -0
- data/vendor/plugins/will_paginate/test/tasks.rake +59 -0
- data/vendor/plugins/will_paginate/test/view_test.rb +373 -0
- data/vendor/plugins/will_paginate/will_paginate.gemspec +19 -0
- metadata +308 -27
- data/db/migrate/20091029034951_remove_blurb_from_news_items.rb +0 -9
- data/public/javascripts/jquery-ui-1.8rc1.min.js +0 -375
- data/test/fixtures/news_items.yml +0 -14
- data/test/unit/news_items_test.rb +0 -33
- data/vendor/plugins/authentication/test/fixtures/users.yml +0 -19
- data/vendor/plugins/authentication/test/functional/sessions_controller_test.rb +0 -85
- data/vendor/plugins/authentication/test/functional/users_controller_test.rb +0 -99
- data/vendor/plugins/authentication/test/unit/user_test.rb +0 -164
- data/vendor/plugins/news/app/controllers/admin/news_items_controller.rb +0 -5
- data/vendor/plugins/news/app/controllers/news_items_controller.rb +0 -20
- data/vendor/plugins/news/app/models/news_item.rb +0 -24
- data/vendor/plugins/news/app/views/admin/news_items/_form.html.erb +0 -19
- data/vendor/plugins/news/app/views/admin/news_items/_news_item.html.erb +0 -15
- data/vendor/plugins/news/app/views/admin/news_items/edit.html.erb +0 -1
- data/vendor/plugins/news/app/views/admin/news_items/index.html.erb +0 -31
- data/vendor/plugins/news/app/views/admin/news_items/new.html.erb +0 -1
- data/vendor/plugins/news/app/views/news_items/_recent_posts.html.erb +0 -8
- data/vendor/plugins/news/app/views/news_items/index.html.erb +0 -17
- data/vendor/plugins/news/app/views/news_items/index.rss.builder +0 -26
- data/vendor/plugins/news/app/views/news_items/show.html.erb +0 -13
- data/vendor/plugins/news/config/routes.rb +0 -7
- data/vendor/plugins/news/news.md +0 -20
- data/vendor/plugins/news/rails/init.rb +0 -11
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require 'test/unit'
|
|
4
|
+
require 'hpricot'
|
|
5
|
+
require 'load_files'
|
|
6
|
+
|
|
7
|
+
class TestParser < Test::Unit::TestCase
|
|
8
|
+
def test_roundtrip
|
|
9
|
+
@basic = Hpricot.parse(TestFiles::BASIC)
|
|
10
|
+
%w[link link[2] body #link1 a p.ohmy].each do |css_sel|
|
|
11
|
+
ele = @basic.at(css_sel)
|
|
12
|
+
assert_equal ele, @basic.at(ele.css_path)
|
|
13
|
+
assert_equal ele, @basic.at(ele.xpath)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
def test_attr_brackets
|
|
17
|
+
doc = Hpricot('<input name="vendor[porkpies]"/>')
|
|
18
|
+
assert_equal 1, (doc/'input[@name^="vendor[porkpies]"]').length
|
|
19
|
+
assert_equal 1, (doc/'input[@name="vendor[porkpies]"]').length
|
|
20
|
+
assert_equal 0, (doc/'input[@name$="]]]]]"]').length
|
|
21
|
+
|
|
22
|
+
doc = Hpricot('<input name="vendor[porkpies][meaty]"/>')
|
|
23
|
+
assert_equal 1, (doc/'input[@name^="vendor[porkpies][meaty]"]').length
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#!/usr/bin/env ruby
|
|
3
|
+
|
|
4
|
+
require 'test/unit'
|
|
5
|
+
require 'hpricot'
|
|
6
|
+
require 'load_files'
|
|
7
|
+
|
|
8
|
+
unless "".respond_to?(:lines)
|
|
9
|
+
require 'enumerator'
|
|
10
|
+
class String
|
|
11
|
+
def lines
|
|
12
|
+
Enumerable::Enumerator.new(self, :each_line)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
class TestPreserved < Test::Unit::TestCase
|
|
18
|
+
def assert_roundtrip str
|
|
19
|
+
doc = Hpricot(str)
|
|
20
|
+
yield doc if block_given?
|
|
21
|
+
str2 = doc.to_original_html
|
|
22
|
+
if RUBY_VERSION =~ /^1.9/
|
|
23
|
+
str2.force_encoding('UTF-8')
|
|
24
|
+
end
|
|
25
|
+
str.lines.zip(str2.lines).each do |s1, s2|
|
|
26
|
+
assert_equal s1, s2
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def assert_html str1, str2
|
|
31
|
+
doc = Hpricot(str2)
|
|
32
|
+
yield doc if block_given?
|
|
33
|
+
assert_equal str1, doc.to_original_html
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def test_simple
|
|
37
|
+
str = "<p>Hpricot is a <b>you know <i>uh</b> fine thing.</p>"
|
|
38
|
+
assert_html str, str
|
|
39
|
+
assert_html "<p class=\"new\">Hpricot is a <b>you know <i>uh</b> fine thing.</p>", str do |doc|
|
|
40
|
+
(doc/:p).set('class', 'new')
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def test_parent
|
|
45
|
+
str = "<html><base href='/'><head><title>Test</title></head><body><div id='wrap'><p>Paragraph one.</p><p>Paragraph two.</p></div></body></html>"
|
|
46
|
+
assert_html str, str
|
|
47
|
+
assert_html "<html><base href='/'><body><div id=\"all\"><div><p>Paragraph one.</p></div><div><p>Paragraph two.</p></div></div></body></html>", str do |doc|
|
|
48
|
+
(doc/:head).remove
|
|
49
|
+
(doc/:div).set('id', 'all')
|
|
50
|
+
(doc/:p).wrap('<div></div>')
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def test_escaping_of_contents
|
|
55
|
+
doc = Hpricot(TestFiles::BOINGBOING)
|
|
56
|
+
assert_equal "Fukuda’s Automatic Door opens around your body as you pass through it. The idea is to save energy and keep the room clean.", doc.at("img[@alt='200606131240']").next.to_s.strip
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def test_files
|
|
60
|
+
assert_roundtrip TestFiles::BASIC
|
|
61
|
+
assert_roundtrip TestFiles::BOINGBOING
|
|
62
|
+
assert_roundtrip TestFiles::CY0
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def test_fixup_link
|
|
66
|
+
doc = %{<?xml version="1.0" encoding="UTF-8"?><rss><channel><link>ht</link></channel></rss>}
|
|
67
|
+
assert_roundtrip doc
|
|
68
|
+
assert_equal Hpricot(doc).to_s,
|
|
69
|
+
%{<?xml version="1.0" encoding="UTF-8"?><rss><channel><link />ht</channel></rss>}
|
|
70
|
+
assert_equal Hpricot.XML(doc).to_s,
|
|
71
|
+
%{<?xml version="1.0" encoding="UTF-8"?><rss><channel><link>ht</link></channel></rss>}
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def test_escaping_of_attrs
|
|
75
|
+
# ampersands in URLs
|
|
76
|
+
str = %{<a href="http://google.com/search?q=hpricot&l=en">Google</a>}
|
|
77
|
+
link = (doc = Hpricot(str)).at(:a)
|
|
78
|
+
assert_equal "http://google.com/search?q=hpricot&l=en", link['href']
|
|
79
|
+
assert_equal "http://google.com/search?q=hpricot&l=en", link.attributes['href']
|
|
80
|
+
assert_equal "http://google.com/search?q=hpricot&l=en", link.get_attribute('href')
|
|
81
|
+
assert_equal "http://google.com/search?q=hpricot&l=en", link.raw_attributes['href']
|
|
82
|
+
assert_equal str, doc.to_html
|
|
83
|
+
|
|
84
|
+
# alter the url
|
|
85
|
+
link['href'] = "javascript:alert(\"AGGA-KA-BOO!\")"
|
|
86
|
+
assert_equal %{<a href="javascript:alert("AGGA-KA-BOO!")">Google</a>}, doc.to_html
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require 'test/unit'
|
|
4
|
+
require 'hpricot'
|
|
5
|
+
require 'load_files'
|
|
6
|
+
|
|
7
|
+
class TestParser < Test::Unit::TestCase
|
|
8
|
+
# normally, the link tags are empty HTML tags.
|
|
9
|
+
# contributed by laudney.
|
|
10
|
+
def test_normally_empty
|
|
11
|
+
doc = Hpricot::XML("<rss><channel><title>this is title</title><link>http://fake.com</link></channel></rss>")
|
|
12
|
+
assert_equal "this is title", (doc/:rss/:channel/:title).text
|
|
13
|
+
assert_equal "http://fake.com", (doc/:rss/:channel/:link).text
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# make sure XML doesn't get downcased
|
|
17
|
+
def test_casing
|
|
18
|
+
doc = Hpricot::XML(TestFiles::WHY)
|
|
19
|
+
assert_equal "hourly", (doc.at "sy:updatePeriod").inner_html
|
|
20
|
+
assert_equal 1, (doc/"guid[@isPermaLink]").length
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# be sure tags named "text" are ok
|
|
24
|
+
def test_text_tags
|
|
25
|
+
doc = Hpricot::XML("<feed><title>City Poisoned</title><text>Rita Lee has poisoned Brazil.</text></feed>")
|
|
26
|
+
assert_equal "City Poisoned", (doc/"title").text
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -8,12 +8,7 @@ class Admin::InquiriesController < Admin::BaseController
|
|
|
8
8
|
def toggle_status
|
|
9
9
|
@inquiry.toggle!(:open)
|
|
10
10
|
|
|
11
|
-
flash[:notice] = "'#{@inquiry.name}' has been "
|
|
12
|
-
if @inquiry.open?
|
|
13
|
-
"reopened"
|
|
14
|
-
else
|
|
15
|
-
"closed"
|
|
16
|
-
end
|
|
11
|
+
flash[:notice] = "'#{@inquiry.name}' has been #{@inquiry.open? ? "reopened" : "closed"}"
|
|
17
12
|
|
|
18
13
|
redirect_to :action => 'index'
|
|
19
14
|
end
|
|
@@ -1,13 +1,2 @@
|
|
|
1
1
|
module InquiriesHelper
|
|
2
|
-
|
|
3
|
-
def open_close_link(inquiry)
|
|
4
|
-
if inquiry.open?
|
|
5
|
-
link_to("Open", {:action => 'toggle_status', :id => inquiry.id},
|
|
6
|
-
{:title => "Click to close this inquiry"})
|
|
7
|
-
else
|
|
8
|
-
link_to("Closed", {:action => 'toggle_status', :id => inquiry.id},
|
|
9
|
-
{:title => "Click to open this inquiry back up"})
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
|
|
13
2
|
end
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
<li class='clearfix record <%= cycle("on", "on-hover") %>'>
|
|
2
2
|
<span class='title'>
|
|
3
3
|
<span class='actions'>
|
|
4
|
-
<%= link_to refinery_icon_tag("#{inquiry.open? ? 'accept' : 'arrow_up'}.png"),
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
<%= link_to refinery_icon_tag("#{inquiry.open? ? 'accept' : 'arrow_up'}.png"),
|
|
5
|
+
toggle_status_admin_inquiry_url(inquiry),
|
|
6
|
+
:title => "Move this inquiry to #{inquiry.open? ? 'closed' : 'open'}" %>
|
|
7
|
+
<%= link_to refinery_icon_tag('email_open.png'),
|
|
8
|
+
admin_inquiry_url(inquiry),
|
|
9
|
+
:title => "Read this inquiry" -%>
|
|
10
|
+
<%= link_to refinery_icon_tag('delete.png'),
|
|
11
|
+
admin_inquiry_url(inquiry),
|
|
12
|
+
:class => "cancel confirm-delete",
|
|
13
|
+
:title => "Remove this inquiry forever" -%>
|
|
10
14
|
</span>
|
|
11
15
|
<%=h inquiry.name %>
|
|
12
16
|
<span class="preview">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<%= InquirySetting.confirmation_body.value.gsub("%name%", @inquiry.name) %>
|
|
1
|
+
<%= InquirySetting.confirmation_body.value.gsub("%name%", h(@inquiry.name)) %>
|
|
@@ -2,7 +2,7 @@ ActionController::Routing::Routes.draw do |map|
|
|
|
2
2
|
map.resources :inquiries, :collection => {:thank_you => :get}
|
|
3
3
|
|
|
4
4
|
map.namespace(:admin) do |admin|
|
|
5
|
-
admin.resources :inquiries
|
|
5
|
+
admin.resources :inquiries, :member => {:toggle_status => :get}
|
|
6
6
|
admin.resources :inquiry_settings
|
|
7
7
|
end
|
|
8
8
|
end
|
|
@@ -2,7 +2,7 @@ class Admin::PagesController < Admin::BaseController
|
|
|
2
2
|
|
|
3
3
|
crudify :page, :conditions => "parent_id IS NULL", :order => "position ASC", :include => [:parts, :slugs, :children], :paging => false
|
|
4
4
|
before_filter :find_pages_for_parents_list, :only => [:new, :create, :edit, :update]
|
|
5
|
-
after_filter :expire_menu_fragment_caching, :only => [:create, :update, :destroy]
|
|
5
|
+
after_filter :expire_menu_fragment_caching, :only => [:create, :update, :destroy, :update_positions]
|
|
6
6
|
|
|
7
7
|
def new
|
|
8
8
|
@page = Page.new
|
|
@@ -18,8 +18,12 @@ protected
|
|
|
18
18
|
|
|
19
19
|
# This finds all of the pages that could possibly be assigned as the current page's parent.
|
|
20
20
|
def find_pages_for_parents_list
|
|
21
|
-
@pages_for_parents_list =
|
|
22
|
-
|
|
21
|
+
@pages_for_parents_list = []
|
|
22
|
+
Page.find_all_by_parent_id(nil, :order => "position ASC").each do |page|
|
|
23
|
+
@pages_for_parents_list << page
|
|
24
|
+
@pages_for_parents_list += add_pages_branch_to_parents_list(page)
|
|
25
|
+
end
|
|
26
|
+
@pages_for_parents_list.flatten.compact!
|
|
23
27
|
# We need to remove all references to the current page or any of its decendants or we get a nightmare.
|
|
24
28
|
unless @page.nil? or @page.new_record?
|
|
25
29
|
@pages_for_parents_list.reject! do |page|
|
|
@@ -27,5 +31,14 @@ protected
|
|
|
27
31
|
end
|
|
28
32
|
end
|
|
29
33
|
end
|
|
34
|
+
|
|
35
|
+
def add_pages_branch_to_parents_list(page)
|
|
36
|
+
list = []
|
|
37
|
+
page.children.each do |child|
|
|
38
|
+
list << child
|
|
39
|
+
list += add_pages_branch_to_parents_list if child.children.any?
|
|
40
|
+
end
|
|
41
|
+
list
|
|
42
|
+
end
|
|
30
43
|
|
|
31
44
|
end
|
|
@@ -9,4 +9,13 @@ class PagePart < ActiveRecord::Base
|
|
|
9
9
|
"page_part_#{self.title.downcase.gsub(" ", "_")}"
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
+
before_save :normalise_text_fields
|
|
13
|
+
|
|
14
|
+
protected
|
|
15
|
+
def normalise_text_fields
|
|
16
|
+
unless self.body.blank? or self.body =~ /^\</
|
|
17
|
+
self.body = "<p>#{self.body.gsub("\r\n\r\n", "</p><p>").gsub("\r\n", "<br/>")}</p>"
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
12
21
|
end
|
|
@@ -155,11 +155,9 @@ module Indexer
|
|
|
155
155
|
table_name = model_name.constantize.table_name
|
|
156
156
|
else
|
|
157
157
|
#puts "Unable to get the table_name for #{model_name.to_s}. it could be an ActiveResource"
|
|
158
|
-
next
|
|
159
158
|
end
|
|
160
159
|
else
|
|
161
160
|
#puts "Unable to constantize #{model_name.to_s}, if you are sure that #{model_name.to_s} is a valid class name, please file an issue on\nhttp://github.com/eladmeidar/rails_indexes\nPlease supply the relevant code as well, thanks. =)"
|
|
162
|
-
next
|
|
163
161
|
end
|
|
164
162
|
end
|
|
165
163
|
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
<head>
|
|
3
3
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
4
4
|
<title><%= RefinerySetting.find_or_set(:site_name, 'Company Name').titleize %> - Refinery</title>
|
|
5
|
-
<%= stylesheet_link_tag 'refinery/refinery', 'refinery/tooltips', :cache => (use_caching ? "cache/refinery" : false) %>
|
|
5
|
+
<%= stylesheet_link_tag 'refinery/refinery', 'refinery/tooltips', "wymeditor/skins/refinery/skin", :cache => (use_caching ? "cache/refinery" : false) %>
|
|
6
6
|
<%= render :partial => "/shared/admin/head_before_javascript_libraries" -%>
|
|
7
7
|
<%= jquery_include_tags(use_caching) %>
|
|
8
|
+
<%= yield :head_after_javascript_libraries %>
|
|
8
9
|
<%= javascript_include_tag 'admin', 'wymeditor/jquery.refinery.wymeditor.js', 'refinery/boot_wym', 'refinery/admin', :cache => (use_caching ? "cache/admin" : false) %>
|
|
9
10
|
<%= javascript_include_tag "http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js" if RefinerySetting.find_or_set(:show_firebug_lite, false) -%>
|
|
10
11
|
<%= yield :head %>
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
<%= stylesheet_link_tag "theme" %>
|
|
7
7
|
<%= stylesheet_link_tag "home", :theme => theme if home_page? %>
|
|
8
8
|
<%= "<!--[if IE 7]>#{stylesheet_link_tag 'ie7'}<![endif]-->" if request.env['HTTP_USER_AGENT'] =~ /MSIE/ -%>
|
|
9
|
-
<%= auto_discovery_link_tag(:rss, news_items_url(:format => 'rss')) %>
|
|
10
9
|
<link rel="shortcut icon" href="/favicon.ico" />
|
|
11
10
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
12
11
|
<%= "<meta name=\"keywords\" content=\"#{@meta.meta_keywords}\" />" if @meta.meta_keywords.present? %>
|
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<div id="
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
<p>
|
|
8
|
-
|
|
9
|
-
</
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
<% if RefinerySetting.find_or_set(:ie6_upgrade_message_enabled, true) -%>
|
|
2
|
+
<!--[if lte IE 6]>
|
|
3
|
+
<div id="ie6msg_wrapper">
|
|
4
|
+
<div id="ie6msg">
|
|
5
|
+
<h4>Did you know that your browser is out of date?</h4>
|
|
6
|
+
<div id='ie6message'>
|
|
7
|
+
<p>
|
|
8
|
+
To get the best possible experience using our website we recommend that you upgrade your browser to a newer version. The current version is
|
|
9
|
+
<a class="getie8" href="http://upgradeie.s3.amazonaws.com/eng/index.html">Internet Explorer 8</a>.
|
|
10
|
+
The upgrade is free. If you're using a PC at work you should contact your IT administrator.
|
|
11
|
+
</p>
|
|
12
|
+
<p>
|
|
13
|
+
If you want to you may also try some other popular and <strong>free</strong> Internet browsers like:<br/>
|
|
14
|
+
<a class="ie6expl" href="http://getfirefox.com" target='_blank'>Firefox</a>,
|
|
15
|
+
<a class="ie6expl" href="http://www.opera.com" target='_blank'>Opera</a>,
|
|
16
|
+
<a class="ie6expl" href="http://www.apple.com/safari/download/" target='_blank'>Safari</a> or
|
|
17
|
+
<a class="ie6expl" href="http://www.google.com/chrome" target='_blank'>Chrome</a>
|
|
18
|
+
</p>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<![endif]-->
|
|
23
|
+
<% end -%>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
2
2
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
3
3
|
<head>
|
|
4
|
-
<
|
|
4
|
+
<%= "<meta http-equiv='X-UA-Compatible' content='IE-EmulateIE7' />" if request.env['HTTP_USER_AGENT'] =~ /MSIE/ %>
|
|
5
|
+
<title>WYMeditor</title>
|
|
5
6
|
<%= stylesheet_link_tag "wymeditor/skins/refinery/wymiframe", "formatting", "theme", :media => "all" %>
|
|
6
7
|
</head>
|
|
7
8
|
<body class="wym_iframe"></body>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
Usage:
|
|
2
|
-
./script/generate refinery team_member title:string description:text image:image
|
|
2
|
+
./script/generate refinery team_member title:string description:text image:image resource:resource
|
|
@@ -4,8 +4,8 @@ class <%= migration_name %> < ActiveRecord::Migration
|
|
|
4
4
|
create_table :<%= table_name %> do |t|
|
|
5
5
|
<%
|
|
6
6
|
attributes.each do |attribute|
|
|
7
|
-
# turn image into what it was supposed to be which is an integer reference to an image.
|
|
8
|
-
if attribute.type.to_s
|
|
7
|
+
# turn image or resource into what it was supposed to be which is an integer reference to an image or resource.
|
|
8
|
+
if attribute.type.to_s =~ /^(image|resource)$/
|
|
9
9
|
attribute.type = 'integer'
|
|
10
10
|
attribute.name = "#{attribute.name}_id".gsub("_id_id", "_id")
|
|
11
11
|
end
|
|
@@ -9,5 +9,9 @@ class <%= class_name %> < ActiveRecord::Base
|
|
|
9
9
|
<% attributes.collect{|a| a if a.type.to_s == 'image'}.compact.uniq.each do |a| -%>
|
|
10
10
|
belongs_to :<%= a.name.gsub("_id", "") %><%= ", :class_name => 'Image'" unless a.name =~ /^image(_id)?$/ %>
|
|
11
11
|
<% end -%>
|
|
12
|
+
<% attributes.collect{|a| a if a.type.to_s == 'resource'}.compact.uniq.each do |a| -%>
|
|
13
|
+
belongs_to :<%= a.name.gsub("_id", "") %><%= ", :class_name => 'Resource'" unless a.name =~ /^resource(_id)?$/ %>
|
|
14
|
+
<% end -%>
|
|
15
|
+
|
|
12
16
|
|
|
13
17
|
end
|
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
:image => @<%= singular_name %>.<%= attribute.name.gsub("_id", "") %>,
|
|
11
11
|
:toggle_image_display => false
|
|
12
12
|
} %>
|
|
13
|
+
<% elsif attribute.type.to_s == 'resource' %>
|
|
14
|
+
<%%= render :partial => "/shared/admin/resource_picker", :locals => {
|
|
15
|
+
:f => f,
|
|
16
|
+
:field => :<%= "#{attribute.name}_id".gsub("_id_id", "_id") %>,
|
|
17
|
+
:resource => @<%= singular_name %>.<%= attribute.name.gsub("_id", "") %>,
|
|
18
|
+
} %>
|
|
13
19
|
<% elsif attribute.field_type.to_s == "text_area" -%>
|
|
14
20
|
<%%= f.text_area :<%= attribute.name %>, :rows => 20, :cols => 140, :class => 'wymeditor' -%>
|
|
15
21
|
<% else -%>
|
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
<% attributes.each do |attribute| %>
|
|
7
7
|
<div>
|
|
8
8
|
<h3><%= attribute.name.titleize %></h3>
|
|
9
|
-
<%
|
|
10
|
-
<%%= @<%= singular_name %>.<%= attribute.name %> %>
|
|
11
|
-
<% else -%>
|
|
9
|
+
<% if attribute.type.to_s == 'image' -%>
|
|
12
10
|
<%%= image_fu @<%= singular_name %>.<%= attribute.name %>, nil %>
|
|
11
|
+
<% elsif attribute.type.to_s == 'resource' -%>
|
|
12
|
+
<%%= link_to <%= "'#{attribute.name}'" %>, @<%= singular_name %>.<%= attribute.name %>.public_filename %>
|
|
13
|
+
<% else -%>
|
|
14
|
+
<%%= @<%= singular_name %>.<%= attribute.name %> %>
|
|
13
15
|
<% end -%>
|
|
14
16
|
</div>
|
|
15
17
|
<% end %>
|
|
@@ -42,9 +42,9 @@ module Refinery::ApplicationHelper
|
|
|
42
42
|
//google.load('jqueryui', '1.8');
|
|
43
43
|
// google isn't using jqueryui 1.8 yet although it was before.
|
|
44
44
|
</script>
|
|
45
|
-
#{javascript_include_tag 'jquery-ui-1.
|
|
45
|
+
#{javascript_include_tag 'jquery-ui-1.8.min.js'}"
|
|
46
46
|
else
|
|
47
|
-
javascript_include_tag 'jquery', 'jquery-ui-1.
|
|
47
|
+
javascript_include_tag 'jquery', 'jquery-ui-1.8.min.js', :cache => (use_caching ? "cache/libraries" : nil)
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
|
|
@@ -31,28 +31,14 @@ module Refinery
|
|
|
31
31
|
end
|
|
32
32
|
$LOAD_PATH.uniq!
|
|
33
33
|
end
|
|
34
|
-
|
|
35
|
-
# We need to overload this because some gems raise errors if they're not installed
|
|
36
|
-
# rather than just letting the framework handle it so we need to trap them here.
|
|
37
|
-
def ensure_all_registered_plugins_are_loaded!
|
|
38
|
-
begin
|
|
39
|
-
super
|
|
40
|
-
rescue LoadError => load_error
|
|
41
|
-
raise LoadError, load_error.to_s unless load_error.to_s =~ /friendly_id|aasm|will_paginate/
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
34
|
end
|
|
45
35
|
|
|
46
36
|
class Initializer < Rails::Initializer
|
|
47
37
|
def self.run(command = :process, configuration = Configuration.new)
|
|
48
|
-
# Set up configuration that is rather specific to Refinery.
|
|
38
|
+
# Set up configuration that is rather specific to Refinery. (some plugins require on other more 'core' plugins).
|
|
39
|
+
# We do make sure we check that things haven't already been set in the application.
|
|
49
40
|
configuration.plugin_loader = Refinery::PluginLoader unless configuration.plugin_loader != Rails::Plugin::Loader
|
|
50
|
-
configuration.plugins = [ :
|
|
51
|
-
configuration.gem "aasm", :version => "~> 2.1.3", :lib => "aasm"
|
|
52
|
-
configuration.gem "friendly_id", :version => "~> 2.2.2", :lib => "friendly_id"
|
|
53
|
-
configuration.gem "hpricot", :version => "~> 0.8.1", :lib => "hpricot"
|
|
54
|
-
configuration.gem "slim_scrooge", :version => "~> 1.0.5", :lib => "slim_scrooge"
|
|
55
|
-
configuration.gem "will_paginate", :version => "~> 2.3.11", :lib => "will_paginate"
|
|
41
|
+
configuration.plugins = [ :authlogic, :friendly_id, :will_paginate, :all ] if configuration.plugins.nil?
|
|
56
42
|
|
|
57
43
|
# Pass our configuration along to Rails.
|
|
58
44
|
Rails.configuration = configuration
|
|
@@ -63,29 +49,6 @@ module Refinery
|
|
|
63
49
|
# Create deprecations for variables that we've stopped using (possibly remove in 1.0?)
|
|
64
50
|
require 'refinery/deprecations'
|
|
65
51
|
end
|
|
66
|
-
|
|
67
|
-
def load_plugins
|
|
68
|
-
# inject all gems that manipulate ActiveRecord::Base into the application
|
|
69
|
-
# and stub any calls that are dangerous.
|
|
70
|
-
::ActiveRecord::Base.module_eval do
|
|
71
|
-
begin
|
|
72
|
-
require 'friendly_id'
|
|
73
|
-
require 'will_paginate'
|
|
74
|
-
require 'aasm'
|
|
75
|
-
rescue LoadError => load_error
|
|
76
|
-
# this will stop us running rake gems:install which we don't really want so just trap this error.
|
|
77
|
-
puts "*** Trapping error caused by missing gems ***"
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
# Stub has_friendly_id. This will get overriden when/if included.
|
|
81
|
-
# The config will still complain that the gem is missing but this allows it to do so.
|
|
82
|
-
def self.has_friendly_id(column, options = {}, &block)
|
|
83
|
-
super if defined? super and table_exists?
|
|
84
|
-
end
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
# call Rails' load_plugins
|
|
88
|
-
super
|
|
89
|
-
end
|
|
90
52
|
end
|
|
53
|
+
|
|
91
54
|
end
|