zena 1.2.7 → 1.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +80 -25
- data/Rakefile +2 -2
- data/app/controllers/columns_controller.rb +2 -2
- data/app/controllers/nodes_controller.rb +22 -29
- data/app/controllers/user_sessions_controller.rb +35 -10
- data/app/controllers/users_controller.rb +2 -2
- data/app/controllers/versions_controller.rb +2 -2
- data/app/models/group.rb +15 -1
- data/app/models/node.rb +109 -8
- data/app/models/role.rb +4 -0
- data/app/models/site.rb +64 -58
- data/app/models/template.rb +1 -1
- data/app/models/user.rb +135 -29
- data/app/models/user_session.rb +0 -1
- data/app/models/virtual_class.rb +11 -6
- data/app/views/columns/_form.html.erb +3 -1
- data/app/views/columns/_li.html.erb +1 -1
- data/app/views/columns/create.rjs +1 -1
- data/app/views/groups/_form.rhtml +16 -13
- data/app/views/relations/_form.erb +18 -6
- data/app/views/sites/_form.erb +12 -6
- data/app/views/users/_form.rhtml +23 -8
- data/app/views/users/_li.rhtml +14 -3
- data/app/views/users/index.rhtml +1 -1
- data/app/views/virtual_classes/_form.erb +12 -2
- data/app/views/zafu/default/Node-+login.zafu +8 -1
- data/app/views/zafu/default/Node-+search.zafu +1 -1
- data/bricks/acls/lib/bricks/acls.rb +1 -0
- data/bricks/acls/zena/migrate/20130903150356_longer_names_for_acl.rb +9 -0
- data/bricks/acls/zena/test/integration/acl_integration_test.rb +2 -2
- data/bricks/currency/lib/bricks/currency.rb +120 -0
- data/bricks/currency/zena/test/unit/currency_test.rb +43 -0
- data/bricks/fs_skin/lib/bricks/fs_skin.rb +1 -1
- data/bricks/fs_skin/zena/skins/blog/Node-+search.zafu +1 -1
- data/bricks/fs_skin/zena/skins/blog/Node.zafu +1 -1
- data/bricks/fs_skin/zena/test/unit/fs_skin_view_test.rb +35 -0
- data/bricks/pdf/lib/bricks/pdf.rb +1 -1
- data/bricks/sphinx/lib/bricks/sphinx.rb +2 -0
- data/bricks/sphinx/zena/init.rb +14 -0
- data/bricks/tags/zena/test/zafu/tags.yml +5 -1
- data/bricks/worker/lib/bricks/worker.rb +3 -2
- data/bricks/zena/zena/migrate/20130829093753_add_versioned_flag_to_column.rb +10 -0
- data/bricks/zena/zena/migrate/20130903084909_count_login_attempts.rb +11 -0
- data/bricks/zena/zena/migrate/20131104153126_index_fullpath.rb +10 -0
- data/bricks/zena/zena/migrate/20131104210011_rebuild_fullpath_after_change.rb +10 -0
- data/bricks/zena/zena/migrate/20131105160420_add_skin_id_to_sites.rb +9 -0
- data/bricks/zena/zena/migrate/20131105175822_add_profile_to_users.rb +11 -0
- data/bricks/zena/zena/migrate/20140213120038_fix_idx_scope.rb +13 -0
- data/bricks/zena/zena/migrate/20140628140247_add_site_readonly.rb +9 -0
- data/config/bricks.yml +8 -4
- data/config/gems.yml +5 -3
- data/db/init/base/skins/default/Node-+login.zafu +8 -1
- data/db/init/base/skins/default/Node-+search.zafu +1 -1
- data/lib/bricks/loader.rb +5 -5
- data/lib/gettext_strings.rb +3 -0
- data/lib/tasks/zena.rake +25 -22
- data/lib/zafu/process/context.rb +4 -0
- data/lib/zena/acts/secure_node.rb +3 -3
- data/lib/zena/app.rb +1 -0
- data/lib/zena/deploy.rb +1 -1
- data/lib/zena/deploy/template.rb +1 -1
- data/lib/zena/foxy_parser.rb +5 -2
- data/lib/zena/info.rb +1 -1
- data/lib/zena/site_worker.rb +2 -2
- data/lib/zena/test_controller.rb +5 -2
- data/lib/zena/use/action.rb +9 -2
- data/lib/zena/use/ajax.rb +20 -4
- data/lib/zena/use/ancestry.rb +89 -15
- data/lib/zena/use/authlogic.rb +8 -2
- data/lib/zena/use/context.rb +1 -0
- data/lib/zena/use/display.rb +1 -97
- data/lib/zena/use/forms.rb +28 -8
- data/lib/zena/use/html_tags.rb +16 -7
- data/lib/zena/use/i18n.rb +1 -1
- data/lib/zena/use/prop_eval.rb +6 -1
- data/lib/zena/use/query_node.rb +69 -4
- data/lib/zena/use/recursion.rb +1 -1
- data/lib/zena/use/refactor.rb +5 -2
- data/lib/zena/use/relations.rb +1 -0
- data/lib/zena/use/rendering.rb +7 -4
- data/lib/zena/use/test_helper.rb +8 -4
- data/lib/zena/use/upload.rb +14 -0
- data/lib/zena/use/urls.rb +39 -23
- data/lib/zena/use/version_hash.rb +5 -2
- data/lib/zena/use/workflow.rb +116 -70
- data/lib/zena/use/zafu_eval.rb +41 -0
- data/lib/zena/use/zafu_safe_definitions.rb +1 -0
- data/lib/zena/use/zafu_templates.rb +32 -26
- data/lib/zena/use/zazen.rb +8 -7
- data/locale/app.pot +5 -1
- data/locale/de/LC_MESSAGES/zena.mo +0 -0
- data/locale/de/zena.po +385 -281
- data/locale/en/LC_MESSAGES/zena.mo +0 -0
- data/locale/en/zena.po +378 -271
- data/locale/fr/LC_MESSAGES/zena.mo +0 -0
- data/locale/fr/zena.po +387 -272
- data/locale/it/LC_MESSAGES/zena.mo +0 -0
- data/locale/it/zena.po +433 -404
- data/locale/zena.pot +362 -268
- data/public/javascripts/grid.js +280 -104
- data/public/javascripts/zena.js +43 -15
- data/public/stylesheets/admin.css +8 -2
- data/public/stylesheets/grid.css +5 -2
- data/public/stylesheets/popup.css +1 -1
- data/test/fixtures/files/TestNode.zafu +51 -0
- data/test/functional/nodes_controller_test.rb +20 -5
- data/test/functional/user_sessions_controller_test.rb +41 -6
- data/test/functional/users_controller_test.rb +1 -2
- data/test/integration/navigation_test.rb +22 -4
- data/test/integration/query_node/basic.yml +7 -0
- data/test/integration/query_node/complex.yml +1 -1
- data/test/integration/query_node/errors.yml +1 -1
- data/test/integration/query_node/filters.yml +34 -1
- data/test/integration/query_node/relations.yml +6 -13
- data/test/integration/query_node_test.rb +22 -3
- data/test/integration/zafu_compiler/action.yml +1 -1
- data/test/integration/zafu_compiler/alias_site.yml +52 -0
- data/test/integration/zafu_compiler/complex.yml +1 -1
- data/test/integration/zafu_compiler/complex_ok.yml +5 -5
- data/test/integration/zafu_compiler/context.yml +1 -1
- data/test/integration/zafu_compiler/display.yml +56 -5
- data/test/integration/zafu_compiler/forms.yml +35 -2
- data/test/integration/zafu_compiler/meta.yml +4 -0
- data/test/integration/zafu_compiler/rubyless.yml +1 -1
- data/test/integration/zafu_compiler/safe_definitions.yml +4 -0
- data/test/integration/zafu_compiler/security.yml +10 -0
- data/test/integration/zafu_compiler/site.yml +5 -1
- data/test/integration/zafu_compiler/urls.yml +8 -2
- data/test/integration/zafu_compiler/zafu_attributes.yml +2 -1
- data/test/integration/zafu_compiler/zazen.yml +4 -0
- data/test/integration/zafu_compiler_test.rb +47 -4
- data/test/selenium/Grid/grid1.rsel +8 -8
- data/test/sites/complex/sites.yml +2 -2
- data/test/sites/complex/users.yml +1 -0
- data/test/sites/zena/columns.yml +4 -0
- data/test/sites/zena/sites.yml +1 -0
- data/test/sites/zena/users.yml +1 -0
- data/test/unit/node_test.rb +53 -5
- data/test/unit/note_test.rb +1 -1
- data/test/unit/relation_proxy_test.rb +20 -0
- data/test/unit/role_test.rb +2 -0
- data/test/unit/site_test.rb +28 -6
- data/test/unit/user_test.rb +332 -1
- data/test/unit/virtual_class_test.rb +55 -0
- data/test/unit/workflow_test.rb +175 -0
- data/test/unit/zena/use/ancestry_test.rb +52 -10
- data/test/unit/zena/use/prop_eval_test.rb +44 -0
- data/test/unit/zena/use/rendering_test.rb +48 -2
- data/test/unit/zena/use/upload_test.rb +15 -13
- data/test/unit/zena/use/urls_test.rb +1 -0
- data/vendor/plugins/ar_mysql_full_text/lib/ar_mysql_full_text.rb +39 -25
- data/zena.gemspec +69 -307
- metadata +143 -368
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run 2.tmCommand +0 -24
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Context.tmCommand +0 -58
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Focused Should.tmCommand +0 -88
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run.tmCommand +0 -27
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/YAML to Shoulda.tmCommand +0 -23
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Context.tmPreferences +0 -19
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Should.tmPreferences +0 -19
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory attributes for.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory build.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define with class.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_next.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_sequence.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_bad_value.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_contains.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_does_not_contain.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_good_value.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_same_elements.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_save.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_sent_email.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_valid.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/association.tmSnippet +0 -17
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/attribute.tmSnippet +0 -17
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/before_should block.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block get.tmSnippet +0 -22
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block post.tmSnippet +0 -23
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block with setup.tmSnippet +0 -25
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/setup.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block with before proc.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_allow_values_for.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_assign_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful denied.tmSnippet +0 -20
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful.tmSnippet +0 -20
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_belong_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change by.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change from to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_at_least.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_in_range.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_is.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_value_in_range.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_eventually.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_filter_params.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_and_belong_to_many.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_class_methods.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_column.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_columns.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_index.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_indices.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_instance_methods.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_many.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_named_scope.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_one.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_readonly_attributes.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_mass_assignment_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_values_for.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_assign_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_change.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_set_the_flash.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_redirect_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_a_form.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_template.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_with_layout.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_without_layout.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with_content_type.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_return_from_session.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_route.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_set_the_flash_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_acceptance_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_numericality_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_presence_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of with scope.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/catch_exception.rb +0 -39
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/run_script.rb +0 -104
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/stdin_dialog.rb +0 -14
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/test.rb +0 -17
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/todo.txt +0 -13
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/bin/yaml_to_shoulda.rb +0 -25
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Syntaxes/Ruby on Rails (Shoulda).tmLanguage +0 -166
- data/vendor/TextMate/Ruby Shoulda.tmbundle/info.plist +0 -304
- data/vendor/TextMate/Zena.tmbundle/Commands/Run all yaml tests.tmCommand +0 -37
- data/vendor/TextMate/Zena.tmbundle/Commands/Run focused yaml test.tmCommand +0 -52
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/catch_exception.rb +0 -39
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/run_script.rb +0 -118
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/stdin_dialog.rb +0 -14
- data/vendor/TextMate/Zena.tmbundle/info.plist +0 -17
- data/vendor/plugins/selenium-on-rails/CHANGELOG +0 -125
- data/vendor/plugins/selenium-on-rails/LICENSE-2.0.txt +0 -202
- data/vendor/plugins/selenium-on-rails/README.md +0 -202
- data/vendor/plugins/selenium-on-rails/Rakefile +0 -38
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumController.html +0 -265
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumHelper.html +0 -148
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails.html +0 -126
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/FixtureLoader.html +0 -231
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/PartialsSupport.html +0 -195
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Paths.html +0 -295
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/RSelenese.html +0 -219
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Renderer.html +0 -156
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Selenese.html +0 -179
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/SuiteRenderer.html +0 -223
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilder.html +0 -441
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderAccessors.html +0 -3098
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderActions.html +0 -2080
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderUserAccessors.html +0 -116
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderUserActions.html +0 -116
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRailsConfig.html +0 -150
- data/vendor/plugins/selenium-on-rails/doc/files/CHANGELOG.html +0 -422
- data/vendor/plugins/selenium-on-rails/doc/files/README.html +0 -321
- data/vendor/plugins/selenium-on-rails/doc/files/lib/controllers/selenium_controller_rb.html +0 -108
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_helper_rb.html +0 -101
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/acceptance_test_runner_rb.html +0 -222
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/fixture_loader_rb.html +0 -109
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/partials_support_rb.html +0 -111
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/paths_rb.html +0 -101
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/renderer_rb.html +0 -101
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/rselenese_rb.html +0 -118
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/selenese_rb.html +0 -101
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/suite_renderer_rb.html +0 -101
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_accessors_rb.html +0 -114
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_actions_rb.html +0 -113
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_rb.html +0 -120
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails_config_rb.html +0 -108
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails_rb.html +0 -115
- data/vendor/plugins/selenium-on-rails/doc/fr_class_index.html +0 -42
- data/vendor/plugins/selenium-on-rails/doc/fr_file_index.html +0 -43
- data/vendor/plugins/selenium-on-rails/doc/fr_method_index.html +0 -182
- data/vendor/plugins/selenium-on-rails/doc/index.html +0 -24
- data/vendor/plugins/selenium-on-rails/doc/rdoc-style.css +0 -208
- data/vendor/plugins/selenium-on-rails/generators/selenium/USAGE +0 -19
- data/vendor/plugins/selenium-on-rails/generators/selenium/selenium_generator.rb +0 -50
- data/vendor/plugins/selenium-on-rails/generators/selenium/templates/rhtml.rhtml +0 -16
- data/vendor/plugins/selenium-on-rails/generators/selenium/templates/rselenese.rhtml +0 -14
- data/vendor/plugins/selenium-on-rails/generators/selenium/templates/selenese.rhtml +0 -11
- data/vendor/plugins/selenium-on-rails/init.rb +0 -15
- data/vendor/plugins/selenium-on-rails/lib/controllers/selenium_controller.rb +0 -122
- data/vendor/plugins/selenium-on-rails/lib/controllers/switch_environment_controller.rb +0 -16
- data/vendor/plugins/selenium-on-rails/lib/selenium_helper.rb +0 -8
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails.rb +0 -11
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/acceptance_test_runner.rb +0 -215
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/fixture_loader.rb +0 -57
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/partials_support.rb +0 -36
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/paths.rb +0 -61
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/renderer.rb +0 -20
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/rselenese.rb +0 -44
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/selenese.rb +0 -87
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/suite_renderer.rb +0 -56
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder.rb +0 -116
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_accessors.rb +0 -1002
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_actions.rb +0 -514
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_user_accessors.rb.example +0 -91
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_user_actions.rb.example +0 -24
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails_config.rb +0 -30
- data/vendor/plugins/selenium-on-rails/lib/views/layouts/layout.rhtml +0 -18
- data/vendor/plugins/selenium-on-rails/lib/views/record.rhtml +0 -5
- data/vendor/plugins/selenium-on-rails/lib/views/selenium_helper.rb +0 -9
- data/vendor/plugins/selenium-on-rails/lib/views/setup.rhtml +0 -67
- data/vendor/plugins/selenium-on-rails/lib/views/test_suite.rhtml +0 -26
- data/vendor/plugins/selenium-on-rails/routes.rb +0 -24
- data/vendor/plugins/selenium-on-rails/selenium-core/Blank.html +0 -7
- data/vendor/plugins/selenium-on-rails/selenium-core/InjectedRemoteRunner.html +0 -8
- data/vendor/plugins/selenium-on-rails/selenium-core/RemoteRunner.html +0 -110
- data/vendor/plugins/selenium-on-rails/selenium-core/SeleniumLog.html +0 -109
- data/vendor/plugins/selenium-on-rails/selenium-core/TestPrompt.html +0 -145
- data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner-splash.html +0 -55
- data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner.hta +0 -177
- data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner.html +0 -177
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/butmin.gif +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/butplus.gif +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/domviewer.css +0 -298
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/domviewer.html +0 -16
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/selenium-domviewer.js +0 -205
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/all.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/continue.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/continue_disabled.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/pause.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/pause_disabled.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/selected.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/step.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/step_disabled.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/iedoc-core.xml +0 -1759
- data/vendor/plugins/selenium-on-rails/selenium-core/iedoc.xml +0 -1800
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/cssQuery-p.js +0 -6
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-level2.js +0 -142
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-level3.js +0 -150
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-standard.js +0 -53
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery.js +0 -356
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/prototype.js +0 -2006
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/builder.js +0 -101
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/controls.js +0 -815
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/dragdrop.js +0 -915
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/effects.js +0 -958
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/scriptaculous.js +0 -47
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/slider.js +0 -283
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/unittest.js +0 -383
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/snapsie.js +0 -91
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/find_matching_child.js +0 -69
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/htmlutils.js +0 -1616
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/injection.html +0 -72
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-api.js +0 -3184
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-browserbot.js +0 -2300
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-browserdetect.js +0 -153
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-commandhandlers.js +0 -377
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-executionloop.js +0 -175
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-logging.js +0 -148
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-remoterunner.js +0 -695
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-testrunner.js +0 -1362
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-version.js +0 -5
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-doc.html +0 -803
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-element.js +0 -1537
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-map-sample.js +0 -979
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/user-extensions.js +0 -3
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/user-extensions.js.sample +0 -75
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/xmlextras.js +0 -153
- data/vendor/plugins/selenium-on-rails/selenium-core/selenium-logo.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/selenium-test.css +0 -43
- data/vendor/plugins/selenium-on-rails/selenium-core/selenium.css +0 -316
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/dom.js +0 -566
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/javascript-xpath-0.1.11.js +0 -2816
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/util.js +0 -549
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/xmltoken.js +0 -149
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/xpath.js +0 -2450
- data/vendor/plugins/selenium-on-rails/tasks/test_acceptance.rake +0 -8
- data/vendor/plugins/selenium-on-rails/test/fixtures/config.yml +0 -37
- data/vendor/plugins/selenium-on-rails/test/fixtures/selenium.yml +0 -27
- data/vendor/plugins/selenium-on-rails/test/paths_test.rb +0 -72
- data/vendor/plugins/selenium-on-rails/test/renderer_test.rb +0 -157
- data/vendor/plugins/selenium-on-rails/test/rselenese_test.rb +0 -708
- data/vendor/plugins/selenium-on-rails/test/selenese_test.rb +0 -242
- data/vendor/plugins/selenium-on-rails/test/selenium_controller_test.rb +0 -67
- data/vendor/plugins/selenium-on-rails/test/selenium_on_rails_config_test.rb +0 -43
- data/vendor/plugins/selenium-on-rails/test/selenium_support_test.rb +0 -35
- data/vendor/plugins/selenium-on-rails/test/setup_test.rb +0 -31
- data/vendor/plugins/selenium-on-rails/test/suite_renderer_test.rb +0 -109
- data/vendor/plugins/selenium-on-rails/test/switch_environment_controller_test.rb +0 -17
- data/vendor/plugins/selenium-on-rails/test/test_builder_functions_authortest.rb +0 -51
- data/vendor/plugins/selenium-on-rails/test/test_helper.rb +0 -101
- data/vendor/plugins/selenium-on-rails/test_data/_partial.rsel +0 -1
- data/vendor/plugins/selenium-on-rails/test_data/own_layout.html +0 -12
- data/vendor/plugins/selenium-on-rails/test_data/partials/_html.html +0 -6
- data/vendor/plugins/selenium-on-rails/test_data/partials/_nesting.rsel +0 -2
- data/vendor/plugins/selenium-on-rails/test_data/partials/_rhtml.rhtml +0 -6
- data/vendor/plugins/selenium-on-rails/test_data/partials/_rsel.rsel +0 -1
- data/vendor/plugins/selenium-on-rails/test_data/partials/_sel.sel +0 -5
- data/vendor/plugins/selenium-on-rails/test_data/partials/all_partials.rsel +0 -5
- data/vendor/plugins/selenium-on-rails/test_data/rhtml.rhtml +0 -7
- data/vendor/plugins/selenium-on-rails/test_data/rselenese.rsel +0 -8
- data/vendor/plugins/selenium-on-rails/test_data/selenese.sel +0 -7
- data/vendor/plugins/selenium-on-rails/test_data/suite_one/subsuite/suite_one_subsuite_testcase.sel +0 -1
- data/vendor/plugins/selenium-on-rails/test_data/suite_one/suite_one_testcase1.sel +0 -1
- data/vendor/plugins/selenium-on-rails/test_data/suite_one/suite_one_testcase2.sel +0 -1
- data/vendor/plugins/selenium-on-rails/test_data/suite_two/suite_two_testcase.sel +0 -1
data/app/models/user_session.rb
CHANGED
data/app/models/virtual_class.rb
CHANGED
@@ -662,9 +662,12 @@ class VirtualClass < Role
|
|
662
662
|
Zena::Db.execute "UPDATE nodes SET kpath = '#{new_kpath}' WHERE vclass_id = #{self.id} AND site_id = #{current_site.id}"
|
663
663
|
Zena::Db.execute "UPDATE roles SET kpath = '#{new_kpath}' WHERE kpath = '#{old_kpath}' AND site_id = #{current_site.id} AND (type = 'Role' or type IS NULL)"
|
664
664
|
# ========================================= Update templates
|
665
|
+
# Find Template through IdxTemplate
|
665
666
|
idx_templates = IdxTemplate.all(
|
666
667
|
:conditions => ['tkpath = ? AND site_id = ? AND node_id IS NOT NULL', old_kpath, site_id]
|
667
668
|
)
|
669
|
+
# This is for fs_skin
|
670
|
+
Zena::Db.execute "UPDATE idx_templates SET tkpath = '#{new_kpath}' WHERE tkpath = '#{old_kpath}' AND site_id = #{current_site.id}"
|
668
671
|
|
669
672
|
if !idx_templates.empty?
|
670
673
|
# update related templates
|
@@ -683,12 +686,14 @@ class VirtualClass < Role
|
|
683
686
|
end
|
684
687
|
|
685
688
|
# ========================================= Update relations
|
686
|
-
Relation
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
689
|
+
secure(Relation) do
|
690
|
+
Relation.all(
|
691
|
+
:conditions => ['source_kpath = ? or target_kpath = ?', old_kpath, old_kpath]
|
692
|
+
).each do |rel|
|
693
|
+
rel.source_kpath = new_kpath if rel.source_kpath == old_kpath
|
694
|
+
rel.target_kpath = new_kpath if rel.target_kpath == old_kpath
|
695
|
+
rel.save!
|
696
|
+
end
|
692
697
|
end
|
693
698
|
|
694
699
|
# ========================================= Update sub-classes
|
@@ -18,16 +18,18 @@
|
|
18
18
|
<td class='label'><%= _("type")%></td>
|
19
19
|
<td class='label'><%= _("name")%></td>
|
20
20
|
<td class='label'><%= _("index")%></td>
|
21
|
+
<td class='label'><label for='column_versioned'><%= _("vers.")%></label></td>
|
21
22
|
</tr>
|
22
23
|
<tr class='ruby'>
|
23
24
|
<td><span class='constant'><%= select('column', 'role_id', Column.roles_for_form ) %></span></td>
|
24
25
|
<td><span class='text'><%= select('column', 'ptype', Column::TYPES_FOR_FORM ) %></span></td>
|
25
26
|
<td><%= text_field('column', 'name', :size=>15 ) %></td>
|
26
27
|
<td><span class='text'><%= select_tag "column[index]", grouped_options_for_select(Column.indices_for_form, @column.index, '') %></span></td>
|
28
|
+
<td><span class='text'><%= check_box('column', 'versioned', {}, 1, 0) %></span></td>
|
27
29
|
</tr>
|
28
30
|
<tr>
|
29
31
|
<td class='label'><%= _("comment") %></td>
|
30
|
-
<td colspan='
|
32
|
+
<td colspan='4'>
|
31
33
|
<%= text_area('column', 'comment', :rows => 2, :cols => 50) %>
|
32
34
|
</td>
|
33
35
|
</tr>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
if @column.errors.empty?
|
2
2
|
page.insert_html :before, 'add_column', :partial=>'columns/li', :collection=>[@column]
|
3
|
-
@column = Column.new(:role_id => @column.role_id, :ptype => @column.ptype)
|
3
|
+
@column = Column.new(:role_id => @column.role_id, :ptype => @column.ptype, :versioned => true)
|
4
4
|
page.replace_html 'add_column_form', :partial=>'columns/form'
|
5
5
|
page << "$('column_name').focus();"
|
6
6
|
else
|
@@ -16,19 +16,21 @@
|
|
16
16
|
<% end %>
|
17
17
|
<table cellspacing='0'>
|
18
18
|
<tr><td class='label'><%= _('name')%> </td><td><%= text_field('group', 'name', :size=>15 ) %></td></tr>
|
19
|
-
<tr><td class='label'><%= _('users')%> </td
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
19
|
+
<tr><td class='label'><%= _('users')%> </td>
|
20
|
+
<td class='boxes'>
|
21
|
+
<p><%= @users.inject([]) do |list, u|
|
22
|
+
unless u.is_anon?
|
23
|
+
if (@group[:id] == visitor.site.public_group_id) || (@group[:id] == visitor.site.site_group_id)
|
24
|
+
list << "<input type='checkbox' name='group[user_ids][]' value='#{u.id}' class='box' checked='1' disabled='1'/>#{u.login}"
|
25
|
+
else
|
26
|
+
list << "<input id='user#{u.id}' type='checkbox' name='group[user_ids][]' value='#{u.id}' class='box' #{(@group && @group.user_ids.include?(u[:id])) ? "checked='1'" : ''}/><label for='user#{u.id}'>#{u.login}</label>"
|
27
|
+
end
|
26
28
|
end
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
</
|
29
|
+
list
|
30
|
+
end.join('</p><p>') %></p>
|
31
|
+
<input type='hidden' name='group[user_ids][]' value=''/>
|
32
|
+
</td>
|
33
|
+
</tr>
|
32
34
|
<% if !@group.new_record? -%>
|
33
35
|
<tr><td class='label'><%= _('replace by') %></td><td><%= select('group', 'replace_by', @groups.map{|g| [g[:name], g[:id]]} , {:include_blank => true}) %></td></tr>
|
34
36
|
<% end -%>
|
@@ -36,7 +38,8 @@
|
|
36
38
|
<td class='label'><%= _('auto_publish') %></td>
|
37
39
|
<td>
|
38
40
|
<input type='hidden' name='group[auto_publish]' value=''/>
|
39
|
-
<input type='checkbox' name='group[auto_publish]' value='1'<%= @group.auto_publish? ? " checked='checked'" : '' %>/>
|
41
|
+
<input id='auto_publish' type='checkbox' name='group[auto_publish]' value='1'<%= @group.auto_publish? ? " checked='checked'" : '' %>/>
|
42
|
+
<label for='auto_publish'><%= _('auto_publish') %></label>
|
40
43
|
</td>
|
41
44
|
</tr>
|
42
45
|
<tr><td colspan='2'><input type='submit' class='btn_validate' value='<%= _('validate') %>'/></td></tr>
|
@@ -19,13 +19,25 @@
|
|
19
19
|
<td class="dark"><%= select('relation', 'target_kpath', Node.kpaths_for_form ) %></td>
|
20
20
|
</tr>
|
21
21
|
<tr><td class="label" ><%= _('type') %></td>
|
22
|
-
<td class="light" >
|
23
|
-
|
24
|
-
<%= radio_button("relation", "target_unique",
|
22
|
+
<td class="light boxes" >
|
23
|
+
<p>
|
24
|
+
<%= radio_button("relation", "target_unique", true , :checked => @relation.target_unique?) %>
|
25
|
+
<label for='relation_target_unique_true'><%= _('has_one') %></label>
|
26
|
+
</p>
|
27
|
+
<p>
|
28
|
+
<%= radio_button("relation", "target_unique", false, :checked => !@relation.target_unique?) %>
|
29
|
+
<label for='relation_target_unique_false'><%= _('has_many') %></label>
|
30
|
+
</p>
|
25
31
|
</td>
|
26
|
-
<td class="dark" >
|
27
|
-
|
28
|
-
<%= radio_button("relation", "source_unique",
|
32
|
+
<td class="dark boxes" >
|
33
|
+
<p>
|
34
|
+
<%= radio_button("relation", "source_unique", true , :checked => @relation.source_unique?) %>
|
35
|
+
<label for='relation_source_unique_true'><%= _('has_one') %></label>
|
36
|
+
</p>
|
37
|
+
<p>
|
38
|
+
<%= radio_button("relation", "source_unique", false, :checked => !@relation.source_unique?) %>
|
39
|
+
<label for='relation_source_unique_false'><%= _('has_many') %></label>
|
40
|
+
</p>
|
29
41
|
</td>
|
30
42
|
</tr>
|
31
43
|
<tr><td class="label" ><%= _('role') %></td>
|
data/app/views/sites/_form.erb
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
<table cellspacing='0' class='edit_site'>
|
16
16
|
<tr><td class='label'><%= _('host') %></td><td><%= @site[:host] %></td></tr>
|
17
17
|
<tr><td class='label'><%= _('home') %></td><td><%= text_field('site', :home_zip, :size=>15, :value => @site.home_zip) %></td></tr>
|
18
|
+
<tr><td class='label'><%= _('skin') %></td><td><%= text_field('site', :skin_zip, :size=>15, :value => @site.skin_zip) %></td></tr>
|
18
19
|
<% Site.attributes_for_form(@site.is_alias?)[:text].each do |name| -%>
|
19
20
|
<tr><td class='label'><%= _(name) %></td><td><%= text_field('site', name, :size=>nil) %></td></tr>
|
20
21
|
<% end -%>
|
@@ -25,12 +26,17 @@
|
|
25
26
|
<tr><td class='label'><%= _('API group') %></td><td><%= select('site', 'api_group_id', visitor.all_groups.map{|g| [g.name, g.id]}, {:include_blank => true, :selected => @site.api_group_id} ) %></td></tr>
|
26
27
|
<% end %>
|
27
28
|
|
28
|
-
<tr><td class='label'><%= _('options') %></td
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
<tr><td class='label'><%= _('options') %></td>
|
30
|
+
<td class='boxes'>
|
31
|
+
<% Site.attributes_for_form(@site.is_alias?)[:bool].each do |sym| -%>
|
32
|
+
<p>
|
33
|
+
<input type='hidden' name='site[<%= sym %>]' value=''/>
|
34
|
+
<input id='site_<%= sym %>' type='checkbox' name='site[<%= sym %>]' value='1'<%= @site.send(sym) ? " checked='checked'" : '' %>/>
|
35
|
+
<label for='site_<%= sym %>'><%= _(sym.to_s) %></label>
|
36
|
+
</p>
|
37
|
+
<% end -%>
|
38
|
+
</td>
|
39
|
+
</tr>
|
34
40
|
<% if !@site.new_record? && !@site.is_alias? %>
|
35
41
|
<tr><td class='label'><%= _('action') %></td><td id='messages<%= @site[:id] %>'>
|
36
42
|
<ul>
|
data/app/views/users/_form.rhtml
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
link_to_function _('btn_x'), "['add_user', 'add_user_form'].each(Element.toggle)"
|
6
6
|
end %>
|
7
7
|
</td>
|
8
|
-
<td class="add" colspan="
|
8
|
+
<td class="add" colspan="6">
|
9
9
|
<div id='user_errors'><%= error_messages_for(:user, :object => @user) %></div>
|
10
10
|
<% if user_id %>
|
11
11
|
<%= form_remote_tag(:url => user_path(@user), :method => :put ) %>
|
@@ -21,25 +21,40 @@
|
|
21
21
|
<% else -%>
|
22
22
|
<tr id='user_set_pass'><td class='label'><%= _("password")%></td><td><%= password_field('user', 'password', :size=>15, :value=>"" ) %></td></tr>
|
23
23
|
<% end -%>
|
24
|
+
<tr>
|
25
|
+
<td class='label'><%= _("profile")%></td>
|
26
|
+
<td class='profile'>
|
27
|
+
<%= select('user', 'profile', profile_users.reject {|u| u.id == @user.id}.map{|u| u.login}.sort, :include_blank => true) %>
|
28
|
+
</td>
|
29
|
+
</tr>
|
24
30
|
<% end -%>
|
25
31
|
<tr><td class='label'><%= _("status")%> </td><td><%= select('user', 'status', User::Status.reject {|k,v| v > User::Status[:admin]}.map{|k,v| [_(k.to_s),v]}.sort{|a,b| b[1] <=> a[1]}) %></td></tr>
|
26
32
|
<tr><td class='label'><%= _("single_access_token")%> </td><td><%= @user.single_access_token %></td></tr>
|
27
33
|
<tr><td class='label'><%= _('language')%> </td><td><%= select('user', 'lang', visitor.site.lang_list.map {|l| [_(l),l]}) %></td></tr>
|
28
34
|
<tr><td class='label'><%= _("time zone")%> </td><td><select name='user[time_zone]'><%= options_for_select([''] + TZInfo::Timezone.all_identifiers, @user[:time_zone] || '') %></select></td></tr>
|
35
|
+
<tr><td class='label'><%= _("login_attempt_count")%> </td><td><%= check_box('user', 'login_attempt_count', {}, 0, @user.login_attempt_count) %> reset</td></tr>
|
29
36
|
<% unless @user.is_anon? -%>
|
30
|
-
<tr><td class='label'><%= _("groups")%> </td><td>
|
31
|
-
|
37
|
+
<tr><td class='label'><%= _("groups")%> </td><td class='boxes'>
|
38
|
+
<p><%= @groups.inject([]) do |list, g|
|
32
39
|
if g[:id] == visitor.site.public_group_id || g[:id] == visitor.site.site_group_id
|
33
|
-
list << "<input type='checkbox' name='user[group_ids][]' value='#{g.id}' class='box' checked='1' disabled='1'
|
40
|
+
list << "<input id='group#{g.id}' type='checkbox' name='user[group_ids][]' value='#{g.id}' class='box' checked='1' disabled='1' /><label for='group#{g.id}'>#{g.name}</label>"
|
34
41
|
else
|
35
|
-
list << "<input type='checkbox' name='user[group_ids][]' value='#{g.id}' class='box' #{(@user && @user.group_set_ids.include?(g[:id])) ? "checked='1'" : ''}
|
42
|
+
list << "<input id='group#{g.id}' type='checkbox' name='user[group_ids][]' value='#{g.id}' class='box' #{(@user && @user.group_set_ids.include?(g[:id])) ? "checked='1'" : ''}/><label for='group#{g.id}'>#{g.name}</label>"
|
36
43
|
end
|
37
44
|
list
|
38
|
-
end.join("
|
45
|
+
end.join("</p><p>") %></p>
|
39
46
|
<input type='hidden' name='user[group_ids][]' value=''/>
|
40
47
|
</td></tr>
|
41
48
|
<% end -%>
|
42
|
-
|
49
|
+
|
50
|
+
<tr>
|
51
|
+
<td class='label'><%= _("is profile")%></td>
|
52
|
+
<td class='is_profile'>
|
53
|
+
<input type='hidden' name='user[is_profile]' value='0'/>
|
54
|
+
<input type='checkbox' name='user[is_profile]' value='1' class='box'<%= @user.is_profile? ? " checked='checked'" : ''%>/>
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
|
43
58
|
<tr>
|
44
59
|
<td class='label'><%= _("use acls")%></td>
|
45
60
|
<td class='use_acls'>
|
@@ -47,7 +62,7 @@
|
|
47
62
|
<input type='checkbox' name='user[use_acls]' value='1' class='box'<%= @user.use_acls? ? " checked='checked'" : ''%>/>
|
48
63
|
</td>
|
49
64
|
</tr>
|
50
|
-
<tr><td colspan='2'><%= node_form %></td></tr>
|
65
|
+
<tr><td colspan='2' class='nform'><%= node_form %></td></tr>
|
51
66
|
<tr><td colspan='2'><p class='btn_validate'><input type='submit' value='<%= _('validate') %>'/></p></td></tr>
|
52
67
|
</table>
|
53
68
|
</form>
|
data/app/views/users/_li.rhtml
CHANGED
@@ -1,19 +1,30 @@
|
|
1
1
|
<% icon = 'user'
|
2
2
|
if li.is_anon?
|
3
3
|
icon += '_pub'
|
4
|
+
elsif li.is_profile?
|
5
|
+
icon += '_profile'
|
4
6
|
elsif li.is_admin?
|
5
7
|
icon += '_admin'
|
8
|
+
elsif li.is_manager?
|
9
|
+
icon += '_manager'
|
6
10
|
end %>
|
7
11
|
<tr id='user<%= li[:id] %>' class='u<%= li.status %>'>
|
8
12
|
<td class="adm_icon"><%= link_to_remote(li.use_acls? ? " #{_('img_acl')}" : _("img_#{icon}"),
|
9
13
|
:update =>"user#{li[:id]}",
|
10
14
|
:url => edit_user_path(li),
|
11
15
|
:method => :get) %></td>
|
12
|
-
<td class="login"><%= li.is_anon? ? '<i>public</i>' : li.login %></td>
|
13
|
-
<td class="
|
16
|
+
<td class="login<%= li.is_profile? ? ' profile' : '' %>"><%= li.is_anon? ? '<i>public</i>' : li.login %></td>
|
17
|
+
<td class="groups<%= li.profile_id ? ' profile' : '' %>">
|
18
|
+
<% if li.profile_id %>
|
19
|
+
<%= li.profile %>
|
20
|
+
<% else %>
|
21
|
+
<%= li.groups.map {|g| g.name }.sort.join('<br/>') %>
|
22
|
+
<% end %>
|
23
|
+
</td>
|
14
24
|
<td class="login"><%= _(User::Num_to_status[li.status].to_s) %></td>
|
25
|
+
<td class="fullname" ><a href='<%= zen_path(li.node) %>'><%= li.node ? li.node.title : '' %></a></td>
|
15
26
|
<% if Bricks::CONFIG['activity'] %>
|
16
27
|
<td class="seen_at"><%= format_date(li.seen_at, :format =>_(Zena::Use::Dates::DATETIME)) %></td>
|
17
28
|
<% end %>
|
18
|
-
<td class="
|
29
|
+
<td class="failed"><% if li.login_attempt_count.to_i > 0 %><%= li.login_attempt_count %> login failures<% end %></td>
|
19
30
|
</tr>
|
data/app/views/users/index.rhtml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<h2 class='title'><%= _('users') %></h2>
|
2
2
|
|
3
3
|
<table id='user_list' class='admin' cellspacing="0">
|
4
|
-
<tr><th class='nav' colspan='
|
4
|
+
<tr><th class='nav' colspan='7'><%= will_paginate @users %></th></tr>
|
5
5
|
<%= render :partial=>'users/li', :collection=>@users %>
|
6
6
|
<%= render :partial=>'users/add', :locals=>{:groups=>@groups} %>
|
7
7
|
</table>
|
@@ -40,8 +40,18 @@
|
|
40
40
|
<tr><td class='label'><%= _('prop eval') %></td><td><%= text_area('virtual_class', 'prop_eval', :rows => 2, :cols => 30) %></td></tr>
|
41
41
|
|
42
42
|
<tr><td class='label'><%= _('edit group') %></td><td><%= select('virtual_class', 'create_group_id', visitor.all_groups.map{|g| [g.name, g.id]} ) %></td></tr>
|
43
|
-
<tr
|
44
|
-
|
43
|
+
<tr>
|
44
|
+
<td class='label'>
|
45
|
+
<label for='virtual_class_auto_create_discussion'><%= _('auto create discussion')%></label>
|
46
|
+
</td>
|
47
|
+
<td><%= check_box('virtual_class', 'auto_create_discussion') %></td>
|
48
|
+
</tr>
|
49
|
+
<tr>
|
50
|
+
<td class='label'>
|
51
|
+
<label for='virtual_class_monolingual'><%= _('monolingual') %></label>
|
52
|
+
</td>
|
53
|
+
<td><%= check_box('virtual_class', 'monolingual') %></td>
|
54
|
+
</tr>
|
45
55
|
<tr><td class='label'><%= _('content_type')%></td><td><%= text_field('virtual_class', 'content_type') %></td></tr>
|
46
56
|
<% end -%>
|
47
57
|
<tr><td class='label'><%= _('icon')%> </td><td><%= text_field('virtual_class', 'icon', :size=>15 ) %></td></tr>
|
@@ -14,6 +14,7 @@ a:hover { color:#04a;}
|
|
14
14
|
table { margin:20px;}
|
15
15
|
td { padding:5px; }
|
16
16
|
#login_form { border:1px solid grey; background:#eee; width:400px; margin:120px auto; padding:0;}
|
17
|
+
.error {background:#fcc; padding:8px; border-bottom:1px solid #333}
|
17
18
|
</style>
|
18
19
|
</head>
|
19
20
|
|
@@ -31,7 +32,13 @@ td { padding:5px; }
|
|
31
32
|
|
32
33
|
<td><input name="password" size="20" type="password" /></td>
|
33
34
|
</tr>
|
34
|
-
<tr
|
35
|
+
<tr>
|
36
|
+
<td></td>
|
37
|
+
<td>
|
38
|
+
<input name="commit" type="submit" value=" login " /> <p class='cancel' do='link' do='t'>cancel</p>
|
39
|
+
<input name='lang' type='hidden' value='#{visitor.lang}'/>
|
40
|
+
</td>
|
41
|
+
</tr>
|
35
42
|
</table>
|
36
43
|
</form>
|
37
44
|
</div>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<h2 do='t'>search results</h2>
|
6
6
|
|
7
|
-
<ul id='search_results' do='
|
7
|
+
<ul id='search_results' do='nodes where fulltext match #{params[:q]} in site'>
|
8
8
|
<li class='result_entry' do='each'>
|
9
9
|
<p class='result_image' do='Document?'>
|
10
10
|
<r:link format='data' do='img' alt_src='icon' mode='pv'/>
|
@@ -118,7 +118,7 @@ class AclIntegrationTest < Zena::Integration::TestCase
|
|
118
118
|
should 'allow t_url in rendering skin' do
|
119
119
|
get @zafu_url
|
120
120
|
assert_response :success
|
121
|
-
assert_equal %{
|
121
|
+
assert_equal %{if (Zena.stampOk('list1', 0)) {\nElement.replace(\"list1\", \"Zafu safe ok\\n\");\n\n}}, response.body
|
122
122
|
end
|
123
123
|
end # using zafu ajax
|
124
124
|
|
@@ -294,7 +294,7 @@ class AclIntegrationTest < Zena::Integration::TestCase
|
|
294
294
|
setup do
|
295
295
|
# The visitor can delete objects in assigned_project
|
296
296
|
Zena::Db.execute "UPDATE acls SET query = '%q{nodes in project from assigned_project}', action = 'delete' WHERE id = #{acls_id(:rap)}"
|
297
|
-
@delete_url = "http://erebus.host/nodes/#{nodes_zip(:
|
297
|
+
@delete_url = "http://erebus.host/nodes/#{nodes_zip(:wedding)}"
|
298
298
|
end
|
299
299
|
|
300
300
|
context 'with wrong user status' do
|
@@ -0,0 +1,120 @@
|
|
1
|
+
require 'uri'
|
2
|
+
require 'net/http'
|
3
|
+
|
4
|
+
# To use this gem, simply enable the currency gem and set app_id from openexchangerates.org
|
5
|
+
# currency:
|
6
|
+
# switch: ON
|
7
|
+
# app_id: the_secret_app_id
|
8
|
+
#
|
9
|
+
# You can then get
|
10
|
+
module Bricks
|
11
|
+
module Currency
|
12
|
+
# We have a module accessor so that we can rewrite app_id during testing
|
13
|
+
mattr_accessor :app_id
|
14
|
+
|
15
|
+
self.app_id = Bricks::CONFIG['currency']['app_id']
|
16
|
+
|
17
|
+
EXCHANGE_URI = "http://openexchangerates.org/api/latest.json"
|
18
|
+
CURRENCY_URI = "http://openexchangerates.org/api/currencies.json"
|
19
|
+
|
20
|
+
@@exchange_rates = {
|
21
|
+
:expire_at => Time.now.utc.advance(:year => -1),
|
22
|
+
:rates => {},
|
23
|
+
:currencies => nil,
|
24
|
+
}
|
25
|
+
|
26
|
+
# Returns a list of rates from the base rate to currency keys in the list with currency full name:
|
27
|
+
# ==> [['USD', 1.23, 'US Dollar'], ['EUR', 1.0, 'Euro'], ...]
|
28
|
+
def self.get_rates(list, base = 'USD')
|
29
|
+
stamp = Time.now.utc
|
30
|
+
rates = {}
|
31
|
+
if @@exchange_rates[:expire_at] <= stamp
|
32
|
+
# Reload exchange rates
|
33
|
+
|
34
|
+
app_id = self.app_id
|
35
|
+
raise "Missing 'currency/app_id' in config/bricks.yml" if app_id.blank?
|
36
|
+
exchange_uri = URI.parse("#{EXCHANGE_URI}?app_id=#{app_id}")
|
37
|
+
Net::HTTP.new(exchange_uri.host, exchange_uri.port).start do |http|
|
38
|
+
response = http.request_get(exchange_uri.request_uri)
|
39
|
+
if response.kind_of?(Net::HTTPSuccess)
|
40
|
+
rates = JSON.parse(response.body)['rates']
|
41
|
+
else
|
42
|
+
raise "Could not get exchange rates (#{response.body})."
|
43
|
+
end
|
44
|
+
end
|
45
|
+
@@exchange_rates[:rates] = rates
|
46
|
+
@@exchange_rates[:expire_at] = stamp.advance(:hour => 6) # Update currency rate every 6 hours (works with the free plan)
|
47
|
+
else
|
48
|
+
rates = @@exchange_rates[:rates]
|
49
|
+
end
|
50
|
+
|
51
|
+
curr = self.get_currencies
|
52
|
+
# Base for rates = USD
|
53
|
+
if base != 'USD'
|
54
|
+
ratio = rates[base]
|
55
|
+
raise "Invalid base currency '#{base}'" if ratio.nil?
|
56
|
+
end
|
57
|
+
list.map do |l|
|
58
|
+
l = l.strip
|
59
|
+
rate = rates[l]
|
60
|
+
title = curr[l]
|
61
|
+
if !rate
|
62
|
+
rate = 0.0
|
63
|
+
title = "#{title} (Error: could not get exchange rate)"
|
64
|
+
elsif ratio
|
65
|
+
rate = rate / ratio
|
66
|
+
end
|
67
|
+
[l, rate, title]
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.get_currencies
|
72
|
+
@@exchange_rates[:currencies] ||= begin
|
73
|
+
app_id = self.app_id
|
74
|
+
raise "Missing 'currency/app_id' in config/bricks.yml" if app_id.blank?
|
75
|
+
currency_uri = URI.parse("#{CURRENCY_URI}?app_id=#{app_id}")
|
76
|
+
Net::HTTP.new(currency_uri.host, currency_uri.port).start do |http|
|
77
|
+
response = http.request_get(currency_uri.request_uri)
|
78
|
+
if response.kind_of?(Net::HTTPSuccess)
|
79
|
+
JSON.parse(response.body)
|
80
|
+
else
|
81
|
+
raise "Could not get currencies (#{response.body})."
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
module ZafuMethods
|
88
|
+
# Used to build a currency selector with current exchange rates from openexchangerates API.
|
89
|
+
def r_currency_options
|
90
|
+
return parser_error('missing list parameter') unless list = @params[:list]
|
91
|
+
list = ::RubyLess.translate(self, list)
|
92
|
+
base = ::RubyLess.translate(self, @params[:selected] || 'nil')
|
93
|
+
out "<%= currency_options(#{list}, #{base}) %>"
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
module ViewMethods
|
98
|
+
include RubyLess
|
99
|
+
|
100
|
+
# Returns jsonp
|
101
|
+
safe_method [:currency_rates, [String], String] => String
|
102
|
+
|
103
|
+
# Returns a list of currency rates compatible with Javascript.
|
104
|
+
def currency_rates(list, base)
|
105
|
+
Bricks::Currency.get_rates(list, base).inspect
|
106
|
+
rescue
|
107
|
+
'[]'
|
108
|
+
end
|
109
|
+
|
110
|
+
def currency_options(list, base = 'USD')
|
111
|
+
Bricks::Currency.get_rates(list, base).map do |n, c, title|
|
112
|
+
"<option data-c='#{c}' value='#{n}'#{n==base ? " selected='selected'" : ""}>#{n} (#{title})</option>"
|
113
|
+
end.join("\n")
|
114
|
+
rescue => err
|
115
|
+
Rails.logger.warn "Could not get exchange rates! (#{err.message})"
|
116
|
+
"<!-- Could not get exchange rates -->"
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end # Currency
|
120
|
+
end # Bricks
|