six-updater-web 0.10.8 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +8 -6
- data/bin/six-updater-web +1 -1
- data/lib/README +243 -0
- data/lib/Rakefile +10 -0
- data/lib/app/controllers/actions_controller.rb +23 -0
- data/lib/app/controllers/application_controller.rb +20 -0
- data/lib/app/controllers/appsettings_controller.rb +40 -0
- data/lib/app/controllers/logs_controller.rb +5 -0
- data/lib/app/controllers/logsessions_controller.rb +5 -0
- data/lib/app/controllers/logviews_controller.rb +52 -0
- data/lib/app/controllers/main_controller.rb +432 -0
- data/lib/app/controllers/mods_controller.rb +48 -0
- data/lib/app/controllers/queryservers_controller.rb +42 -0
- data/lib/app/controllers/repositories_controller.rb +16 -0
- data/lib/app/controllers/servers_controller.rb +34 -0
- data/lib/app/controllers/sixconfigs_controller.rb +33 -0
- data/lib/app/controllers/system_settings_controller.rb +5 -0
- data/lib/app/helpers/actions_helper.rb +2 -0
- data/lib/app/helpers/application_helper.rb +13 -0
- data/lib/app/helpers/appsettings_helper.rb +17 -0
- data/lib/app/helpers/logs_helper.rb +2 -0
- data/lib/app/helpers/logsessions_helper.rb +2 -0
- data/lib/app/helpers/logviews_helper.rb +5 -0
- data/lib/app/helpers/main_helper.rb +2 -0
- data/lib/app/helpers/mods_helper.rb +5 -0
- data/lib/app/helpers/queryservers_helper.rb +8 -0
- data/lib/app/helpers/repositories_helper.rb +2 -0
- data/lib/app/helpers/servers_helper.rb +13 -0
- data/lib/app/helpers/sixconfigs_helper.rb +5 -0
- data/lib/app/helpers/system_settings_helper.rb +2 -0
- data/lib/app/models/action.rb +5 -0
- data/lib/app/models/appsetting.rb +18 -0
- data/lib/app/models/log.rb +3 -0
- data/lib/app/models/log_observer.rb +23 -0
- data/lib/app/models/logsession.rb +3 -0
- data/lib/app/models/mod.rb +96 -0
- data/lib/app/models/queryserver.rb +167 -0
- data/lib/app/models/repository.rb +11 -0
- data/lib/app/models/server.rb +25 -0
- data/lib/app/models/sixconfig.rb +185 -0
- data/lib/app/models/system_setting.rb +77 -0
- data/lib/app/views/Repositories/imp.erb +1 -0
- data/lib/app/views/appsettings/manage.erb +4 -0
- data/lib/app/views/layouts/application.haml +48 -0
- data/lib/app/views/layouts/empty.haml +2 -0
- data/lib/app/views/logviews/_logs.erb +1 -0
- data/lib/app/views/logviews/upd.rjs +1 -0
- data/lib/app/views/main/_check.haml +18 -0
- data/lib/app/views/main/execute.haml +24 -0
- data/lib/app/views/main/fetch.haml +2 -0
- data/lib/app/views/main/index.haml +100 -0
- data/lib/app/views/main/logoutput.erb +6 -0
- data/lib/app/views/main/modlogs.erb +5 -0
- data/lib/app/views/main/reset.erb +40 -0
- data/lib/app/views/main/reset_act.haml +1 -0
- data/lib/app/views/mods/imp.haml +1 -0
- data/lib/app/views/servers/imp.erb +1 -0
- data/lib/config/GeoIP.dat +0 -0
- data/lib/config/boot.rb +110 -0
- data/lib/config/database.yml +34 -0
- data/lib/config/database.yml.sample +34 -0
- data/lib/config/environment.rb +59 -0
- data/lib/config/environments/development.rb +17 -0
- data/lib/config/environments/production.rb +28 -0
- data/lib/config/environments/test.rb +28 -0
- data/lib/config/gslist.cfg +3229 -0
- data/lib/config/initializers/backtrace_silencers.rb +7 -0
- data/lib/config/initializers/inflections.rb +10 -0
- data/lib/config/initializers/mime_types.rb +5 -0
- data/lib/config/initializers/new_rails_defaults.rb +19 -0
- data/lib/config/initializers/session_store.rb +15 -0
- data/lib/config/locales/en.yml +5 -0
- data/lib/config/routes.rb +43 -0
- data/lib/config/six-updater-web.rb +221 -0
- data/lib/db/migrate/20090826185820_create_repositories.rb +18 -0
- data/lib/db/migrate/20090826185836_create_mods.rb +23 -0
- data/lib/db/migrate/20090826185847_create_servers.rb +22 -0
- data/lib/db/migrate/20090826185930_create_appsettings.rb +21 -0
- data/lib/db/migrate/20090826190008_create_sixconfigs.rb +16 -0
- data/lib/db/migrate/20090829165545_create_actions.rb +18 -0
- data/lib/db/migrate/20090829165546_add_logpath_to_appsetting.rb +9 -0
- data/lib/db/migrate/20090829165547_change_columns_appsettings.rb +10 -0
- data/lib/db/migrate/20090916174120_create_logs.rb +14 -0
- data/lib/db/migrate/20090916174333_create_logsessions.rb +13 -0
- data/lib/db/migrate/20090921092253_create_sessions.rb +16 -0
- data/lib/db/migrate/20090921165547_change_columns.rb +46 -0
- data/lib/db/migrate/20090928163554_create_system_settings.rb +14 -0
- data/lib/db/migrate/20090928163555_change_columns_mods.rb +11 -0
- data/lib/db/migrate/20090928163556_change2_columns_mods.rb +11 -0
- data/lib/db/migrate/20090928163558_change_columns_repositories.rb +11 -0
- data/lib/db/migrate/20090928163559_change_columns_system_settings.rb +9 -0
- data/lib/db/migrate/20090928163560_change2_columns_system_settings.rb +9 -0
- data/lib/db/migrate/20090928163561_change2_columns.rb +46 -0
- data/lib/db/migrate/20090928163562_change3_columns_system_settings.rb +17 -0
- data/lib/db/migrate/20090928163563_change2_columns_appsettings.rb +9 -0
- data/lib/db/migrate/20100327164004_create_queryservers.rb +18 -0
- data/lib/db/migrate/20100404150547_add_fields_to_queryservers.rb +35 -0
- data/lib/db/migrate/20100404152436_create_mods_queryservers.rb +11 -0
- data/lib/db/migrate/20100405142958_add_saved_password_to_queryservers.rb +9 -0
- data/lib/db/migrate/20100405142959_change_mods_queryservers_id.rb +9 -0
- data/lib/db/migrate/20100405142960_add_gamespied_at_to_system_settings.rb +9 -0
- data/lib/db/migrate/20100409114653_add_priority_and_path_to_mods.rb +11 -0
- data/lib/db/schema.rb +289 -0
- data/lib/doc/README_FOR_APP +2 -0
- data/lib/init.rb +74 -0
- data/lib/lib/tasks/fixtures.rake +33 -0
- data/lib/lib/tasks/sync.rake +51 -0
- data/lib/log/production.log +1 -0
- data/lib/public/404.html +30 -0
- data/lib/public/422.html +30 -0
- data/lib/public/500.html +30 -0
- data/lib/public/blank.html +33 -0
- data/lib/public/favicon.ico +0 -0
- data/lib/public/goldberg/images/action.png +0 -0
- data/lib/public/goldberg/images/add.png +0 -0
- data/lib/public/goldberg/images/blockquote-bg.gif +0 -0
- data/lib/public/goldberg/images/body-bg.jpg +0 -0
- data/lib/public/goldberg/images/centerColumn-bg.jpg +0 -0
- data/lib/public/goldberg/images/daddy_leftarrow.gif +0 -0
- data/lib/public/goldberg/images/delete.png +0 -0
- data/lib/public/goldberg/images/down.png +0 -0
- data/lib/public/goldberg/images/h2-bg.gif +0 -0
- data/lib/public/goldberg/images/h3-bg.gif +0 -0
- data/lib/public/goldberg/images/header-bg.jpg +0 -0
- data/lib/public/goldberg/images/hr-bg.jpg +0 -0
- data/lib/public/goldberg/images/logo.jpg +0 -0
- data/lib/public/goldberg/images/page.png +0 -0
- data/lib/public/goldberg/images/permission.png +0 -0
- data/lib/public/goldberg/images/role.png +0 -0
- data/lib/public/goldberg/images/up.png +0 -0
- data/lib/public/goldberg/javascripts/suckerfish.js +12 -0
- data/lib/public/goldberg/stylesheets/goldberg.css +142 -0
- data/lib/public/goldberg/stylesheets/layout.css +433 -0
- data/lib/public/goldberg/stylesheets/suckerfish.css +124 -0
- data/lib/public/images/active_scaffold/DO_NOT_EDIT +2 -0
- data/lib/public/images/active_scaffold/default/add.gif +0 -0
- data/lib/public/images/active_scaffold/default/arrow_down.gif +0 -0
- data/lib/public/images/active_scaffold/default/arrow_refresh.png +0 -0
- data/lib/public/images/active_scaffold/default/arrow_up.gif +0 -0
- data/lib/public/images/active_scaffold/default/close.gif +0 -0
- data/lib/public/images/active_scaffold/default/cross.png +0 -0
- data/lib/public/images/active_scaffold/default/customize_tool.png +0 -0
- data/lib/public/images/active_scaffold/default/export_tool.png +0 -0
- data/lib/public/images/active_scaffold/default/indicator-small.gif +0 -0
- data/lib/public/images/active_scaffold/default/indicator.gif +0 -0
- data/lib/public/images/active_scaffold/default/magnifier.png +0 -0
- data/lib/public/images/active_scaffold/default/printer_tool.png +0 -0
- data/lib/public/images/rails.png +0 -0
- data/lib/public/images/record_select/cross.gif +0 -0
- data/lib/public/images/record_select/next.gif +0 -0
- data/lib/public/images/record_select/previous.gif +0 -0
- data/lib/public/images/top.png +0 -0
- data/lib/public/javascripts/active_scaffold/DO_NOT_EDIT +2 -0
- data/lib/public/javascripts/active_scaffold/default/active_scaffold.js +517 -0
- data/lib/public/javascripts/active_scaffold/default/advanced_search.js +54 -0
- data/lib/public/javascripts/active_scaffold/default/dhtml_history.js +867 -0
- data/lib/public/javascripts/active_scaffold/default/form_enhancements.js +117 -0
- data/lib/public/javascripts/active_scaffold/default/number_formats.js +167 -0
- data/lib/public/javascripts/active_scaffold/default/rico_corner.js +370 -0
- data/lib/public/javascripts/application.js +2 -0
- data/lib/public/javascripts/controls.js +963 -0
- data/lib/public/javascripts/dragdrop.js +973 -0
- data/lib/public/javascripts/effects.js +1128 -0
- data/lib/public/javascripts/prototype.js +4320 -0
- data/lib/public/javascripts/record_select/record_select.js +352 -0
- data/lib/public/robots.txt +5 -0
- data/lib/public/stylesheets/active_scaffold/DO_NOT_EDIT +2 -0
- data/lib/public/stylesheets/active_scaffold/default/advanced_search.css +11 -0
- data/lib/public/stylesheets/active_scaffold/default/stylesheet-ie.css +50 -0
- data/lib/public/stylesheets/active_scaffold/default/stylesheet.css +1059 -0
- data/lib/public/stylesheets/active_scaffold/default/tools-left-handed-stylesheet-ie.css +11 -0
- data/lib/public/stylesheets/active_scaffold/default/tools-left-handed-stylesheet.css +68 -0
- data/lib/public/stylesheets/record_select/record_select.css +129 -0
- data/lib/script/about +4 -0
- data/lib/script/console +3 -0
- data/lib/script/dbconsole +3 -0
- data/lib/script/destroy +3 -0
- data/lib/script/generate +3 -0
- data/lib/script/performance/benchmarker +3 -0
- data/lib/script/performance/profiler +3 -0
- data/lib/script/plugin +3 -0
- data/lib/script/runner +3 -0
- data/lib/script/server +3 -0
- data/lib/test/functional/actions_controller_test.rb +8 -0
- data/lib/test/functional/configs_controller_test.rb +8 -0
- data/lib/test/functional/logs_controller_test.rb +8 -0
- data/lib/test/functional/logsessions_controller_test.rb +8 -0
- data/lib/test/functional/logviews_controller_test.rb +8 -0
- data/lib/test/functional/main_controller_test.rb +8 -0
- data/lib/test/functional/mods_controller_test.rb +8 -0
- data/lib/test/functional/queryservers_controller_test.rb +8 -0
- data/lib/test/functional/repositories_controller_test.rb +8 -0
- data/lib/test/functional/servers_controller_test.rb +8 -0
- data/lib/test/functional/settings_controller_test.rb +8 -0
- data/lib/test/functional/system_settings_controller_test.rb +8 -0
- data/lib/test/performance/browsing_test.rb +9 -0
- data/lib/test/test_helper.rb +38 -0
- data/lib/test/unit/action_test.rb +8 -0
- data/lib/test/unit/config_test.rb +8 -0
- data/lib/test/unit/helpers/actions_helper_test.rb +4 -0
- data/lib/test/unit/helpers/configs_helper_test.rb +4 -0
- data/lib/test/unit/helpers/logs_helper_test.rb +4 -0
- data/lib/test/unit/helpers/logsessions_helper_test.rb +4 -0
- data/lib/test/unit/helpers/logviews_helper_test.rb +4 -0
- data/lib/test/unit/helpers/main_helper_test.rb +4 -0
- data/lib/test/unit/helpers/mods_helper_test.rb +4 -0
- data/lib/test/unit/helpers/queryservers_helper_test.rb +4 -0
- data/lib/test/unit/helpers/repositories_helper_test.rb +4 -0
- data/lib/test/unit/helpers/servers_helper_test.rb +4 -0
- data/lib/test/unit/helpers/settings_helper_test.rb +4 -0
- data/lib/test/unit/helpers/system_settings_helper_test.rb +4 -0
- data/lib/test/unit/log_test.rb +8 -0
- data/lib/test/unit/logsession_test.rb +8 -0
- data/lib/test/unit/mod_test.rb +8 -0
- data/lib/test/unit/queryserver_test.rb +8 -0
- data/lib/test/unit/repository_test.rb +8 -0
- data/lib/test/unit/server_test.rb +8 -0
- data/lib/test/unit/setting_test.rb +8 -0
- data/lib/test/unit/system_setting_test.rb +8 -0
- data/lib/vendor/plugins/active_scaffold/CHANGELOG +152 -0
- data/lib/vendor/plugins/active_scaffold/MIT-LICENSE +20 -0
- data/lib/vendor/plugins/active_scaffold/README +128 -0
- data/lib/vendor/plugins/active_scaffold/Rakefile +24 -0
- data/lib/vendor/plugins/active_scaffold/environment.rb +20 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/images/add.gif +0 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/images/arrow_down.gif +0 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/images/arrow_refresh.png +0 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/images/arrow_up.gif +0 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/images/close.gif +0 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/images/cross.png +0 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/images/customize_tool.png +0 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/images/export_tool.png +0 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/images/indicator-small.gif +0 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/images/indicator.gif +0 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/images/magnifier.png +0 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/images/printer_tool.png +0 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/javascripts/active_scaffold.js +517 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/javascripts/dhtml_history.js +867 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/javascripts/form_enhancements.js +117 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/javascripts/number_formats.js +167 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/javascripts/rico_corner.js +370 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/stylesheets/stylesheet-ie.css +50 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/stylesheets/stylesheet.css +1059 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/stylesheets/tools-left-handed-stylesheet-ie.css +11 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/stylesheets/tools-left-handed-stylesheet.css +68 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_add_existing_form.html.erb +36 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_create_form.html.erb +57 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_create_form_on_list.html.erb +45 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_create_form_submit.html.erb +2 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_export_csv.html.erb +20 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_field_search.html.erb +58 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_form.html.erb +23 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_form_association.html.erb +12 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_form_association_footer.html.erb +43 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_form_attribute.html.erb +24 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_form_hidden_attribute.html.erb +1 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_form_messages.html.erb +5 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_horizontal_subform.html.erb +19 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_horizontal_subform_header.html.erb +10 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_horizontal_subform_record.html.erb +29 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list.html.erb +43 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_actions.html.erb +29 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_calculations.html.erb +43 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_column_headings.html.erb +64 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_header.html.erb +29 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_inline_adapter.html.erb +11 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_pagination_links.html.erb +30 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_record.html.erb +32 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_record_actions.html.erb +5 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_record_columns.html.erb +20 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_live_search.html.erb +23 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_messages.html.erb +10 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_nested.html.erb +45 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_print_list.html.erb +22 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_revision.html.erb +11 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_revision_columns.html.erb +62 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_search.html.erb +21 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_show.html.erb +8 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_show_columns.html.erb +19 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_show_customize.html.erb +27 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_show_export_tool.html.erb +17 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_update_actions.html.erb +9 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_update_form.html.erb +61 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_update_form_submit.html.erb +2 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_vertical_subform.html.erb +12 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/_vertical_subform_record.html.erb +31 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/add_existing.js.rjs +16 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/add_existing_form.html.erb +5 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/copy.rjs +4 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/create.html.erb +5 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/delete.html.erb +13 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/destroy.js.rjs +10 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/edit_associated.js.rjs +14 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/field_search.html.erb +5 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/form_messages.js.rjs +1 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/form_messages_on_save.js.rjs +10 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/latest.rjs +2 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/list.html.erb +48 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs +25 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/on_update.js.rjs +11 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/print_list.prawn +26 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/refresh_list.js.rjs +6 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/refresh_record.js.rjs +2 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/render_field.js.rjs +9 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/revision.html.erb +5 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/search.html.erb +5 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/show.html.erb +5 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/show_customize.html.erb +5 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/show_export_tool.html.erb +5 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/update.html.erb +8 -0
- data/lib/vendor/plugins/active_scaffold/frontends/default/views/update_column.js.rjs +12 -0
- data/lib/vendor/plugins/active_scaffold/init.rb +18 -0
- data/lib/vendor/plugins/active_scaffold/install.rb +39 -0
- data/lib/vendor/plugins/active_scaffold/install_assets.rb +36 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_record_permissions.rb +136 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold.rb +215 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/core.rb +142 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/create.rb +160 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/customize.rb +59 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/delete.rb +72 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/export_tool.rb +49 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/field_search.rb +82 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/list.rb +119 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/live_search.rb +59 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/nested.rb +219 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/print_base.rb +23 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/print_list.rb +44 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/refresh.rb +31 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/revision.rb +51 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/search.rb +50 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/show.rb +54 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/subform.rb +17 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/update.rb +128 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/attribute_params.rb +196 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb +45 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/core.rb +263 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/create.rb +43 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/customize.rb +34 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/delete.rb +25 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/export_tool.rb +52 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/field_search.rb +53 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/form.rb +49 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/list.rb +142 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/live_search.rb +52 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/nested.rb +34 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/print_base.rb +40 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/print_list.rb +52 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/refresh.rb +22 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/revision.rb +39 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/search.rb +52 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/show.rb +36 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/subform.rb +40 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/update.rb +32 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/configurable.rb +29 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/constraints.rb +181 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/action_columns.rb +97 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/action_link.rb +140 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/action_links.rb +47 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/actions.rb +45 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/column.rb +343 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/columns.rb +75 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/error_message.rb +24 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/set.rb +62 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/sorting.rb +159 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/finder.rb +331 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/active_scaffold_generator.rb +348 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/controller_methods.rb +36 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/controller_scaffolding.rhtml +10 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/fixtures.yml +5 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/form.rhtml +3 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/form_scaffolding.rhtml +1 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/functional_test.rb +45 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/helper.rb +2 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/model.rb +3 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/model_scaffolding.rhtml +90 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/show.rhtml +8 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/show_scaffolding.rhtml +1 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/unit_test.rb +5 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/association_helpers.rb +40 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/controller_helpers.rb +41 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/country_helpers.rb +365 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/form_column_helpers.rb +484 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/id_helpers.rb +152 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/list_column_helpers.rb +397 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/number_helpers.rb +143 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/pagination_helpers.rb +39 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/search_column_helpers.rb +279 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/show_column_helpers.rb +46 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/view_helpers.rb +227 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/locale/en-countries.yml +247 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/locale/en.rb +68 -0
- data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/search.rb +21 -0
- data/lib/vendor/plugins/active_scaffold/lib/bridges/bridge.rb +52 -0
- data/lib/vendor/plugins/active_scaffold/lib/bridges/calendar_date_select/bridge.rb +11 -0
- data/lib/vendor/plugins/active_scaffold/lib/bridges/calendar_date_select/lib/as_cds_bridge.rb +135 -0
- data/lib/vendor/plugins/active_scaffold/lib/bridges/checkbox.rb +21 -0
- data/lib/vendor/plugins/active_scaffold/lib/bridges/file_column/bridge.rb +12 -0
- data/lib/vendor/plugins/active_scaffold/lib/bridges/file_column/lib/as_file_column_bridge.rb +75 -0
- data/lib/vendor/plugins/active_scaffold/lib/bridges/file_column/lib/file_column_helpers.rb +51 -0
- data/lib/vendor/plugins/active_scaffold/lib/bridges/file_column/lib/form_ui.rb +33 -0
- data/lib/vendor/plugins/active_scaffold/lib/bridges/file_column/lib/list_ui.rb +42 -0
- data/lib/vendor/plugins/active_scaffold/lib/bridges/file_column/test/functional/file_column_keep_test.rb +43 -0
- data/lib/vendor/plugins/active_scaffold/lib/bridges/file_column/test/mock_model.rb +9 -0
- data/lib/vendor/plugins/active_scaffold/lib/bridges/file_column/test/test_helper.rb +15 -0
- data/lib/vendor/plugins/active_scaffold/lib/bridges/tiny_mce/bridge.rb +5 -0
- data/lib/vendor/plugins/active_scaffold/lib/bridges/tiny_mce/lib/tiny_mce_bridge.rb +45 -0
- data/lib/vendor/plugins/active_scaffold/lib/dhtml_confirm.rb +54 -0
- data/lib/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb +20 -0
- data/lib/vendor/plugins/active_scaffold/lib/extensions/action_view_rendering.rb +88 -0
- data/lib/vendor/plugins/active_scaffold/lib/extensions/array.rb +7 -0
- data/lib/vendor/plugins/active_scaffold/lib/extensions/component_response_with_namespacing.rb +17 -0
- data/lib/vendor/plugins/active_scaffold/lib/extensions/generic_view_paths.rb +33 -0
- data/lib/vendor/plugins/active_scaffold/lib/extensions/java_script_macros_helper.rb +152 -0
- data/lib/vendor/plugins/active_scaffold/lib/extensions/localize.rb +11 -0
- data/lib/vendor/plugins/active_scaffold/lib/extensions/name_option_for_datetime.rb +12 -0
- data/lib/vendor/plugins/active_scaffold/lib/extensions/nil_id_in_url_params.rb +7 -0
- data/lib/vendor/plugins/active_scaffold/lib/extensions/resources.rb +27 -0
- data/lib/vendor/plugins/active_scaffold/lib/extensions/reverse_associations.rb +56 -0
- data/lib/vendor/plugins/active_scaffold/lib/extensions/schema_definitions.rb +15 -0
- data/lib/vendor/plugins/active_scaffold/lib/extensions/to_label.rb +8 -0
- data/lib/vendor/plugins/active_scaffold/lib/extensions/unsaved_associated.rb +61 -0
- data/lib/vendor/plugins/active_scaffold/lib/extensions/unsaved_record.rb +20 -0
- data/lib/vendor/plugins/active_scaffold/lib/extensions/usa_state.rb +46 -0
- data/lib/vendor/plugins/active_scaffold/lib/paginator.rb +136 -0
- data/lib/vendor/plugins/active_scaffold/lib/responds_to_parent.rb +68 -0
- data/lib/vendor/plugins/active_scaffold/public/blank.html +33 -0
- data/lib/vendor/plugins/active_scaffold/test/bridges/bridge_test.rb +47 -0
- data/lib/vendor/plugins/active_scaffold/test/config/create_test.rb +55 -0
- data/lib/vendor/plugins/active_scaffold/test/config/list_test.rb +74 -0
- data/lib/vendor/plugins/active_scaffold/test/config/update_test.rb +17 -0
- data/lib/vendor/plugins/active_scaffold/test/const_mocker.rb +36 -0
- data/lib/vendor/plugins/active_scaffold/test/data_structures/action_columns_test.rb +119 -0
- data/lib/vendor/plugins/active_scaffold/test/data_structures/action_link_test.rb +78 -0
- data/lib/vendor/plugins/active_scaffold/test/data_structures/action_links_test.rb +78 -0
- data/lib/vendor/plugins/active_scaffold/test/data_structures/actions_test.rb +25 -0
- data/lib/vendor/plugins/active_scaffold/test/data_structures/association_column_test.rb +41 -0
- data/lib/vendor/plugins/active_scaffold/test/data_structures/column_test.rb +161 -0
- data/lib/vendor/plugins/active_scaffold/test/data_structures/columns_test.rb +69 -0
- data/lib/vendor/plugins/active_scaffold/test/data_structures/error_message_test.rb +28 -0
- data/lib/vendor/plugins/active_scaffold/test/data_structures/set_test.rb +86 -0
- data/lib/vendor/plugins/active_scaffold/test/data_structures/sorting_test.rb +96 -0
- data/lib/vendor/plugins/active_scaffold/test/data_structures/standard_column_test.rb +34 -0
- data/lib/vendor/plugins/active_scaffold/test/data_structures/virtual_column_test.rb +34 -0
- data/lib/vendor/plugins/active_scaffold/test/extensions/active_record_test.rb +45 -0
- data/lib/vendor/plugins/active_scaffold/test/extensions/array.rb +12 -0
- data/lib/vendor/plugins/active_scaffold/test/misc/active_record_permissions.rb +154 -0
- data/lib/vendor/plugins/active_scaffold/test/misc/configurable_test.rb +96 -0
- data/lib/vendor/plugins/active_scaffold/test/misc/constraints_test.rb +175 -0
- data/lib/vendor/plugins/active_scaffold/test/misc/finder_test.rb +70 -0
- data/lib/vendor/plugins/active_scaffold/test/misc/lang_test.rb +12 -0
- data/lib/vendor/plugins/active_scaffold/test/model_stub.rb +39 -0
- data/lib/vendor/plugins/active_scaffold/test/render_component/abstract_unit.rb +8 -0
- data/lib/vendor/plugins/active_scaffold/test/render_component/components_test.rb +140 -0
- data/lib/vendor/plugins/active_scaffold/test/run_all.rb +8 -0
- data/lib/vendor/plugins/active_scaffold/test/test_helper.rb +13 -0
- data/lib/vendor/plugins/active_scaffold/things.todo +55 -0
- data/lib/vendor/plugins/active_scaffold/uninstall.rb +13 -0
- data/lib/vendor/plugins/activescaffold_advanced_search/README +1 -0
- data/lib/vendor/plugins/activescaffold_advanced_search/README.markdown +39 -0
- data/lib/vendor/plugins/activescaffold_advanced_search/app/views/active_scaffold_overrides/_advanced_search.rhtml +41 -0
- data/lib/vendor/plugins/activescaffold_advanced_search/frontends/default/javascripts/advanced_search.js +54 -0
- data/lib/vendor/plugins/activescaffold_advanced_search/frontends/default/stylesheets/advanced_search.css +11 -0
- data/lib/vendor/plugins/activescaffold_advanced_search/init.rb +22 -0
- data/lib/vendor/plugins/activescaffold_advanced_search/install.rb +50 -0
- data/lib/vendor/plugins/activescaffold_advanced_search/lib/actions/advanced_search.rb +62 -0
- data/lib/vendor/plugins/activescaffold_advanced_search/lib/advanced_finder.rb +101 -0
- data/lib/vendor/plugins/activescaffold_advanced_search/lib/config/advanced_search.rb +48 -0
- data/lib/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb +23 -0
- data/lib/vendor/plugins/activescaffold_advanced_search/lib/helpers/advanced_search_helpers.rb +19 -0
- data/lib/vendor/plugins/activescaffold_advanced_search/lib/helpers/view_helpers.rb +20 -0
- data/lib/vendor/plugins/activescaffold_advanced_search/uninstall.rb.rb +2 -0
- data/lib/vendor/plugins/goldberg/README.rdoc +36 -0
- data/lib/vendor/plugins/goldberg/app/controllers/goldberg/auth_controller.rb +97 -0
- data/lib/vendor/plugins/goldberg/app/controllers/goldberg/content_pages_controller.rb +197 -0
- data/lib/vendor/plugins/goldberg/app/controllers/goldberg/controller_actions_controller.rb +130 -0
- data/lib/vendor/plugins/goldberg/app/controllers/goldberg/menu_items_controller.rb +184 -0
- data/lib/vendor/plugins/goldberg/app/controllers/goldberg/permissions_controller.rb +60 -0
- data/lib/vendor/plugins/goldberg/app/controllers/goldberg/roles_controller.rb +85 -0
- data/lib/vendor/plugins/goldberg/app/controllers/goldberg/roles_permissions_controller.rb +65 -0
- data/lib/vendor/plugins/goldberg/app/controllers/goldberg/site_controllers_controller.rb +157 -0
- data/lib/vendor/plugins/goldberg/app/controllers/goldberg/system_settings_controller.rb +75 -0
- data/lib/vendor/plugins/goldberg/app/controllers/goldberg/users_controller.rb +293 -0
- data/lib/vendor/plugins/goldberg/app/helpers/goldberg/auth_helper.rb +4 -0
- data/lib/vendor/plugins/goldberg/app/helpers/goldberg/content_pages_helper.rb +23 -0
- data/lib/vendor/plugins/goldberg/app/helpers/goldberg/controller_actions_helper.rb +5 -0
- data/lib/vendor/plugins/goldberg/app/helpers/goldberg/menu_items_helper.rb +4 -0
- data/lib/vendor/plugins/goldberg/app/helpers/goldberg/permissions_helper.rb +4 -0
- data/lib/vendor/plugins/goldberg/app/helpers/goldberg/roles_helper.rb +4 -0
- data/lib/vendor/plugins/goldberg/app/helpers/goldberg/roles_permissions_helper.rb +4 -0
- data/lib/vendor/plugins/goldberg/app/helpers/goldberg/site_controllers_helper.rb +4 -0
- data/lib/vendor/plugins/goldberg/app/helpers/goldberg/system_settings_helper.rb +4 -0
- data/lib/vendor/plugins/goldberg/app/helpers/goldberg/users_helper.rb +4 -0
- data/lib/vendor/plugins/goldberg/app/models/goldberg/content_page.rb +134 -0
- data/lib/vendor/plugins/goldberg/app/models/goldberg/controller_action.rb +86 -0
- data/lib/vendor/plugins/goldberg/app/models/goldberg/credentials.rb +128 -0
- data/lib/vendor/plugins/goldberg/app/models/goldberg/menu.rb +198 -0
- data/lib/vendor/plugins/goldberg/app/models/goldberg/menu_item.rb +127 -0
- data/lib/vendor/plugins/goldberg/app/models/goldberg/permission.rb +37 -0
- data/lib/vendor/plugins/goldberg/app/models/goldberg/role.rb +68 -0
- data/lib/vendor/plugins/goldberg/app/models/goldberg/roles_permission.rb +18 -0
- data/lib/vendor/plugins/goldberg/app/models/goldberg/site_controller.rb +60 -0
- data/lib/vendor/plugins/goldberg/app/models/goldberg/system_settings.rb +112 -0
- data/lib/vendor/plugins/goldberg/app/models/goldberg/user.rb +69 -0
- data/lib/vendor/plugins/goldberg/app/models/goldberg/user_mailer.rb +43 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/auth/_login.rhtml +15 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/auth/login.rhtml +22 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/auth/logout.rhtml +2 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/_fck_create_folder.rxml +6 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/_fck_files.rxml +19 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/_form.rhtml +32 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/edit.rhtml +10 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/fck_speller_pages.rhtml +58 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/list.rhtml +22 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/new.rhtml +8 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/show.rhtml +57 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/view.rhtml +1 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/view_default.rhtml +1 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/controller_actions/_form.rhtml +53 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/controller_actions/edit.rhtml +9 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/controller_actions/list.rhtml +27 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/controller_actions/new.rhtml +10 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/controller_actions/show.rhtml +13 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/layouts/_tabpanel_js.rhtml +52 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/layouts/_tabpanel_list.rhtml +7 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/_breadcrumbs.rhtml +5 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/_form.rhtml +42 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/_item_list.rhtml +52 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/_item_parent_list.rhtml +15 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/_menubar.rhtml +21 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/_suckerfish.rhtml +14 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/edit.rhtml +10 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/list-original.rhtml +27 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/list.rhtml +16 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/new.rhtml +9 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/show.rhtml +8 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/permissions/_form.rhtml +7 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/permissions/edit.rhtml +9 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/permissions/list.rhtml +14 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/permissions/new.rhtml +8 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/permissions/show.rhtml +38 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/roles/_form.rhtml +18 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/roles/edit.rhtml +9 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/roles/list.rhtml +21 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/roles/new.rhtml +8 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/roles/show.rhtml +79 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/roles_permissions/_form.rhtml +13 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/roles_permissions/edit.rhtml +9 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/roles_permissions/list.rhtml +24 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/roles_permissions/new.rhtml +8 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/roles_permissions/new_permission_for_role.rhtml +8 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/roles_permissions/show.rhtml +8 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/site_controllers/_form.rhtml +15 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/site_controllers/_list.rhtml +26 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/site_controllers/edit.rhtml +9 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/site_controllers/list.rhtml +107 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/site_controllers/new.rhtml +8 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/site_controllers/show.rhtml +38 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/system_settings/_form.rhtml +71 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/system_settings/edit.rhtml +9 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/system_settings/list.rhtml +27 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/system_settings/new.rhtml +8 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/system_settings/show.rhtml +189 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/user_mailer/confirmation_request.rhtml +19 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/user_mailer/reset_password.rhtml +17 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/user_mailer/reset_password_request.rhtml +23 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/users/_form.rhtml +53 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/users/confirm_registration.rhtml +26 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/users/confirm_registration_submit.rhtml +4 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/users/create.rhtml +19 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/users/edit.rhtml +11 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/users/forgot_password.rhtml +27 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/users/forgot_password_submit.rhtml +4 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/users/list.rhtml +18 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/users/new.rhtml +19 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/users/reset_password.rhtml +11 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/users/reset_password_submit.rhtml +3 -0
- data/lib/vendor/plugins/goldberg/app/views/goldberg/users/show.rhtml +33 -0
- data/lib/vendor/plugins/goldberg/db/ContentPage.yml +466 -0
- data/lib/vendor/plugins/goldberg/db/ControllerAction.yml +162 -0
- data/lib/vendor/plugins/goldberg/db/MenuItem.yml +109 -0
- data/lib/vendor/plugins/goldberg/db/Permission.yml +21 -0
- data/lib/vendor/plugins/goldberg/db/Role.yml +493 -0
- data/lib/vendor/plugins/goldberg/db/RolesPermission.yml +26 -0
- data/lib/vendor/plugins/goldberg/db/SiteController.yml +61 -0
- data/lib/vendor/plugins/goldberg/db/SystemSettings.yml +21 -0
- data/lib/vendor/plugins/goldberg/db/User.yml +15 -0
- data/lib/vendor/plugins/goldberg/db/migrate/001_initial_setup.rb +128 -0
- data/lib/vendor/plugins/goldberg/db/migrate/002_menu_rest_items_users_cached_content_pages.rb +26 -0
- data/lib/vendor/plugins/goldberg/db/migrate/003_self_registration.rb +54 -0
- data/lib/vendor/plugins/goldberg/db/migrate/004_column_fixes.rb +119 -0
- data/lib/vendor/plugins/goldberg/goldberg.txt +1 -0
- data/lib/vendor/plugins/goldberg/init.rb +15 -0
- data/lib/vendor/plugins/goldberg/lib/goldberg.rb +37 -0
- data/lib/vendor/plugins/goldberg/lib/goldberg/controller.rb +10 -0
- data/lib/vendor/plugins/goldberg/lib/goldberg/filters.rb +197 -0
- data/lib/vendor/plugins/goldberg/lib/goldberg/helper.rb +66 -0
- data/lib/vendor/plugins/goldberg/lib/goldberg/migration.rb +113 -0
- data/lib/vendor/plugins/goldberg/lib/goldberg/migrator.rb +133 -0
- data/lib/vendor/plugins/goldberg/lib/goldberg/model.rb +127 -0
- data/lib/vendor/plugins/goldberg/lib/goldberg/routes.rb +49 -0
- data/lib/vendor/plugins/goldberg/lib/goldberg/test_helper.rb +82 -0
- data/lib/vendor/plugins/goldberg/tasks/goldberg_tasks.rake +81 -0
- data/lib/vendor/plugins/goldberg/test/functional/content_pages_controller_test.rb +31 -0
- data/lib/vendor/plugins/goldberg/test/integration/security_test.rb +95 -0
- data/lib/vendor/plugins/goldberg/test/test_helper.rb +40 -0
- data/lib/vendor/plugins/goldberg/test/unit/content_page_test.rb +87 -0
- data/lib/vendor/plugins/goldberg/test/unit/controller_action_test.rb +85 -0
- data/lib/vendor/plugins/goldberg/test/unit/menu_item_test.rb +46 -0
- data/lib/vendor/plugins/goldberg/test/unit/permission_test.rb +35 -0
- data/lib/vendor/plugins/goldberg/test/unit/site_controller_test.rb +53 -0
- data/lib/vendor/plugins/goldberg/test/unit/system_settings_test.rb +71 -0
- data/lib/vendor/plugins/goldberg/test/unit/user_test.rb +104 -0
- data/lib/vendor/plugins/goldberg/themes/common/public/images/action.png +0 -0
- data/lib/vendor/plugins/goldberg/themes/common/public/images/add.png +0 -0
- data/lib/vendor/plugins/goldberg/themes/common/public/images/delete.png +0 -0
- data/lib/vendor/plugins/goldberg/themes/common/public/images/down.png +0 -0
- data/lib/vendor/plugins/goldberg/themes/common/public/images/page.png +0 -0
- data/lib/vendor/plugins/goldberg/themes/common/public/images/permission.png +0 -0
- data/lib/vendor/plugins/goldberg/themes/common/public/images/role.png +0 -0
- data/lib/vendor/plugins/goldberg/themes/common/public/images/up.png +0 -0
- data/lib/vendor/plugins/goldberg/themes/common/public/javascripts/suckerfish.js +12 -0
- data/lib/vendor/plugins/goldberg/themes/common/public/stylesheets/goldberg.css +142 -0
- data/lib/vendor/plugins/goldberg/themes/common/public/stylesheets/suckerfish.css +124 -0
- data/lib/vendor/plugins/goldberg/themes/ewnf/app/views/layouts/application.html.erb +74 -0
- data/lib/vendor/plugins/goldberg/themes/ewnf/public/images/bg.gif +0 -0
- data/lib/vendor/plugins/goldberg/themes/ewnf/public/images/daddy_rightarrow.gif +0 -0
- data/lib/vendor/plugins/goldberg/themes/ewnf/public/images/sample.jpg +0 -0
- data/lib/vendor/plugins/goldberg/themes/ewnf/public/images/title_img.jpg +0 -0
- data/lib/vendor/plugins/goldberg/themes/ewnf/public/stylesheets/layout.css +223 -0
- data/lib/vendor/plugins/goldberg/themes/goldberg/app/views/layouts/application.html.erb +80 -0
- data/lib/vendor/plugins/goldberg/themes/goldberg/public/images/bodybg.jpg +0 -0
- data/lib/vendor/plugins/goldberg/themes/goldberg/public/images/footerbg.jpg +0 -0
- data/lib/vendor/plugins/goldberg/themes/goldberg/public/images/logo_right.jpg +0 -0
- data/lib/vendor/plugins/goldberg/themes/goldberg/public/images/menuhover.jpg +0 -0
- data/lib/vendor/plugins/goldberg/themes/goldberg/public/stylesheets/layout.css +321 -0
- data/lib/vendor/plugins/goldberg/themes/snooker/app/views/layouts/application.html.erb +74 -0
- data/lib/vendor/plugins/goldberg/themes/snooker/public/images/column_200.png +0 -0
- data/lib/vendor/plugins/goldberg/themes/snooker/public/images/daddy_rightarrow.gif +0 -0
- data/lib/vendor/plugins/goldberg/themes/snooker/public/images/footer_bg.png +0 -0
- data/lib/vendor/plugins/goldberg/themes/snooker/public/images/logo.jpg +0 -0
- data/lib/vendor/plugins/goldberg/themes/snooker/public/stylesheets/layout.css +183 -0
- data/lib/vendor/plugins/goldberg/themes/spoiled_brat/app/views/layouts/application.html.erb +71 -0
- data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/blockquote-bg.gif +0 -0
- data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/body-bg.jpg +0 -0
- data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/centerColumn-bg.jpg +0 -0
- data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/daddy_leftarrow.gif +0 -0
- data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/h2-bg.gif +0 -0
- data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/h3-bg.gif +0 -0
- data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/header-bg.jpg +0 -0
- data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/hr-bg.jpg +0 -0
- data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/logo.jpg +0 -0
- data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/stylesheets/layout.css +379 -0
- data/lib/vendor/plugins/in_place_editing/README +14 -0
- data/lib/vendor/plugins/in_place_editing/Rakefile +22 -0
- data/lib/vendor/plugins/in_place_editing/init.rb +2 -0
- data/lib/vendor/plugins/in_place_editing/lib/in_place_editing.rb +29 -0
- data/lib/vendor/plugins/in_place_editing/lib/in_place_macros_helper.rb +81 -0
- data/lib/vendor/plugins/in_place_editing/test/in_place_editing_test.rb +89 -0
- data/lib/vendor/plugins/in_place_editing/test/test_helper.rb +8 -0
- data/lib/vendor/plugins/recordselect/CHANGELOG +25 -0
- data/lib/vendor/plugins/recordselect/MIT-LICENSE +20 -0
- data/lib/vendor/plugins/recordselect/README +11 -0
- data/lib/vendor/plugins/recordselect/Rakefile +23 -0
- data/lib/vendor/plugins/recordselect/app/helpers/record_select_helper.rb +187 -0
- data/lib/vendor/plugins/recordselect/app/views/record_select/_browse.html.erb +8 -0
- data/lib/vendor/plugins/recordselect/app/views/record_select/_list.html.erb +31 -0
- data/lib/vendor/plugins/recordselect/app/views/record_select/_search.html.erb +14 -0
- data/lib/vendor/plugins/recordselect/app/views/record_select/browse.js.rjs +4 -0
- data/lib/vendor/plugins/recordselect/assets/images/cross.gif +0 -0
- data/lib/vendor/plugins/recordselect/assets/images/next.gif +0 -0
- data/lib/vendor/plugins/recordselect/assets/images/previous.gif +0 -0
- data/lib/vendor/plugins/recordselect/assets/javascripts/record_select.js +352 -0
- data/lib/vendor/plugins/recordselect/assets/stylesheets/record_select.css +129 -0
- data/lib/vendor/plugins/recordselect/init.rb +16 -0
- data/lib/vendor/plugins/recordselect/install.rb +1 -0
- data/lib/vendor/plugins/recordselect/lib/extensions/active_record.rb +9 -0
- data/lib/vendor/plugins/recordselect/lib/localization.rb +8 -0
- data/lib/vendor/plugins/recordselect/lib/record_select.rb +36 -0
- data/lib/vendor/plugins/recordselect/lib/record_select/actions.rb +67 -0
- data/lib/vendor/plugins/recordselect/lib/record_select/conditions.rb +86 -0
- data/lib/vendor/plugins/recordselect/lib/record_select/config.rb +91 -0
- data/lib/vendor/plugins/recordselect/lib/record_select/form_builder.rb +25 -0
- data/lib/vendor/plugins/recordselect/test/recordselect_test.rb +8 -0
- data/lib/vendor/plugins/recordselect/uninstall.rb +4 -0
- data/lib/vendor/plugins/render_component/README +37 -0
- data/lib/vendor/plugins/render_component/Rakefile +22 -0
- data/lib/vendor/plugins/render_component/init.rb +2 -0
- data/lib/vendor/plugins/render_component/lib/components.rb +142 -0
- data/lib/vendor/plugins/render_component/test/abstract_unit.rb +8 -0
- data/lib/vendor/plugins/render_component/test/components_test.rb +140 -0
- data/lib/vendor/plugins/six-app_manager/Rakefile +26 -0
- data/lib/vendor/plugins/six-app_manager/environment.rb +30 -0
- data/lib/vendor/plugins/six-app_manager/init.rb +18 -0
- data/lib/vendor/plugins/six-app_manager/lib/six/appmanager.rb +247 -0
- data/lib/vendor/plugins/six-db_manager/Rakefile +26 -0
- data/lib/vendor/plugins/six-db_manager/db/actions.yml +1 -0
- data/lib/vendor/plugins/six-db_manager/db/actions_sixconfigs.yml +1 -0
- data/lib/vendor/plugins/six-db_manager/db/appsettings.yml +1 -0
- data/lib/vendor/plugins/six-db_manager/db/appsettings_sixconfigs.yml +1 -0
- data/lib/vendor/plugins/six-db_manager/db/goldberg_content_pages.yml +360 -0
- data/lib/vendor/plugins/six-db_manager/db/goldberg_controller_actions.yml +211 -0
- data/lib/vendor/plugins/six-db_manager/db/goldberg_menu_items.yml +169 -0
- data/lib/vendor/plugins/six-db_manager/db/goldberg_permissions.yml +16 -0
- data/lib/vendor/plugins/six-db_manager/db/goldberg_roles.yml +683 -0
- data/lib/vendor/plugins/six-db_manager/db/goldberg_roles_permissions.yml +21 -0
- data/lib/vendor/plugins/six-db_manager/db/goldberg_site_controllers.yml +106 -0
- data/lib/vendor/plugins/six-db_manager/db/goldberg_system_settings.yml +20 -0
- data/lib/vendor/plugins/six-db_manager/db/goldberg_users.yml +27 -0
- data/lib/vendor/plugins/six-db_manager/db/mods.yml +1 -0
- data/lib/vendor/plugins/six-db_manager/db/mods_servers.yml +2 -0
- data/lib/vendor/plugins/six-db_manager/db/mods_sixconfigs.yml +1 -0
- data/lib/vendor/plugins/six-db_manager/db/queryservers.yml +1 -0
- data/lib/vendor/plugins/six-db_manager/db/repositories.yml +1 -0
- data/lib/vendor/plugins/six-db_manager/db/servers.yml +2 -0
- data/lib/vendor/plugins/six-db_manager/db/servers_sixconfigs.yml +2 -0
- data/lib/vendor/plugins/six-db_manager/db/sixconfigs.yml +1 -0
- data/lib/vendor/plugins/six-db_manager/db/system_settings.yml +1 -0
- data/lib/vendor/plugins/six-db_manager/environment.rb +24 -0
- data/lib/vendor/plugins/six-db_manager/init.rb +18 -0
- data/lib/vendor/plugins/six-db_manager/lib/six/dbmanager.rb +204 -0
- data/lib/vendor/plugins/six-guid/Rakefile +26 -0
- data/lib/vendor/plugins/six-guid/environment.rb +24 -0
- data/lib/vendor/plugins/six-guid/init.rb +18 -0
- data/lib/vendor/plugins/six-guid/lib/six/guid.rb +32 -0
- data/lib/vendor/plugins/six-import/Rakefile +26 -0
- data/lib/vendor/plugins/six-import/environment.rb +24 -0
- data/lib/vendor/plugins/six-import/init.rb +18 -0
- data/lib/vendor/plugins/six-import/lib/six/import.rb +133 -0
- data/lib/vendor/plugins/six-network/Rakefile +26 -0
- data/lib/vendor/plugins/six-network/environment.rb +2 -0
- data/lib/vendor/plugins/six-network/init.rb +18 -0
- data/lib/vendor/plugins/six-network/lib/six/network.rb +72 -0
- data/lib/vendor/plugins/six-query/Rakefile +26 -0
- data/lib/vendor/plugins/six-query/app/controllers/sixsense/auth_controller.rb +165 -0
- data/lib/vendor/plugins/six-query/environment.rb +33 -0
- data/lib/vendor/plugins/six-query/init.rb +18 -0
- data/lib/vendor/plugins/six-query/lib/six/query.rb +4 -0
- data/lib/vendor/plugins/six-query/lib/six/query/base.rb +37 -0
- data/lib/vendor/plugins/six-query/lib/six/query/gamespy.rb +107 -0
- data/lib/vendor/plugins/six-query/lib/six/query/gamespy_master.rb +61 -0
- metadata +743 -7
- data/lib/six/updater-web-app.rb +0 -80722
@@ -0,0 +1,143 @@
|
|
1
|
+
module ActiveScaffold
|
2
|
+
module Helpers
|
3
|
+
# Provides methods for converting a number into a formatted string that currently represents
|
4
|
+
# one of the following forms: phone number, percentage, money, or precision level.
|
5
|
+
module NumberHelpers
|
6
|
+
# Formats a +number+ into a US ssn number string. The +options+ can be a hash used to customize the format of the output.
|
7
|
+
# The delimiter can be set using +:delimiter+; default is "-"
|
8
|
+
# Examples:
|
9
|
+
# usa_number_to_ssn(123551234) => 123-55-1234
|
10
|
+
def usa_number_to_ssn(number, options = {})
|
11
|
+
return "" if number.nil?
|
12
|
+
delimiter = options[:delimiter] || "-"
|
13
|
+
begin
|
14
|
+
str = number.to_s.gsub(/([0-9]{3})([0-9]{2})([0-9]{4})/,"\\1#{delimiter}\\2#{delimiter}\\3")
|
15
|
+
rescue
|
16
|
+
number
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
# Formats a +number+ into a US zip code string. The +options+ can be a hash used to customize the format of the output.
|
21
|
+
# The delimiter can be set using +:delimiter+; default is "-"
|
22
|
+
# Examples:
|
23
|
+
# usa_number_to_zip(123551234) => 12355-1234
|
24
|
+
def usa_number_to_zip(number, options = {})
|
25
|
+
return "" if number.nil?
|
26
|
+
delimiter = options[:delimiter] || "-"
|
27
|
+
begin
|
28
|
+
str = number.to_s.gsub(/([0-9]{5})([0-9]{4})/,"\\1#{delimiter}\\2")
|
29
|
+
rescue
|
30
|
+
number
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# Formats a +number+ into a US phone number string. The +options+ can be a hash used to customize the format of the output.
|
35
|
+
# The area code can be surrounded by parentheses by setting +:area_code+ to true; default is false
|
36
|
+
# The delimiter can be set using +:delimiter+; default is "-"
|
37
|
+
# Examples:
|
38
|
+
# usa_number_to_phone(1235551234) => 123-555-1234
|
39
|
+
# usa_number_to_phone(1235551234, {:area_code => true}) => (123) 555-1234
|
40
|
+
# usa_number_to_phone(1235551234, {:delimiter => " "}) => 123 555 1234
|
41
|
+
# usa_number_to_phone(1235551234, {:area_code => true, :extension => 555}) => (123) 555-1234 x 555
|
42
|
+
def usa_number_to_phone(number, options = {})
|
43
|
+
return "" if number.nil?
|
44
|
+
options[:area_code] ||= false
|
45
|
+
options[:delimiter] ||= "-"
|
46
|
+
options[:extension] ||= ""
|
47
|
+
begin
|
48
|
+
str = options[:area_code] == true ? number.to_s.gsub(/([0-9]{3})([0-9]{3})([0-9]{4})/,"(\\1) \\2#{options[:delimiter]}\\3") : number.to_s.gsub(/([0-9]{3})([0-9]{3})([0-9]{4})/,"\\1#{options[:delimiter]}\\2#{options[:delimiter]}\\3")
|
49
|
+
options[:extension].to_s.strip.empty? ? str : "#{str} x #{options[:extension].to_s.strip}"
|
50
|
+
rescue
|
51
|
+
number
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
# User Rails versions
|
56
|
+
# # Formats a +number+ into a currency string. The +options+ hash can be used to customize the format of the output.
|
57
|
+
# # The +number+ can contain a level of precision using the +precision+ key; default is 2
|
58
|
+
# # The currency type can be set using the +unit+ key; default is "$"
|
59
|
+
# # The unit separator can be set using the +separator+ key; default is "."
|
60
|
+
# # The delimiter can be set using the +delimiter+ key; default is ","
|
61
|
+
# # Examples:
|
62
|
+
# # number_to_currency(1234567890.50) => $1,234,567,890.50
|
63
|
+
# # number_to_currency(1234567890.506) => $1,234,567,890.51
|
64
|
+
# # number_to_currency(1234567890.50, {:unit => "£", :separator => ",", :delimiter => ""}) => £1234567890,50
|
65
|
+
# def number_to_currency(number, options = {})
|
66
|
+
# return "" if number.nil?
|
67
|
+
# options[:precision] ||= 2
|
68
|
+
# options[:unit] ||= "$"
|
69
|
+
# options[:separator] ||= "."
|
70
|
+
# options[:delimiter] ||= ","
|
71
|
+
# options[:separator] = "" unless options[:precision] > 0
|
72
|
+
# begin
|
73
|
+
# parts = number_with_precision(number, options[:precision]).split('.')
|
74
|
+
# options[:unit] + number_with_delimiter(parts[0], options[:delimiter]) + options[:separator] + parts[1].to_s
|
75
|
+
# rescue
|
76
|
+
# number
|
77
|
+
# end
|
78
|
+
# end
|
79
|
+
#
|
80
|
+
# # Formats a +number+ as into a percentage string. The +options+ hash can be used to customize the format of the output.
|
81
|
+
# # The +number+ can contain a level of precision using the +precision+ key; default is 3
|
82
|
+
# # The unit separator can be set using the +separator+ key; default is "."
|
83
|
+
# # Examples:
|
84
|
+
# # number_to_percentage(100) => 100.000%
|
85
|
+
# # number_to_percentage(100, {:precision => 0}) => 100%
|
86
|
+
# # number_to_percentage(302.0574, {:precision => 2}) => 302.06%
|
87
|
+
# def number_to_percentage(number, options = {})
|
88
|
+
# return "" if number.nil?
|
89
|
+
# options[:precision] ||= 2
|
90
|
+
# options[:separator] ||= "."
|
91
|
+
# begin
|
92
|
+
# number = number_with_precision(number, options[:precision])
|
93
|
+
# parts = number.split('.')
|
94
|
+
# if parts.at(1).nil?
|
95
|
+
# parts[0] + "%"
|
96
|
+
# else
|
97
|
+
# parts[0] + options[:separator] + parts[1].to_s + "%"
|
98
|
+
# end
|
99
|
+
# rescue
|
100
|
+
# number
|
101
|
+
# end
|
102
|
+
# end
|
103
|
+
#
|
104
|
+
# # Formats a +number+ with a +delimiter+.
|
105
|
+
# # Example:
|
106
|
+
# # number_with_delimiter(12345678) => 12,345,678
|
107
|
+
# def number_with_delimiter(number, delimiter=",")
|
108
|
+
# return "" if number.nil?
|
109
|
+
# number.to_s.gsub(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1#{delimiter}")
|
110
|
+
# end
|
111
|
+
#
|
112
|
+
# # Returns a formatted-for-humans file size.
|
113
|
+
# #
|
114
|
+
# # Examples:
|
115
|
+
# # human_size(123) => 123 Bytes
|
116
|
+
# # human_size(1234) => 1.2 KB
|
117
|
+
# # human_size(12345) => 12.1 KB
|
118
|
+
# # human_size(1234567) => 1.2 MB
|
119
|
+
# # human_size(1234567890) => 1.1 GB
|
120
|
+
# def number_to_human_size(size)
|
121
|
+
# return "" if size.nil?
|
122
|
+
# case
|
123
|
+
# when size < 1.kilobyte: '%d Bytes' % size
|
124
|
+
# when size < 1.megabyte: '%.1f KB' % (size / 1.0.kilobyte)
|
125
|
+
# when size < 1.gigabyte: '%.1f MB' % (size / 1.0.megabyte)
|
126
|
+
# when size < 1.terabyte: '%.1f GB' % (size / 1.0.gigabyte)
|
127
|
+
# else '%.1f TB' % (size / 1.0.terabyte)
|
128
|
+
# end.sub('.0', '')
|
129
|
+
# rescue
|
130
|
+
# ""
|
131
|
+
# end
|
132
|
+
#
|
133
|
+
# alias_method :human_size, :number_to_human_size # deprecated alias
|
134
|
+
#
|
135
|
+
# # Formats a +number+ with a level of +precision+.
|
136
|
+
# # Example:
|
137
|
+
# # number_with_precision(111.2345) => 111.235
|
138
|
+
# def number_with_precision(number, precision=3)
|
139
|
+
# sprintf("%01.#{precision}f", number)
|
140
|
+
# end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module ActiveScaffold
|
2
|
+
module Helpers
|
3
|
+
module PaginationHelpers
|
4
|
+
def pagination_ajax_link(page_number, params)
|
5
|
+
url = url_for params.merge(:page => page_number)
|
6
|
+
page_link = link_to_remote(page_number,
|
7
|
+
{ :url => url,
|
8
|
+
:before => "addActiveScaffoldPageToHistory('#{url}', '#{controller_id}');",
|
9
|
+
:after => "$('#{loading_indicator_id(:action => :pagination)}').style.visibility = 'visible';",
|
10
|
+
:complete => "$('#{loading_indicator_id(:action => :pagination)}').style.visibility = 'hidden';",
|
11
|
+
:update => active_scaffold_content_id,
|
12
|
+
:failure => "ActiveScaffold.report_500_response('#{active_scaffold_id}')",
|
13
|
+
:method => :get },
|
14
|
+
{ :href => url_for(params.merge(:page => page_number)) })
|
15
|
+
end
|
16
|
+
|
17
|
+
def pagination_ajax_links(current_page, params)
|
18
|
+
start_number = current_page.number - 2
|
19
|
+
end_number = current_page.number + 2
|
20
|
+
start_number = 1 if start_number <= 0
|
21
|
+
end_number = current_page.pager.last.number if end_number > current_page.pager.last.number
|
22
|
+
|
23
|
+
html = []
|
24
|
+
html << pagination_ajax_link(1, params) unless current_page.number <= 3
|
25
|
+
html << ".." unless current_page.number <= 4
|
26
|
+
start_number.upto(end_number) do |num|
|
27
|
+
if current_page.number == num
|
28
|
+
html << num
|
29
|
+
else
|
30
|
+
html << pagination_ajax_link(num, params)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
html << ".." unless current_page.number >= current_page.pager.last.number - 3
|
34
|
+
html << pagination_ajax_link(current_page.pager.last.number, params) unless current_page.number >= current_page.pager.last.number - 2
|
35
|
+
html.join(' ')
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,279 @@
|
|
1
|
+
module ActiveScaffold
|
2
|
+
module Helpers
|
3
|
+
# Helpers that assist with the rendering of a Form Column
|
4
|
+
module SearchColumnHelpers
|
5
|
+
# This method decides which input to use for the given column.
|
6
|
+
# It does not do any rendering. It only decides which method is responsible for rendering.
|
7
|
+
def active_scaffold_search_for(column)
|
8
|
+
options = active_scaffold_search_options(column)
|
9
|
+
|
10
|
+
# check if the dev has created an override for this specific field for search
|
11
|
+
if override_search_field?(column)
|
12
|
+
# AST - I like column and options as params
|
13
|
+
send(override_search_field(column), @record, column, options)
|
14
|
+
|
15
|
+
# check if the dev has specified a valid search_ui for this column, using specific ui for searches
|
16
|
+
elsif column.search_ui and override_search?(column.search_ui)
|
17
|
+
send(override_search(column.search_ui), column, options)
|
18
|
+
|
19
|
+
# check if the dev has specified a valid search_ui for this column, using generic ui for forms
|
20
|
+
elsif column.search_ui and override_input?(column.search_ui)
|
21
|
+
send(override_input(column.search_ui), column, options)
|
22
|
+
|
23
|
+
# AST - my prefered order
|
24
|
+
# check if the dev has created an override for this specific field
|
25
|
+
elsif override_form_field?(column)
|
26
|
+
# AST - I like column and options as params
|
27
|
+
send(override_form_field(column), @record, column, options)
|
28
|
+
# AST End
|
29
|
+
|
30
|
+
# fallback: we get to make the decision
|
31
|
+
else
|
32
|
+
if column.association or column.virtual?
|
33
|
+
active_scaffold_search_text(column, options)
|
34
|
+
|
35
|
+
else # regular model attribute column
|
36
|
+
# if we (or someone else) have created a custom render option for the column type, use that
|
37
|
+
if override_search?(column.column.type)
|
38
|
+
send(override_search(column.column.type), column, options)
|
39
|
+
# if we (or someone else) have created a custom render option for the column type, use that
|
40
|
+
elsif override_input?(column.column.type)
|
41
|
+
send(override_input(column.column.type), column, options)
|
42
|
+
# final ultimate fallback: use rails' generic input method
|
43
|
+
else
|
44
|
+
# for textual fields we pass different options
|
45
|
+
text_types = [:text, :string, :integer, :float, :decimal]
|
46
|
+
options = active_scaffold_input_text_options(options) if text_types.include?(column.column.type)
|
47
|
+
input(:record, column.name, options.merge(column.options))
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# the standard active scaffold options used for class, name and scope
|
54
|
+
def active_scaffold_search_options(column)
|
55
|
+
{ :name => "search[#{column.name}]", :class => "#{column.name}-input", :id => "search_#{column.name}"}
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
## Search input methods
|
60
|
+
##
|
61
|
+
|
62
|
+
def active_scaffold_search_multi_select(column, options)
|
63
|
+
# AST not a big fan of checkboxes
|
64
|
+
return active_scaffold_search_select(column, options.merge(:multiple => true), select_options)
|
65
|
+
# AST End
|
66
|
+
associated_options = @record.send(column.association.name).collect {|r| [r.to_label, r.id]}
|
67
|
+
select_options = associated_options | options_for_association(column.association, true)
|
68
|
+
return as_(:no_options) if select_options.empty?
|
69
|
+
|
70
|
+
html = "<ul class=\"checkbox-list\" id=\"#{options[:id]}\">"
|
71
|
+
|
72
|
+
associated_ids = associated_options.collect {|a| a[1]}
|
73
|
+
select_options.each_with_index do |option, i|
|
74
|
+
label, id = option
|
75
|
+
this_name = "#{options[:name]}[#{i}][id]"
|
76
|
+
this_id = "#{options[:id]}_#{i}_id"
|
77
|
+
html << "<li>"
|
78
|
+
html << check_box_tag(this_name, id, associated_ids.include?(id), :id => this_id)
|
79
|
+
html << "<label for='#{this_id}'>"
|
80
|
+
html << label
|
81
|
+
html << "</label>"
|
82
|
+
html << "</li>"
|
83
|
+
end
|
84
|
+
|
85
|
+
html << '</ul>'
|
86
|
+
html << javascript_tag("new DraggableLists('#{options[:id]}')") if column.options[:draggable_lists]
|
87
|
+
html
|
88
|
+
end
|
89
|
+
|
90
|
+
def active_scaffold_search_select(column, options)
|
91
|
+
if column.association
|
92
|
+
associated = @record.send(column.association.name)
|
93
|
+
associated = associated.first if associated.is_a?(Array) # for columns with plural association
|
94
|
+
|
95
|
+
select_options = options_for_association(column.association, true)
|
96
|
+
select_options.unshift([ associated.to_label, associated.id ]) unless associated.nil? or select_options.find {|label, id| id == associated.id}
|
97
|
+
|
98
|
+
selected = associated.nil? ? nil : associated.id
|
99
|
+
method = column.association.macro == :belongs_to ? column.association.primary_key_name : column.name
|
100
|
+
options[:name] += '[id]'
|
101
|
+
select(:record, method, select_options.uniq, {:selected => selected, :include_blank => as_(:_select_)}, options)
|
102
|
+
else
|
103
|
+
select(:record, column.name, column.options, { :selected => @record.send(column.name) }, options)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
def active_scaffold_search_text(column, options)
|
108
|
+
text_field :record, column.name, active_scaffold_input_text_options(options)
|
109
|
+
end
|
110
|
+
|
111
|
+
# we can't use active_scaffold_input_boolean because we need to have a nil value even when column can't be null
|
112
|
+
# to decide whether search for this field or not
|
113
|
+
def active_scaffold_search_boolean(column, options)
|
114
|
+
select_options = []
|
115
|
+
select_options << [as_(:_select_), nil]
|
116
|
+
select_options << [as_(:true), true]
|
117
|
+
select_options << [as_(:false), false]
|
118
|
+
|
119
|
+
# AST Begin
|
120
|
+
value = @record.send(column.name)
|
121
|
+
value = value.blank? ? nil : (value ? 1 : 0)
|
122
|
+
select_tag(options[:name], options_for_select(select_options, value))
|
123
|
+
# AST End
|
124
|
+
end
|
125
|
+
# we can't use checkbox ui because it's not possible to decide whether search for this field or not
|
126
|
+
alias_method :active_scaffold_search_checkbox, :active_scaffold_search_boolean
|
127
|
+
|
128
|
+
def active_scaffold_search_integer(column, options)
|
129
|
+
html = []
|
130
|
+
html << select_tag("#{options[:name]}[opt]",
|
131
|
+
options_for_select(ActiveScaffold::Finder::NumericComparators.collect {|comp| [as_(comp.downcase.to_sym), comp]}),
|
132
|
+
:id => "#{options[:id]}_opt",
|
133
|
+
:onchange => "Element[this.value == 'BETWEEN' ? 'show' : 'hide']('#{options[:id]}_between');")
|
134
|
+
html << text_field_tag("#{options[:name]}[from]", nil, active_scaffold_input_text_options(:id => options[:id], :size => 10))
|
135
|
+
html << content_tag(:span, ' - ' + text_field_tag("#{options[:name]}[to]", nil,
|
136
|
+
active_scaffold_input_text_options(:id => "#{options[:id]}_to", :size => 10)),
|
137
|
+
:id => "#{options[:id]}_between", :style => "display:none")
|
138
|
+
html * ' '
|
139
|
+
end
|
140
|
+
alias_method :active_scaffold_search_decimal, :active_scaffold_search_integer
|
141
|
+
alias_method :active_scaffold_search_float, :active_scaffold_search_integer
|
142
|
+
|
143
|
+
# AST Begin
|
144
|
+
def search_session_column_range_values(column)
|
145
|
+
search_ui = column.search_ui || column.column.type
|
146
|
+
return nil if @search_session_info.nil? or search_ui.nil?
|
147
|
+
values = @search_session_info[column.name]
|
148
|
+
return nil, nil, nil if values.blank?
|
149
|
+
return nil, values, nil unless values.is_a?(Array)
|
150
|
+
return values[:opt], values[:from], values[:to]
|
151
|
+
end
|
152
|
+
|
153
|
+
def active_scaffold_search_range(column, options)
|
154
|
+
opt_value, from_value, to_value = search_session_column_range_values(column)
|
155
|
+
html = []
|
156
|
+
# AST - give StringComparators labels
|
157
|
+
select_options = [:string].include?(column.column.type) ? ActiveScaffold::Finder::StringComparators.collect {|title, comp| [as_(title), comp]} : ActiveScaffold::Finder::NumericComparators.collect {|comp| [as_(comp), comp]}
|
158
|
+
html << select_tag("#{options[:name]}[opt]",
|
159
|
+
options_for_select(select_options, opt_value),
|
160
|
+
:id => "#{options[:id]}_opt",
|
161
|
+
:onchange => "Element[this.value == 'BETWEEN' ? 'show' : 'hide']('#{options[:id]}_between');")
|
162
|
+
html << text_field_tag("#{options[:name]}[from]", from_value, active_scaffold_input_text_options(:id => options[:id], :size => 10))
|
163
|
+
html << content_tag(:span, ' - ' + text_field_tag("#{options[:name]}[to]", to_value,
|
164
|
+
active_scaffold_input_text_options(:id => "#{options[:id]}_to", :size => 10)),
|
165
|
+
:id => "#{options[:id]}_between", :style => to_value.blank? ? "display:none" : "")
|
166
|
+
html * ' '
|
167
|
+
end
|
168
|
+
alias_method :active_scaffold_search_integer, :active_scaffold_search_range
|
169
|
+
alias_method :active_scaffold_search_decimal, :active_scaffold_search_range
|
170
|
+
alias_method :active_scaffold_search_float, :active_scaffold_search_range
|
171
|
+
alias_method :active_scaffold_search_usa_money, :active_scaffold_search_range
|
172
|
+
alias_method :active_scaffold_search_string, :active_scaffold_search_range
|
173
|
+
alias_method :active_scaffold_search_text, :active_scaffold_search_range
|
174
|
+
|
175
|
+
def active_scaffold_search_usa_state(column, options)
|
176
|
+
@record.send("#{column.name}=", search_session_column_multi_select_values(column))
|
177
|
+
select_options = options
|
178
|
+
select_options.delete(:size)
|
179
|
+
options.delete([:prompt, :priority])
|
180
|
+
usa_state_select(:record, column.name, column.options[:priority], select_options, column.options.merge!(options))
|
181
|
+
end
|
182
|
+
|
183
|
+
def active_scaffold_search_record_select(column, options)
|
184
|
+
begin
|
185
|
+
value = @search_session_info[column.name] unless @search_session_info.nil?
|
186
|
+
if column.plural_association?
|
187
|
+
value.collect! {|id| Float(id) rescue nil ? id.to_i : id}.flatten if value
|
188
|
+
@record.send("#{column.name}=", column.association.klass.find(value)) if value
|
189
|
+
else
|
190
|
+
if value.blank?
|
191
|
+
value = nil
|
192
|
+
else
|
193
|
+
value = Float(value) rescue nil ? value.to_i : value
|
194
|
+
value = column.association.klass.find(value)
|
195
|
+
end
|
196
|
+
@record.send("#{column.name}=", value)
|
197
|
+
end
|
198
|
+
rescue Exception => e
|
199
|
+
logger.error Time.now.to_s + "Sorry, we are not that smart yet. Attempted to restore search values to search fields but instead got -- #{e.inspect} -- on the ActiveScaffold column = :#{column.name} in #{@controller.class}"
|
200
|
+
raise e
|
201
|
+
end
|
202
|
+
|
203
|
+
unless column.association
|
204
|
+
raise ArgumentError, "record_select can only work against associations (and #{column.name} is not). A common mistake is to specify the foreign key field (like :user_id), instead of the association (:user)."
|
205
|
+
end
|
206
|
+
remote_controller = File.join('/', active_scaffold_controller_for(column.association.klass).controller_path)
|
207
|
+
|
208
|
+
# if the opposite association is a :belongs_to, then only show records that have not been associated yet
|
209
|
+
params = {:parent_model => @record.class}
|
210
|
+
|
211
|
+
record_select_options = {:controller => remote_controller, :id => options[:id], :params => params}
|
212
|
+
record_select_options.merge!(active_scaffold_input_text_options)
|
213
|
+
record_select_options.merge!(column.options)
|
214
|
+
|
215
|
+
if column.singular_association?
|
216
|
+
record_select_field(options[:name], (@record.send(column.name) || column.association.klass.new), record_select_options)
|
217
|
+
elsif column.plural_association?
|
218
|
+
record_multi_select_field(options[:name], @record.send(column.name), record_select_options)
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
def search_session_column_multi_select_values(column)
|
223
|
+
begin
|
224
|
+
value = @search_session_info[column.name] unless @search_session_info.nil?
|
225
|
+
if value.is_a?(Hash)
|
226
|
+
value = Float(value[:id]) rescue nil ? value[:id].to_i : value[:id] if value.has_key?(:id)
|
227
|
+
else
|
228
|
+
value.collect! {|id| Float(id) rescue nil ? id.to_i : id}.flatten if value
|
229
|
+
end
|
230
|
+
value
|
231
|
+
rescue Exception => e
|
232
|
+
logger.error Time.now.to_s + "Sorry, we are not that smart yet. Attempted to restore search values to search fields but instead got -- #{e.inspect} -- on the ActiveScaffold column = :#{column.name} in #{@controller.class}"
|
233
|
+
# raise e
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
# AST End
|
238
|
+
|
239
|
+
def active_scaffold_search_datetime(column, options)
|
240
|
+
options = column.options.merge(options)
|
241
|
+
helper = "select_#{'date' unless options[:discard_date]}#{'time' unless options[:discard_time]}"
|
242
|
+
html = []
|
243
|
+
html << send(helper, nil, {:include_blank => true, :prefix => "#{options[:name]}[from]"}.merge(options))
|
244
|
+
html << send(helper, nil, {:include_blank => true, :prefix => "#{options[:name]}[to]"}.merge(options))
|
245
|
+
html * ' - '
|
246
|
+
end
|
247
|
+
|
248
|
+
def active_scaffold_search_date(column, options)
|
249
|
+
active_scaffold_search_datetime(column, options.merge!(:discard_time => true))
|
250
|
+
end
|
251
|
+
def active_scaffold_search_time(column, options)
|
252
|
+
active_scaffold_search_datetime(column, options.merge!(:discard_date => true))
|
253
|
+
end
|
254
|
+
alias_method :active_scaffold_search_timestamp, :active_scaffold_search_datetime
|
255
|
+
|
256
|
+
##
|
257
|
+
## Search column override signatures
|
258
|
+
##
|
259
|
+
|
260
|
+
def override_search_field?(column)
|
261
|
+
respond_to?(override_search_field(column))
|
262
|
+
end
|
263
|
+
|
264
|
+
# the naming convention for overriding form fields with helpers
|
265
|
+
def override_search_field(column)
|
266
|
+
"#{column.name}_search_column"
|
267
|
+
end
|
268
|
+
|
269
|
+
def override_search?(search_ui)
|
270
|
+
respond_to?(override_search(search_ui))
|
271
|
+
end
|
272
|
+
|
273
|
+
# the naming convention for overriding search input types with helpers
|
274
|
+
def override_search(form_ui)
|
275
|
+
"active_scaffold_search_#{form_ui}"
|
276
|
+
end
|
277
|
+
end
|
278
|
+
end
|
279
|
+
end
|