refinerycms 0.9.6.19 → 0.9.6.21
Sign up to get free protection for your applications and to get access to all the features.
- 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,139 @@
|
|
1
|
+
= 2.3.12, released 2009-12-01
|
2
|
+
|
3
|
+
* make view helpers "HTML safe" for Rails 2.3.5 with rails_xss plugin
|
4
|
+
|
5
|
+
= 2.3.11, released 2009-06-02
|
6
|
+
|
7
|
+
* fix `enable_actionpack`
|
8
|
+
|
9
|
+
= 2.3.10, released 2009-05-21
|
10
|
+
|
11
|
+
* count_by_sql: don't use table alias with any adapters starting with "oracle"
|
12
|
+
* Add back "AS count_table" alias to `paginate_by_sql` counter SQL
|
13
|
+
|
14
|
+
= 2.3.9, released 2009-05-29
|
15
|
+
|
16
|
+
* remove "AS count_table" alias from `paginate_by_sql` counter SQL
|
17
|
+
* Rails 2.3.2 compat: monkeypatch Rails issue #2189 (count breaks has_many :through)
|
18
|
+
* fix generation of page URLs that contain the "@" character
|
19
|
+
* check for method existance in a ruby 1.8- and 1.9-compatible way
|
20
|
+
* load will_paginate view helpers even if ActiveRecord is not loaded
|
21
|
+
|
22
|
+
== 2.3.8, released 2009-03-09
|
23
|
+
|
24
|
+
* Rails 2.3 compat: query parameter parsing with Rack
|
25
|
+
|
26
|
+
== 2.3.7, released 2009-02-09
|
27
|
+
|
28
|
+
* Removed all unnecessary &block variables since they cause serious memory damage and lots of subsequent gc runs.
|
29
|
+
|
30
|
+
== 2.3.6, released 2008-10-26
|
31
|
+
|
32
|
+
* Rails 2.2 fix: stop using `extract_attribute_names_from_match` inernal AR method, it no longer exists
|
33
|
+
|
34
|
+
== 2.3.5, released 2008-10-07
|
35
|
+
|
36
|
+
* update the backported named_scope implementation for Rails versions older than 2.1
|
37
|
+
* break out of scope of paginated_each() yielded block when used on named scopes
|
38
|
+
* fix paginate(:from)
|
39
|
+
|
40
|
+
== 2.3.4, released 2008-09-16
|
41
|
+
|
42
|
+
* Removed gem dependency to Active Support (causes trouble with vendored rails).
|
43
|
+
* Rails 2.1: fix a failing test and a deprecation warning.
|
44
|
+
* Cope with scoped :select when counting.
|
45
|
+
|
46
|
+
== 2.3.3, released 2008-08-29
|
47
|
+
|
48
|
+
* Ensure that paginate_by_sql doesn't change the original SQL query.
|
49
|
+
* RDoc love (now live at http://mislav.caboo.se/static/will_paginate/doc/)
|
50
|
+
* Rename :prev_label to :previous_label for consistency. old name still functions but is deprecated
|
51
|
+
* ActiveRecord 2.1: Remove :include option from count_all query when it's possible.
|
52
|
+
|
53
|
+
== 2.3.2, released 2008-05-16
|
54
|
+
|
55
|
+
* Fixed LinkRenderer#stringified_merge by removing "return" from iterator block
|
56
|
+
* Ensure that 'href' values in pagination links are escaped URLs
|
57
|
+
|
58
|
+
== 2.3.1, released 2008-05-04
|
59
|
+
|
60
|
+
* Fixed page numbers not showing with custom routes and implicit first page
|
61
|
+
* Try to use Hanna for documentation (falls back to default RDoc template if not)
|
62
|
+
|
63
|
+
== 2.3.0, released 2008-04-29
|
64
|
+
|
65
|
+
* Changed LinkRenderer to receive collection, options and reference to view template NOT in
|
66
|
+
constructor, but with the #prepare method. This is a step towards supporting passing of
|
67
|
+
LinkRenderer (or subclass) instances that may be preconfigured in some way
|
68
|
+
* LinkRenderer now has #page_link and #page_span methods for easier customization of output in
|
69
|
+
subclasses
|
70
|
+
* Changed page_entries_info() method to adjust its output according to humanized class name of
|
71
|
+
collection items. Override this with :entry_name parameter (singular).
|
72
|
+
|
73
|
+
page_entries_info(@posts)
|
74
|
+
#-> "Displaying all 12 posts"
|
75
|
+
page_entries_info(@posts, :entry_name => 'item')
|
76
|
+
#-> "Displaying all 12 items"
|
77
|
+
|
78
|
+
== 2.2.3, released 2008-04-26
|
79
|
+
|
80
|
+
* will_paginate gem is no longer published on RubyForge, but on
|
81
|
+
gems.github.com:
|
82
|
+
|
83
|
+
gem sources -a http://gems.github.com/ (you only need to do this once)
|
84
|
+
gem install mislav-will_paginate
|
85
|
+
|
86
|
+
* extract reusable pagination testing stuff into WillPaginate::View
|
87
|
+
* rethink the page URL construction mechanizm to be more bulletproof when
|
88
|
+
combined with custom routing for page parameter
|
89
|
+
* test that anchor parameter can be used in pagination links
|
90
|
+
|
91
|
+
== 2.2.2, released 2008-04-21
|
92
|
+
|
93
|
+
* Add support for page parameter in custom routes like "/foo/page/2"
|
94
|
+
* Change output of "page_entries_info" on single-page collection and erraneous
|
95
|
+
output with empty collection as reported by Tim Chater
|
96
|
+
|
97
|
+
== 2.2.1, released 2008-04-08
|
98
|
+
|
99
|
+
* take less risky path when monkeypatching named_scope; fix that it no longer
|
100
|
+
requires ActiveRecord::VERSION
|
101
|
+
* use strings in "respond_to?" calls to work around a bug in acts_as_ferret
|
102
|
+
stable (ugh)
|
103
|
+
* add rake release task
|
104
|
+
|
105
|
+
|
106
|
+
== 2.2.0, released 2008-04-07
|
107
|
+
|
108
|
+
=== API changes
|
109
|
+
* Rename WillPaginate::Collection#page_count to "total_pages" for consistency.
|
110
|
+
If you implemented this interface, change your implementation accordingly.
|
111
|
+
* Remove old, deprecated style of calling Array#paginate as "paginate(page,
|
112
|
+
per_page)". If you want to specify :page, :per_page or :total_entries, use a
|
113
|
+
parameter hash.
|
114
|
+
* Rename LinkRenderer#url_options to "url_for" and drastically optimize it
|
115
|
+
|
116
|
+
=== View changes
|
117
|
+
* Added "prev_page" and "next_page" CSS classes on previous/next page buttons
|
118
|
+
* Add examples of pagination links styling in "examples/index.html"
|
119
|
+
* Change gap in pagination links from "..." to
|
120
|
+
"<span class="gap">…</span>".
|
121
|
+
* Add "paginated_section", a block helper that renders pagination both above and
|
122
|
+
below content in the block
|
123
|
+
* Add rel="prev|next|start" to page links
|
124
|
+
|
125
|
+
=== Other
|
126
|
+
|
127
|
+
* Add ability to opt-in for Rails 2.1 feature "named_scope" by calling
|
128
|
+
WillPaginate.enable_named_scope (tested in Rails 1.2.6 and 2.0.2)
|
129
|
+
* Support complex page parameters like "developers[page]"
|
130
|
+
* Move Array#paginate definition to will_paginate/array.rb. You can now easily
|
131
|
+
use pagination on arrays outside of Rails:
|
132
|
+
|
133
|
+
gem 'will_paginate'
|
134
|
+
require 'will_paginate/array'
|
135
|
+
|
136
|
+
* Add "paginated_each" method for iterating through every record by loading only
|
137
|
+
one page of records at the time
|
138
|
+
* Rails 2: Rescue from WillPaginate::InvalidPage error with 404 Not Found by
|
139
|
+
default
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Copyright (c) 2007 PJ Hyett and Mislav Marohnić
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
5
|
+
the Software without restriction, including without limitation the rights to
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
7
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
8
|
+
subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
11
|
+
copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
15
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
16
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
17
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
18
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,107 @@
|
|
1
|
+
= WillPaginate
|
2
|
+
|
3
|
+
Pagination is just limiting the number of records displayed. Why should you let
|
4
|
+
it get in your way while developing, then? This plugin makes magic happen. Did
|
5
|
+
you ever want to be able to do just this on a model:
|
6
|
+
|
7
|
+
Post.paginate :page => 1, :order => 'created_at DESC'
|
8
|
+
|
9
|
+
... and then render the page links with a single view helper? Well, now you
|
10
|
+
can.
|
11
|
+
|
12
|
+
Some resources to get you started:
|
13
|
+
|
14
|
+
* {Installation instructions}[http://github.com/mislav/will_paginate/wikis/installation]
|
15
|
+
on {the wiki}[http://github.com/mislav/will_paginate/wikis]
|
16
|
+
* Your mind reels with questions? Join our
|
17
|
+
{Google group}[http://groups.google.com/group/will_paginate].
|
18
|
+
* {How to report bugs}[http://github.com/mislav/will_paginate/wikis/report-bugs]
|
19
|
+
|
20
|
+
|
21
|
+
== Example usage
|
22
|
+
|
23
|
+
Use a paginate finder in the controller:
|
24
|
+
|
25
|
+
@posts = Post.paginate_by_board_id @board.id, :page => params[:page], :order => 'updated_at DESC'
|
26
|
+
|
27
|
+
Yeah, +paginate+ works just like +find+ -- it just doesn't fetch all the
|
28
|
+
records. Don't forget to tell it which page you want, or it will complain!
|
29
|
+
Read more on WillPaginate::Finder::ClassMethods.
|
30
|
+
|
31
|
+
Render the posts in your view like you would normally do. When you need to render
|
32
|
+
pagination, just stick this in:
|
33
|
+
|
34
|
+
<%= will_paginate @posts %>
|
35
|
+
|
36
|
+
You're done. (You can find the option list at WillPaginate::ViewHelpers.)
|
37
|
+
|
38
|
+
How does it know how much items to fetch per page? It asks your model by calling
|
39
|
+
its <tt>per_page</tt> class method. You can define it like this:
|
40
|
+
|
41
|
+
class Post < ActiveRecord::Base
|
42
|
+
cattr_reader :per_page
|
43
|
+
@@per_page = 50
|
44
|
+
end
|
45
|
+
|
46
|
+
... or like this:
|
47
|
+
|
48
|
+
class Post < ActiveRecord::Base
|
49
|
+
def self.per_page
|
50
|
+
50
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
... or don't worry about it at all. WillPaginate defines it to be <b>30</b> by default.
|
55
|
+
But you can always specify the count explicitly when calling +paginate+:
|
56
|
+
|
57
|
+
@posts = Post.paginate :page => params[:page], :per_page => 50
|
58
|
+
|
59
|
+
The +paginate+ finder wraps the original finder and returns your resultset that now has
|
60
|
+
some new properties. You can use the collection as you would with any ActiveRecord
|
61
|
+
resultset. WillPaginate view helpers also need that object to be able to render pagination:
|
62
|
+
|
63
|
+
<ol>
|
64
|
+
<% for post in @posts -%>
|
65
|
+
<li>Render `post` in some nice way.</li>
|
66
|
+
<% end -%>
|
67
|
+
</ol>
|
68
|
+
|
69
|
+
<p>Now let's render us some pagination!</p>
|
70
|
+
<%= will_paginate @posts %>
|
71
|
+
|
72
|
+
More detailed documentation:
|
73
|
+
|
74
|
+
* WillPaginate::Finder::ClassMethods for pagination on your models;
|
75
|
+
* WillPaginate::ViewHelpers for your views.
|
76
|
+
|
77
|
+
|
78
|
+
== Authors and credits
|
79
|
+
|
80
|
+
Authors:: Mislav Marohnić, PJ Hyett
|
81
|
+
Original announcement:: http://errtheblog.com/post/929
|
82
|
+
Original PHP source:: http://www.strangerstudios.com/sandbox/pagination/diggstyle.php
|
83
|
+
|
84
|
+
All these people helped making will_paginate what it is now with their code
|
85
|
+
contributions or just simply awesome ideas:
|
86
|
+
|
87
|
+
Chris Wanstrath, Dr. Nic Williams, K. Adam Christensen, Mike Garey, Bence
|
88
|
+
Golda, Matt Aimonetti, Charles Brian Quinn, Desi McAdam, James Coglan, Matijs
|
89
|
+
van Zuijlen, Maria, Brendan Ribera, Todd Willey, Bryan Helmkamp, Jan Berkel,
|
90
|
+
Lourens Naudé, Rick Olson, Russell Norris, Piotr Usewicz, Chris Eppstein,
|
91
|
+
Denis Barushev, Ben Pickles.
|
92
|
+
|
93
|
+
|
94
|
+
== Usable pagination in the UI
|
95
|
+
|
96
|
+
There are some CSS styles to get you started in the "examples/" directory. They
|
97
|
+
are {showcased online here}[http://mislav.caboo.se/static/will_paginate/].
|
98
|
+
|
99
|
+
More reading about pagination as design pattern:
|
100
|
+
|
101
|
+
* {Pagination 101}[http://kurafire.net/log/archive/2007/06/22/pagination-101]
|
102
|
+
* {Pagination gallery}[http://www.smashingmagazine.com/2007/11/16/pagination-gallery-examples-and-good-practices/]
|
103
|
+
* {Pagination on Yahoo Design Pattern Library}[http://developer.yahoo.com/ypatterns/parent.php?pattern=pagination]
|
104
|
+
|
105
|
+
Want to discuss, request features, ask questions? Join the
|
106
|
+
{Google group}[http://groups.google.com/group/will_paginate].
|
107
|
+
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
begin
|
3
|
+
hanna_dir = '/Users/mislav/Projects/Hanna/lib'
|
4
|
+
$:.unshift hanna_dir if File.exists? hanna_dir
|
5
|
+
require 'hanna/rdoctask'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rake'
|
8
|
+
require 'rake/rdoctask'
|
9
|
+
end
|
10
|
+
load 'test/tasks.rake'
|
11
|
+
|
12
|
+
desc 'Default: run unit tests.'
|
13
|
+
task :default => :test
|
14
|
+
|
15
|
+
desc 'Generate RDoc documentation for the will_paginate plugin.'
|
16
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
17
|
+
rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'CHANGELOG.rdoc').
|
18
|
+
include('lib/**/*.rb').
|
19
|
+
exclude('lib/will_paginate/named_scope*').
|
20
|
+
exclude('lib/will_paginate/array.rb').
|
21
|
+
exclude('lib/will_paginate/version.rb')
|
22
|
+
|
23
|
+
rdoc.main = "README.rdoc" # page to start on
|
24
|
+
rdoc.title = "will_paginate documentation"
|
25
|
+
|
26
|
+
rdoc.rdoc_dir = 'doc' # rdoc output folder
|
27
|
+
rdoc.options << '--inline-source' << '--charset=UTF-8'
|
28
|
+
rdoc.options << '--webcvs=http://github.com/mislav/will_paginate/tree/master/'
|
29
|
+
end
|
30
|
+
|
31
|
+
desc %{Update ".manifest" with the latest list of project filenames. Respect\
|
32
|
+
.gitignore by excluding everything that git ignores. Update `files` and\
|
33
|
+
`test_files` arrays in "*.gemspec" file if it's present.}
|
34
|
+
task :manifest do
|
35
|
+
list = `git ls-files --full-name --exclude=*.gemspec --exclude=.*`.chomp.split("\n")
|
36
|
+
|
37
|
+
if spec_file = Dir['*.gemspec'].first
|
38
|
+
spec = File.read spec_file
|
39
|
+
spec.gsub! /^(\s* s.(test_)?files \s* = \s* )( \[ [^\]]* \] | %w\( [^)]* \) )/mx do
|
40
|
+
assignment = $1
|
41
|
+
bunch = $2 ? list.grep(/^test\//) : list
|
42
|
+
'%s%%w(%s)' % [assignment, bunch.join(' ')]
|
43
|
+
end
|
44
|
+
|
45
|
+
File.open(spec_file, 'w') { |f| f << spec }
|
46
|
+
end
|
47
|
+
File.open('.manifest', 'w') { |f| f << list.join("\n") }
|
48
|
+
end
|
49
|
+
|
50
|
+
task :examples do
|
51
|
+
%x(haml examples/index.haml examples/index.html)
|
52
|
+
%x(sass examples/pagination.sass examples/pagination.css)
|
53
|
+
end
|
Binary file
|
@@ -0,0 +1,69 @@
|
|
1
|
+
!!!
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%title Samples of pagination styling for will_paginate
|
5
|
+
%link{ :rel => 'stylesheet', :type => 'text/css', :href => 'pagination.css' }
|
6
|
+
%style{ :type => 'text/css' }
|
7
|
+
:sass
|
8
|
+
html
|
9
|
+
:margin 0
|
10
|
+
:padding 0
|
11
|
+
:background #999
|
12
|
+
:font normal 76% "Lucida Grande", Verdana, Helvetica, sans-serif
|
13
|
+
body
|
14
|
+
:margin 2em
|
15
|
+
:padding 2em
|
16
|
+
:border 2px solid gray
|
17
|
+
:background white
|
18
|
+
:color #222
|
19
|
+
h1
|
20
|
+
:font-size 2em
|
21
|
+
:font-weight normal
|
22
|
+
:margin 0 0 1em 0
|
23
|
+
h2
|
24
|
+
:font-size 1.4em
|
25
|
+
:margin 1em 0 .5em 0
|
26
|
+
pre
|
27
|
+
:font-size 13px
|
28
|
+
:font-family Monaco, "DejaVu Sans Mono", "Bitstream Vera Mono", "Courier New", monospace
|
29
|
+
|
30
|
+
- pagination = '<span class="disabled prev_page">« Previous</span> <span class="current">1</span> <a href="./?page=2" rel="next">2</a> <a href="./?page=3">3</a> <a href="./?page=4">4</a> <a href="./?page=5">5</a> <a href="./?page=6">6</a> <a href="./?page=7">7</a> <a href="./?page=8">8</a> <a href="./?page=9">9</a> <span class="gap">…</span> <a href="./?page=29">29</a> <a href="./?page=30">30</a> <a href="./?page=2" rel="next" class="next_page">Next »</a>'
|
31
|
+
- pagination_no_page_links = '<span class="disabled prev_page">« Previous</span> <a href="./?page=2" rel="next" class="next_page">Next »</a>'
|
32
|
+
|
33
|
+
%body
|
34
|
+
%h1 Samples of pagination styling for will_paginate
|
35
|
+
%p
|
36
|
+
Find these styles in <b>"examples/pagination.css"</b> of <i>will_paginate</i> library.
|
37
|
+
There is a Sass version of it for all you sassy people.
|
38
|
+
%p
|
39
|
+
Read about good rules for pagination:
|
40
|
+
%a{ :href => 'http://kurafire.net/log/archive/2007/06/22/pagination-101' } Pagination 101
|
41
|
+
%p
|
42
|
+
%em Warning:
|
43
|
+
page links below don't lead anywhere (so don't click on them).
|
44
|
+
|
45
|
+
%h2 Unstyled pagination <span style="font-weight:normal">(<i>ewww!</i>)</span>
|
46
|
+
%div= pagination
|
47
|
+
|
48
|
+
%h2 Digg.com
|
49
|
+
.digg_pagination= pagination
|
50
|
+
|
51
|
+
%h2 Digg-style, no page links
|
52
|
+
.digg_pagination= pagination_no_page_links
|
53
|
+
%p Code that renders this:
|
54
|
+
%pre= '<code>%s</code>' % %[<%= will_paginate @posts, :page_links => false %>].gsub('<', '<').gsub('>', '>')
|
55
|
+
|
56
|
+
%h2 Digg-style, extra content
|
57
|
+
.digg_pagination
|
58
|
+
.page_info Displaying entries <b>1 - 6</b> of <b>180</b> in total
|
59
|
+
= pagination
|
60
|
+
%p Code that renders this:
|
61
|
+
%pre= '<code>%s</code>' % %[<div class="digg_pagination">\n <div clas="page_info">\n <%= page_entries_info @posts %>\n </div>\n <%= will_paginate @posts, :container => false %>\n</div>].gsub('<', '<').gsub('>', '>')
|
62
|
+
|
63
|
+
%h2 Apple.com store
|
64
|
+
.apple_pagination= pagination
|
65
|
+
|
66
|
+
%h2 Flickr.com
|
67
|
+
.flickr_pagination
|
68
|
+
= pagination
|
69
|
+
.page_info (118 photos)
|
@@ -0,0 +1,92 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html>
|
3
|
+
</html>
|
4
|
+
<head>
|
5
|
+
<title>Samples of pagination styling for will_paginate</title>
|
6
|
+
<link href='pagination.css' rel='stylesheet' type='text/css' />
|
7
|
+
<style type='text/css'>
|
8
|
+
html {
|
9
|
+
margin: 0;
|
10
|
+
padding: 0;
|
11
|
+
background: #999;
|
12
|
+
font: normal 76% "Lucida Grande", Verdana, Helvetica, sans-serif; }
|
13
|
+
|
14
|
+
body {
|
15
|
+
margin: 2em;
|
16
|
+
padding: 2em;
|
17
|
+
border: 2px solid gray;
|
18
|
+
background: white;
|
19
|
+
color: #222; }
|
20
|
+
|
21
|
+
h1 {
|
22
|
+
font-size: 2em;
|
23
|
+
font-weight: normal;
|
24
|
+
margin: 0 0 1em 0; }
|
25
|
+
|
26
|
+
h2 {
|
27
|
+
font-size: 1.4em;
|
28
|
+
margin: 1em 0 .5em 0; }
|
29
|
+
|
30
|
+
pre {
|
31
|
+
font-size: 13px;
|
32
|
+
font-family: Monaco, "DejaVu Sans Mono", "Bitstream Vera Mono", "Courier New", monospace; }
|
33
|
+
</style>
|
34
|
+
</head>
|
35
|
+
<body>
|
36
|
+
<h1>Samples of pagination styling for will_paginate</h1>
|
37
|
+
<p>
|
38
|
+
Find these styles in <b>"examples/pagination.css"</b> of <i>will_paginate</i> library.
|
39
|
+
There is a Sass version of it for all you sassy people.
|
40
|
+
</p>
|
41
|
+
<p>
|
42
|
+
Read about good rules for pagination:
|
43
|
+
<a href='http://kurafire.net/log/archive/2007/06/22/pagination-101'>Pagination 101</a>
|
44
|
+
</p>
|
45
|
+
<p>
|
46
|
+
<em>Warning:</em>
|
47
|
+
page links below don't lead anywhere (so don't click on them).
|
48
|
+
</p>
|
49
|
+
<h2>
|
50
|
+
Unstyled pagination <span style="font-weight:normal">(<i>ewww!</i>)</span>
|
51
|
+
</h2>
|
52
|
+
<div>
|
53
|
+
<span class="disabled prev_page">« Previous</span> <span class="current">1</span> <a href="./?page=2" rel="next">2</a> <a href="./?page=3">3</a> <a href="./?page=4">4</a> <a href="./?page=5">5</a> <a href="./?page=6">6</a> <a href="./?page=7">7</a> <a href="./?page=8">8</a> <a href="./?page=9">9</a> <span class="gap">…</span> <a href="./?page=29">29</a> <a href="./?page=30">30</a> <a href="./?page=2" rel="next" class="next_page">Next »</a>
|
54
|
+
</div>
|
55
|
+
<h2>Digg.com</h2>
|
56
|
+
<div class='digg_pagination'>
|
57
|
+
<span class="disabled prev_page">« Previous</span> <span class="current">1</span> <a href="./?page=2" rel="next">2</a> <a href="./?page=3">3</a> <a href="./?page=4">4</a> <a href="./?page=5">5</a> <a href="./?page=6">6</a> <a href="./?page=7">7</a> <a href="./?page=8">8</a> <a href="./?page=9">9</a> <span class="gap">…</span> <a href="./?page=29">29</a> <a href="./?page=30">30</a> <a href="./?page=2" rel="next" class="next_page">Next »</a>
|
58
|
+
</div>
|
59
|
+
<h2>Digg-style, no page links</h2>
|
60
|
+
<div class='digg_pagination'>
|
61
|
+
<span class="disabled prev_page">« Previous</span> <a href="./?page=2" rel="next" class="next_page">Next »</a>
|
62
|
+
</div>
|
63
|
+
<p>Code that renders this:</p>
|
64
|
+
<pre>
|
65
|
+
<code><%= will_paginate @posts, :page_links => false %></code>
|
66
|
+
</pre>
|
67
|
+
<h2>Digg-style, extra content</h2>
|
68
|
+
<div class='digg_pagination'>
|
69
|
+
<div class='page_info'>
|
70
|
+
Displaying entries <b>1 - 6</b> of <b>180</b> in total
|
71
|
+
</div>
|
72
|
+
<span class="disabled prev_page">« Previous</span> <span class="current">1</span> <a href="./?page=2" rel="next">2</a> <a href="./?page=3">3</a> <a href="./?page=4">4</a> <a href="./?page=5">5</a> <a href="./?page=6">6</a> <a href="./?page=7">7</a> <a href="./?page=8">8</a> <a href="./?page=9">9</a> <span class="gap">…</span> <a href="./?page=29">29</a> <a href="./?page=30">30</a> <a href="./?page=2" rel="next" class="next_page">Next »</a>
|
73
|
+
</div>
|
74
|
+
<p>Code that renders this:</p>
|
75
|
+
<pre>
|
76
|
+
<code><div class="digg_pagination">
|
77
|
+
<div clas="page_info">
|
78
|
+
<%= page_entries_info @posts %>
|
79
|
+
</div>
|
80
|
+
<%= will_paginate @posts, :container => false %>
|
81
|
+
</div></code>
|
82
|
+
</pre>
|
83
|
+
<h2>Apple.com store</h2>
|
84
|
+
<div class='apple_pagination'>
|
85
|
+
<span class="disabled prev_page">« Previous</span> <span class="current">1</span> <a href="./?page=2" rel="next">2</a> <a href="./?page=3">3</a> <a href="./?page=4">4</a> <a href="./?page=5">5</a> <a href="./?page=6">6</a> <a href="./?page=7">7</a> <a href="./?page=8">8</a> <a href="./?page=9">9</a> <span class="gap">…</span> <a href="./?page=29">29</a> <a href="./?page=30">30</a> <a href="./?page=2" rel="next" class="next_page">Next »</a>
|
86
|
+
</div>
|
87
|
+
<h2>Flickr.com</h2>
|
88
|
+
<div class='flickr_pagination'>
|
89
|
+
<span class="disabled prev_page">« Previous</span> <span class="current">1</span> <a href="./?page=2" rel="next">2</a> <a href="./?page=3">3</a> <a href="./?page=4">4</a> <a href="./?page=5">5</a> <a href="./?page=6">6</a> <a href="./?page=7">7</a> <a href="./?page=8">8</a> <a href="./?page=9">9</a> <span class="gap">…</span> <a href="./?page=29">29</a> <a href="./?page=30">30</a> <a href="./?page=2" rel="next" class="next_page">Next »</a>
|
90
|
+
<div class='page_info'>(118 photos)</div>
|
91
|
+
</div>
|
92
|
+
</body>
|