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,25 @@
|
|
1
|
+
cancel_selector = "##{element_form_id(:action => :create)} a.cancel".to_json
|
2
|
+
|
3
|
+
if controller.send :successful?
|
4
|
+
if @insert_row
|
5
|
+
page.insert_html :top, active_scaffold_tbody_id, :partial => 'list_record', :locals => {:record => @record}
|
6
|
+
page << "ActiveScaffold.stripe($('#{active_scaffold_tbody_id}'))"
|
7
|
+
page << "ActiveScaffold.hide_empty_message('#{active_scaffold_tbody_id}','#{empty_message_id}');"
|
8
|
+
page << "ActiveScaffold.increment_record_count('#{active_scaffold_id}');"
|
9
|
+
end
|
10
|
+
|
11
|
+
if (active_scaffold_config.create.persistent)
|
12
|
+
page << "$$(#{cancel_selector}).first().link.reload();"
|
13
|
+
else
|
14
|
+
page << "$$(#{cancel_selector}).first().link.close#{'_with_refresh' unless @insert_row}();"
|
15
|
+
end
|
16
|
+
if (active_scaffold_config.create.edit_after_create)
|
17
|
+
page << "var link = $('#{action_link_id 'edit', @record.id}');"
|
18
|
+
page << "if (link) (function() { link.action_link.open() }).defer();"
|
19
|
+
end
|
20
|
+
else
|
21
|
+
page << "l = $$(#{cancel_selector}).first().link;"
|
22
|
+
page.replace element_form_id(:action => :create), :partial => 'create_form'
|
23
|
+
page << "l.register_cancel_hooks();"
|
24
|
+
end
|
25
|
+
page.replace_html active_scaffold_messages_id, :partial => 'messages'
|
@@ -0,0 +1,11 @@
|
|
1
|
+
cancel_selector = "##{element_form_id(:action => :update)} a.cancel".to_json
|
2
|
+
|
3
|
+
if controller.send :successful?
|
4
|
+
page << "$$(#{cancel_selector}).first().link.close_with_refresh();"
|
5
|
+
page.replace active_scaffold_calculations_id, :partial => 'list_calculations' if active_scaffold_config.list.columns.any? {|c| c.calculation?}
|
6
|
+
else
|
7
|
+
page << "l = $$(#{cancel_selector}).first().link;"
|
8
|
+
page.replace element_form_id(:action => :update), :partial => 'update_form'
|
9
|
+
page << "l.register_cancel_hooks();"
|
10
|
+
end
|
11
|
+
page.replace_html active_scaffold_messages_id, :partial => 'messages'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# pdf.text active_scaffold_config.print_list.header_text if active_scaffold_config.print_list.header_text
|
2
|
+
headers = active_scaffold_tools_list_columns.collect {|column| column.label}
|
3
|
+
rows = []
|
4
|
+
@records.each do |record|
|
5
|
+
columns = []
|
6
|
+
active_scaffold_tools_list_columns.each do |column|
|
7
|
+
save_column_inplace_edit = column.inplace_edit
|
8
|
+
column.inplace_edit = false
|
9
|
+
column.list_ui = :boolean if column.list_ui and column.list_ui.to_sym == :checkbox
|
10
|
+
columns << get_column_value(record, column).gsub(' ', '').gsub('&', '&')
|
11
|
+
column.inplace_edit = save_column_inplace_edit
|
12
|
+
end
|
13
|
+
rows << columns
|
14
|
+
end
|
15
|
+
|
16
|
+
pdf.font "#{Prawn::BASEDIR}/data/fonts/DejaVuSans.ttf"
|
17
|
+
pdf.table rows,
|
18
|
+
:font_size => active_scaffold_config.print_list.font_size,
|
19
|
+
:horizontal_padding => 10,
|
20
|
+
:vertical_padding => 3,
|
21
|
+
:border_width => 1,
|
22
|
+
:position => :left,
|
23
|
+
:headers => headers,
|
24
|
+
:align => {1 => :center},
|
25
|
+
:align_headers => :center,
|
26
|
+
:row_colors => :pdf_writer
|
@@ -0,0 +1,6 @@
|
|
1
|
+
page.remove element_row_id(:action => 'list', :id => params[:id])
|
2
|
+
page.insert_html :bottom, active_scaffold_tbody_id, :partial => 'list_record', :locals => {:record => @record}
|
3
|
+
page << "ActiveScaffold.reload_if_empty('#{active_scaffold_tbody_id}','#{url_for(params_for :action => 'update_table', :id => nil, :page => [active_scaffold_config.list.user.page.to_i - 1, 1].max, :escape => false)}');"
|
4
|
+
page << "ActiveScaffold.stripe('#{active_scaffold_tbody_id}');"
|
5
|
+
page << "ActiveScaffold.decrement_record_count('#{active_scaffold_id}');"
|
6
|
+
page.replace active_scaffold_calculations_id, :partial => 'list_calculations' if active_scaffold_tools_list_columns.any? {|c| c.calculation?}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
@update_columns.each do |update_column|
|
2
|
+
column = update_column
|
3
|
+
while column
|
4
|
+
field_id = active_scaffold_input_options(column, params[:scope])[:id]
|
5
|
+
page[field_id].up('dl').replace :partial => form_partial_for_column(column), :locals => { :column => column, :scope => params[:scope] }
|
6
|
+
column = Hash === column.options ? column.options[:update_column] : nil
|
7
|
+
column = active_scaffold_config.columns[column] if column
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<div class="active-scaffold">
|
2
|
+
<div class="update-view <%= "#{params[:controller]}-view" %> view">
|
3
|
+
<% if active_scaffold_config.update.nested_links and active_scaffold_config.action_links.any? {|link| link.type == :record } -%>
|
4
|
+
<%= render :partial => 'update_actions', :locals => {:record => @record, :url_options => params_for(:action => :list, :id => @record.id)} %>
|
5
|
+
<% end -%>
|
6
|
+
<%= render :partial => 'update_form' -%>
|
7
|
+
</div>
|
8
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
column_span_id = element_cell_id(:id => @record.id.to_s, :action => 'update_column', :name => params[:column])
|
2
|
+
unless controller.send :successful?
|
3
|
+
page.alert(@record.errors.full_messages(active_scaffold_config).join("\n"))
|
4
|
+
@record.reload
|
5
|
+
end
|
6
|
+
column = active_scaffold_config.columns[params[:column]]
|
7
|
+
if column.inplace_edit
|
8
|
+
page.replace_html(column_span_id,format_inplace_edit_column(@record, column))
|
9
|
+
else
|
10
|
+
formatted_value = get_column_value(@record, column)
|
11
|
+
page.replace_html(column_span_id, formatted_value)
|
12
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
##
|
2
|
+
## Initialize the environment
|
3
|
+
##
|
4
|
+
unless Rails::VERSION::MAJOR == 2 && Rails::VERSION::MINOR >= 3
|
5
|
+
raise "This version of ActiveScaffold requires Rails 2.3 or higher. Please use an earlier version."
|
6
|
+
end
|
7
|
+
|
8
|
+
require File.dirname(__FILE__) + '/environment'
|
9
|
+
|
10
|
+
##
|
11
|
+
## Run the install assets script, too, just to make sure
|
12
|
+
## But at least rescue the action in production
|
13
|
+
##
|
14
|
+
begin
|
15
|
+
require File.dirname(__FILE__) + '/install_assets'
|
16
|
+
rescue
|
17
|
+
raise $! unless Rails.env == 'production'
|
18
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
##
|
2
|
+
## Install ActiveScaffold assets into /public
|
3
|
+
##
|
4
|
+
|
5
|
+
require File.dirname(__FILE__) + '/install_assets'
|
6
|
+
|
7
|
+
##
|
8
|
+
## Install Counter
|
9
|
+
##
|
10
|
+
#
|
11
|
+
# What's going on here?
|
12
|
+
# We're incrementing a web counter so we can track SVN installs of ActiveScaffold
|
13
|
+
#
|
14
|
+
# How?
|
15
|
+
# We're making a GET request to errcount.com to update a simple counter. No data is transmitted.
|
16
|
+
#
|
17
|
+
# Why?
|
18
|
+
# So we can know how many people are using ActiveScaffold and modulate our level of effort accordingly.
|
19
|
+
# Despite numerous pleas our Googly overlords still only provide us with download stats for the zip distro.
|
20
|
+
#
|
21
|
+
# *Thanks for your understanding*
|
22
|
+
#
|
23
|
+
|
24
|
+
class ErrCounter # using errcount.com
|
25
|
+
require "net/http"
|
26
|
+
|
27
|
+
@@ACCOUNT_ID = 341
|
28
|
+
@@SITE_DOMAIN = 'installs.activescaffold.com'
|
29
|
+
|
30
|
+
def self.increment
|
31
|
+
@http = Net::HTTP.new("errcount.com")
|
32
|
+
resp, data = @http.get2("/ctr/#{@@ACCOUNT_ID}.js", {'Referer' => @@SITE_DOMAIN})
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
begin
|
37
|
+
ErrCounter.increment
|
38
|
+
rescue
|
39
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# Workaround a problem with script/plugin and http-based repos.
|
2
|
+
# See http://dev.rubyonrails.org/ticket/8189
|
3
|
+
Dir.chdir(Dir.getwd.sub(/vendor.*/, '')) do
|
4
|
+
|
5
|
+
##
|
6
|
+
## Copy over asset files (javascript/css/images) from the plugin directory to public/
|
7
|
+
##
|
8
|
+
|
9
|
+
def copy_files(source_path, destination_path, directory)
|
10
|
+
source, destination = File.join(directory, source_path), File.join(Rails.root, destination_path)
|
11
|
+
FileUtils.mkdir_p(destination) unless File.exist?(destination)
|
12
|
+
FileUtils.cp_r(Dir.glob(source+'/*.*'), destination)
|
13
|
+
end
|
14
|
+
|
15
|
+
directory = File.dirname(__FILE__)
|
16
|
+
|
17
|
+
copy_files("/public", "/public", directory)
|
18
|
+
|
19
|
+
available_frontends = Dir[File.join(directory, 'frontends', '*')].collect { |d| File.basename d }
|
20
|
+
[ :stylesheets, :javascripts, :images].each do |asset_type|
|
21
|
+
path = "/public/#{asset_type}/active_scaffold"
|
22
|
+
copy_files(path, path, directory)
|
23
|
+
|
24
|
+
File.open(File.join(Rails.root, path, 'DO_NOT_EDIT'), 'w') do |f|
|
25
|
+
f.puts "Any changes made to files in sub-folders will be lost."
|
26
|
+
f.puts "See http://activescaffold.com/tutorials/faq#custom-css."
|
27
|
+
end
|
28
|
+
|
29
|
+
available_frontends.each do |frontend|
|
30
|
+
source = "/frontends/#{frontend}/#{asset_type}/"
|
31
|
+
destination = "/public/#{asset_type}/active_scaffold/#{frontend}"
|
32
|
+
copy_files(source, destination, directory)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
@@ -0,0 +1,136 @@
|
|
1
|
+
# This module attempts to create permissions conventions for your ActiveRecord models. It supports english-based
|
2
|
+
# methods that let you restrict access per-model, per-record, per-column, per-action, and per-user. All at once.
|
3
|
+
#
|
4
|
+
# You may define instance methods in the following formats:
|
5
|
+
# def #{column}_authorized_for_#{action}?
|
6
|
+
# def #{column}_authorized?
|
7
|
+
# def authorized_for_#{action}?
|
8
|
+
#
|
9
|
+
# Your methods should allow for the following special cases:
|
10
|
+
# * cron scripts
|
11
|
+
# * guest users (or nil current_user objects)
|
12
|
+
module ActiveRecordPermissions
|
13
|
+
# ActiveRecordPermissions needs to know what method on your ApplicationController will return the current user,
|
14
|
+
# if available. This defaults to the :current_user method. You may configure this in your environment.rb if you
|
15
|
+
# have a different setup.
|
16
|
+
def self.current_user_method=(v); @@current_user_method = v; end
|
17
|
+
def self.current_user_method; @@current_user_method; end
|
18
|
+
@@current_user_method = :current_user
|
19
|
+
|
20
|
+
# Whether the default permission is permissive or not
|
21
|
+
# If set to true, then everything's allowed until configured otherwise
|
22
|
+
def self.default_permission=(v); @@default_permission = v; end
|
23
|
+
def self.default_permission; @@default_permission; end
|
24
|
+
@@default_permission = true
|
25
|
+
|
26
|
+
# AST Begin
|
27
|
+
# Actions allowed. If you create a customized action add it to this list.
|
28
|
+
def self.allowed_actions=(v); @@allowed_actions = v; end
|
29
|
+
def self.allowed_actions; @@allowed_actions; end
|
30
|
+
@@allowed_actions = [:create, :read, :update, :destroy, :print]
|
31
|
+
# AST End
|
32
|
+
|
33
|
+
# This is a module aimed at making the current_user available to ActiveRecord models for permissions.
|
34
|
+
module ModelUserAccess
|
35
|
+
module Controller
|
36
|
+
def self.included(base)
|
37
|
+
base.prepend_before_filter :assign_current_user_to_models
|
38
|
+
end
|
39
|
+
|
40
|
+
# We need to give the ActiveRecord classes a handle to the current user. We don't want to just pass the object,
|
41
|
+
# because the object may change (someone may log in or out). So we give ActiveRecord a proc that ties to the
|
42
|
+
# current_user_method on this ApplicationController.
|
43
|
+
def assign_current_user_to_models
|
44
|
+
ActiveRecord::Base.current_user_proc = proc {send(ActiveRecordPermissions.current_user_method)}
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
module Model
|
49
|
+
def self.included(base)
|
50
|
+
base.extend ClassMethods
|
51
|
+
end
|
52
|
+
|
53
|
+
module ClassMethods
|
54
|
+
# The proc to call that retrieves the current_user from the ApplicationController.
|
55
|
+
attr_accessor :current_user_proc
|
56
|
+
|
57
|
+
# Class-level access to the current user
|
58
|
+
def current_user
|
59
|
+
ActiveRecord::Base.current_user_proc.call if ActiveRecord::Base.current_user_proc
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
# Instance-level access to the current user
|
64
|
+
def current_user
|
65
|
+
self.class.current_user
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
module Permissions
|
71
|
+
def self.included(base)
|
72
|
+
base.extend ClassMethods
|
73
|
+
end
|
74
|
+
|
75
|
+
# A generic authorization query. This is what will be called programatically, since
|
76
|
+
# the actual permission methods can't be guaranteed to exist. And because we want to
|
77
|
+
# intelligently combine multiple applicable methods.
|
78
|
+
#
|
79
|
+
# options[:action] should be a CRUD verb (:create, :read, :update, :destroy)
|
80
|
+
# options[:column] should be the name of a model attribute
|
81
|
+
def authorized_for?(options = {})
|
82
|
+
# AST allowed_actions
|
83
|
+
raise ArgumentError, "unknown action #{options[:action]}" if options[:action] and !ActiveRecordPermissions.allowed_actions.include?(options[:action])
|
84
|
+
|
85
|
+
# column_authorized_for_action? has priority over other methods,
|
86
|
+
# you can disable an action and enable that action for a column
|
87
|
+
# (for example, disable update and enable inplace_edit in a column)
|
88
|
+
method = column_and_action_security_method(options[:column], options[:action])
|
89
|
+
return send(method) if method and respond_to?(method)
|
90
|
+
|
91
|
+
# collect the possibly-related methods that actually exist
|
92
|
+
methods = [
|
93
|
+
column_security_method(options[:column]),
|
94
|
+
action_security_method(options[:action]),
|
95
|
+
].compact.select {|m| respond_to?(m)}
|
96
|
+
|
97
|
+
# if any method returns false, then return false
|
98
|
+
return false if methods.any? {|m| !send(m)}
|
99
|
+
|
100
|
+
# if any method actually exists then it must've returned true, so return true
|
101
|
+
return true unless methods.empty?
|
102
|
+
|
103
|
+
# if no method exists, return the default permission
|
104
|
+
return ActiveRecordPermissions.default_permission
|
105
|
+
end
|
106
|
+
|
107
|
+
# Because any class-level queries get delegated to the instance level via a new record,
|
108
|
+
# it's useful to know when the authorization query is meant for a specific record or not.
|
109
|
+
# But using new_record? is confusing, even though accurate. So this is basically just a wrapper.
|
110
|
+
def existing_record_check?
|
111
|
+
!new_record?
|
112
|
+
end
|
113
|
+
|
114
|
+
module ClassMethods
|
115
|
+
# Class level just delegates to instance level
|
116
|
+
def authorized_for?(*args)
|
117
|
+
@authorized_for_delegatee ||= self.new
|
118
|
+
@authorized_for_delegatee.authorized_for?(*args)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
private
|
123
|
+
|
124
|
+
def column_security_method(column)
|
125
|
+
"#{column}_authorized?" if column
|
126
|
+
end
|
127
|
+
|
128
|
+
def action_security_method(action)
|
129
|
+
"authorized_for_#{action}?" if action
|
130
|
+
end
|
131
|
+
|
132
|
+
def column_and_action_security_method(column, action)
|
133
|
+
"#{column}_authorized_for_#{action}?" if column and action
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
@@ -0,0 +1,215 @@
|
|
1
|
+
module ActiveScaffold
|
2
|
+
class ControllerNotFound < RuntimeError; end
|
3
|
+
class DependencyFailure < RuntimeError; end
|
4
|
+
class MalformedConstraint < RuntimeError; end
|
5
|
+
class RecordNotAllowed < SecurityError; end
|
6
|
+
class ActionNotAllowed < SecurityError; end
|
7
|
+
class ReverseAssociationRequired < RuntimeError; end
|
8
|
+
|
9
|
+
def self.included(base)
|
10
|
+
base.extend(ClassMethods)
|
11
|
+
base.module_eval do
|
12
|
+
# TODO: these should be in actions/core
|
13
|
+
before_filter :handle_user_settings
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.set_defaults(&block)
|
18
|
+
ActiveScaffold::Config::Core.configure &block
|
19
|
+
end
|
20
|
+
|
21
|
+
def active_scaffold_config
|
22
|
+
self.class.active_scaffold_config
|
23
|
+
end
|
24
|
+
|
25
|
+
def active_scaffold_config_for(klass)
|
26
|
+
self.class.active_scaffold_config_for(klass)
|
27
|
+
end
|
28
|
+
|
29
|
+
def active_scaffold_session_storage
|
30
|
+
id = params[:eid] || params[:controller]
|
31
|
+
session_index = "as:#{id}"
|
32
|
+
session[session_index] ||= {}
|
33
|
+
session[session_index]
|
34
|
+
end
|
35
|
+
|
36
|
+
# at some point we need to pass the session and params into config. we'll just take care of that before any particular action occurs by passing those hashes off to the UserSettings class of each action.
|
37
|
+
def handle_user_settings
|
38
|
+
if self.class.uses_active_scaffold?
|
39
|
+
active_scaffold_config.actions.each do |action_name|
|
40
|
+
conf_instance = active_scaffold_config.send(action_name) rescue next
|
41
|
+
next if conf_instance.class::UserSettings == ActiveScaffold::Config::Base::UserSettings # if it hasn't been extended, skip it
|
42
|
+
active_scaffold_session_storage[action_name] ||= {}
|
43
|
+
conf_instance.user = conf_instance.class::UserSettings.new(conf_instance, active_scaffold_session_storage[action_name], params)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
module ClassMethods
|
49
|
+
def active_scaffold(model_id = nil, &block)
|
50
|
+
# initialize bridges here
|
51
|
+
ActiveScaffold::Bridge.run_all
|
52
|
+
|
53
|
+
# converts Foo::BarController to 'bar' and FooBarsController to 'foo_bar' and AddressController to 'address'
|
54
|
+
model_id = self.to_s.split('::').last.sub(/Controller$/, '').pluralize.singularize.underscore unless model_id
|
55
|
+
|
56
|
+
# run the configuration
|
57
|
+
@active_scaffold_config = ActiveScaffold::Config::Core.new(model_id)
|
58
|
+
@active_scaffold_config_block = block
|
59
|
+
self.links_for_associations
|
60
|
+
self.active_scaffold_superclasses_blocks.each {|superblock| self.active_scaffold_config.configure &superblock}
|
61
|
+
self.active_scaffold_config.configure &block if block_given?
|
62
|
+
self.active_scaffold_config._configure_sti unless self.active_scaffold_config.sti_children.nil?
|
63
|
+
self.active_scaffold_config._load_action_columns
|
64
|
+
|
65
|
+
# defines the attribute read methods on the model, so record.send() doesn't find protected/private methods instead
|
66
|
+
klass = self.active_scaffold_config.model
|
67
|
+
klass.define_attribute_methods unless klass.generated_methods?
|
68
|
+
|
69
|
+
@active_scaffold_overrides = []
|
70
|
+
ActionController::Base.view_paths.each do |dir|
|
71
|
+
active_scaffold_overrides_dir = File.join(dir,"active_scaffold_overrides")
|
72
|
+
@active_scaffold_overrides << active_scaffold_overrides_dir if File.exists?(active_scaffold_overrides_dir)
|
73
|
+
end
|
74
|
+
@active_scaffold_overrides.uniq! # Fix rails duplicating some view_paths
|
75
|
+
@active_scaffold_frontends = []
|
76
|
+
if active_scaffold_config.frontend.to_sym != :default
|
77
|
+
active_scaffold_custom_frontend_path = File.join(Rails.root, 'vendor', 'plugins', ActiveScaffold::Config::Core.plugin_directory, 'frontends', active_scaffold_config.frontend.to_s , 'views')
|
78
|
+
@active_scaffold_frontends << active_scaffold_custom_frontend_path
|
79
|
+
end
|
80
|
+
active_scaffold_default_frontend_path = File.join(Rails.root, 'vendor', 'plugins', ActiveScaffold::Config::Core.plugin_directory, 'frontends', 'default' , 'views')
|
81
|
+
@active_scaffold_frontends << active_scaffold_default_frontend_path
|
82
|
+
@active_scaffold_custom_paths = []
|
83
|
+
|
84
|
+
# include the rest of the code into the controller: the action core and the included actions
|
85
|
+
module_eval do
|
86
|
+
include ActiveScaffold::Finder
|
87
|
+
include ActiveScaffold::Constraints
|
88
|
+
include ActiveScaffold::AttributeParams
|
89
|
+
include ActiveScaffold::Actions::Core
|
90
|
+
active_scaffold_config.actions.each do |mod|
|
91
|
+
name = mod.to_s.camelize
|
92
|
+
include "ActiveScaffold::Actions::#{name}".constantize
|
93
|
+
|
94
|
+
# sneak the action links from the actions into the main set
|
95
|
+
if link = active_scaffold_config.send(mod).link rescue nil
|
96
|
+
active_scaffold_config.action_links << link
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
self.active_scaffold_config._add_sti_create_links if self.active_scaffold_config.add_sti_create_links?
|
101
|
+
end
|
102
|
+
|
103
|
+
# Create the automatic column links. Note that this has to happen when configuration is *done*, because otherwise the Nested module could be disabled. Actually, it could still be disabled later, couldn't it?
|
104
|
+
def links_for_associations
|
105
|
+
return unless active_scaffold_config.actions.include? :list and active_scaffold_config.actions.include? :nested
|
106
|
+
active_scaffold_config.columns.each do |column|
|
107
|
+
next unless column.link.nil? and column.autolink?
|
108
|
+
if column.plural_association?
|
109
|
+
# note: we can't create nested scaffolds on :through associations because there's no reverse association.
|
110
|
+
column.set_link('nested', :parameters => {:associations => column.name.to_sym}, :html_options => {:class => column.name}) #unless column.through_association?
|
111
|
+
elsif column.polymorphic_association?
|
112
|
+
# note: we can't create inline forms on singular polymorphic associations
|
113
|
+
column.clear_link
|
114
|
+
else
|
115
|
+
model = column.association.klass
|
116
|
+
begin
|
117
|
+
controller = active_scaffold_controller_for(model)
|
118
|
+
rescue ActiveScaffold::ControllerNotFound
|
119
|
+
next
|
120
|
+
end
|
121
|
+
|
122
|
+
actions = controller.active_scaffold_config.actions
|
123
|
+
column.actions_for_association_links.delete :new unless actions.include? :create
|
124
|
+
column.actions_for_association_links.delete :edit unless actions.include? :update
|
125
|
+
column.actions_for_association_links.delete :show unless actions.include? :show
|
126
|
+
column.set_link(:none, :controller => controller.controller_path, :crud_type => nil, :html_options => {:class => column.name})
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
def add_active_scaffold_path(path)
|
132
|
+
@active_scaffold_paths = nil # Force active_scaffold_paths to rebuild
|
133
|
+
@active_scaffold_custom_paths << path
|
134
|
+
end
|
135
|
+
|
136
|
+
def add_active_scaffold_override_path(path)
|
137
|
+
@active_scaffold_paths = nil # Force active_scaffold_paths to rebuild
|
138
|
+
@active_scaffold_overrides.unshift path
|
139
|
+
end
|
140
|
+
|
141
|
+
def active_scaffold_paths
|
142
|
+
return @active_scaffold_paths unless @active_scaffold_paths.nil?
|
143
|
+
|
144
|
+
@active_scaffold_paths = ActionView::PathSet.new
|
145
|
+
@active_scaffold_paths.concat @active_scaffold_overrides unless @active_scaffold_overrides.nil?
|
146
|
+
@active_scaffold_paths.concat @active_scaffold_custom_paths unless @active_scaffold_custom_paths.nil?
|
147
|
+
@active_scaffold_paths.concat @active_scaffold_frontends unless @active_scaffold_frontends.nil?
|
148
|
+
@active_scaffold_paths
|
149
|
+
end
|
150
|
+
|
151
|
+
def active_scaffold_config
|
152
|
+
if @active_scaffold_config.nil?
|
153
|
+
self.superclass.active_scaffold_config if self.superclass.respond_to? :active_scaffold_config
|
154
|
+
else
|
155
|
+
@active_scaffold_config
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
def active_scaffold_config_block
|
160
|
+
@active_scaffold_config_block
|
161
|
+
end
|
162
|
+
|
163
|
+
def active_scaffold_superclasses_blocks
|
164
|
+
blocks = []
|
165
|
+
klass = self.superclass
|
166
|
+
while klass.respond_to? :active_scaffold_superclasses_blocks
|
167
|
+
blocks << klass.active_scaffold_config_block
|
168
|
+
klass = klass.superclass
|
169
|
+
end
|
170
|
+
blocks.compact.reverse
|
171
|
+
end
|
172
|
+
|
173
|
+
def active_scaffold_config_for(klass)
|
174
|
+
begin
|
175
|
+
controller = active_scaffold_controller_for(klass)
|
176
|
+
rescue ActiveScaffold::ControllerNotFound
|
177
|
+
config = ActiveScaffold::Config::Core.new(klass)
|
178
|
+
config._load_action_columns
|
179
|
+
config
|
180
|
+
else
|
181
|
+
controller.active_scaffold_config
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
# Tries to find a controller for the given ActiveRecord model.
|
186
|
+
# Searches in the namespace of the current controller for singular and plural versions of the conventional "#{model}Controller" syntax.
|
187
|
+
# You may override this method to customize the search routine.
|
188
|
+
def active_scaffold_controller_for(klass)
|
189
|
+
namespace = self.to_s.split('::')[0...-1].join('::') + '::'
|
190
|
+
error_message = []
|
191
|
+
["#{klass.to_s.underscore.pluralize}", "#{klass.to_s.underscore.pluralize.singularize}"].each do |controller_name|
|
192
|
+
begin
|
193
|
+
controller = "#{namespace}#{controller_name.camelize}Controller".constantize
|
194
|
+
rescue NameError => error
|
195
|
+
# Only rescue NameError associated with the controller constant not existing - not other compile errors
|
196
|
+
if error.message["uninitialized constant #{controller}"]
|
197
|
+
error_message << "#{namespace}#{controller_name.camelize}Controller"
|
198
|
+
next
|
199
|
+
else
|
200
|
+
raise
|
201
|
+
end
|
202
|
+
end
|
203
|
+
raise ActiveScaffold::ControllerNotFound, "#{controller} missing ActiveScaffold", caller unless controller.uses_active_scaffold?
|
204
|
+
# AST I ran into a situation where the .to_s == .to_s was necessary
|
205
|
+
raise ActiveScaffold::ControllerNotFound, "ActiveScaffold on #{controller} is not for #{klass} model.", caller unless controller.active_scaffold_config.model.to_s == klass.to_s
|
206
|
+
return controller
|
207
|
+
end
|
208
|
+
raise ActiveScaffold::ControllerNotFound, "Could not find " + error_message.join(" or "), caller
|
209
|
+
end
|
210
|
+
|
211
|
+
def uses_active_scaffold?
|
212
|
+
!active_scaffold_config.nil?
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|