From 0531c6a234fa8cf1abc7ad890d8e24d572d61d98 Mon Sep 17 00:00:00 2001 From: Leandro Nunes dos Santos Date: Tue, 24 Feb 2015 11:37:25 -0300 Subject: [PATCH] merging with master --- Gemfile | 11 +++++------ INSTALL.md | 3 +-- INSTALL.multitenancy.md | 4 ++-- SECURITY.md | 10 ++++++++++ app/controllers/admin/admin_panel_controller.rb | 2 +- app/controllers/application_controller.rb | 11 ++--------- app/controllers/public/chat_controller.rb | 42 +++++++++++++++++++++++++++++++++++++++--- app/controllers/public/contact_controller.rb | 1 + app/controllers/public/events_controller.rb | 1 + app/controllers/public/home_controller.rb | 6 +++--- app/controllers/public/profile_controller.rb | 19 +------------------ app/controllers/public_controller.rb | 22 ++++++++++++++++++++++ app/helpers/application_helper.rb | 20 +++++++++----------- app/helpers/article_helper.rb | 3 +-- app/helpers/boxes_helper.rb | 36 ++++++++++++++++++++++++++++-------- app/helpers/chat_helper.rb | 3 ++- app/helpers/colorbox_helper.rb | 25 ------------------------- app/helpers/comment_helper.rb | 2 +- app/helpers/dates_helper.rb | 40 +++++++++++----------------------------- app/helpers/design_helper.rb | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ app/helpers/lightbox_helper.rb | 36 ------------------------------------ app/helpers/manage_products_helper.rb | 2 +- app/helpers/modal_helper.rb | 46 ++++++++++++++++++++++++++++++++++++++++++++++ app/helpers/plugins_helper.rb | 9 +++++++++ app/helpers/thickbox_helper.rb | 11 ----------- app/models/article.rb | 17 ++++++++++------- app/models/blog_archives_block.rb | 3 +-- app/models/box.rb | 8 ++++---- app/models/enterprise.rb | 3 ++- app/models/environment.rb | 11 ++++------- app/models/event.rb | 4 ++++ app/models/external_feed.rb | 14 +++++++------- app/models/favorite_enterprise_person.rb | 8 ++++++++ app/models/forum.rb | 2 +- app/models/input.rb | 3 ++- app/models/product.rb | 5 +++-- app/models/text_article.rb | 10 +++++----- app/models/user.rb | 13 +++++++++++-- app/views/account/_login_form.html.erb | 9 +++------ app/views/account/activate_enterprise.html.erb | 4 ++-- app/views/account/index_anonymous.html.erb | 2 +- app/views/account/login.html.erb | 6 +++--- app/views/account/logout_popup.html.erb | 2 +- app/views/admin_panel/set_portal_community.html.erb | 2 +- app/views/admin_panel/set_portal_news_amount.html.erb | 6 ++++-- app/views/box_organizer/edit.html.erb | 2 +- app/views/box_organizer/move_block.rjs | 1 + app/views/cms/_blog.html.erb | 7 ++++--- app/views/cms/_upload_file.html.erb | 2 +- app/views/cms/edit.html.erb | 2 +- app/views/cms/select_article_type.html.erb | 2 +- app/views/cms/view.html.erb | 2 +- app/views/cms/why_categorize.html.erb | 2 +- app/views/comment/_comment_form.html.erb | 8 ++++---- app/views/content_viewer/_article_toolbar.html.erb | 4 ++-- app/views/content_viewer/_comment_form.html.erb | 6 +++--- app/views/events/_month.html.erb | 4 ++-- app/views/invite/_select_address_book.html.erb | 10 +++++----- app/views/invite/select_friends.html.erb | 4 ++-- app/views/layouts/_javascript.html.erb | 16 +++++++++------- app/views/layouts/_user.html.erb | 4 ++-- app/views/layouts/application-ng.html.erb | 9 ++------- app/views/manage_products/_categories_for_selection.html.erb | 10 ++++++---- app/views/manage_products/_display_name.html.erb | 2 +- app/views/manage_products/new.html.erb | 2 +- app/views/manage_products/show.html.erb | 15 +++++++++++++++ app/views/maps/_google_map.js.erb | 37 ++++++++++++++++++------------------- app/views/profile/_profile_scrap.html.erb | 2 +- app/views/profile/_profile_scraps.html.erb | 2 +- app/views/profile/_profile_wall.html.erb | 2 +- app/views/profile/join.html.erb | 2 +- app/views/profile/leave.html.erb | 2 +- app/views/profile/report_abuse.html.erb | 4 ++-- app/views/profile_editor/_organization.html.erb | 4 ++-- app/views/profile_members/_add_admins.html.erb | 14 +++++++------- app/views/profile_members/_members_list.html.erb | 6 +++--- app/views/profile_themes/add_css.html.erb | 2 +- app/views/profile_themes/edit.html.erb | 6 +++--- app/views/profile_themes/index.html.erb | 2 +- app/views/shared/logged_in/xmpp_chat.html.erb | 76 +++++++++++++++++++++++++++++++++++++--------------------------------------- app/views/shared/profile_actions/xmpp_chat.html.erb | 5 ----- app/views/shared/user_menu.html.erb | 6 +++--- app/views/shared/usermenu/xmpp_chat.html.erb | 1 - config/application.rb | 1 + config/database.yml.multitenancy | 4 ++-- config/noosfero.yml.dist | 1 + config/schedule.rb | 2 +- db/migrate/20120820120000_index_parent_id_from_all_tables.rb | 17 +++++++++++++++++ db/migrate/20120820142056_add_ancestry_to_categories.rb | 11 +++++++++++ db/migrate/20140519113821_add_last_login_at_to_user.rb | 9 +++++++++ db/migrate/20140709212646_add_spam_comments_counter_cache_to_articles.rb | 2 +- db/migrate/20150112233715_normalize_users_email.rb | 11 +++++++++++ db/schema.rb | 36 +++++++++++++++++++++++++++++------- debian/control | 1 - features/events.feature | 7 +++++-- lib/acts_as_filesystem.rb | 256 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------------------- lib/acts_as_having_boxes.rb | 5 +++-- lib/authenticated_system.rb | 19 ++++++++++--------- lib/noosfero/constants.rb | 2 +- lib/noosfero/plugin.rb | 31 +++++++++++++++++++++++-------- lib/noosfero/plugin/macro.rb | 2 +- lib/noosfero/plugin/routes.rb | 17 ++++++++++------- lib/noosfero/plugin/spammable.rb | 2 +- lib/noosfero/translatable_content.rb | 1 + lib/tasks/multitenancy.rake | 10 +++++----- plugins/bsc/public/jquery.ui.spinner | 1 - plugins/bsc/views/shared/_fields.html.erb | 4 ++-- plugins/comment_group/lib/ext/article.rb | 2 +- plugins/community_track/lib/community_track_plugin/track.rb | 2 +- plugins/custom_forms/lib/custom_forms_plugin/field.rb | 2 +- plugins/custom_forms/lib/custom_forms_plugin/submission.rb | 2 +- plugins/custom_forms/public/style.css | 2 +- plugins/custom_forms/test/unit/custom_forms_plugin/field_test.rb | 12 ++++++++++++ plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_select.html.erb | 2 +- plugins/event/lib/event_plugin.rb | 23 +++++++++++++++++++++++ plugins/event/lib/event_plugin/event_block.rb | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/event/po/pt/event.po | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/event/public/event.js | 16 ++++++++++++++++ plugins/event/public/style.css | 196 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/event/test/functional/event_block_test.rb | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/event/test/unit/event_block_test.rb | 189 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/event/test/unit/event_plugin_test.rb | 9 +++++++++ plugins/event/views/blocks/event.html.erb | 19 +++++++++++++++++++ plugins/event/views/environment_design | 1 + plugins/event/views/event_plugin/event_block_item.html.erb | 41 +++++++++++++++++++++++++++++++++++++++++ plugins/event/views/profile_design/event_plugin/_event_block.html.erb | 24 ++++++++++++++++++++++++ plugins/metadata/config.yml.dist | 18 +++++++++--------- plugins/metadata/lib/ext/article.rb | 57 ++++++++++++++++++++++++++++++++++----------------------- plugins/metadata/lib/ext/community.rb | 6 +++--- plugins/metadata/lib/ext/enterprise.rb | 26 ++++++++++++++------------ plugins/metadata/lib/ext/environment.rb | 20 ++++++++++++++------ plugins/metadata/lib/ext/person.rb | 6 +++--- plugins/metadata/lib/ext/product.rb | 37 +++++++++++++++++++------------------ plugins/metadata/lib/ext/profile.rb | 39 ++++++++++++++++++++++++--------------- plugins/metadata/lib/ext/uploaded_file.rb | 14 +++++++------- plugins/metadata/lib/metadata_plugin.rb | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------ plugins/metadata/lib/metadata_plugin/spec.rb | 29 ----------------------------- plugins/metadata/lib/metadata_plugin/specs.rb | 22 ++++++++++++++++++++++ plugins/metadata/locales/en.yml | 14 -------------- plugins/metadata/locales/pt.yml | 14 -------------- plugins/metadata/test/functional/content_viewer_controller_test.rb | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/metadata/test/functional/home_controller_test.rb | 33 +++++++++++++++++++++++++++++++++ plugins/notification/README | 0 plugins/notification/dependencies.rb | 0 plugins/oauth_client/Gemfile | 6 +++--- plugins/oauth_client/README.md | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/oauth_client/controllers/oauth_client_plugin_admin_controller.rb | 2 +- plugins/oauth_provider/Gemfile | 2 +- plugins/oauth_provider/README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ plugins/oauth_provider/controllers/oauth_provider_plugin_admin_controller.rb | 2 +- plugins/profile_description_block/lib/profile_description_block.rb | 41 +++++++++++++++++++++++++++++++++++++++++ plugins/profile_description_block/lib/profile_description_block_plugin.rb | 24 ++++++++++++++++++++++++ plugins/profile_description_block/public/style.css | 10 ++++++++++ plugins/profile_description_block/test/unit/profile_description_block_test.rb | 29 +++++++++++++++++++++++++++++ plugins/profile_description_block/views/blocks/profile_description.html.erb | 8 ++++++++ plugins/relevant_content/lib/relevant_content_plugin/relevant_content_block.rb | 4 ++-- plugins/relevant_content/test/unit/article.rb | 8 ++++---- plugins/relevant_content/test/unit/relevant_content_block_test.rb | 15 +++++++++++++++ plugins/shopping_cart/public/cart.js | 5 +---- plugins/shopping_cart/views/cart.html.erb | 2 +- plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb | 2 +- plugins/shopping_cart/views/shopping_cart_plugin_profile/buy.html.erb | 2 +- plugins/solr/lib/ext/article.rb | 1 + plugins/statistics/lib/statistics_block.rb | 13 ++++++++++++- plugins/statistics/test/functional/statistics_plugin_environment_design_controller_test.rb | 22 ++++++++++++++++------ plugins/statistics/test/functional/statistics_plugin_home_controller_test.rb | 18 ++++++++++++++++++ plugins/statistics/test/unit/statistics_block_test.rb | 36 +++++++++++++++++++++++++++++++++++- plugins/statistics/views/box_organizer/_statistics_block.html.erb | 24 ++++++++++++++---------- plugins/statistics/views/statistics_block.html.erb | 3 +++ plugins/stoa/public/javascripts/signup_complement.js | 5 +++-- plugins/tolerance_time/lib/tolerance_time_plugin.rb | 6 ++---- po/es/noosfero.po | 2 +- public/designs/icons/awesome/FontAwesome.otf | Bin 75188 -> 0 bytes public/designs/icons/awesome/fontawesome-webfont.eot | Bin 72449 -> 0 bytes public/designs/icons/awesome/fontawesome-webfont.svg | 504 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ public/designs/icons/awesome/fontawesome-webfont.ttf | Bin 141564 -> 0 bytes public/designs/icons/awesome/fontawesome-webfont.woff | Bin 83760 -> 0 bytes public/designs/icons/awesome/fonts/FontAwesome.otf | Bin 0 -> 93888 bytes public/designs/icons/awesome/fonts/fontawesome-webfont.eot | Bin 0 -> 60767 bytes public/designs/icons/awesome/fonts/fontawesome-webfont.svg | 565 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/designs/icons/awesome/fonts/fontawesome-webfont.ttf | Bin 0 -> 122092 bytes public/designs/icons/awesome/fonts/fontawesome-webfont.woff | Bin 0 -> 71508 bytes public/designs/icons/awesome/fonts/fontawesome-webfont.woff2 | Bin 0 -> 56780 bytes public/designs/icons/awesome/scss/_animated.scss | 34 ++++++++++++++++++++++++++++++++++ public/designs/icons/awesome/scss/_bordered-pulled.scss | 16 ++++++++++++++++ public/designs/icons/awesome/scss/_core.scss | 13 +++++++++++++ public/designs/icons/awesome/scss/_fixed-width.scss | 6 ++++++ public/designs/icons/awesome/scss/_icons.scss | 596 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/designs/icons/awesome/scss/_larger.scss | 13 +++++++++++++ public/designs/icons/awesome/scss/_list.scss | 19 +++++++++++++++++++ public/designs/icons/awesome/scss/_mixins.scss | 27 +++++++++++++++++++++++++++ public/designs/icons/awesome/scss/_path.scss | 15 +++++++++++++++ public/designs/icons/awesome/scss/_rotated-flipped.scss | 20 ++++++++++++++++++++ public/designs/icons/awesome/scss/_stacked.scss | 20 ++++++++++++++++++++ public/designs/icons/awesome/scss/_variables.scss | 606 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/designs/icons/awesome/scss/font-awesome.scss | 17 +++++++++++++++++ public/designs/icons/awesome/style.css | 3548 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- public/designs/icons/awesome/style.css.map | 7 +++++++ public/designs/icons/awesome/style.scss | 299 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/designs/icons/tango/mod/64x64/apps/internet-group-chat.png | Bin 0 -> 2164 bytes public/designs/icons/tango/style.css | 1 + public/designs/templates/topleft/config.yml | 4 ++++ public/designs/templates/topleft/stylesheets/style.css | 37 +++++++++++++++++++++++++++++++++++++ public/designs/templates/topleft/thumbnail.png | Bin 0 -> 3960 bytes public/designs/templates/topleft/thumbnail.svg | 239 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/designs/themes/noosfero/style.css | 5 ----- public/images/colorbox/controls.png | Bin 1249 -> 0 bytes public/javascripts/application.js | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------- public/javascripts/article.js | 9 ++++----- public/javascripts/chat.js | 362 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------------------- public/javascripts/colorbox.js | 814 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- public/javascripts/comment_form.js | 4 ++-- public/javascripts/jquery.colorbox-min.js | 7 +++++++ public/javascripts/jquery.noconflict.js | 1 - public/javascripts/jrails.js | 1 + public/javascripts/lightbox.js | 232 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- public/javascripts/modal.js | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/javascripts/report-abuse.js | 3 +-- public/javascripts/strophejs-1.1.3/examples/attach/__init__.py | 0 public/javascripts/strophejs-1.1.3/examples/attach/attacher/__init__.py | 0 public/javascripts/thickbox.js | 319 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- public/stylesheets/application.css | 25 ++++++++++++++----------- public/stylesheets/chat.css | 456 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------------------- public/stylesheets/colorbox.css | 70 +++++++++++++++++++++++++++++----------------------------------------- public/stylesheets/lightbox.css | 63 --------------------------------------------------------------- public/stylesheets/thickbox.css | 163 ------------------------------------------------------------------------------------------------------------------------------------------------------------------- script/gitlab-ci | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ script/install-dependencies/debian-squeeze.sh | 2 +- script/quick-start | 25 +++++++++++++++++++------ test/factories.rb | 8 +++++++- test/functional/account_controller_test.rb | 8 ++++---- test/functional/admin_panel_controller_test.rb | 4 +++- test/functional/application_controller_test.rb | 15 --------------- test/functional/chat_controller_test.rb | 132 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------- test/functional/cms_controller_test.rb | 12 +++++++++--- test/functional/contact_controller_test.rb | 27 +++++++++++++++++++++++++++ test/functional/content_viewer_controller_test.rb | 26 ++------------------------ test/functional/events_controller_test.rb | 29 +++++++++++++++++++++++++++++ test/functional/profile_editor_controller_test.rb | 2 +- test/test_helper.rb | 1 - test/unit/acts_as_filesystem_test.rb | 27 ++++++++++++++++++++++++--- test/unit/application_helper_test.rb | 33 +++++++++------------------------ test/unit/article_block_test.rb | 1 - test/unit/box_test.rb | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------- test/unit/boxes_helper_test.rb | 38 ++++++++++++++++++++++++++++++++++++-- test/unit/chat_helper_test.rb | 4 +++- test/unit/colorbox_helper_test.rb | 36 ------------------------------------ test/unit/comment_helper_test.rb | 2 +- test/unit/dates_helper_test.rb | 52 +++++++++++++--------------------------------------- test/unit/design_helper_test.rb | 20 ++++++++++++++++++++ test/unit/environment_test.rb | 24 ++++++++++++++++++++++++ test/unit/event_test.rb | 26 ++++++++++++++++++++++++++ test/unit/external_feed_test.rb | 8 +++++--- test/unit/lightbox_helper_test.rb | 65 ----------------------------------------------------------------- test/unit/macro_test.rb | 2 +- test/unit/manage_products_helper_test.rb | 2 +- test/unit/modal_helper_test.rb | 36 ++++++++++++++++++++++++++++++++++++ test/unit/organization_test.rb | 2 +- test/unit/product_test.rb | 16 ++++++++-------- test/unit/text_article_test.rb | 42 +++++++++++++++++++++++++++++++++--------- test/unit/thickbox_helper_test.rb | 25 ------------------------- test/unit/tiny_mce_article_test.rb | 13 +------------ test/unit/translatable_content_test.rb | 2 +- test/unit/user_activation_job_test.rb | 2 +- test/unit/user_test.rb | 14 ++++++++++++-- vendor/cardmagic-contacts-f66219e6589ccaf3ab9e3574fdd41225d0dd5073/lib/contacts/aol.rb | 39 +++++++++++++++++++-------------------- vendor/plugins/access_control/lib/permission_check.rb | 18 +++++++++--------- vendor/plugins/eita-jrails/CHANGELOG | 43 +++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/Gemfile | 3 +++ vendor/plugins/eita-jrails/LICENSE | 18 ++++++++++++++++++ vendor/plugins/eita-jrails/MIT-LICENSE | 20 ++++++++++++++++++++ vendor/plugins/eita-jrails/README.md | 22 ++++++++++++++++++++++ vendor/plugins/eita-jrails/Rakefile | 3 +++ vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png | Bin 0 -> 180 bytes vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png | Bin 0 -> 178 bytes vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png | Bin 0 -> 120 bytes vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 105 bytes vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png | Bin 0 -> 111 bytes vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png | Bin 0 -> 110 bytes vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png | Bin 0 -> 119 bytes vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 0 -> 101 bytes vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-icons_222222_256x240.png | Bin 0 -> 4369 bytes vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png | Bin 0 -> 4369 bytes vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-icons_454545_256x240.png | Bin 0 -> 4369 bytes vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-icons_888888_256x240.png | Bin 0 -> 4369 bytes vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png | Bin 0 -> 4369 bytes vendor/plugins/eita-jrails/assets/javascripts/jquery/jquery-ui-i18n.js | 1379 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/assets/javascripts/jquery/jquery-ui-i18n.min.js | 33 +++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/assets/javascripts/jquery/jquery-ui.js | 14823 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/assets/javascripts/jquery/jquery-ui.min.js | 6 ++++++ vendor/plugins/eita-jrails/assets/javascripts/jquery/jquery.js | 9404 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/assets/javascripts/jquery/jquery.min.js | 4 ++++ vendor/plugins/eita-jrails/assets/javascripts/jrails/jrails.js | 185 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/assets/javascripts/jrails/jrails.min.js | 1 + vendor/plugins/eita-jrails/assets/stylesheets/smoothness/jquery-ui.css | 573 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/bin/jrails | 30 ++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/config/jrails.yml | 19 +++++++++++++++++++ vendor/plugins/eita-jrails/eita-jrails.gemspec | 31 +++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/init.rb | 3 +++ vendor/plugins/eita-jrails/lib/action_view/helpers/javascript_proxies.rb | 185 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/lib/action_view/helpers/jquery_helper.rb | 585 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/lib/action_view/helpers/jquery_helper/generator.rb | 410 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/lib/action_view/helpers/jquery_ui_helper.rb | 164 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/lib/action_view/template/handlers/rjs.rb | 14 ++++++++++++++ vendor/plugins/eita-jrails/lib/jrails.rb | 42 ++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/lib/jrails/asset_tag_ext.rb | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/lib/jrails/engine.rb | 26 ++++++++++++++++++++++++++ vendor/plugins/eita-jrails/lib/jrails/javascript_helper.rb | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/lib/jrails/on_load_action_controller.rb | 2 ++ vendor/plugins/eita-jrails/lib/jrails/on_load_action_view.rb | 26 ++++++++++++++++++++++++++ vendor/plugins/eita-jrails/lib/jrails/renderers.rb | 12 ++++++++++++ vendor/plugins/eita-jrails/lib/jrails/rendering.rb | 13 +++++++++++++ vendor/plugins/eita-jrails/lib/jrails/selector_assertions.rb | 211 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/lib/tasks/jrails.rake | 25 +++++++++++++++++++++++++ vendor/plugins/eita-jrails/test/assert_select_test.rb | 457 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/test/controller/caching_test.rb | 43 +++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/test/controller/content_type_test.rb | 16 ++++++++++++++++ vendor/plugins/eita-jrails/test/controller/mime_responds_test.rb | 213 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/test/controller/new_base/content_type_test.rb | 19 +++++++++++++++++++ vendor/plugins/eita-jrails/test/controller/new_base/render_rjs_test.rb | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/test/controller/render_js_test.rb | 22 ++++++++++++++++++++++ vendor/plugins/eita-jrails/test/fixtures/functional_caching/_partial.erb | 3 +++ vendor/plugins/eita-jrails/test/fixtures/functional_caching/formatted_fragment_cached.js.rjs | 6 ++++++ vendor/plugins/eita-jrails/test/fixtures/functional_caching/js_fragment_cached_with_partial.js.rjs | 1 + vendor/plugins/eita-jrails/test/fixtures/old_content_type/render_default_for_rjs.rjs | 1 + vendor/plugins/eita-jrails/test/fixtures/respond_to/all_types_with_layout.js.rjs | 1 + vendor/plugins/eita-jrails/test/fixtures/respond_to/layouts/standard.html.erb | 1 + vendor/plugins/eita-jrails/test/fixtures/respond_to/using_defaults.js.rjs | 1 + vendor/plugins/eita-jrails/test/fixtures/respond_to/using_defaults_with_type_list.js.rjs | 1 + vendor/plugins/eita-jrails/test/fixtures/respond_with/using_resource.js.rjs | 1 + vendor/plugins/eita-jrails/test/fixtures/test/_one.html.erb | 1 + vendor/plugins/eita-jrails/test/fixtures/test/_partial.html.erb | 1 + vendor/plugins/eita-jrails/test/fixtures/test/_partial.js.erb | 1 + vendor/plugins/eita-jrails/test/fixtures/test/_two.html.erb | 1 + vendor/plugins/eita-jrails/test/fixtures/test/delete_with_js.rjs | 2 ++ vendor/plugins/eita-jrails/test/fixtures/test/enum_rjs_test.rjs | 6 ++++++ vendor/plugins/eita-jrails/test/fixtures/test/greeting.js.rjs | 1 + vendor/plugins/eita-jrails/test/fixtures/test/render_explicit_html_template.js.rjs | 1 + vendor/plugins/eita-jrails/test/fixtures/test/render_implicit_html_template.js.rjs | 1 + vendor/plugins/eita-jrails/test/javascript_helper_test.rb | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/test/jrails_test.rb | 8 ++++++++ vendor/plugins/eita-jrails/test/lib/abstract_unit.rb | 225 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/test/lib/controller/fake_models.rb | 29 +++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/test/render_other_test.rb | 256 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/test/template/prototype_helper_test.rb | 476 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/test/template/render_test.rb | 24 ++++++++++++++++++++++++ vendor/plugins/eita-jrails/test/template/scriptaculous_helper_test.rb | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/eita-jrails/test/test_helper.rb | 3 +++ vendor/plugins/ruby_bosh/Rakefile | 2 +- vendor/plugins/ruby_bosh/lib/ruby_bosh.rb | 38 +++++++++++++++++++------------------- vendor/plugins/ruby_bosh/ruby_bosh.gemspec | 3 --- vendor/prototype_legacy_helper/README.markdown | 13 ------------- vendor/prototype_legacy_helper/init.rb | 1 - vendor/prototype_legacy_helper/lib/prototype_legacy_helper.rb | 432 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ vendor/prototype_legacy_helper/test/test_prototype_helper.rb | 297 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 355 files changed, 38615 insertions(+), 5958 deletions(-) create mode 100644 SECURITY.md delete mode 100644 app/helpers/colorbox_helper.rb create mode 100644 app/helpers/design_helper.rb delete mode 100644 app/helpers/lightbox_helper.rb create mode 100644 app/helpers/modal_helper.rb create mode 100644 app/helpers/plugins_helper.rb delete mode 100644 app/helpers/thickbox_helper.rb create mode 100644 app/models/favorite_enterprise_person.rb delete mode 100644 app/views/shared/profile_actions/xmpp_chat.html.erb delete mode 100644 app/views/shared/usermenu/xmpp_chat.html.erb create mode 100644 db/migrate/20120820120000_index_parent_id_from_all_tables.rb create mode 100644 db/migrate/20120820142056_add_ancestry_to_categories.rb create mode 100644 db/migrate/20140519113821_add_last_login_at_to_user.rb create mode 100644 db/migrate/20150112233715_normalize_users_email.rb delete mode 160000 plugins/bsc/public/jquery.ui.spinner create mode 100644 plugins/event/lib/event_plugin.rb create mode 100644 plugins/event/lib/event_plugin/event_block.rb create mode 100644 plugins/event/po/pt/event.po create mode 100644 plugins/event/public/event.js create mode 100644 plugins/event/public/style.css create mode 100644 plugins/event/test/functional/event_block_test.rb create mode 100644 plugins/event/test/unit/event_block_test.rb create mode 100644 plugins/event/test/unit/event_plugin_test.rb create mode 100644 plugins/event/views/blocks/event.html.erb create mode 120000 plugins/event/views/environment_design create mode 100644 plugins/event/views/event_plugin/event_block_item.html.erb create mode 100644 plugins/event/views/profile_design/event_plugin/_event_block.html.erb delete mode 100644 plugins/metadata/lib/metadata_plugin/spec.rb create mode 100644 plugins/metadata/lib/metadata_plugin/specs.rb delete mode 100644 plugins/metadata/locales/en.yml delete mode 100644 plugins/metadata/locales/pt.yml create mode 100644 plugins/metadata/test/functional/content_viewer_controller_test.rb create mode 100644 plugins/metadata/test/functional/home_controller_test.rb delete mode 100644 plugins/notification/README delete mode 100644 plugins/notification/dependencies.rb create mode 100644 plugins/oauth_client/README.md create mode 100644 plugins/oauth_provider/README.md create mode 100644 plugins/profile_description_block/lib/profile_description_block.rb create mode 100644 plugins/profile_description_block/lib/profile_description_block_plugin.rb create mode 100644 plugins/profile_description_block/public/style.css create mode 100644 plugins/profile_description_block/test/unit/profile_description_block_test.rb create mode 100644 plugins/profile_description_block/views/blocks/profile_description.html.erb mode change 100644 => 100755 plugins/statistics/test/functional/statistics_plugin_home_controller_test.rb delete mode 100644 public/designs/icons/awesome/FontAwesome.otf delete mode 100755 public/designs/icons/awesome/fontawesome-webfont.eot delete mode 100755 public/designs/icons/awesome/fontawesome-webfont.svg delete mode 100755 public/designs/icons/awesome/fontawesome-webfont.ttf delete mode 100755 public/designs/icons/awesome/fontawesome-webfont.woff create mode 100644 public/designs/icons/awesome/fonts/FontAwesome.otf create mode 100644 public/designs/icons/awesome/fonts/fontawesome-webfont.eot create mode 100644 public/designs/icons/awesome/fonts/fontawesome-webfont.svg create mode 100644 public/designs/icons/awesome/fonts/fontawesome-webfont.ttf create mode 100644 public/designs/icons/awesome/fonts/fontawesome-webfont.woff create mode 100644 public/designs/icons/awesome/fonts/fontawesome-webfont.woff2 create mode 100644 public/designs/icons/awesome/scss/_animated.scss create mode 100644 public/designs/icons/awesome/scss/_bordered-pulled.scss create mode 100644 public/designs/icons/awesome/scss/_core.scss create mode 100644 public/designs/icons/awesome/scss/_fixed-width.scss create mode 100644 public/designs/icons/awesome/scss/_icons.scss create mode 100644 public/designs/icons/awesome/scss/_larger.scss create mode 100644 public/designs/icons/awesome/scss/_list.scss create mode 100644 public/designs/icons/awesome/scss/_mixins.scss create mode 100644 public/designs/icons/awesome/scss/_path.scss create mode 100644 public/designs/icons/awesome/scss/_rotated-flipped.scss create mode 100644 public/designs/icons/awesome/scss/_stacked.scss create mode 100644 public/designs/icons/awesome/scss/_variables.scss create mode 100644 public/designs/icons/awesome/scss/font-awesome.scss create mode 100644 public/designs/icons/awesome/style.css.map create mode 100644 public/designs/icons/awesome/style.scss create mode 100644 public/designs/icons/tango/mod/64x64/apps/internet-group-chat.png create mode 100644 public/designs/templates/topleft/config.yml create mode 100644 public/designs/templates/topleft/stylesheets/style.css create mode 100644 public/designs/templates/topleft/thumbnail.png create mode 100644 public/designs/templates/topleft/thumbnail.svg delete mode 100644 public/javascripts/colorbox.js create mode 100644 public/javascripts/jquery.colorbox-min.js delete mode 100644 public/javascripts/jquery.noconflict.js create mode 120000 public/javascripts/jrails.js delete mode 100644 public/javascripts/lightbox.js create mode 100644 public/javascripts/modal.js delete mode 100644 public/javascripts/strophejs-1.1.3/examples/attach/__init__.py delete mode 100644 public/javascripts/strophejs-1.1.3/examples/attach/attacher/__init__.py delete mode 100644 public/javascripts/thickbox.js delete mode 100644 public/stylesheets/lightbox.css delete mode 100644 public/stylesheets/thickbox.css create mode 100755 script/gitlab-ci delete mode 100644 test/unit/colorbox_helper_test.rb create mode 100644 test/unit/design_helper_test.rb delete mode 100644 test/unit/lightbox_helper_test.rb create mode 100644 test/unit/modal_helper_test.rb delete mode 100644 test/unit/thickbox_helper_test.rb create mode 100644 vendor/plugins/eita-jrails/CHANGELOG create mode 100644 vendor/plugins/eita-jrails/Gemfile create mode 100644 vendor/plugins/eita-jrails/LICENSE create mode 100644 vendor/plugins/eita-jrails/MIT-LICENSE create mode 100644 vendor/plugins/eita-jrails/README.md create mode 100644 vendor/plugins/eita-jrails/Rakefile create mode 100644 vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png create mode 100644 vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png create mode 100644 vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png create mode 100644 vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png create mode 100644 vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png create mode 100644 vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png create mode 100644 vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png create mode 100644 vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png create mode 100644 vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-icons_222222_256x240.png create mode 100644 vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png create mode 100644 vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-icons_454545_256x240.png create mode 100644 vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-icons_888888_256x240.png create mode 100644 vendor/plugins/eita-jrails/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png create mode 100644 vendor/plugins/eita-jrails/assets/javascripts/jquery/jquery-ui-i18n.js create mode 100644 vendor/plugins/eita-jrails/assets/javascripts/jquery/jquery-ui-i18n.min.js create mode 100644 vendor/plugins/eita-jrails/assets/javascripts/jquery/jquery-ui.js create mode 100644 vendor/plugins/eita-jrails/assets/javascripts/jquery/jquery-ui.min.js create mode 100644 vendor/plugins/eita-jrails/assets/javascripts/jquery/jquery.js create mode 100644 vendor/plugins/eita-jrails/assets/javascripts/jquery/jquery.min.js create mode 100644 vendor/plugins/eita-jrails/assets/javascripts/jrails/jrails.js create mode 100644 vendor/plugins/eita-jrails/assets/javascripts/jrails/jrails.min.js create mode 100644 vendor/plugins/eita-jrails/assets/stylesheets/smoothness/jquery-ui.css create mode 100755 vendor/plugins/eita-jrails/bin/jrails create mode 100644 vendor/plugins/eita-jrails/config/jrails.yml create mode 100644 vendor/plugins/eita-jrails/eita-jrails.gemspec create mode 100644 vendor/plugins/eita-jrails/init.rb create mode 100644 vendor/plugins/eita-jrails/lib/action_view/helpers/javascript_proxies.rb create mode 100644 vendor/plugins/eita-jrails/lib/action_view/helpers/jquery_helper.rb create mode 100644 vendor/plugins/eita-jrails/lib/action_view/helpers/jquery_helper/generator.rb create mode 100644 vendor/plugins/eita-jrails/lib/action_view/helpers/jquery_ui_helper.rb create mode 100644 vendor/plugins/eita-jrails/lib/action_view/template/handlers/rjs.rb create mode 100644 vendor/plugins/eita-jrails/lib/jrails.rb create mode 100644 vendor/plugins/eita-jrails/lib/jrails/asset_tag_ext.rb create mode 100644 vendor/plugins/eita-jrails/lib/jrails/engine.rb create mode 100644 vendor/plugins/eita-jrails/lib/jrails/javascript_helper.rb create mode 100644 vendor/plugins/eita-jrails/lib/jrails/on_load_action_controller.rb create mode 100644 vendor/plugins/eita-jrails/lib/jrails/on_load_action_view.rb create mode 100644 vendor/plugins/eita-jrails/lib/jrails/renderers.rb create mode 100644 vendor/plugins/eita-jrails/lib/jrails/rendering.rb create mode 100644 vendor/plugins/eita-jrails/lib/jrails/selector_assertions.rb create mode 100644 vendor/plugins/eita-jrails/lib/tasks/jrails.rake create mode 100644 vendor/plugins/eita-jrails/test/assert_select_test.rb create mode 100644 vendor/plugins/eita-jrails/test/controller/caching_test.rb create mode 100644 vendor/plugins/eita-jrails/test/controller/content_type_test.rb create mode 100644 vendor/plugins/eita-jrails/test/controller/mime_responds_test.rb create mode 100644 vendor/plugins/eita-jrails/test/controller/new_base/content_type_test.rb create mode 100644 vendor/plugins/eita-jrails/test/controller/new_base/render_rjs_test.rb create mode 100644 vendor/plugins/eita-jrails/test/controller/render_js_test.rb create mode 100644 vendor/plugins/eita-jrails/test/fixtures/functional_caching/_partial.erb create mode 100644 vendor/plugins/eita-jrails/test/fixtures/functional_caching/formatted_fragment_cached.js.rjs create mode 100644 vendor/plugins/eita-jrails/test/fixtures/functional_caching/js_fragment_cached_with_partial.js.rjs create mode 100644 vendor/plugins/eita-jrails/test/fixtures/old_content_type/render_default_for_rjs.rjs create mode 100644 vendor/plugins/eita-jrails/test/fixtures/respond_to/all_types_with_layout.js.rjs create mode 100644 vendor/plugins/eita-jrails/test/fixtures/respond_to/layouts/standard.html.erb create mode 100644 vendor/plugins/eita-jrails/test/fixtures/respond_to/using_defaults.js.rjs create mode 100644 vendor/plugins/eita-jrails/test/fixtures/respond_to/using_defaults_with_type_list.js.rjs create mode 100644 vendor/plugins/eita-jrails/test/fixtures/respond_with/using_resource.js.rjs create mode 100644 vendor/plugins/eita-jrails/test/fixtures/test/_one.html.erb create mode 100644 vendor/plugins/eita-jrails/test/fixtures/test/_partial.html.erb create mode 100644 vendor/plugins/eita-jrails/test/fixtures/test/_partial.js.erb create mode 100644 vendor/plugins/eita-jrails/test/fixtures/test/_two.html.erb create mode 100644 vendor/plugins/eita-jrails/test/fixtures/test/delete_with_js.rjs create mode 100644 vendor/plugins/eita-jrails/test/fixtures/test/enum_rjs_test.rjs create mode 100644 vendor/plugins/eita-jrails/test/fixtures/test/greeting.js.rjs create mode 100644 vendor/plugins/eita-jrails/test/fixtures/test/render_explicit_html_template.js.rjs create mode 100644 vendor/plugins/eita-jrails/test/fixtures/test/render_implicit_html_template.js.rjs create mode 100644 vendor/plugins/eita-jrails/test/javascript_helper_test.rb create mode 100644 vendor/plugins/eita-jrails/test/jrails_test.rb create mode 100644 vendor/plugins/eita-jrails/test/lib/abstract_unit.rb create mode 100644 vendor/plugins/eita-jrails/test/lib/controller/fake_models.rb create mode 100644 vendor/plugins/eita-jrails/test/render_other_test.rb create mode 100644 vendor/plugins/eita-jrails/test/template/prototype_helper_test.rb create mode 100644 vendor/plugins/eita-jrails/test/template/render_test.rb create mode 100644 vendor/plugins/eita-jrails/test/template/scriptaculous_helper_test.rb create mode 100644 vendor/plugins/eita-jrails/test/test_helper.rb delete mode 100644 vendor/prototype_legacy_helper/README.markdown delete mode 100644 vendor/prototype_legacy_helper/init.rb delete mode 100644 vendor/prototype_legacy_helper/lib/prototype_legacy_helper.rb delete mode 100644 vendor/prototype_legacy_helper/test/test_prototype_helper.rb diff --git a/Gemfile b/Gemfile index 4fe72e1..ef084d3 100644 --- a/Gemfile +++ b/Gemfile @@ -3,8 +3,6 @@ gem 'rails', '~> 3.2.21' gem 'minitest', '~> 3.2.0' gem 'fast_gettext', '~> 0.6.8' gem 'acts-as-taggable-on', '~> 3.0.2' -gem 'prototype-rails', '~> 3.2.1' -gem 'prototype_legacy_helper', '0.0.0', :path => 'vendor/prototype_legacy_helper' gem 'rails_autolink', '~> 1.1.5' gem 'pg', '~> 0.13.2' gem 'rmagick', '~> 2.13.1' @@ -13,8 +11,7 @@ gem 'will_paginate', '~> 3.0.3' gem 'ruby-feedparser', '~> 0.7' gem 'daemons', '~> 1.1.5' gem 'thin', '~> 1.3.1' -gem 'hpricot', '~> 0.8.6' -gem 'nokogiri', '~> 1.6.0' +gem 'nokogiri', '~> 1.5.5' gem 'rake', :require => false gem 'grape', '~> 0.2.1' gem 'rest-client', '~> 1.6.7' @@ -24,8 +21,7 @@ gem 'locale', '~> 2.0.5' gem 'whenever', :require => false -# FIXME list here all actual dependencies (i.e. the ones in debian/control), -# with their GEM names (not the Debian package names) +gem 'eita-jrails', path: 'vendor/plugins/eita-jrails' group :production do gem 'dalli', '~> 2.7.0' @@ -45,6 +41,9 @@ group :cucumber do gem 'selenium-webdriver', '~> 2.39.0' end +# Requires custom dependencies +eval(File.read('config/Gemfile'), binding) rescue nil + # include gemfiles from enabled plugins # plugins in baseplugins/ are not included on purpose. They should not have any # dependencies. diff --git a/INSTALL.md b/INSTALL.md index d5b04a2..64ef642 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -21,7 +21,7 @@ Noosfero is written in Ruby with the "[Rails framework](http://www.rubyonrails.o You need to install some packages Noosfero depends on. On Debian GNU/Linux or Debian-based systems, all of these packages are available through the Debian archive. You can install them with the following command: # apt-get install ruby rake po4a libgettext-ruby-util libgettext-ruby1.8 \ - libsqlite3-ruby rcov librmagick-ruby libredcloth-ruby libhpricot-ruby \ + libsqlite3-ruby rcov librmagick-ruby libredcloth-ruby \ libwill-paginate-ruby iso-codes libfeedparser-ruby libdaemons-ruby thin \ tango-icon-theme @@ -40,7 +40,6 @@ On other systems, they may or may not be available through your regular package * Daemons - http://daemons.rubyforge.org * Thin: http://code.macournoyer.com/thin * tango-icon-theme: http://tango.freedesktop.org/Tango_Icon_Library -* Hpricot: http://hpricot.com If you manage to install Noosfero successfully on other systems than Debian, please feel free to contact the Noosfero development mailing with the diff --git a/INSTALL.multitenancy.md b/INSTALL.multitenancy.md index 06b0791..372ef1e 100644 --- a/INSTALL.multitenancy.md +++ b/INSTALL.multitenancy.md @@ -26,7 +26,7 @@ The file config/database.yml must follow a structure in order to achieve multite Each "hosted" environment must have an entry like this: - env1_production: + env1_production: &DEFAULT adapter: postgresql encoding: unicode database: noosfero @@ -61,7 +61,7 @@ The "hosted" environments define, besides the `schema_search_path`, a list of do You must also tell the application which is the default environment. production: - env1_production + <<: *DEFAULT On the example above there are only three hosted environments, but it can be more than three. The schemas `env2` and `env3` must already exist in the same database of the hosting environment. As postgres user, you can create them typing: diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..c436351 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,10 @@ +# Noosfero security + +## Reporting security issues in Noosfero + +Security vulnerabilities should be reported via an email to +noosfero-security@listas.softwarelivre.org, which ia a private mailing list. +Reported problems will be published after fixes are available. + +The members of the mailing list are people who provide Noosfero (Noosfero +committers, mainly). diff --git a/app/controllers/admin/admin_panel_controller.rb b/app/controllers/admin/admin_panel_controller.rb index 86fb9e6..59c87a7 100644 --- a/app/controllers/admin/admin_panel_controller.rb +++ b/app/controllers/admin/admin_panel_controller.rb @@ -87,6 +87,6 @@ class AdminPanelController < AdminController scope = scope.order('name ASC') @q = params[:q] - @collection = find_by_contents(:organizations, scope, @q, {:per_page => 10, :page => params[:npage]})[:results] + @collection = find_by_contents(:organizations, environment, scope, @q, {:per_page => 10, :page => params[:npage]})[:results] end end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 7bffe43..40b55ab 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -33,6 +33,7 @@ class ApplicationController < ActionController::Base unless environment.access_control_allow_methods.blank? response.headers["Access-Control-Allow-Methods"] = environment.access_control_allow_methods end + response.headers["Access-Control-Allow-Credentials"] = 'true' elsif environment.restrict_to_access_control_origins render_access_denied _('Origin not in allowed.') end @@ -64,15 +65,7 @@ class ApplicationController < ActionController::Base helper :document helper :language - def self.no_design_blocks - @no_design_blocks = true - end - def self.uses_design_blocks? - !@no_design_blocks - end - def uses_design_blocks? - !@no_design_blocks && self.class.uses_design_blocks? - end + include DesignHelper # Be sure to include AuthenticationSystem in Application Controller instead include AuthenticatedSystem diff --git a/app/controllers/public/chat_controller.rb b/app/controllers/public/chat_controller.rb index 4d19335..2d835bc 100644 --- a/app/controllers/public/chat_controller.rb +++ b/app/controllers/public/chat_controller.rb @@ -6,6 +6,7 @@ class ChatController < PublicController def start_session login = user.jid password = current_user.crypted_password + session[:chat] ||= {:rooms => []} begin jid, sid, rid = RubyBOSH.initialize_session(login, password, "http://#{environment.default_hostname}/http-bind", :wait => 30, :hold => 1, :window => 5) @@ -16,6 +17,31 @@ class ChatController < PublicController end end + def toggle + session[:chat][:status] = session[:chat][:status] == 'opened' ? 'closed' : 'opened' + render :nothing => true + end + + def tab + session[:chat][:tab_id] = params[:tab_id] + render :nothing => true + end + + def join + session[:chat][:rooms] << params[:room_id] + session[:chat][:rooms].uniq! + render :nothing => true + end + + def leave + session[:chat][:rooms].delete(params[:room_id]) + render :nothing => true + end + + def my_session + render :text => session[:chat].to_json, :layout => false + end + def avatar profile = environment.profiles.find_by_identifier(params[:id]) filename, mimetype = profile_icon(profile, :minor, true) @@ -51,18 +77,28 @@ class ChatController < PublicController messages = ChatMessage.where('(to_id=:other and from_id=:me) or (to_id=:me and from_id=:other)', {:me => user.id, :other => other.id}) end - messages = messages.order('created_at DESC').includes(:to, :from).limit(20) + messages = messages.order('created_at DESC').includes(:to, :from).offset(params[:offset]).limit(20) messages_json = messages.map do |message| { :body => message.body, - :to => {:id => message.to.identifier, :name => message.to.name, :type => message.to.type}, - :from => {:id => message.from.identifier, :name => message.from.name, :type => message.from.type}, + :to => {:id => message.to.identifier, :name => message.to.name}, + :from => {:id => message.from.identifier, :name => message.from.name}, :created_at => message.created_at } end render :json => messages_json.reverse end + def recent_conversations + conversations_order = ActiveRecord::Base.connection.execute("select profiles.identifier from profiles inner join (select distinct r.id as id, MAX(r.created_at) as created_at from (select from_id, to_id, created_at, (case when from_id=#{user.id} then to_id else from_id end) as id from chat_messages where from_id=#{user.id} or to_id=#{user.id}) as r group by id order by created_at desc, id) as t on profiles.id=t.id order by t.created_at desc").entries.map {|e| e['identifier']} + render :json => {:order => conversations_order.reverse, :domain => environment.default_hostname.gsub('.','-')}.to_json + end + + #TODO Ideally this is done through roster table on ejabberd. + def roster_groups + render :text => user.memberships.map {|m| {:jid => m.jid, :name => m.name}}.to_json + end + protected def check_environment_feature diff --git a/app/controllers/public/contact_controller.rb b/app/controllers/public/contact_controller.rb index bad75d0..fd29463 100644 --- a/app/controllers/public/contact_controller.rb +++ b/app/controllers/public/contact_controller.rb @@ -1,6 +1,7 @@ class ContactController < PublicController needs_profile + before_filter :allow_access_to_page def new @contact = build_contact diff --git a/app/controllers/public/events_controller.rb b/app/controllers/public/events_controller.rb index 93a0e4d..05303e5 100644 --- a/app/controllers/public/events_controller.rb +++ b/app/controllers/public/events_controller.rb @@ -1,6 +1,7 @@ class EventsController < PublicController needs_profile + before_filter :allow_access_to_page def events @events = [] diff --git a/app/controllers/public/home_controller.rb b/app/controllers/public/home_controller.rb index a2f0c27..ab55d23 100644 --- a/app/controllers/public/home_controller.rb +++ b/app/controllers/public/home_controller.rb @@ -2,13 +2,13 @@ class HomeController < PublicController def index @has_news = false - if environment.enabled?('use_portal_community') && environment.portal_community + if environment.portal_enabled @has_news = true @news_cache_key = environment.portal_news_cache_key(FastGettext.locale) if !read_fragment(@news_cache_key) portal_community = environment.portal_community - @highlighted_news = portal_community.news(2, true) - @portal_news = portal_community.news(7, true) - @highlighted_news + @highlighted_news = portal_community.news(environment.highlighted_news_amount, true) + @portal_news = portal_community.news(environment.portal_news_amount, true).offset(environment.highlighted_news_amount) @area_news = environment.portal_folders end end diff --git a/app/controllers/public/profile_controller.rb b/app/controllers/public/profile_controller.rb index 8577d75..1817d0c 100644 --- a/app/controllers/public/profile_controller.rb +++ b/app/controllers/public/profile_controller.rb @@ -16,13 +16,7 @@ class ProfileController < PublicController @activities = @profile.activities.paginate(:per_page => 15, :page => params[:page]) end @tags = profile.article_tags - unless profile.display_info_to?(user) - if profile.visible? - private_profile - else - invisible_profile - end - end + allow_access_to_page end def tags @@ -399,17 +393,6 @@ class ProfileController < PublicController end end - def private_profile - private_profile_partial_parameters - render :action => 'index', :status => 403 - end - - def invisible_profile - unless profile.is_template? - render_access_denied(_("This profile is inaccessible. You don't have the permission to view the content here."), _("Oops ... you cannot go ahead here")) - end - end - def per_page Noosfero::Constants::PROFILE_PER_PAGE end diff --git a/app/controllers/public_controller.rb b/app/controllers/public_controller.rb index 2857026..34e5fcd 100644 --- a/app/controllers/public_controller.rb +++ b/app/controllers/public_controller.rb @@ -1,2 +1,24 @@ class PublicController < ApplicationController + protected + + def allow_access_to_page + unless profile.display_info_to?(user) + if profile.visible? + private_profile + else + invisible_profile + end + end + end + + def private_profile + private_profile_partial_parameters + render :template => 'shared/access_denied.html.erb', :status => 403 + end + + def invisible_profile + unless profile.is_template? + render_access_denied(_("This profile is inaccessible. You don't have the permission to view the content here."), _("Oops ... you cannot go ahead here")) + end + end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 86c10a3..c97612e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -8,11 +8,7 @@ module ApplicationHelper include PermissionNameHelper - include LightboxHelper - - include ThickboxHelper - - include ColorboxHelper + include ModalHelper include BoxesHelper @@ -46,6 +42,8 @@ module ApplicationHelper include CatalogHelper + include PluginsHelper + def locale (@page && !@page.language.blank?) ? @page.language : FastGettext.locale end @@ -649,8 +647,8 @@ module ApplicationHelper ' onfocus="if(this.value==\''+s+'\'){this.value=\'\'} this.form.className=\'focus-in\'"'+ ' onblur="if(/^\s*$/.test(this.value)){this.value=\''+s+'\'} this.form.className=\'focus-out\'">'+ '' - else #opt == 'lightbox_link' is default - lightbox_link_to ''+ _('Search'), { + else + modal_link_to ''+ _('Search'), { :controller => 'search', :action => 'popup', :category_path => (@category ? @category.explode_path : nil)}, @@ -1048,7 +1046,7 @@ module ApplicationHelper {s_('contents|Most commented') => {:href => url_for({:controller => 'search', :action => 'contents', :filter => 'more_comments'})}} ] if logged_in? - links.push(_('New content') => colorbox_options({:href => url_for({:controller => 'cms', :action => 'new', :profile => current_user.login, :cms => true})})) + links.push(_('New content') => modal_options({:href => url_for({:controller => 'cms', :action => 'new', :profile => current_user.login, :cms => true})})) end link_to(content_tag(:span, _('Contents'), :class => 'icon-menu-articles'), {:controller => "search", :action => 'contents', :category_path => nil}, :id => 'submenu-contents') + @@ -1408,16 +1406,16 @@ module ApplicationHelper end def convert_macro(html, source) - doc = Hpricot(html) + doc = Nokogiri::HTML.fragment html #TODO This way is more efficient but do not support macro inside of # macro. You must parse them from the inside-out in order to enable # that. - doc.search('.macro').each do |macro| + doc.css('.macro').each do |macro| macro_name = macro['data-macro'] result = @plugins.parse_macro(macro_name, macro, source) macro.inner_html = result.kind_of?(Proc) ? self.instance_exec(&result) : result end - doc.html + doc.to_html end def default_folder_for_image_upload(profile) diff --git a/app/helpers/article_helper.rb b/app/helpers/article_helper.rb index 8bca69a..a91bac2 100644 --- a/app/helpers/article_helper.rb +++ b/app/helpers/article_helper.rb @@ -1,6 +1,5 @@ module ArticleHelper - include PrototypeHelper include TokenHelper def article_reported_version(article) @@ -35,7 +34,7 @@ module ArticleHelper 'div', check_box(:article, :notify_comments) + content_tag('label', _('I want to receive a notification of each comment written by e-mail'), :for => 'article_notify_comments') + - observe_field(:article_accept_comments, :function => "$('article_notify_comments').disabled = ! $('article_accept_comments').checked;$('article_moderate_comments').disabled = ! $('article_accept_comments').checked") + observe_field(:article_accept_comments, :function => "jQuery('#article_notify_comments')[0].disabled = ! jQuery('#article_accept_comments')[0].checked;jQuery('#article_moderate_comments')[0].disabled = ! jQuery('#article_accept_comments')[0].checked") ) + content_tag( diff --git a/app/helpers/boxes_helper.rb b/app/helpers/boxes_helper.rb index a35cf7d..e1fd4a1 100644 --- a/app/helpers/boxes_helper.rb +++ b/app/helpers/boxes_helper.rb @@ -38,8 +38,12 @@ module BoxesHelper end end + def boxes_limit holder + controller.send(:custom_design)[:boxes_limit] || holder.boxes_limit(controller.send(:custom_design)[:layout_template]) + end + def display_boxes(holder, main_content) - boxes = holder.boxes.with_position.first(holder.boxes_limit) + boxes = holder.boxes.with_position.first(boxes_limit(holder)) content = boxes.reverse.map { |item| display_box(item, main_content) }.join("\n") content = main_content if (content.blank?) @@ -65,11 +69,13 @@ module BoxesHelper end def display_box_content(box, main_content) - context = { :article => @page, :request_path => request.path, :locale => locale, :params => request.params, :user => user } - box_decorator.select_blocks(box.blocks.includes(:box), context).map { |item| display_block(item, main_content) }.join("\n") + box_decorator.block_target(box) + context = { :article => @page, :request_path => request.path, :locale => locale, :params => request.params, :user => user, :controller => controller } + box_decorator.select_blocks(box, box.blocks.includes(:box), context).map do |item| + display_block item, main_content + end.join("\n") + box_decorator.block_target(box) end - def select_blocks(arr, context) + def select_blocks box, arr, context arr end @@ -150,8 +156,22 @@ module BoxesHelper def self.block_edit_buttons(block) '' end - def self.select_blocks(arr, context) - arr.select { |block| block.visible?(context) } + def self.select_blocks box, arr, context + arr = arr.select{ |block| block.visible? context } + + custom_design = context[:controller].send(:custom_design) + inserts = [custom_design[:insert]].flatten.compact + inserts.each do |insert_opts| + next unless box.position == insert_opts[:box] + position, block = insert_opts[:position], insert_opts[:block] + block = block.new box: box if block.is_a? Class + + if not insert_opts[:uniq] or not box.blocks.map(&:class).include? block.klass + arr = arr.insert position, block + end + end + + arr end end @@ -211,7 +231,7 @@ module BoxesHelper end if block.editable? - buttons << colorbox_icon_button(:edit, _('Edit'), { :action => 'edit', :id => block.id }) + buttons << modal_icon_button(:edit, _('Edit'), { :action => 'edit', :id => block.id }) end if !block.main? @@ -221,7 +241,7 @@ module BoxesHelper end if block.respond_to?(:help) - buttons << thickbox_inline_popup_icon(:help, _('Help on this block'), {}, "help-on-box-#{block.id}") << content_tag('div', content_tag('h2', _('Help')) + content_tag('div', block.help, :style => 'margin-bottom: 1em;') + thickbox_close_button(_('Close')), :style => 'display: none;', :id => "help-on-box-#{block.id}") + buttons << modal_inline_icon(:help, _('Help on this block'), {}, "#help-on-box-#{block.id}") << content_tag('div', content_tag('h2', _('Help')) + content_tag('div', block.help, :style => 'margin-bottom: 1em;') + modal_close_button(_('Close')), :style => 'display: none;', :id => "help-on-box-#{block.id}") end if block.embedable? diff --git a/app/helpers/chat_helper.rb b/app/helpers/chat_helper.rb index 6e4315b..a799852 100644 --- a/app/helpers/chat_helper.rb +++ b/app/helpers/chat_helper.rb @@ -6,8 +6,9 @@ module ChatHelper ['icon-menu-busy', _('Busy'), 'chat-busy'], ['icon-menu-offline', _('Sign out of chat'), 'chat-disconnect'], ] + avatar = profile_image(user, :portrait, :class => 'avatar') content_tag('span', - link_to(content_tag('span', user.name) + ui_icon('ui-icon-triangle-1-s'), + link_to(avatar + content_tag('span', user.name) + ui_icon('ui-icon-triangle-1-s'), '#', :onclick => 'toggleMenu(this); return false', :class => icon_class + ' simplemenu-trigger' diff --git a/app/helpers/colorbox_helper.rb b/app/helpers/colorbox_helper.rb deleted file mode 100644 index 24bedc5..0000000 --- a/app/helpers/colorbox_helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -module ColorboxHelper - - def colorbox_close_button(text, options = {}) - button(:close, text, '#', colorbox_options(options, :close)) - end - - def colorbox_button(type, label, url, options = {}) - button(type, label, url, colorbox_options(options)) - end - - def colorbox_icon_button(type, label, url, options = {}) - icon_button(type, label, url, colorbox_options(options)) - end - - # options must be an HTML options hash as passed to link_to etc. - # - # returns a new hash with colorbox class added. Keeps existing classes. - def colorbox_options(options, type=nil) - the_class = 'colorbox' - the_class += "-#{type.to_s}" unless type.nil? - the_class << " #{options[:class]}" if options.has_key?(:class) - options.merge(:class => the_class) - end - -end diff --git a/app/helpers/comment_helper.rb b/app/helpers/comment_helper.rb index ba19262..9b93e8c 100644 --- a/app/helpers/comment_helper.rb +++ b/app/helpers/comment_helper.rb @@ -65,7 +65,7 @@ module CommentHelper def link_for_edit(comment) if comment.can_be_updated_by?(user) - {:link => expirable_comment_link(comment, :edit, _('Edit'), url_for(:profile => profile.identifier, :controller => :comment, :action => :edit, :id => comment.id),:class => 'colorbox')} + {:link => expirable_comment_link(comment, :edit, _('Edit'), url_for(:profile => profile.identifier, :controller => :comment, :action => :edit, :id => comment.id),:class => 'modal')} end end diff --git a/app/helpers/dates_helper.rb b/app/helpers/dates_helper.rb index 4be36e1..337c147 100644 --- a/app/helpers/dates_helper.rb +++ b/app/helpers/dates_helper.rb @@ -2,24 +2,14 @@ require 'noosfero/i18n' module DatesHelper - # FIXME Date#strftime should translate this for us !!!! - MONTHS = [ - N_('January'), - N_('February'), - N_('March'), - N_('April'), - N_('May'), - N_('June'), - N_('July'), - N_('August'), - N_('September'), - N_('October'), - N_('November'), - N_('December') - ] - - def month_name(n) - _(MONTHS[n-1]) + MONTHS = I18n.t('date.month_names') + + def month_name(n, abbreviated = false) + if abbreviated + I18n.t('date.abbr_month_names')[n] + else + MONTHS[n] + end end # formats a date for displaying. @@ -91,15 +81,7 @@ module DatesHelper _(date.strftime("%a")) else # FIXME Date#strftime should translate this for us !!!! - _([ - N_('Sunday'), - N_('Monday'), - N_('Tuesday'), - N_('Wednesday'), - N_('Thursday'), - N_('Friday'), - N_('Saturday'), - ][date.wday]) + I18n.t('date.day_names')[date.wday] end end @@ -111,7 +93,7 @@ module DatesHelper date = date << 1 end if opts[:only_month] - _('%{month}') % {:month => month_name(date.month.to_i) } + _('%{month}') % { :month => month_name(date.month.to_i) } else _('%{month} %{year}') % { :year => date.year, :month => month_name(date.month.to_i) } end @@ -156,7 +138,7 @@ module DatesHelper else order = [:day, :month, :year] end - date_select(object, method, html_options.merge(options.merge(:include_blank => true, :order => order, :use_month_names => MONTHS.map {|item| gettext(item)}))) + date_select(object, method, html_options.merge(options.merge(:include_blank => true, :order => order, :use_month_names => MONTHS))) end end diff --git a/app/helpers/design_helper.rb b/app/helpers/design_helper.rb new file mode 100644 index 0000000..9c78710 --- /dev/null +++ b/app/helpers/design_helper.rb @@ -0,0 +1,50 @@ +module DesignHelper + + extend ActiveSupport::Concern + + included do + extend ClassMethods + include InstanceMethods + before_filter :load_custom_design if self.respond_to? :before_filter + end + + module ClassMethods + + def no_design_blocks + @no_design_blocks = true + end + + def use_custom_design options = {} + @custom_design = options + end + + def custom_design + @custom_design ||= {} + end + + def uses_design_blocks? + !@no_design_blocks + end + + end + + module InstanceMethods + + protected + + def uses_design_blocks? + !@no_design_blocks && self.class.uses_design_blocks? + end + + def load_custom_design + # see also: LayoutHelper#body_classes + @layout_template = self.class.custom_design[:layout_template] + end + + def custom_design + @custom_design || self.class.custom_design + end + + end + +end diff --git a/app/helpers/lightbox_helper.rb b/app/helpers/lightbox_helper.rb deleted file mode 100644 index ffb8d35..0000000 --- a/app/helpers/lightbox_helper.rb +++ /dev/null @@ -1,36 +0,0 @@ -module LightboxHelper - - def lightbox_link_to(text, url, options = {}) - link_to(text, url, lightbox_options(options)) - end - - def lightbox_close_button(text, options = {}) - button(:close, text, '#', lightbox_options(options, 'lbAction').merge(:rel => 'deactivate')) - end - - def lightbox_button(type, label, url, options = {}) - button(type, label, url, lightbox_options(options)) - end - - def lightbox_icon_button(type, label, url, options = {}) - icon_button(type, label, url, lightbox_options(options)) - end - - # options must be an HTML options hash as passed to link_to etc. - # - # returns a new hash with lightbox class added. Keeps existing classes. - def lightbox_options(options, lightbox_type = 'lbOn') - the_class = lightbox_type - the_class << " #{options[:class]}" if options.has_key?(:class) - options.merge(:class => the_class) - end - - def lightbox? - request.xhr? - end - - def lightbox_remote_button(type, label, url, options = {}) - button(type, label, url, lightbox_options(options, 'remote-lbOn')) - end - -end diff --git a/app/helpers/manage_products_helper.rb b/app/helpers/manage_products_helper.rb index 7479167..f0b57d4 100644 --- a/app/helpers/manage_products_helper.rb +++ b/app/helpers/manage_products_helper.rb @@ -137,7 +137,7 @@ module ManageProductsHelper ui_button_to_remote(label, {:update => "product-#{field}", :url => { :controller => 'manage_products', :action => "edit", :id => product.id, :field => field }, - :complete => "$('edit-product-button-ui-#{field}').hide()", + :complete => "jQuery('#edit-product-button-ui-#{field}').hide()", :method => :get, :loading => "loading_for_button('##{id}')"}, options) diff --git a/app/helpers/modal_helper.rb b/app/helpers/modal_helper.rb new file mode 100644 index 0000000..3c602e5 --- /dev/null +++ b/app/helpers/modal_helper.rb @@ -0,0 +1,46 @@ +module ModalHelper + + def modal_inline_link_to title, url, selector, options = {} + link_to title, url, modal_options(options.merge(:inline => selector)) + end + + def modal_inline_icon type, title, url, selector, options = {} + icon_button type, title, url, modal_options(options.merge(:inline => selector)) + end + + def modal_link_to title, url, options = {} + link_to title, url, modal_options(options) + end + + def modal_close_link text, options = {} + link_to text, '#', modal_options(options, :close) + end + + def modal_close_button(text, options = {}) + button :close, text, '#', modal_options(options, :close).merge(:rel => 'deactivate') + end + + def modal_button(type, label, url, options = {}) + button type, label, url, modal_options(options) + end + + def modal_icon_button(type, label, url, options = {}) + icon_button type, label, url, modal_options(options) + end + + # options must be an HTML options hash as passed to link_to etc. + # + # returns a new hash with modal class added. Keeps existing classes. + def modal_options(options, type=nil) + inline_selector = options.delete :inline + options[:onclick] = "return noosfero.modal.inline('#{inline_selector}')" if inline_selector + + classes = if inline_selector then '' else 'modal-toggle' end + classes += " modal-#{type.to_s}" if type.present? + classes << " #{options[:class]}" if options.has_key? :class + options.merge!(:class => classes) + + options + end + +end diff --git a/app/helpers/plugins_helper.rb b/app/helpers/plugins_helper.rb new file mode 100644 index 0000000..503c791 --- /dev/null +++ b/app/helpers/plugins_helper.rb @@ -0,0 +1,9 @@ +module PluginsHelper + + def plugins_product_tabs + @plugins.dispatch(:product_tabs, @product).map do |tab| + {:title => tab[:title], :id => tab[:id], :content => instance_eval(&tab[:content])} + end + end + +end diff --git a/app/helpers/thickbox_helper.rb b/app/helpers/thickbox_helper.rb deleted file mode 100644 index 376dd4f..0000000 --- a/app/helpers/thickbox_helper.rb +++ /dev/null @@ -1,11 +0,0 @@ -module ThickboxHelper - def thickbox_inline_popup_link(title, url, id, options = {}) - link_to(title, url_for(url) + "#TB_inline?height=300&width=500&inlineId=#{id}&modal=true", {:class => 'thickbox'}.merge(options)) - end - def thickbox_inline_popup_icon(type, title, url, id, options = {}) - icon_button(type, title, url_for(url) + "#TB_inline?height=300&width=500&inlineId=#{id}&modal=true", {:class => "thickbox"}.merge(options)) - end - def thickbox_close_button(title) - button_to_function(:close, title, 'tb_remove();') - end -end diff --git a/app/models/article.rb b/app/models/article.rb index 7e661f6..0f57bd1 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -1,4 +1,3 @@ -require 'hpricot' class Article < ActiveRecord::Base @@ -400,6 +399,10 @@ class Article < ActiveRecord::Base {} end + def alternate_languages + self.translations.map(&:language) + end + scope :native_translations, :conditions => { :translation_of_id => nil } def translatable? @@ -713,7 +716,7 @@ class Article < ActiveRecord::Base end def first_paragraph - paragraphs = Hpricot(to_html).search('p') + paragraphs = Nokogiri::HTML.fragment(to_html).css('p') paragraphs.empty? ? '' : paragraphs.first.to_html end @@ -735,8 +738,8 @@ class Article < ActiveRecord::Base def body_images_paths require 'uri' - Hpricot(self.body.to_s).search('img[@src]').collect do |i| - (self.profile && self.profile.environment) ? URI.join(self.profile.environment.top_url, URI.escape(i.attributes['src'])).to_s : i.attributes['src'] + Nokogiri::HTML.fragment(self.body.to_s).css('img[src]').collect do |i| + (self.profile && self.profile.environment) ? URI.join(self.profile.environment.top_url, URI.escape(i['src'])).to_s : i['src'] end end @@ -773,11 +776,11 @@ class Article < ActiveRecord::Base end def first_image - img = Hpricot(self.lead.to_s).search('img[@src]').first || Hpricot(self.body.to_s).search('img').first - img.nil? ? '' : img.attributes['src'] + img = Nokogiri::HTML.fragment(self.lead.to_s).css('img[src]').first || Nokogiri::HTML.fragment(self.body.to_s).search('img').first + img.nil? ? '' : img['src'] end - delegate :region, :region_id, :environment, :environment_id, :to => :profile, :allow_nil => true + delegate :lat, :lng, :region, :region_id, :environment, :environment_id, :to => :profile, :allow_nil => true def has_macro? true diff --git a/app/models/blog_archives_block.rb b/app/models/blog_archives_block.rb index 62703e4..4368d93 100644 --- a/app/models/blog_archives_block.rb +++ b/app/models/blog_archives_block.rb @@ -36,8 +36,7 @@ class BlogArchivesBlock < Block results << content_tag('li', content_tag('strong', "#{year} (#{count})")) results << "" end diff --git a/app/models/box.rb b/app/models/box.rb index 9aa00e8..7a925bf 100644 --- a/app/models/box.rb +++ b/app/models/box.rb @@ -14,8 +14,8 @@ class Box < ActiveRecord::Base end def acceptable_blocks - blocks_classes = central? ? Box.acceptable_center_blocks + plugins.dispatch(:extra_blocks, :type => owner.class, :position => 1) : Box.acceptable_side_blocks + plugins.dispatch(:extra_blocks, :type => owner.class, :position => [2, 3]) - to_css_class_name(blocks_classes) + blocks_classes = if central? then Box.acceptable_center_blocks + plugins.dispatch(:extra_blocks, :type => owner.class, :position => 1) else Box.acceptable_side_blocks + plugins.dispatch(:extra_blocks, :type => owner.class, :position => [2, 3]) end + to_css_selector blocks_classes end def central? @@ -74,8 +74,8 @@ class Box < ActiveRecord::Base private - def to_css_class_name(blocks_classes) - blocks_classes.map{ |block_class| block_class.name.to_css_class } + def to_css_selector(blocks_classes) + blocks_classes.map{ |block_class| ".#{block_class.name.to_css_class}" }.join(',') end end diff --git a/app/models/enterprise.rb b/app/models/enterprise.rb index 6b4b700..cab8386 100644 --- a/app/models/enterprise.rb +++ b/app/models/enterprise.rb @@ -19,7 +19,8 @@ class Enterprise < Organization has_many :inputs, :through => :products has_many :production_costs, :as => :owner - has_and_belongs_to_many :fans, :class_name => 'Person', :join_table => 'favorite_enteprises_people' + has_many :favorite_enterprise_people + has_many :fans, through: :favorite_enterprise_people, source: :person def product_categories ProductCategory.by_enterprise(self) diff --git a/app/models/environment.rb b/app/models/environment.rb index cdb89d7..1d15d31 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -3,7 +3,7 @@ # domains. class Environment < ActiveRecord::Base - attr_accessible :name, :is_default, :signup_welcome_text_subject, :signup_welcome_text_body, :terms_of_use, :message_for_disabled_enterprise, :news_amount_by_folder, :default_language, :languages, :description, :organization_approval_method, :enabled_plugins, :enabled_features, :disabled_blocks, :redirection_after_login, :redirection_after_signup, :contact_email, :theme, :reports_lower_bound, :noreply_email, :signup_welcome_screen_body, :members_whitelist_enabled, :members_whitelist + attr_accessible :name, :is_default, :signup_welcome_text_subject, :signup_welcome_text_body, :terms_of_use, :message_for_disabled_enterprise, :news_amount_by_folder, :default_language, :languages, :description, :organization_approval_method, :enabled_plugins, :enabled_features, :redirection_after_login, :redirection_after_signup, :contact_email, :theme, :reports_lower_bound, :noreply_email, :signup_welcome_screen_body, :members_whitelist_enabled, :members_whitelist, :highlighted_news_amount, :portal_news_amount has_many :users @@ -268,9 +268,12 @@ class Environment < ActiveRecord::Base settings_items :description, :type => String, :default => '
Noosfero
' settings_items :local_docs, :type => Array, :default => [] settings_items :news_amount_by_folder, :type => Integer, :default => 4 + settings_items :highlighted_news_amount, :type => Integer, :default => 2 + settings_items :portal_news_amount, :type => Integer, :default => 5 settings_items :help_message_to_add_enterprise, :type => String, :default => '' settings_items :tip_message_enterprise_activation_question, :type => String, :default => '' + settings_items :currency_iso_unit, :type => String, :default => 'USD' settings_items :currency_unit, :type => String, :default => '$' settings_items :currency_separator, :type => String, :default => '.' settings_items :currency_delimiter, :type => String, :default => ',' @@ -292,8 +295,6 @@ class Environment < ActiveRecord::Base settings_items :enabled_plugins, :type => Array, :default => Noosfero::Plugin.available_plugin_names - settings_items :disabled_blocks, :type => Array, :default => [] - settings_items :search_hints, :type => Hash, :default => {} # Set to return http forbidden to host not on the allow origin list bellow @@ -359,10 +360,6 @@ class Environment < ActiveRecord::Base enabled_plugins.include?(plugin.to_s) end - def block_disabled?(block) - disabled_blocks.include?(block.to_s) - end - # enables the features identified by features, which is expected to # be an Enumarable object containing the identifiers of the desired features. # Passing nil is the same as passing an empty Array. diff --git a/app/models/event.rb b/app/models/event.rb index aaf28db..f1548a4 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -141,6 +141,10 @@ class Event < Article result end + def duration + ((self.end_date || self.start_date) - self.start_date).to_i + end + def lead content_tag('div', show_period(start_date, end_date), diff --git a/app/models/external_feed.rb b/app/models/external_feed.rb index 40f018a..2220262 100644 --- a/app/models/external_feed.rb +++ b/app/models/external_feed.rb @@ -14,9 +14,9 @@ class ExternalFeed < ActiveRecord::Base def add_item(title, link, date, content) return if content.blank? - doc = Hpricot(content) - doc.search('*').each do |p| - if p.instance_of? Hpricot::Elem + doc = Nokogiri::HTML.fragment content + doc.css('*').each do |p| + if p.instance_of? Nokogiri::XML::Element p.remove_attribute 'style' p.remove_attribute 'class' end @@ -26,10 +26,10 @@ class ExternalFeed < ActiveRecord::Base article = TinyMceArticle.new article.name = title article.profile = blog.profile - article.body = content - article.published_at = date - article.source = link - article.profile = blog.profile + article.body = content + article.published_at = date + article.source = link + article.profile = blog.profile article.parent = blog article.author_name = self.feed_title unless blog.children.exists?(:slug => article.slug) diff --git a/app/models/favorite_enterprise_person.rb b/app/models/favorite_enterprise_person.rb new file mode 100644 index 0000000..f46cbe3 --- /dev/null +++ b/app/models/favorite_enterprise_person.rb @@ -0,0 +1,8 @@ +class FavoriteEnterprisePerson < ActiveRecord::Base + + self.table_name = :favorite_enteprises_people + + belongs_to :enterprise + belongs_to :person + +end diff --git a/app/models/forum.rb b/app/models/forum.rb index f6a7eb1..a6c1e3a 100644 --- a/app/models/forum.rb +++ b/app/models/forum.rb @@ -54,7 +54,7 @@ class Forum < Folder def first_paragraph return '' if body.blank? - paragraphs = Hpricot(body).search('p') + paragraphs = Nokogiri::HTML.fragment(body).css('p') paragraphs.empty? ? '' : paragraphs.first.to_html end diff --git a/app/models/input.rb b/app/models/input.rb index a8809f2..a4938cc 100644 --- a/app/models/input.rb +++ b/app/models/input.rb @@ -1,6 +1,7 @@ class Input < ActiveRecord::Base - attr_accessible :product, :product_category, :product_category_id, :amount_used, :unit_id, :price_per_unit, :relevant_to_price + attr_accessible :product, :product_id, :product_category, :product_category_id, + :amount_used, :unit_id, :price_per_unit, :relevant_to_price, :is_from_solidarity_economy belongs_to :product belongs_to :product_category diff --git a/app/models/product.rb b/app/models/product.rb index b2873d0..e9137ff 100644 --- a/app/models/product.rb +++ b/app/models/product.rb @@ -10,7 +10,8 @@ class Product < ActiveRecord::Base :display => %w[full map] } - attr_accessible :name, :product_category, :highlighted, :price, :enterprise, :image_builder, :description, :available, :qualifiers, :unit_id, :discount, :inputs, :qualifiers_list + attr_accessible :name, :product_category, :profile, :profile_id, :enterprise, + :highlighted, :price, :image_builder, :description, :available, :qualifiers, :unit_id, :discount, :inputs, :qualifiers_list def self.default_search_display 'full' @@ -236,7 +237,7 @@ class Product < ActiveRecord::Base def percentage_from_solidarity_economy se_i = t_i = 0 - self.inputs(true).each{ |i| t_i += 1; se_i += 1 if i.is_from_solidarity_economy } + self.inputs.each{ |i| t_i += 1; se_i += 1 if i.is_from_solidarity_economy } t_i = 1 if t_i == 0 # avoid division by 0 p = case (se_i.to_f/t_i)*100 when 0 then [0, ''] diff --git a/app/models/text_article.rb b/app/models/text_article.rb index 5e774dc..66dbe9f 100644 --- a/app/models/text_article.rb +++ b/app/models/text_article.rb @@ -1,6 +1,6 @@ require 'noosfero/translatable_content' -# a base class for all text article types. +# a base class for all text article types. class TextArticle < Article xss_terminate :only => [ :name ], :on => 'validation' @@ -26,10 +26,10 @@ class TextArticle < Article before_save :set_relative_path def set_relative_path - parsed = Hpricot(self.body.to_s) - parsed.search('img[@src]').map { |i| change_element_path(i, 'src') } - parsed.search('a[@href]').map { |i| change_element_path(i, 'href') } - self.body = parsed.to_s + parsed = Nokogiri::HTML.fragment(self.body.to_s) + parsed.css('img[src]').each { |i| change_element_path(i, 'src') } + parsed.css('a[href]').each { |i| change_element_path(i, 'href') } + self.body = parsed.to_html end def change_element_path(el, attribute) diff --git a/app/models/user.rb b/app/models/user.rb index b1ccb49..8f65256 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,6 +1,5 @@ require 'digest/sha1' require 'user_activation_job' -require 'securerandom' # User models the system users, and is generated by the acts_as_authenticated # Rails generator. @@ -55,7 +54,7 @@ class User < ActiveRecord::Base user.person = p end - if user.environment.enabled?('skip_new_user_email_confirmation') + if user.environment.enabled?('skip_new_user_email_confirmation') if user.environment.enabled?('admin_must_approve_new_users') create_moderate_task else @@ -103,6 +102,7 @@ class User < ActiveRecord::Base validates_length_of :email, :within => 3..100, :if => (lambda {|user| !user.email.blank?}) validates_uniqueness_of :login, :email, :case_sensitive => false, :scope => :environment_id before_save :encrypt_password + before_save :normalize_email, if: proc{ |u| u.email.present? } validates_format_of :email, :with => Noosfero::Constants::EMAIL_FORMAT, :if => (lambda {|user| !user.email.blank?}) validates_inclusion_of :terms_accepted, :in => [ '1' ], :if => lambda { |u| ! u.terms_of_use.blank? }, :message => N_('{fn} must be checked in order to signup.').fix_i18n @@ -115,6 +115,10 @@ class User < ActiveRecord::Base u && u.authenticated?(password) ? u : nil end + def register_login + self.update_attribute :last_login_at, Time.now + end + #FIXME make this test def generate_private_token! self.private_token = SecureRandom.hex @@ -345,6 +349,11 @@ class User < ActiveRecord::Base end protected + + def normalize_email + self.email = self.email.squish.downcase + end + # before filter def encrypt_password return if password.blank? diff --git a/app/views/account/_login_form.html.erb b/app/views/account/_login_form.html.erb index a145e92..56660c0 100644 --- a/app/views/account/_login_form.html.erb +++ b/app/views/account/_login_form.html.erb @@ -1,12 +1,9 @@ <%= labelled_form_for :user, :url => { :controller => 'account', :action => (params[:enterprise_code] ? 'activate_enterprise' : 'login') } do |f| %> -<%= f.text_field :login, - :id => ( lightbox? ? 'lightbox_' : '' ) + 'user_login', - :onchange => 'this.value = convToValidLogin( this.value )' %> +<%= f.text_field :login, :id => 'user_login', :onchange => 'this.value = convToValidLogin( this.value )' %> -<%= f.password_field :password, - :id => ( lightbox? ? 'lightbox_' : '' ) + 'user_password' %> +<%= f.password_field :password, :id => 'user_password' %> <% if params[:enterprise_code] %> <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %> @@ -16,7 +13,7 @@ <% button_bar do %> <%= submit_button( 'login', _('Log in') )%> - <%= lightbox_close_button(_('Cancel')) if lightbox? %> + <%= modal_close_button _('Cancel') if request.xhr? %> <% end %> <% end %> diff --git a/app/views/account/activate_enterprise.html.erb b/app/views/account/activate_enterprise.html.erb index 779af71..192013d 100644 --- a/app/views/account/activate_enterprise.html.erb +++ b/app/views/account/activate_enterprise.html.erb @@ -7,8 +7,8 @@

