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,33 @@
|
|
1
|
+
module ActiveScaffold
|
2
|
+
module Helpers
|
3
|
+
# Helpers that assist with the rendering of a Form Column
|
4
|
+
module FormColumnHelpers
|
5
|
+
def active_scaffold_input_file_column(column, options)
|
6
|
+
if @record.send(column.name)
|
7
|
+
# we already have a value? display the form for deletion.
|
8
|
+
content_tag(
|
9
|
+
:div,
|
10
|
+
content_tag(
|
11
|
+
:div,
|
12
|
+
get_column_value(@record, column) + " " +
|
13
|
+
hidden_field(:record, "delete_#{column.name}", :value => "false") +
|
14
|
+
" | " +
|
15
|
+
link_to_function(as_(:remove_file), "$(this).previous().value='true'; p=$(this).up(); p.hide(); p.next().show();"),
|
16
|
+
{}
|
17
|
+
) +
|
18
|
+
content_tag(
|
19
|
+
:div,
|
20
|
+
file_column_field("record", column.name, options),
|
21
|
+
:style => "display: none"
|
22
|
+
),
|
23
|
+
{}
|
24
|
+
)
|
25
|
+
else
|
26
|
+
# no, just display the file_column_field
|
27
|
+
# AST - let's enjoy some of the AS formatting
|
28
|
+
file_column_field("record", column.name, options.merge(active_scaffold_input_text_options(:class => "#{column.name}-input")))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module ActiveScaffold
|
2
|
+
module Helpers
|
3
|
+
# Helpers that assist with the rendering of a List Column
|
4
|
+
module ListColumnHelpers
|
5
|
+
def active_scaffold_column_download_link_with_filename(column, record)
|
6
|
+
return nil if record.send(column.name).nil?
|
7
|
+
active_scaffold_column_download_link(column, record, File.basename(record.send(column.name)))
|
8
|
+
end
|
9
|
+
|
10
|
+
# HOWTO
|
11
|
+
# <% column = active_scaffold_config.columns[:file_name] %>
|
12
|
+
# <% doc = Document.find(:first, :conditions => ["name = ?", doc_name]) %>
|
13
|
+
# <%= active_scaffold_column_download_link(column, doc) %>
|
14
|
+
def active_scaffold_column_download_link(column, record, label = nil)
|
15
|
+
return nil if record.send(column.name).nil?
|
16
|
+
label ||= as_(:download)
|
17
|
+
# AST Begin - :secure_download
|
18
|
+
if column.options[:secure_download]
|
19
|
+
url_options = active_scaffold_column_download_link_url_options(column, record)
|
20
|
+
else
|
21
|
+
url_options = url_for_file_column(record, column.name.to_s)
|
22
|
+
end
|
23
|
+
# AST End
|
24
|
+
link_to( label, url_options, :popup => true)
|
25
|
+
end
|
26
|
+
|
27
|
+
# AST - active_scaffold_column_download_link_url_options
|
28
|
+
def active_scaffold_column_download_link_url_options(column, record)
|
29
|
+
{:controller => active_scaffold_config.secure_download_controller, :action => "show", :id => record.id, :download => url_for_file_column(record, column.name.to_s)}#.encrypt!(:symmetric, :key => active_scaffold_config.secure_download_key)}
|
30
|
+
end
|
31
|
+
|
32
|
+
def active_scaffold_column_thumbnail(column, record)
|
33
|
+
return nil if record.send(column.name).nil?
|
34
|
+
link_to(
|
35
|
+
image_tag(url_for_file_column(record, column.name.to_s, "thumb"), :border => 0),
|
36
|
+
url_for_file_column(record, column.name.to_s),
|
37
|
+
:popup => true)
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "../test_helper.rb")
|
2
|
+
|
3
|
+
class DeleteFileColumnTest < Test::Unit::TestCase
|
4
|
+
def setup
|
5
|
+
DeleteFileColumn.generate_delete_helpers(MockModel)
|
6
|
+
@model = MockModel.new
|
7
|
+
@model.band_image = "coolio.jpg"
|
8
|
+
end
|
9
|
+
|
10
|
+
def test__file_column_fields
|
11
|
+
assert_equal(1, @model.file_column_fields.length)
|
12
|
+
end
|
13
|
+
|
14
|
+
def test__delete_band_image__boolean__should_delete
|
15
|
+
@model.delete_band_image = true
|
16
|
+
assert_nil @model.band_image
|
17
|
+
end
|
18
|
+
|
19
|
+
def test__delete_band_image__string__should_delete
|
20
|
+
@model.delete_band_image = "true"
|
21
|
+
assert_nil @model.band_image
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
def test__delete_band_image__boolean_false__shouldnt_delete
|
26
|
+
@model.delete_band_image = false
|
27
|
+
assert_not_nil @model.band_image
|
28
|
+
end
|
29
|
+
|
30
|
+
def test__delete_band_image__string_false__shouldnt_delete
|
31
|
+
@model.delete_band_image = "false"
|
32
|
+
assert_not_nil @model.band_image
|
33
|
+
end
|
34
|
+
|
35
|
+
|
36
|
+
def test__just_uploaded__shouldnt_delete
|
37
|
+
@model.band_image_just_uploaded = true
|
38
|
+
@model.delete_band_image = "true"
|
39
|
+
assert_not_nil(@model.band_image)
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require "rubygems"
|
3
|
+
require 'active_support'
|
4
|
+
|
5
|
+
for file in ["../lib/delete_file_column.rb", "mock_model.rb"]
|
6
|
+
require File.expand_path(File.join(File.dirname(__FILE__), file))
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
def dbg
|
12
|
+
require 'ruby-debug'
|
13
|
+
Debugger.start
|
14
|
+
debugger
|
15
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module ActiveScaffold
|
2
|
+
module TinyMceBridge
|
3
|
+
module ViewHelpers
|
4
|
+
def active_scaffold_includes(*args)
|
5
|
+
tiny_mce_js = javascript_tag(%|
|
6
|
+
var action_link_close = ActiveScaffold.ActionLink.Abstract.prototype.close;
|
7
|
+
ActiveScaffold.ActionLink.Abstract.prototype.close = function() {
|
8
|
+
this.adapter.select('textarea.mceEditor').each(function(elem) {
|
9
|
+
tinyMCE.execCommand('mceRemoveControl', false, elem.id);
|
10
|
+
});
|
11
|
+
action_link_close.apply(this);
|
12
|
+
};
|
13
|
+
|) if using_tiny_mce?
|
14
|
+
super(*args) + (include_tiny_mce_if_needed || '') + (tiny_mce_js || '')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
module FormColumnHelpers
|
19
|
+
def active_scaffold_input_text_editor(column, options)
|
20
|
+
options[:class] = "#{options[:class]} mceEditor #{column.options[:class]}".strip
|
21
|
+
html = []
|
22
|
+
html << send(override_input(:textarea), column, options)
|
23
|
+
html << javascript_tag("tinyMCE.execCommand('mceAddControl', false, '#{options[:id]}');") if request.xhr?
|
24
|
+
html.join "\n"
|
25
|
+
end
|
26
|
+
|
27
|
+
def onsubmit
|
28
|
+
submit_js = 'tinyMCE.triggerSave();this.select("textarea.mceEditor").each(function(elem) { tinyMCE.execCommand("mceRemoveControl", false, elem.id); });' if using_tiny_mce?
|
29
|
+
[super, submit_js].compact.join ';'
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
module SearchColumnHelpers
|
34
|
+
def self.included(base)
|
35
|
+
base.class_eval { alias_method :active_scaffold_search_text_editor, :active_scaffold_search_text }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
ActionView::Base.class_eval do
|
42
|
+
include ActiveScaffold::TinyMceBridge::FormColumnHelpers
|
43
|
+
include ActiveScaffold::TinyMceBridge::SearchColumnHelpers
|
44
|
+
include ActiveScaffold::TinyMceBridge::ViewHelpers
|
45
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# Matt Mower <matt@cominded.com>
|
2
|
+
#
|
3
|
+
# A base class for creating DHTML confirmation types.
|
4
|
+
#
|
5
|
+
# The real work is done by the onclick_function and onclick_handler methods. In
|
6
|
+
# general it should only be required to override the default onclick_handler
|
7
|
+
# method and provide the specific Javascript required to invoke the DHTML confirm
|
8
|
+
# dialog of your choice.
|
9
|
+
#
|
10
|
+
# It is up to this dialog, if the user confirms the intended action, to invoke
|
11
|
+
# the function window.gFireModalLink() to trigger the intended action of the link.
|
12
|
+
# For example, using the Modalbox library, you would use something like:
|
13
|
+
#
|
14
|
+
# Modalbox.hide( {
|
15
|
+
# afterHide: function() {
|
16
|
+
# window.gFireModalLink();
|
17
|
+
# } } );
|
18
|
+
#
|
19
|
+
# By default the only action recognized is :value which is used to add a
|
20
|
+
# dhtml_confirm attribute to the link <a> tag. This value is detected by the
|
21
|
+
# ActiveScaffold link and triggers the DHTML confirmation logic.
|
22
|
+
#
|
23
|
+
class DHTMLConfirm
|
24
|
+
attr_accessor :value, :message, :options
|
25
|
+
|
26
|
+
def initialize( options = {} )
|
27
|
+
@options = options
|
28
|
+
@value = @options.delete(:value) { |key| "yes" }
|
29
|
+
@message = @options.delete(:message) { |key| "Are you sure?" }
|
30
|
+
end
|
31
|
+
|
32
|
+
def onclick_function( controller, link_id )
|
33
|
+
script = <<-END
|
34
|
+
window.gFireModalLink = function() {
|
35
|
+
var link = $('#{link_id}').action_link;
|
36
|
+
link.open_action.call( link );
|
37
|
+
};
|
38
|
+
#{ensure_termination(onclick_handler(controller,link_id))}
|
39
|
+
return false;
|
40
|
+
END
|
41
|
+
# script = "window.gModalLink = $('#{link_id}').action_link;#{onclick_handler(controller,link_id)}return false;"
|
42
|
+
end
|
43
|
+
|
44
|
+
def onclick_handler( controller, link_id )
|
45
|
+
""
|
46
|
+
end
|
47
|
+
|
48
|
+
protected
|
49
|
+
def ensure_termination( expression )
|
50
|
+
expression =~ /;$/ ? expression : "#{expression};"
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# wrap the action rendering for ActiveScaffold controllers
|
2
|
+
module ActionController #:nodoc:
|
3
|
+
class Base
|
4
|
+
def render_with_active_scaffold(*args, &block)
|
5
|
+
if self.class.uses_active_scaffold? and params[:adapter] and @rendering_adapter.nil?
|
6
|
+
@rendering_adapter = true # recursion control
|
7
|
+
# if we need an adapter, then we render the actual stuff to a string and insert it into the adapter template
|
8
|
+
render :partial => params[:adapter][1..-1],
|
9
|
+
:locals => {:payload => render_to_string(args.first, &block)},
|
10
|
+
:use_full_path => true, :layout => false
|
11
|
+
@rendering_adapter = nil # recursion control
|
12
|
+
else
|
13
|
+
render_without_active_scaffold(*args, &block)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
alias_method_chain :render, :active_scaffold
|
17
|
+
|
18
|
+
# Rails 2.x implementation is post-initialization on :active_scaffold method
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# wrap the action rendering for ActiveScaffold views
|
2
|
+
module ActionView #:nodoc:
|
3
|
+
class Base
|
4
|
+
# Adds two rendering options.
|
5
|
+
#
|
6
|
+
# ==render :super
|
7
|
+
#
|
8
|
+
# This syntax skips all template overrides and goes directly to the provided ActiveScaffold templates.
|
9
|
+
# Useful if you want to wrap an existing template. Just call super!
|
10
|
+
#
|
11
|
+
# ==render :active_scaffold => #{controller.to_s}, options = {}+
|
12
|
+
#
|
13
|
+
# Lets you embed an ActiveScaffold by referencing the controller where it's configured.
|
14
|
+
#
|
15
|
+
# You may specify options[:constraints] for the embedded scaffold. These constraints have three effects:
|
16
|
+
# * the scaffold's only displays records matching the constraint
|
17
|
+
# * all new records created will be assigned the constrained values
|
18
|
+
# * constrained columns will be hidden (they're pretty boring at this point)
|
19
|
+
#
|
20
|
+
# You may also specify options[:conditions] for the embedded scaffold. These only do 1/3 of what
|
21
|
+
# constraints do (they only limit search results). Any format accepted by ActiveRecord::Base.find is valid.
|
22
|
+
#
|
23
|
+
# Defining options[:label] lets you completely customize the list title for the embedded scaffold.
|
24
|
+
#
|
25
|
+
def render_with_active_scaffold(*args, &block)
|
26
|
+
if args.first == :super
|
27
|
+
options = args[1] || {}
|
28
|
+
options[:locals] ||= {}
|
29
|
+
|
30
|
+
known_extensions = [:erb, :rhtml, :rjs, :haml]
|
31
|
+
# search through call stack for a template file (normally matches on first caller)
|
32
|
+
# note that we can't use split(':').first because windoze boxen may have an extra colon to specify the drive letter. the
|
33
|
+
# solution is to count colons from the *right* of the string, not the left. see issue #299.
|
34
|
+
template_path = caller.find{|c| known_extensions.include?(c.split(':')[-3].split('.').last.to_sym) }
|
35
|
+
template = File.basename(template_path.split(':')[-3])
|
36
|
+
|
37
|
+
# paths previous to current template_path must be ignored to avoid infinite loops when is called twice or more
|
38
|
+
index = 0
|
39
|
+
controller.class.active_scaffold_paths.each_with_index do |active_scaffold_template_path, i|
|
40
|
+
index = i + 1 and break if template_path.include? active_scaffold_template_path
|
41
|
+
end
|
42
|
+
|
43
|
+
controller.class.active_scaffold_paths.slice(index..-1).each do |active_scaffold_template_path|
|
44
|
+
active_scaffold_template = File.join(active_scaffold_template_path, template)
|
45
|
+
return render(:file => active_scaffold_template, :locals => options[:locals]) if File.file? active_scaffold_template
|
46
|
+
end
|
47
|
+
elsif args.first.is_a?(Hash) and args.first[:active_scaffold]
|
48
|
+
require 'digest/md5'
|
49
|
+
options = args.first
|
50
|
+
|
51
|
+
remote_controller = options[:active_scaffold]
|
52
|
+
constraints = options[:constraints]
|
53
|
+
conditions = options[:conditions]
|
54
|
+
eid = Digest::MD5.hexdigest(params[:controller] + remote_controller.to_s + constraints.to_s + conditions.to_s)
|
55
|
+
session["as:#{eid}"] = {:constraints => constraints, :conditions => conditions, :list => {:label => args.first[:label]}}
|
56
|
+
options[:params] ||= {}
|
57
|
+
options[:params].merge! :eid => eid
|
58
|
+
|
59
|
+
render_component :controller => remote_controller.to_s, :action => 'table', :params => options[:params]
|
60
|
+
else
|
61
|
+
render_without_active_scaffold(*args, &block)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
alias_method_chain :render, :active_scaffold
|
65
|
+
|
66
|
+
def partial_pieces(partial_path)
|
67
|
+
if partial_path.include?('/')
|
68
|
+
return File.dirname(partial_path), File.basename(partial_path)
|
69
|
+
else
|
70
|
+
return controller.class.controller_path, partial_path
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# This is the template finder logic, keep it updated with however we find stuff in rails
|
75
|
+
# currently this very similar to the logic in ActionBase::Base.render for options file
|
76
|
+
# TODO: Work with rails core team to find a better way to check for this.
|
77
|
+
def template_exists?(template_name, lookup_overrides = false)
|
78
|
+
begin
|
79
|
+
method = 'find_template'
|
80
|
+
method << '_without_active_scaffold' unless lookup_overrides
|
81
|
+
self.view_paths.send(method, template_name, @template_format)
|
82
|
+
return true
|
83
|
+
rescue ActionView::MissingTemplate => e
|
84
|
+
return false
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module ActionController #:nodoc:
|
2
|
+
module Components
|
3
|
+
module InstanceMethods
|
4
|
+
# Extracts the action_name from the request parameters and performs that action.
|
5
|
+
private
|
6
|
+
# This is to fix a bug in Rails. 1.2.2 was calling klass.controller_name instead of klass.controller_path, which was in turn setting the params[:controller] => "contacts", instead of params[:controller] => "two/contact". Submitted ticket #7545
|
7
|
+
# Namespaces only supported in ActiveScaffold with Rails 1.2.2
|
8
|
+
def component_response(options, reuse_response)
|
9
|
+
klass = component_class(options)
|
10
|
+
request = request_for_component(klass.controller_path, options)
|
11
|
+
new_response = reuse_response ? response : response.dup
|
12
|
+
|
13
|
+
klass.process_with_components(request, new_response, self)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# wrap find_template to search in ActiveScaffold paths when template is missing
|
2
|
+
module ActionView #:nodoc:
|
3
|
+
class PathSet
|
4
|
+
attr_accessor :active_scaffold_paths
|
5
|
+
|
6
|
+
def find_template_with_active_scaffold(original_template_path, format = nil, html_fallback = true)
|
7
|
+
begin
|
8
|
+
find_template_without_active_scaffold(original_template_path, format, html_fallback)
|
9
|
+
rescue MissingTemplate
|
10
|
+
if active_scaffold_paths && original_template_path.include?('/')
|
11
|
+
active_scaffold_paths.find_template_without_active_scaffold(original_template_path.split('/').last, format, html_fallback)
|
12
|
+
else
|
13
|
+
raise
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
alias_method_chain :find_template, :active_scaffold
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
module ActionController #:nodoc:
|
22
|
+
class Base
|
23
|
+
def assign_names_with_active_scaffold
|
24
|
+
assign_names_without_active_scaffold
|
25
|
+
@template.view_paths.active_scaffold_paths = self.class.active_scaffold_paths if search_generic_view_paths?
|
26
|
+
end
|
27
|
+
alias_method_chain :assign_names, :active_scaffold
|
28
|
+
|
29
|
+
def search_generic_view_paths?
|
30
|
+
!self.is_a?(ActionMailer::Base) && self.class.action_methods.include?(self.action_name)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,152 @@
|
|
1
|
+
module ActionView
|
2
|
+
module Helpers
|
3
|
+
module JavaScriptMacrosHelper
|
4
|
+
# Fix html_escape issues with url_for.
|
5
|
+
def in_place_editor(field_id, options = {})
|
6
|
+
function = "new Ajax.InPlaceEditor("
|
7
|
+
function << "'#{field_id}', "
|
8
|
+
function << "'#{url_for(options[:url])}'".gsub("&", "&")
|
9
|
+
|
10
|
+
js_options = {}
|
11
|
+
js_options['cancelText'] = %('#{options[:cancel_text]}') if options[:cancel_text]
|
12
|
+
js_options['okText'] = %('#{options[:save_text]}') if options[:save_text]
|
13
|
+
js_options['loadingText'] = %('#{options[:loading_text]}') if options[:loading_text]
|
14
|
+
js_options['savingText'] = %('#{options[:saving_text]}') if options[:saving_text]
|
15
|
+
js_options['rows'] = options[:rows] if options[:rows]
|
16
|
+
js_options['cols'] = options[:cols] if options[:cols]
|
17
|
+
js_options['size'] = options[:size] if options[:size]
|
18
|
+
js_options['externalControl'] = "'#{options[:external_control]}'" if options[:external_control]
|
19
|
+
js_options['loadTextURL'] = "'#{url_for(options[:load_text_url])}'" if options[:load_text_url]
|
20
|
+
js_options['ajaxOptions'] = options[:options] if options[:options]
|
21
|
+
js_options['evalScripts'] = options[:script] if options[:script]
|
22
|
+
js_options['callback'] = "function(form) { return #{options[:with]} }" if options[:with]
|
23
|
+
js_options['clickToEditText'] = %('#{options[:click_to_edit_text]}') if options[:click_to_edit_text]
|
24
|
+
function << (', ' + options_for_javascript(js_options)) unless js_options.empty?
|
25
|
+
|
26
|
+
function << ')'
|
27
|
+
|
28
|
+
javascript_tag(function)
|
29
|
+
end
|
30
|
+
|
31
|
+
def format_inplace_edit_column(record,column)
|
32
|
+
value = record.send(column.name)
|
33
|
+
if column.list_ui == :checkbox
|
34
|
+
active_scaffold_column_checkbox(column, record)
|
35
|
+
else
|
36
|
+
clean_column_value(format_value(value))
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def active_scaffold_in_place_editor_js(field_id, options = {})
|
41
|
+
function = "new Ajax.InPlaceEditor("
|
42
|
+
function << "'#{field_id}', "
|
43
|
+
function << "'#{url_for(options[:url])}'"
|
44
|
+
|
45
|
+
js_options = {}
|
46
|
+
js_options['cancelText'] = %('#{options[:cancel_text]}') if options[:cancel_text]
|
47
|
+
js_options['okText'] = %('#{options[:save_text]}') if options[:save_text]
|
48
|
+
js_options['loadingText'] = %('#{options[:loading_text]}') if options[:loading_text]
|
49
|
+
js_options['savingText'] = %('#{options[:saving_text]}') if options[:saving_text]
|
50
|
+
js_options['rows'] = options[:rows] if options[:rows]
|
51
|
+
js_options['htmlResponse'] = options[:html_response] if options.has_key?(:html_response)
|
52
|
+
js_options['cols'] = options[:cols] if options[:cols]
|
53
|
+
js_options['size'] = options[:size] if options[:size]
|
54
|
+
js_options['externalControl'] = "'#{options[:external_control]}'" if options[:external_control]
|
55
|
+
js_options['loadTextURL'] = "'#{url_for(options[:load_text_url])}'" if options[:load_text_url]
|
56
|
+
js_options['ajaxOptions'] = options[:options] if options[:options]
|
57
|
+
js_options['evalScripts'] = options[:script] if options[:script]
|
58
|
+
js_options['callback'] = "function(form) { return #{options[:with]} }" if options[:with]
|
59
|
+
js_options['clickToEditText'] = %('#{options[:click_to_edit_text]}') if options[:click_to_edit_text]
|
60
|
+
function << (', ' + options_for_javascript(js_options)) unless js_options.empty?
|
61
|
+
|
62
|
+
function << ')'
|
63
|
+
|
64
|
+
javascript_tag(function)
|
65
|
+
end
|
66
|
+
|
67
|
+
# def active_scaffold_inplace_edit(record, column)
|
68
|
+
# formatted_column = format_inplace_edit_column(record,column)
|
69
|
+
# id_options = {:id => record.id.to_s, :action => 'update_column', :name => column.name.to_s}
|
70
|
+
# tag_options = {:tag => "span", :id => element_cell_id(id_options), :class => "in_place_editor_field"}
|
71
|
+
# in_place_editor_options = {:url => {:controller => params_for[:controller], :action => "update_column", :column => column.name, :id => record.id.to_s},
|
72
|
+
# :click_to_edit_text => as_("Click to edit"),
|
73
|
+
# :cancel_text => as_("Cancel"),
|
74
|
+
# :loading_text => as_("Loading…"),
|
75
|
+
# :save_text => as_("Update"),
|
76
|
+
# :saving_text => as_("Saving…"),
|
77
|
+
# :html_response => false,
|
78
|
+
# :options => "{method: 'post'}",
|
79
|
+
# :script => true}.merge(column.options)
|
80
|
+
# content_tag(:span, formatted_column, tag_options) + active_scaffold_in_place_editor_js(tag_options[:id], in_place_editor_options)
|
81
|
+
# end
|
82
|
+
|
83
|
+
# Allow in_place_editor to pass along nested information so the update_column can call refresh_record properly.
|
84
|
+
def active_scaffold_inplace_edit_2(record, column, options = {})
|
85
|
+
formatted_column = options[:formatted_column] || format_inplace_edit_column(record, column)
|
86
|
+
id_options = {:id => record.id.to_s, :action => 'update_column', :name => column.name.to_s}
|
87
|
+
tag_options = {:tag => "span", :id => element_cell_id(id_options), :class => "in_place_editor_field"}
|
88
|
+
in_place_editor_options = {:url => {:controller => params_for[:controller], :action => "update_column", :eid => params[:eid], :parent_model => params[:parent_model], :column => column.name, :id => record.id.to_s},
|
89
|
+
:click_to_edit_text => as_(:click_to_edit),
|
90
|
+
:cancel_text => as_(:cancel),
|
91
|
+
:loading_text => as_(:loading),
|
92
|
+
:save_text => as_(:update),
|
93
|
+
:saving_text => as_(:saving),
|
94
|
+
:script => true}.merge(column.options)
|
95
|
+
html = html_for_inplace_display(formatted_column, tag_options[:id], in_place_editor_options)
|
96
|
+
html << form_for_inplace_display(record, column, tag_options[:id], in_place_editor_options, options)
|
97
|
+
end
|
98
|
+
|
99
|
+
def check_for_choices(options)
|
100
|
+
raise ArgumentError, "Missing choices for select! Specify options[:choices] for in_place_select" if options[:choices].nil?
|
101
|
+
end
|
102
|
+
|
103
|
+
def html_for_inplace_display(display_text, id_string, in_place_editor_options)
|
104
|
+
content_tag(:span, display_text,
|
105
|
+
:onclick => "Element.hide(this);$('#{id_string}_form').show();",
|
106
|
+
:onmouseover => visual_effect(:highlight, id_string),
|
107
|
+
:title => in_place_editor_options[:click_to_edit_text],
|
108
|
+
:id => id_string,
|
109
|
+
:class => "inplace_span")
|
110
|
+
end
|
111
|
+
|
112
|
+
def form_for_inplace_display(record, column, id_string, in_place_editor_options, options)
|
113
|
+
retval = ""
|
114
|
+
in_place_editor_options[:url] ||= {}
|
115
|
+
in_place_editor_options[:url][:action] ||= "set_record_#{column.name}"
|
116
|
+
in_place_editor_options[:url][:id] ||= record.id
|
117
|
+
loader_message = in_place_editor_options[:saving_text] || as_(:saving_)
|
118
|
+
retval << form_remote_tag(:url => in_place_editor_options[:url],
|
119
|
+
:method => in_place_editor_options[:http_method] || :post,
|
120
|
+
:loading => "$('#{id_string}_form').hide(); $('loader_#{id_string}').show();",
|
121
|
+
:complete => "$('loader_#{id_string}').hide();",
|
122
|
+
:html => {:class => "in_place_editor_form", :id => "#{id_string}_form", :style => "display:none" } )
|
123
|
+
|
124
|
+
retval << field_for_inplace_editing(record, options, column )
|
125
|
+
retval << content_tag(:br) if in_place_editor_options[:br]
|
126
|
+
retval << submit_tag(as_(:ok), :class => "inplace_submit")
|
127
|
+
retval << link_to_function( "Cancel", "$('#{id_string}_form').hide();$('#{id_string}').show() ", {:class => "inplace_cancel" })
|
128
|
+
retval << "</form>"
|
129
|
+
# #FIXME 2008-01-14 (EJM) Level=0 - Use AS's spinner
|
130
|
+
# retval << invisible_loader( loader_message, "loader_#{id_string}", "inplace_loader")
|
131
|
+
retval << content_tag(:br)
|
132
|
+
end
|
133
|
+
|
134
|
+
def field_for_inplace_editing(record, options, column)
|
135
|
+
input_type = column.list_ui
|
136
|
+
options[:class] = "inplace_#{input_type}"
|
137
|
+
htm_opts = {:class => options[:class] }
|
138
|
+
case input_type
|
139
|
+
when :textarea
|
140
|
+
text_area_tag('value', record.send(column.name), options )
|
141
|
+
when :select
|
142
|
+
select_tag('value', options_for_select(options.delete(:choices), record.send(column.name)), options.merge(htm_opts))
|
143
|
+
# when :date_select
|
144
|
+
# calendar_date_select( :record, column.name, options)
|
145
|
+
else
|
146
|
+
text_field_tag('value', record.send(column.name), options)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|