<%= _('Do you have a personal user account in the system?') %>

- <%= button_to_function 'login', _('Yes'), "$('enterprise-activation-create-user-form').hide(); $('enterprise-activation-login-form').show()" %> - <%= button_to_function 'add', _('No'), "$('enterprise-activation-login-form').hide(); $('enterprise-activation-create-user-form').show()" %> + <%= button_to_function 'login', _('Yes'), "jQuery('#enterprise-activation-create-user-form').hide(); jQuery('#enterprise-activation-login-form').show()" %> + <%= button_to_function 'add', _('No'), "jQuery('#enterprise-activation-login-form').hide(); jQuery('#enterprise-activation-create-user-form').show()" %>
<%= javascript_tag do %> - $$('#display-product-category .hierarchy-category')[0].update('<%= + jQuery('#display-product-category .hierarchy-category').first().html('<%= escape_javascript(hierarchy_category_navigation( @product.product_category, :make_links => false, diff --git a/app/views/manage_products/new.html.erb b/app/views/manage_products/new.html.erb index 5e1aced..806c32f 100644 --- a/app/views/manage_products/new.html.erb +++ b/app/views/manage_products/new.html.erb @@ -26,5 +26,5 @@ <% end %> <%= javascript_tag do %> - toggleDisabled(<%= @category && @category.accept_products? ? 'true' : 'false' %>, $('save_and_continue')) + toggleDisabled(<%= @category && @category.accept_products? ? 'true' : 'false' %>, jQuery('#save_and_continue')[0]) <% end %> diff --git a/app/views/manage_products/show.html.erb b/app/views/manage_products/show.html.erb index b6d78b9..f4eefcd 100644 --- a/app/views/manage_products/show.html.erb +++ b/app/views/manage_products/show.html.erb @@ -24,6 +24,8 @@
<% unless !@allowed_user && (@product.description.blank? && @product.inputs.empty? && !@product.price_described? ) %> + <% plugins_tabs = plugins_product_tabs %> +
+
<%= render :partial => 'manage_products/display_description' %>
+
<%= render :partial => 'manage_products/display_inputs' %>
+ <% if @product.price_described? || @allowed_user %>
<%= render :partial => 'manage_products/display_price_details' %> <%= render :partial => 'manage_products/price_details_button' %>
<% end %> + + <% plugins_tabs.each do |tab| %> +
<%= raw tab[:content] %>
+ <% end %> +
<% end %> diff --git a/app/views/maps/_google_map.js.erb b/app/views/maps/_google_map.js.erb index 602edd3..5742e53 100644 --- a/app/views/maps/_google_map.js.erb +++ b/app/views/maps/_google_map.js.erb @@ -9,7 +9,7 @@ var mapZoom = 15; var delay_autocomplete = 500; function pointToAddress(latlng) { - $('location-fields').addClassName("loading"); + jQuery('#location-fields').addClass("loading"); if (latlng == null) return; @@ -22,11 +22,11 @@ function pointToAddress(latlng) { var place = results[0]; - $('location-fields').removeClassName("loading"); + jQuery('#location-fields').removeClass("loading"); var position = marker.getPosition(); - $('profile_data_lat').value = position.lat(); - $('profile_data_lng').value = position.lng(); + jQuery('#profile_data_lat').val(position.lat()); + jQuery('#profile_data_lng').val(position.lng()); form = jQuery('#location-form')[0]; form.lat = marker.getPosition().lat(); @@ -85,26 +85,26 @@ function pointToAddress(latlng) { } if (country_code) - $('profile_data_country').value = country_code; + jQuery('#profile_data_country').val(country_code); if (state) - $('profile_data_state').value = state; + jQuery('#profile_data_state').val(state); if (city) - $('profile_data_city').value = city; + jQuery('#profile_data_city').val(city); if (zip_code) - $('profile_data_zip_code').value = zip_code; + jQuery('#profile_data_zip_code').val(zip_code); if (address) - $('profile_data_address').value = address; + jQuery('#profile_data_address').val(address); map.setCenter(marker.getPosition()); }); } function addressToPoint() { - $('location-fields').addClassName("loading"); + jQuery('#location-fields').addClass("loading"); - var country_option = $('profile_data_country').value; - var address = $('profile_data_address').value + ", " + $('profile_data_zip_code').value + ", " - + $('profile_data_city').value+ ", " + $('profile_data_state').value + ", " + country_option; + var country_option = jQuery('#profile_data_country').val(); + var address = jQuery('#profile_data_address').val() + ", " + jQuery('#profile_data_zip_code').val() + ", " + + jQuery('#profile_data_city').val() + ", " + jQuery('#profile_data_state').val() + ", " + country_option; if (geocoder) { geocoder.geocode({ 'address': address}, function(results, status) { @@ -113,12 +113,12 @@ function addressToPoint() { marker.setPosition(results[0].geometry.location); pointToAddress(marker.getPosition()); - $('profile_data_lat').value = results[0].geometry.location.lat(); - $('profile_data_lng').value = results[0].geometry.location.lng(); - $('location-fields').removeClassName("loading"); + jQuery('#profile_data_lat').val(results[0].geometry.location.lat()); + jQuery('#profile_data_lng').val(results[0].geometry.location.lng()); + jQuery('#location-fields').removeClass("loading"); enable_save(); } else { - $('location-fields').removeClassName("loading"); + jQuery('#location-fields').removeClass("loading"); alert('<%=_("Address not found, reason:")%>' + statusErrorMessage(status)); } }); @@ -175,7 +175,6 @@ function initializeMap() { } -jQuery.noConflict(); jQuery(document).ready(function () { initializeMap(); @@ -198,7 +197,7 @@ jQuery(document).ready(function () { source: "../maps/search_city", minLength: 3, delay: delay_autocomplete, - select: function( event, ui ) { $('profile_data_state').value =( ui.item ? ui.item.category : this.value ); } + select: function( event, ui ) { jQuery('#profile_data_state').val( ui.item ? ui.item.category : this.value ); } }); jQuery("#profile_data_state").autocomplete({ diff --git a/app/views/profile/_profile_scrap.html.erb b/app/views/profile/_profile_scrap.html.erb index baf0459..a7d6113 100644 --- a/app/views/profile/_profile_scrap.html.erb +++ b/app/views/profile/_profile_scrap.html.erb @@ -9,7 +9,7 @@
<% if logged_in? && current_person.follows?(scrap.sender) %> - <%= link_to_function s_('profile|Comment'), "hide_and_show(['#profile-wall-message-response-#{scrap.id}'],['#profile-wall-reply-#{scrap.id}', '#profile-wall-reply-form-#{scrap.id}']);$('reply_content_#{scrap.id}').value='';$('reply_content_#{scrap.id}').focus();return false", :class => "profile-send-reply" %> + <%= link_to_function s_('profile|Comment'), "hide_and_show(['#profile-wall-message-response-#{scrap.id}'],['#profile-wall-reply-#{scrap.id}', '#profile-wall-reply-form-#{scrap.id}']);jQuery('#reply_content_#{scrap.id}').val('');jQuery('#reply_content_#{scrap.id}').focus();return false", :class => "profile-send-reply" %> <% end %> <%= link_to_function(_('Remove'), 'remove_item_wall(this, \'%s\', \'%s\', \'%s\'); return false ;' % [".profile-activity-item", url_for(:profile => params[:profile], :action => :remove_scrap, :scrap_id => scrap.id, :view => params[:view]), _('Are you sure you want to remove this scrap and all its replies?')]) if logged_in? && user.can_control_scrap?(scrap) %> diff --git a/app/views/profile/_profile_scraps.html.erb b/app/views/profile/_profile_scraps.html.erb index fc29559..f38f898 100644 --- a/app/views/profile/_profile_scraps.html.erb +++ b/app/views/profile/_profile_scraps.html.erb @@ -9,7 +9,7 @@
<% if logged_in? && current_person.follows?(scrap.sender) %> - <%= link_to_function s_('profile|Comment'), "hide_and_show(['#profile-wall-message-response-#{scrap.id}'],['#profile-wall-reply-#{scrap.id}', '#profile-wall-reply-form-#{scrap.id}']);$('reply_content_#{scrap.id}').value='';$('reply_content_#{scrap.id}').focus();return false", :class => "profile-send-reply" %> + <%= link_to_function s_('profile|Comment'), "hide_and_show(['#profile-wall-message-response-#{scrap.id}'],['#profile-wall-reply-#{scrap.id}', '#profile-wall-reply-form-#{scrap.id}']);jQuery('#reply_content_#{scrap.id}').val('');jQuery('#reply_content_#{scrap.id}').focus();return false", :class => "profile-send-reply" %> <% end %> <%= link_to_function(_('Remove'), 'remove_item_wall(this, \'%s\', \'%s\', \'%s\'); return false ;' % [".profile-activity-item", url_for(:profile => params[:profile], :action => :remove_scrap, :scrap_id => scrap.id, :view => params[:view]), _('Are you sure you want to remove this scrap and all its replies?')]) if logged_in? && user.can_control_scrap?(scrap) %> diff --git a/app/views/profile/_profile_wall.html.erb b/app/views/profile/_profile_wall.html.erb index 3d95b94..831347a 100644 --- a/app/views/profile/_profile_wall.html.erb +++ b/app/views/profile/_profile_wall.html.erb @@ -1,7 +1,7 @@

<%= _("%s's wall") % @profile.name %>

<%= flash[:error] %> - <%= form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap', :tab_action => 'wall' }, :update => 'profile_activities', :success => "$('leave_scrap_content').value=''", :complete => "jQuery('#leave_scrap_form').removeClass('loading').find('*').attr('disabled', false)", :loading => "jQuery('#leave_scrap_form').addClass('loading').find('*').attr('disabled', true)", :html => {:id => 'leave_scrap_form' } do %> + <%= form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap', :tab_action => 'wall' }, :update => 'profile_activities', :success => "jQuery('#leave_scrap_content').val('')", :complete => "jQuery('#leave_scrap_form').removeClass('loading').find('*').attr('disabled', false)", :loading => "jQuery('#leave_scrap_form').addClass('loading').find('*').attr('disabled', true)", :html => {:id => 'leave_scrap_form' } do %> <%= limited_text_area :scrap, :content, 420, 'leave_scrap_content', :cols => 50, :rows => 2, :class => 'autogrow' %> <%= submit_button :new, _('Share') %> <% end %> diff --git a/app/views/profile/join.html.erb b/app/views/profile/join.html.erb index a836f75..2527f70 100644 --- a/app/views/profile/join.html.erb +++ b/app/views/profile/join.html.erb @@ -9,7 +9,7 @@ <%= hidden_field_tag(:confirmation, 1) %> <%= submit_button(:ok, _("Yes, I want to join.") % profile.name) %> <% if logged_in? && request.xhr? %> - <%= lightbox_close_button(_("No, I don't want")) %> + <%= modal_close_button _("No, I don't want") %> <% else %> <%= button(:cancel, _("No, I don't want."), profile.url) %> <% end %> diff --git a/app/views/profile/leave.html.erb b/app/views/profile/leave.html.erb index a1f3433..908b976 100644 --- a/app/views/profile/leave.html.erb +++ b/app/views/profile/leave.html.erb @@ -9,7 +9,7 @@ <%= hidden_field_tag(:back_to, @back_to) %> <%= submit_button(:ok, _("Yes, I want to leave.") % profile.name) %> <% if logged_in? && request.xhr? %> - <%= lightbox_close_button(_("No, I don't want")) %> + <%= modal_close_button _("No, I don't want") %> <% else %> <%= button(:cancel, _("No, I don't want."), profile.url) %> <% end %> diff --git a/app/views/profile/report_abuse.html.erb b/app/views/profile/report_abuse.html.erb index 0b63206..1eeddfa 100644 --- a/app/views/profile/report_abuse.html.erb +++ b/app/views/profile/report_abuse.html.erb @@ -9,7 +9,7 @@ <% end %> <%= submit_button(:send, _('Report profile'), :style => 'float: left; cursor: pointer;', :id => 'report-abuse-submit-button', :onclick => "jQuery('#form-submit-loading').show()") %> - <%= button(:cancel, _('Cancel'), {}, :style => 'float: left; padding-top: 0px; padding-bottom: 0px;', :onclick => 'jQuery.colorbox.close(); return false;')%> + <%= button(:cancel, _('Cancel'), {}, :style => 'float: left; padding-top: 0px; padding-bottom: 0px;', :onclick => 'noosfero.modal.close(); return false;')%> <% end %> @@ -30,7 +30,7 @@ success: function(data, status, ajax){ if ( !data.ok ) display_notice(data.error.message); else { - $.colorbox.close(); + noosfero.modal.close(); display_notice(data.message); window.location.reload(); } diff --git a/app/views/profile_editor/_organization.html.erb b/app/views/profile_editor/_organization.html.erb index bd5162e..2c2f548 100644 --- a/app/views/profile_editor/_organization.html.erb +++ b/app/views/profile_editor/_organization.html.erb @@ -19,7 +19,7 @@ <% if @environment.enabled?('enable_organization_url_change') %> + +
+ + <%= _('Chat') %> +
+
- <%= profile_image(user, :portrait, :class => 'avatar') %> <%= user_status_menu('icon-menu-offline', _('Offline')) %>
- <%= _('Close') %>
- +
+ <%= text_field_tag(:query, '', :placeholder => _('Search...'), :class => 'search') %> - @@ -47,37 +41,37 @@
-
+