platform 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +21 -0
- data/.rspec +2 -0
- data/Gemfile +14 -0
- data/Gemfile.lock +191 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +5 -0
- data/Rakefile +37 -0
- data/app/assets/images/platform/.gitkeep +0 -0
- data/app/assets/images/platform/accept.png +0 -0
- data/app/assets/images/platform/action_tab_bkgd.gif +0 -0
- data/app/assets/images/platform/action_tab_white_bkgd.gif +0 -0
- data/app/assets/images/platform/add.png +0 -0
- data/app/assets/images/platform/apps/app_icon.gif +0 -0
- data/app/assets/images/platform/apps/app_logo.gif +0 -0
- data/app/assets/images/platform/arrow_down.gif +0 -0
- data/app/assets/images/platform/arrow_down.png +0 -0
- data/app/assets/images/platform/arrow_down_grey.png +0 -0
- data/app/assets/images/platform/arrow_right.gif +0 -0
- data/app/assets/images/platform/arrow_up.png +0 -0
- data/app/assets/images/platform/arrow_up_grey.png +0 -0
- data/app/assets/images/platform/bullet_go.png +0 -0
- data/app/assets/images/platform/buttons.png +0 -0
- data/app/assets/images/platform/cancel.png +0 -0
- data/app/assets/images/platform/clipboard_icon.gif +0 -0
- data/app/assets/images/platform/close.gif +0 -0
- data/app/assets/images/platform/cross.png +0 -0
- data/app/assets/images/platform/default_app_icon.gif +0 -0
- data/app/assets/images/platform/default_app_logo.gif +0 -0
- data/app/assets/images/platform/delete.png +0 -0
- data/app/assets/images/platform/disk.png +0 -0
- data/app/assets/images/platform/exclamation.png +0 -0
- data/app/assets/images/platform/eye.png +0 -0
- data/app/assets/images/platform/eye_not.png +0 -0
- data/app/assets/images/platform/field_sprite.gif +0 -0
- data/app/assets/images/platform/find.png +0 -0
- data/app/assets/images/platform/globe.gif +0 -0
- data/app/assets/images/platform/help.png +0 -0
- data/app/assets/images/platform/help/app_reg.png +0 -0
- data/app/assets/images/platform/help/app_reg_ext.png +0 -0
- data/app/assets/images/platform/help/app_reg_web.png +0 -0
- data/app/assets/images/platform/help/auth_desktop.png +0 -0
- data/app/assets/images/platform/help/auth_iframe.png +0 -0
- data/app/assets/images/platform/help/auth_iphone.png +0 -0
- data/app/assets/images/platform/help/auth_web.png +0 -0
- data/app/assets/images/platform/help/authorize.png +0 -0
- data/app/assets/images/platform/help/ext.png +0 -0
- data/app/assets/images/platform/help/login.png +0 -0
- data/app/assets/images/platform/help/login_desktop.png +0 -0
- data/app/assets/images/platform/help/login_iphone.png +0 -0
- data/app/assets/images/platform/help/login_web.png +0 -0
- data/app/assets/images/platform/help2.png +0 -0
- data/app/assets/images/platform/information.png +0 -0
- data/app/assets/images/platform/keyboard.png +0 -0
- data/app/assets/images/platform/language_selector_arrow.gif +0 -0
- data/app/assets/images/platform/left_quote.png +0 -0
- data/app/assets/images/platform/lightning.png +0 -0
- data/app/assets/images/platform/loading.gif +0 -0
- data/app/assets/images/platform/loading2.gif +0 -0
- data/app/assets/images/platform/loading3.gif +0 -0
- data/app/assets/images/platform/loading_animation.gif +0 -0
- data/app/assets/images/platform/loading_large.gif +0 -0
- data/app/assets/images/platform/lock.png +0 -0
- data/app/assets/images/platform/lock_add.png +0 -0
- data/app/assets/images/platform/lock_delete.png +0 -0
- data/app/assets/images/platform/lock_open.png +0 -0
- data/app/assets/images/platform/medals/bronze.png +0 -0
- data/app/assets/images/platform/medals/gold.png +0 -0
- data/app/assets/images/platform/medals/runner.png +0 -0
- data/app/assets/images/platform/medals/silver.png +0 -0
- data/app/assets/images/platform/minus_node.png +0 -0
- data/app/assets/images/platform/oauth/perm_tile.gif +0 -0
- data/app/assets/images/platform/oauth/right_grey.png +0 -0
- data/app/assets/images/platform/pencil.png +0 -0
- data/app/assets/images/platform/photo_silhouette.gif +0 -0
- data/app/assets/images/platform/pixel.gif +0 -0
- data/app/assets/images/platform/platform.png +0 -0
- data/app/assets/images/platform/platform2.png +0 -0
- data/app/assets/images/platform/platform3.png +0 -0
- data/app/assets/images/platform/platform4.png +0 -0
- data/app/assets/images/platform/platform5.png +0 -0
- data/app/assets/images/platform/plus.png +0 -0
- data/app/assets/images/platform/plus_node.png +0 -0
- data/app/assets/images/platform/random.png +0 -0
- data/app/assets/images/platform/random2.png +0 -0
- data/app/assets/images/platform/rating_star0.png +0 -0
- data/app/assets/images/platform/rating_star05.png +0 -0
- data/app/assets/images/platform/rating_star1.png +0 -0
- data/app/assets/images/platform/rating_stars.gif +0 -0
- data/app/assets/images/platform/rating_stars.psd +0 -0
- data/app/assets/images/platform/reply.png +0 -0
- data/app/assets/images/platform/right_quote.png +0 -0
- data/app/assets/images/platform/rotating_world.gif +0 -0
- data/app/assets/images/platform/script.png +0 -0
- data/app/assets/images/platform/script_edit.png +0 -0
- data/app/assets/images/platform/script_gear.png +0 -0
- data/app/assets/images/platform/site_sprite.gif +0 -0
- data/app/assets/images/platform/spinner.gif +0 -0
- data/app/assets/images/platform/star.png +0 -0
- data/app/assets/images/platform/table_edit.png +0 -0
- data/app/assets/images/platform/table_gear.png +0 -0
- data/app/assets/images/platform/table_multiple.png +0 -0
- data/app/assets/images/platform/thumb_down.png +0 -0
- data/app/assets/images/platform/thumb_up.png +0 -0
- data/app/assets/images/platform/top_left_stem.png +0 -0
- data/app/assets/images/platform/top_right_stem.png +0 -0
- data/app/assets/images/platform/translate_icn.gif +0 -0
- data/app/assets/images/platform/treeview/diffDoc.gif +0 -0
- data/app/assets/images/platform/treeview/diffFolder.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2blank.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2doc.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2folderclosed.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2folderopen.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2lastnode.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2link.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2mlastnode.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2mnode.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2node.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2plastnode.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2pnode.gif +0 -0
- data/app/assets/images/platform/treeview/ftv2vertline.gif +0 -0
- data/app/assets/images/platform/wizard.png +0 -0
- data/app/assets/images/platform/world_link.png +0 -0
- data/app/assets/javascripts/platform/api_explorer.js +628 -0
- data/app/assets/javascripts/platform/application.js +9 -0
- data/app/assets/javascripts/platform/ftiens4.js +1197 -0
- data/app/assets/javascripts/platform/jsdk.js +539 -0
- data/app/assets/javascripts/platform/platform.js +447 -0
- data/app/assets/javascripts/platform/shortcut.js +223 -0
- data/app/assets/javascripts/platform/ua.js +147 -0
- data/app/assets/stylesheets/platform/api_explorer.css.scss +140 -0
- data/app/assets/stylesheets/platform/application.css.scss +6 -0
- data/app/assets/stylesheets/platform/components.css.scss +208 -0
- data/app/assets/stylesheets/platform/layout.css.scss +119 -0
- data/app/assets/stylesheets/platform/oauth.css +51 -0
- data/app/assets/stylesheets/platform/platform.css.scss +311 -0
- data/app/controllers/platform/admin/apps_controller.rb +99 -0
- data/app/controllers/platform/admin/base_controller.rb +60 -0
- data/app/controllers/platform/admin/categories_controller.rb +132 -0
- data/app/controllers/platform/admin/clientsdk_controller.rb +30 -0
- data/app/controllers/platform/admin/developers_controller.rb +30 -0
- data/app/controllers/platform/admin/exceptions_controller.rb +30 -0
- data/app/controllers/platform/admin/forum_controller.rb +34 -0
- data/app/controllers/platform/admin/metrics_controller.rb +42 -0
- data/app/controllers/platform/api/apps_controller.rb +40 -0
- data/app/controllers/platform/api/base_controller.rb +541 -0
- data/app/controllers/platform/apps_controller.rb +142 -0
- data/app/controllers/platform/base_controller.rb +127 -0
- data/app/controllers/platform/developer/api_explorer_controller.rb +56 -0
- data/app/controllers/platform/developer/apps_controller.rb +161 -0
- data/app/controllers/platform/developer/base_controller.rb +51 -0
- data/app/controllers/platform/developer/blog_controller.rb +29 -0
- data/app/controllers/platform/developer/dashboard_controller.rb +63 -0
- data/app/controllers/platform/developer/forum_controller.rb +85 -0
- data/app/controllers/platform/developer/help_controller.rb +113 -0
- data/app/controllers/platform/developer/info_controller.rb +41 -0
- data/app/controllers/platform/developer/registration_controller.rb +39 -0
- data/app/controllers/platform/developer/resources_controller.rb +30 -0
- data/app/controllers/platform/forum_controller.rb +74 -0
- data/app/controllers/platform/oauth_controller.rb +421 -0
- data/app/controllers/platform/ratings_controller.rb +61 -0
- data/app/helpers/platform/admin/categories_helper.rb +54 -0
- data/app/helpers/platform/apps_helper.rb +26 -0
- data/app/helpers/platform/developer/dashboard_helper.rb +42 -0
- data/app/helpers/platform/developer/help_helper.rb +45 -0
- data/app/helpers/platform_helper.rb +26 -0
- data/app/models/platform/application.rb +394 -0
- data/app/models/platform/application_category.rb +34 -0
- data/app/models/platform/application_developer.rb +30 -0
- data/app/models/platform/application_filter.rb +30 -0
- data/app/models/platform/application_log.rb +32 -0
- data/app/models/platform/application_log_filter.rb +34 -0
- data/app/models/platform/application_metric.rb +58 -0
- data/app/models/platform/application_metric_filter.rb +34 -0
- data/app/models/platform/application_permission.rb +30 -0
- data/app/models/platform/application_permission_filter.rb +30 -0
- data/app/models/platform/application_usage_metric.rb +58 -0
- data/app/models/platform/application_usage_metric_filter.rb +34 -0
- data/app/models/platform/application_user.rb +45 -0
- data/app/models/platform/application_user_filter.rb +34 -0
- data/app/models/platform/base_filter.rb +46 -0
- data/app/models/platform/category.rb +64 -0
- data/app/models/platform/daily_application_metric.rb +31 -0
- data/app/models/platform/developer.rb +45 -0
- data/app/models/platform/developer_filter.rb +26 -0
- data/app/models/platform/forum_message.rb +35 -0
- data/app/models/platform/forum_message_filter.rb +26 -0
- data/app/models/platform/forum_topic.rb +38 -0
- data/app/models/platform/forum_topic_filter.rb +26 -0
- data/app/models/platform/logged_exception.rb +290 -0
- data/app/models/platform/logged_exception_filter.rb +58 -0
- data/app/models/platform/media/image.rb +26 -0
- data/app/models/platform/media/media.rb +58 -0
- data/app/models/platform/monthly_application_metric.rb +31 -0
- data/app/models/platform/oauth/access_token.rb +57 -0
- data/app/models/platform/oauth/client_token.rb +38 -0
- data/app/models/platform/oauth/oauth_model_methods.rb +41 -0
- data/app/models/platform/oauth/oauth_token.rb +57 -0
- data/app/models/platform/oauth/oauth_token_filter.rb +34 -0
- data/app/models/platform/oauth/refresh_token.rb +47 -0
- data/app/models/platform/oauth/request_token.rb +50 -0
- data/app/models/platform/permission.rb +27 -0
- data/app/models/platform/rating.rb +43 -0
- data/app/models/platform/rating_filter.rb +30 -0
- data/app/models/platform/rollup_log.rb +27 -0
- data/app/models/platform/rollup_log_filter.rb +30 -0
- data/app/models/platform/total_application_metric.rb +40 -0
- data/app/models/platform/weekly_application_metric.rb +31 -0
- data/app/views/platform/admin/apps/_categories.html.erb +17 -0
- data/app/views/platform/admin/apps/_categories_scripts.html.erb +17 -0
- data/app/views/platform/admin/apps/_tabs.html.erb +25 -0
- data/app/views/platform/admin/apps/index.html.erb +32 -0
- data/app/views/platform/admin/apps/permissions.html.erb +7 -0
- data/app/views/platform/admin/apps/ratings.html.erb +7 -0
- data/app/views/platform/admin/apps/tokens.html.erb +18 -0
- data/app/views/platform/admin/apps/users.html.erb +7 -0
- data/app/views/platform/admin/apps/view.html.erb +170 -0
- data/app/views/platform/admin/categories/_tabs.html.erb +22 -0
- data/app/views/platform/admin/categories/category_assigner.html.erb +9 -0
- data/app/views/platform/admin/categories/category_assigner_tree.html.erb +81 -0
- data/app/views/platform/admin/categories/index.html.erb +106 -0
- data/app/views/platform/admin/categories/items.html.erb +153 -0
- data/app/views/platform/admin/categories/lb_update_application_category.html.erb +54 -0
- data/app/views/platform/admin/categories/lb_update_category.html.erb +64 -0
- data/app/views/platform/admin/categories/tree.html.erb +64 -0
- data/app/views/platform/admin/clientsdk/index.html.erb +89 -0
- data/app/views/platform/admin/common/_footer.html.erb +1 -0
- data/app/views/platform/admin/common/_header.html.erb +32 -0
- data/app/views/platform/admin/common/_lightbox_buttons.html.erb +5 -0
- data/app/views/platform/admin/common/_paginator.html.erb +20 -0
- data/app/views/platform/admin/developers/_tabs.html.erb +22 -0
- data/app/views/platform/admin/developers/index.html.erb +7 -0
- data/app/views/platform/admin/exceptions/_tabs.html.erb +22 -0
- data/app/views/platform/admin/exceptions/index.html.erb +7 -0
- data/app/views/platform/admin/forum/_tabs.html.erb +22 -0
- data/app/views/platform/admin/forum/index.html.erb +7 -0
- data/app/views/platform/admin/forum/messages.html.erb +7 -0
- data/app/views/platform/admin/metrics/_tabs.html.erb +25 -0
- data/app/views/platform/admin/metrics/application_log.html.erb +7 -0
- data/app/views/platform/admin/metrics/index.html.erb +9 -0
- data/app/views/platform/admin/metrics/rollup_log.html.erb +7 -0
- data/app/views/platform/admin/metrics/usage.html.erb +7 -0
- data/app/views/platform/apps/_actions_module.html.erb +3 -0
- data/app/views/platform/apps/_app_footer.html.erb +8 -0
- data/app/views/platform/apps/_app_header.html.erb +25 -0
- data/app/views/platform/apps/_apps_module.html.erb +42 -0
- data/app/views/platform/apps/_authorize_form.html.erb +11 -0
- data/app/views/platform/apps/_categories_module.html.erb +11 -0
- data/app/views/platform/apps/_featured_apps_module.html.erb +40 -0
- data/app/views/platform/apps/_left.html.erb +20 -0
- data/app/views/platform/apps/_monthly_users_module.html.erb +8 -0
- data/app/views/platform/apps/_paginator.html.erb +13 -0
- data/app/views/platform/apps/_rank_module.html.erb +18 -0
- data/app/views/platform/apps/_search_apps_module.html.erb +35 -0
- data/app/views/platform/apps/canvas_app.html.erb +15 -0
- data/app/views/platform/apps/index.html.erb +86 -0
- data/app/views/platform/apps/view.html.erb +71 -0
- data/app/views/platform/apps/xd.html.erb +11 -0
- data/app/views/platform/common/_footer.html.erb +1 -0
- data/app/views/platform/common/_header.html.erb +4 -0
- data/app/views/platform/common/_paginator.html.erb +32 -0
- data/app/views/platform/common/_scripts.html.erb +7 -0
- data/app/views/platform/common/_user_login.html.erb +11 -0
- data/app/views/platform/developer/api_explorer/history.html.erb +31 -0
- data/app/views/platform/developer/api_explorer/index.html.erb +134 -0
- data/app/views/platform/developer/api_explorer/oauth_lander.html.erb +4 -0
- data/app/views/platform/developer/api_explorer/options.html.erb +44 -0
- data/app/views/platform/developer/apps/_form.html.erb +340 -0
- data/app/views/platform/developer/apps/create_version.html.erb +19 -0
- data/app/views/platform/developer/apps/edit.html.erb +21 -0
- data/app/views/platform/developer/apps/index.html.erb +375 -0
- data/app/views/platform/developer/apps/new.html.erb +20 -0
- data/app/views/platform/developer/blog/index.html.erb +7 -0
- data/app/views/platform/developer/common/_footer.html.erb +1 -0
- data/app/views/platform/developer/common/_header.html.erb +34 -0
- data/app/views/platform/developer/dashboard/_apps_info.html.erb +84 -0
- data/app/views/platform/developer/dashboard/_discussions.html.erb +68 -0
- data/app/views/platform/developer/dashboard/_header.html.erb +12 -0
- data/app/views/platform/developer/dashboard/_reviews.html.erb +53 -0
- data/app/views/platform/developer/dashboard/_statistics.html.erb +105 -0
- data/app/views/platform/developer/dashboard/index.html.erb +85 -0
- data/app/views/platform/developer/dashboard/settings.html.erb +23 -0
- data/app/views/platform/developer/forum/_message.html.erb +17 -0
- data/app/views/platform/developer/forum/_messages.html.erb +14 -0
- data/app/views/platform/developer/forum/_new_message.html.erb +28 -0
- data/app/views/platform/developer/forum/_new_topic.html.erb +39 -0
- data/app/views/platform/developer/forum/index.html.erb +89 -0
- data/app/views/platform/developer/forum/topic.html.erb +28 -0
- data/app/views/platform/developer/help/_footer.html.erb +4 -0
- data/app/views/platform/developer/help/_header.html.erb +95 -0
- data/app/views/platform/developer/help/_navigation.html.erb +99 -0
- data/app/views/platform/developer/help/api.html.erb +120 -0
- data/app/views/platform/developer/help/credits.html.erb +77 -0
- data/app/views/platform/developer/help/index.html.erb +19 -0
- data/app/views/platform/developer/help/license.html.erb +586 -0
- data/app/views/platform/developer/help/oauth_app_login.html.erb +177 -0
- data/app/views/platform/developer/help/oauth_client_side.html.erb +264 -0
- data/app/views/platform/developer/help/oauth_desktop.html.erb +191 -0
- data/app/views/platform/developer/help/oauth_extensions.html.erb +342 -0
- data/app/views/platform/developer/help/oauth_intro.html.erb +371 -0
- data/app/views/platform/developer/help/oauth_mobile.html.erb +292 -0
- data/app/views/platform/developer/help/oauth_server_side.html.erb +603 -0
- data/app/views/platform/developer/help/oauth_trusted_client.html.erb +202 -0
- data/app/views/platform/developer/help/reference.html.erb +42 -0
- data/app/views/platform/developer/help/sdk_ios.html.erb +31 -0
- data/app/views/platform/developer/help/sdk_js.html.erb +202 -0
- data/app/views/platform/developer/info/_basic_info.html.erb +74 -0
- data/app/views/platform/developer/info/_header.html.erb +12 -0
- data/app/views/platform/developer/info/index.html.erb +23 -0
- data/app/views/platform/developer/registration/index.html.erb +134 -0
- data/app/views/platform/developer/resources/index.html.erb +23 -0
- data/app/views/platform/forum/_message.html.erb +17 -0
- data/app/views/platform/forum/_messages.html.erb +14 -0
- data/app/views/platform/forum/_new_message.html.erb +26 -0
- data/app/views/platform/forum/_new_topic.html.erb +38 -0
- data/app/views/platform/forum/_topic.html.erb +18 -0
- data/app/views/platform/forum/_topics.html.erb +74 -0
- data/app/views/platform/login/index.html.erb +31 -0
- data/app/views/platform/login/register.html.erb +55 -0
- data/app/views/platform/oauth/_authorization_box.html.erb +75 -0
- data/app/views/platform/oauth/_authorization_popup.html.erb +38 -0
- data/app/views/platform/oauth/_authorize_form.html.erb +11 -0
- data/app/views/platform/oauth/auth_failed.html.erb +0 -0
- data/app/views/platform/oauth/auth_success.html.erb +0 -0
- data/app/views/platform/oauth/authorize_desktop.html.erb +76 -0
- data/app/views/platform/oauth/authorize_failure_iframe.html.erb +1 -0
- data/app/views/platform/oauth/authorize_failure_mobile.html.erb +24 -0
- data/app/views/platform/oauth/authorize_failure_popup.html.erb +24 -0
- data/app/views/platform/oauth/authorize_failure_web.html.erb +1 -0
- data/app/views/platform/oauth/authorize_iframe.html.erb +16 -0
- data/app/views/platform/oauth/authorize_mobile.html.erb +1 -0
- data/app/views/platform/oauth/authorize_popup.html.erb +1 -0
- data/app/views/platform/oauth/authorize_success_iframe.html.erb +1 -0
- data/app/views/platform/oauth/authorize_success_mobile.html.erb +24 -0
- data/app/views/platform/oauth/authorize_success_popup.html.erb +24 -0
- data/app/views/platform/oauth/authorize_success_web.html.erb +1 -0
- data/app/views/platform/oauth/authorize_web.html.erb +3 -0
- data/app/views/platform/oauth/xd.html.erb +13 -0
- data/app/views/platform/ratings/_list.html.erb +30 -0
- data/app/views/platform/ratings/_new.html.erb +70 -0
- data/app/views/platform/ratings/_rating.html.erb +17 -0
- data/config/platform/config.yml +133 -0
- data/config/platform/data/default_applications.yml +39 -0
- data/config/platform/data/default_categories.yml +56 -0
- data/config/platform/data/default_permissions.yml +0 -0
- data/config/platform/site/features.yml +66 -0
- data/config/routes.rb +59 -0
- data/db/migrate/20110602232141_create_platform_tables.rb +262 -0
- data/docs/Classes.graffle +7315 -0
- data/docs/Classes.pdf +0 -0
- data/lib/generators/platform/platform_generator.rb +56 -0
- data/lib/generators/platform/templates/db/create_platform_tables.rb +262 -0
- data/lib/generators/platform/templates/layouts/platform.html.erb +49 -0
- data/lib/generators/platform/templates/layouts/platform_admin.html.erb +60 -0
- data/lib/platform.rb +6 -0
- data/lib/platform/api/already_jsoned_string.rb +9 -0
- data/lib/platform/api/proxy.rb +45 -0
- data/lib/platform/api/proxy/base.rb +62 -0
- data/lib/platform/cache.rb +78 -0
- data/lib/platform/config.rb +666 -0
- data/lib/platform/engine.rb +5 -0
- data/lib/platform/exception.rb +27 -0
- data/lib/platform/extensions/action_controller_extension.rb +65 -0
- data/lib/platform/extensions/action_view_extension.rb +168 -0
- data/lib/platform/extensions/object_extension.rb +51 -0
- data/lib/platform/helper.rb +33 -0
- data/lib/platform/logger.rb +62 -0
- data/lib/platform/railtie.rb +52 -0
- data/lib/platform/random_password_generator.rb +76 -0
- data/lib/platform/simple_string_permissions.rb +40 -0
- data/lib/platform/version.rb +3 -0
- data/lib/tasks/platform.rake +119 -0
- data/platform.gemspec +45 -0
- data/script/rails +6 -0
- data/spec/config/config_spec.rb +10 -0
- data/spec/dummy_app.rb +52 -0
- data/spec/models/application_spec.rb +53 -0
- data/spec/models/developer_spec.rb +23 -0
- data/spec/spec_helper.rb +29 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +7 -0
- data/test/dummy/app/assets/stylesheets/admin.css +200 -0
- data/test/dummy/app/assets/stylesheets/application.css +47 -0
- data/test/dummy/app/assets/stylesheets/components.css.scss +211 -0
- data/test/dummy/app/assets/stylesheets/layout.css.scss +143 -0
- data/test/dummy/app/controllers/admin/admins_controller.rb +7 -0
- data/test/dummy/app/controllers/admin/base_controller.rb +12 -0
- data/test/dummy/app/controllers/admin/bookmarks_controller.rb +7 -0
- data/test/dummy/app/controllers/admin/users_controller.rb +19 -0
- data/test/dummy/app/controllers/api/base_controller.rb +5 -0
- data/test/dummy/app/controllers/api/bookmarks_controller.rb +35 -0
- data/test/dummy/app/controllers/api/users_controller.rb +19 -0
- data/test/dummy/app/controllers/application_controller.rb +31 -0
- data/test/dummy/app/controllers/home_controller.rb +7 -0
- data/test/dummy/app/controllers/login_controller.rb +65 -0
- data/test/dummy/app/helpers/application_helper.rb +9 -0
- data/test/dummy/app/helpers/home_helper.rb +2 -0
- data/test/dummy/app/mailers/.gitkeep +0 -0
- data/test/dummy/app/models/.gitkeep +0 -0
- data/test/dummy/app/models/admin.rb +4 -0
- data/test/dummy/app/models/admin_filter.rb +7 -0
- data/test/dummy/app/models/bookmark.rb +7 -0
- data/test/dummy/app/models/user.rb +34 -0
- data/test/dummy/app/views/admin/admins/index.html.erb +7 -0
- data/test/dummy/app/views/admin/bookmarks/index.html.erb +5 -0
- data/test/dummy/app/views/admin/users/index.html.erb +10 -0
- data/test/dummy/app/views/demo/index.rhtml +108 -0
- data/test/dummy/app/views/demo/tokens.rhtml +35 -0
- data/test/dummy/app/views/home/index.html.erb +43 -0
- data/test/dummy/app/views/layouts/_footer.html.erb +16 -0
- data/test/dummy/app/views/layouts/_header.html.erb +22 -0
- data/test/dummy/app/views/layouts/admin.html.erb +97 -0
- data/test/dummy/app/views/layouts/application.html.erb +25 -0
- data/test/dummy/app/views/layouts/minimal.html.erb +37 -0
- data/test/dummy/app/views/layouts/popup.html.erb +43 -0
- data/test/dummy/app/views/login/index.html.erb +34 -0
- data/test/dummy/app/views/login/register.html.erb +51 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +51 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +30 -0
- data/test/dummy/config/environments/production.rb +60 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/platform/api/0/bookmark.yml +18 -0
- data/test/dummy/config/platform/api/0/user.yml +17 -0
- data/test/dummy/config/platform/api/1/bookmark.yml +58 -0
- data/test/dummy/config/platform/api/1/user.yml +36 -0
- data/test/dummy/config/platform/config.yml +135 -0
- data/test/dummy/config/platform/data/default_applications.yml +39 -0
- data/test/dummy/config/platform/data/default_categories.yml +56 -0
- data/test/dummy/config/platform/data/default_permissions.yml +0 -0
- data/test/dummy/config/platform/site/features.yml +66 -0
- data/test/dummy/config/platform/site/sample_apps.yml +100 -0
- data/test/dummy/config/routes.rb +30 -0
- data/test/dummy/config/tr8n/config.yml +247 -0
- data/test/dummy/config/tr8n/data/ip_locations.csv +93460 -0
- data/test/dummy/config/tr8n/rules/default_date_rules.yml +20 -0
- data/test/dummy/config/tr8n/rules/default_gender_list_rules.yml +82 -0
- data/test/dummy/config/tr8n/rules/default_gender_rules.yml +20 -0
- data/test/dummy/config/tr8n/rules/default_language_cases.yml +272 -0
- data/test/dummy/config/tr8n/rules/default_list_rules.yml +19 -0
- data/test/dummy/config/tr8n/rules/default_numeric_rules.yml +42 -0
- data/test/dummy/config/tr8n/rules/default_value_rules.yml +18 -0
- data/test/dummy/config/tr8n/site/default_glossary.yml +18 -0
- data/test/dummy/config/tr8n/site/default_languages.yml +1591 -0
- data/test/dummy/config/tr8n/site/features.yml +111 -0
- data/test/dummy/config/tr8n/site/shortcuts.yml +55 -0
- data/test/dummy/config/tr8n/site/sitemap.json +42 -0
- data/test/dummy/config/tr8n/tokens/data.yml +19 -0
- data/test/dummy/config/tr8n/tokens/decorations.yml +19 -0
- data/test/dummy/config/will_filter/config.yml +99 -0
- data/test/dummy/db/migrate/20101207014543_create_users.rb +23 -0
- data/test/dummy/db/migrate/20110113223509_create_admins.rb +15 -0
- data/test/dummy/db/migrate/20110930041143_create_will_filter_filters.rb +15 -0
- data/test/dummy/db/migrate/20110930041150_create_tr8n_tables.rb +350 -0
- data/test/dummy/db/migrate/20111004075531_create_platform_tables.rb +262 -0
- data/test/dummy/db/migrate/20111012055603_create_bookmarks.rb +10 -0
- data/test/dummy/db/schema.rb +683 -0
- data/test/dummy/lib/assets/.gitkeep +0 -0
- data/test/dummy/lib/platform/api/bookmark_proxy_0.rb +12 -0
- data/test/dummy/lib/platform/api/bookmark_proxy_1.rb +12 -0
- data/test/dummy/lib/platform/api/user_proxy_0.rb +12 -0
- data/test/dummy/lib/platform/api/user_proxy_1.rb +12 -0
- data/test/dummy/log/.gitkeep +0 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/fixtures/documents.yml +11 -0
- data/test/dummy/test/unit/document_test.rb +7 -0
- metadata +886 -0
@@ -0,0 +1,23 @@
|
|
1
|
+
<%= render :partial => "/platform/developer/common/header" %>
|
2
|
+
|
3
|
+
<%=render(:partial => "apps_info", :locals => {:mode => :view}) %>
|
4
|
+
|
5
|
+
<%= render :partial => "/platform/developer/common/footer" %>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
function switchSectionMode(section, mode) {
|
9
|
+
Platform.Utils.update(section + '_container', '/platform/developer/dashboard/update_section', {
|
10
|
+
parameters: {section:section, mode:mode}
|
11
|
+
});
|
12
|
+
}
|
13
|
+
|
14
|
+
function submitSection(section) {
|
15
|
+
var params = Platform.Utils.serializeForm(section + '_form');
|
16
|
+
params['section'] = section;
|
17
|
+
Platform.Utils.update(section + '_container', '/platform/developer/dashboard/update_section', {
|
18
|
+
parameters: params,
|
19
|
+
method: 'post'
|
20
|
+
});
|
21
|
+
}
|
22
|
+
</script>
|
23
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<td style="padding:5px; width:50px;">
|
2
|
+
<%=platform_user_mugshot_tag(message.user, :linked => true)%>
|
3
|
+
</td>
|
4
|
+
<td style="padding:5px; width:100px;">
|
5
|
+
<%=platform_user_tag(message.user, :linked => true)%>
|
6
|
+
<div style="color:grey;font-size:10px;"><%=message.created_at.trl(:date_time) %></div>
|
7
|
+
<div style="font-size:10px;">
|
8
|
+
<% if message.user == platform_current_user %>
|
9
|
+
<%=link_to(tr("Delete", "Link to delete forum message"), {:action => :delete_message, :message_id => message.id}, {:confirm => trl("Are you sure you want to delete this message?")})%>
|
10
|
+
<% else %>
|
11
|
+
<%=link_to_function(tr("Report", "Link to report an abusive forum message"), "tr8nLightbox.show('/tr8n/translator/lb_report?message_id=#{message.id}', {width:600, height:340});")%>
|
12
|
+
<% end %>
|
13
|
+
</div>
|
14
|
+
</td>
|
15
|
+
<td style="padding:5px; width:700px;">
|
16
|
+
<%=message.toHTML %>
|
17
|
+
</td>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div class="section">
|
2
|
+
<%= platform_paginator_tag(@messages, :subject => "message") %>
|
3
|
+
|
4
|
+
<table style="width:100%; ">
|
5
|
+
<% @messages.each do |message| %>
|
6
|
+
<%
|
7
|
+
style = (message == @messages.last ? "" : "border-bottom:1px dotted #ccc;" )
|
8
|
+
%>
|
9
|
+
<tr style="<%=style%>">
|
10
|
+
<%= render :partial => "message", :locals => {:message => message} %>
|
11
|
+
</tr>
|
12
|
+
<% end %>
|
13
|
+
</table>
|
14
|
+
</div>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<div class="section_title">
|
2
|
+
<%=tr("Reply to This Discussion") %>
|
3
|
+
<a name="reply_message"> </a>
|
4
|
+
</div>
|
5
|
+
|
6
|
+
<div class="section grey">
|
7
|
+
<%= form_tag({:action => :topic}, {:method => :post, :id => "forum_topic_form"}) do %>
|
8
|
+
<%=hidden_field_tag(:topic_id, @topic.id)%>
|
9
|
+
|
10
|
+
<table style="width:99%">
|
11
|
+
<tr>
|
12
|
+
<td style="width:80px; text-align:right; padding-right:10px; font-weight:bold;">
|
13
|
+
<%=tr("Your Reply:") %>
|
14
|
+
</td>
|
15
|
+
<td>
|
16
|
+
<%=text_area_tag(:message, "", :style=>"width:99%; height:70px")%>
|
17
|
+
</td>
|
18
|
+
</tr>
|
19
|
+
</table>
|
20
|
+
|
21
|
+
<div style="padding-top:20px; padding-bottom:10px;text-align:center">
|
22
|
+
<button type="submit" class="translator_btn translator_submit_btn" onClick="Platform.Effects.submit('forum_topic_form'); return false;">
|
23
|
+
<span><%=tr("Reply to This Discussion")%></span>
|
24
|
+
</button>
|
25
|
+
</div>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
</div>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<div class="section_title">
|
2
|
+
<%=tr("Start a New Discussion Topic")%>
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<div class="section grey">
|
6
|
+
<%= form_tag({:action => :topic}, {:method => :post, :id => "forum_topic_form"}) do %>
|
7
|
+
<%=hidden_field_tag(:language_id, params[:language_id])%>
|
8
|
+
|
9
|
+
<table style="width:99%">
|
10
|
+
<tr>
|
11
|
+
<td style="width:80px; text-align:right; padding-right:10px; font-weight:bold;">
|
12
|
+
<%=tr("Topic:")%>
|
13
|
+
</td>
|
14
|
+
<td>
|
15
|
+
<%=text_field_tag(:topic, "", :style=>"width:99%")%>
|
16
|
+
</td>
|
17
|
+
</tr>
|
18
|
+
<tr>
|
19
|
+
<td style="width:80px; text-align:right; padding-right:10px; padding-top:5px; font-weight:bold;">
|
20
|
+
<%=tr("Message:") %>
|
21
|
+
</td>
|
22
|
+
<td style="padding-top:5px;">
|
23
|
+
<%=text_area_tag(:message, "", :style=>"width:99%; height:80px;")%>
|
24
|
+
</td>
|
25
|
+
</tr>
|
26
|
+
</table>
|
27
|
+
|
28
|
+
<div style="padding-top:20px; padding-bottom:10px;text-align:center">
|
29
|
+
<button type="submit" class="platform_btn platform_submit_btn" onClick=" Tr8n.Effects.submit('forum_topic_form'); return false;">
|
30
|
+
<span><%=tr("Start a New Discussion")%></span>
|
31
|
+
</button>
|
32
|
+
<% if include_cancel_button %>
|
33
|
+
<%=tr("or") %>
|
34
|
+
<%=link_to(tr("Cancel"), :action => :index)%>
|
35
|
+
<% end %>
|
36
|
+
</div>
|
37
|
+
<% end %>
|
38
|
+
</div>
|
39
|
+
|
@@ -0,0 +1,89 @@
|
|
1
|
+
<%= render :partial => "/platform/developer/common/header" %>
|
2
|
+
|
3
|
+
<!-- div class="section_box" style="margin-bottom:10px; background-color:#EFF8FF; margin-top:0px;">
|
4
|
+
<% form_tag({:action => :index}, {:method => :get, :id => "translations_search_form"}) do %>
|
5
|
+
<div style="float:right">
|
6
|
+
<button type="submit" class="translator_btn translator_small_btn" onClick="Tr8n.Effects.submit('translations_search_form'); return false;">
|
7
|
+
<span><%=tr("Search", "Search button label")%></span>
|
8
|
+
</button>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<%=text_field_tag(:search, params[:search], {:style => "width:90%;font-size:12px;height:20px"})%><br>
|
12
|
+
<% end %>
|
13
|
+
</div -->
|
14
|
+
|
15
|
+
|
16
|
+
<% unless @topics.empty? %>
|
17
|
+
<div class="section_title">
|
18
|
+
<div style="float:right; padding-top:6px; font-size:12px; color: #ccc;">
|
19
|
+
<%= link_to(tr("+ Start a new discussion topic"), :action => :topic, :mode => :create) %>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<%=tr("Discussion Topics", nil) %>
|
23
|
+
</div>
|
24
|
+
<div class="section">
|
25
|
+
<table style="width:100%;">
|
26
|
+
<tr style="border-bottom: 1px solid #ccc;">
|
27
|
+
<td class="topic_header" style="width:20%; padding:5px;"><%=tr("Author", "Forum column header")%></td>
|
28
|
+
<td class="topic_header" style="width:50%; padding:5px;"><%=tr("Topic", "Forum column header")%></td>
|
29
|
+
<td class="topic_header" style="width:10%; padding:5px;"><%=tr("Posts", "Forum column header")%></td>
|
30
|
+
<td class="topic_header" style="width:20%; padding:5px;"><%=tr("Last Post", "Forum column header")%></td>
|
31
|
+
</tr>
|
32
|
+
<% @topics.each do |topic| %>
|
33
|
+
<%
|
34
|
+
style = (topic == @topics.last ? "" : "border-bottom:1px dotted #ccc;" )
|
35
|
+
%>
|
36
|
+
<tr style="<%=style%>">
|
37
|
+
<td class="topic_value">
|
38
|
+
<table>
|
39
|
+
<tr>
|
40
|
+
<td style="vertical-align:top;padding:5px;">
|
41
|
+
<%=platform_user_mugshot_tag(topic.user, :linked => true)%>
|
42
|
+
</td>
|
43
|
+
<td style="vertical-align:top;padding:5px;">
|
44
|
+
<%=platform_user_tag(topic.user, :linked => true)%>
|
45
|
+
<div style="color:grey;">
|
46
|
+
<%=topic.created_at.trl(:date_time) %>
|
47
|
+
</div>
|
48
|
+
<div style="font-size:10px;padding:5px;">
|
49
|
+
<% if topic.user == platform_current_user %>
|
50
|
+
<%=link_to(tr("Delete"), {:action => :delete_topic, :topic_id => topic.id},
|
51
|
+
{:confirm => trl("Are you sure you want to delete this topic and all of the messages under it?")})%>
|
52
|
+
<% end %>
|
53
|
+
</div>
|
54
|
+
</td>
|
55
|
+
</tr>
|
56
|
+
</table>
|
57
|
+
</td>
|
58
|
+
<td class="topic_value" style="padding:5px;">
|
59
|
+
<%=link_to(topic.topic, :action => :topic, :topic_id => topic.id)%><br>
|
60
|
+
</td>
|
61
|
+
<td class="topic_value" style="padding:5px;">
|
62
|
+
<%=topic.post_count %>
|
63
|
+
</td>
|
64
|
+
<td class="topic_value" style="padding:5px;">
|
65
|
+
<% if topic.last_post %>
|
66
|
+
<div style="font-size:10px;"><%=topic.last_post.created_at.trl(:date_time) %>
|
67
|
+
<% if topic.user %>
|
68
|
+
<%=tr("by {user}", "Name of the publisher", :user => [topic.user, platform_user_tag(topic.user, :linked => true)])%>
|
69
|
+
<% end %>
|
70
|
+
</div>
|
71
|
+
<%
|
72
|
+
message = topic.last_post.message[0..60]
|
73
|
+
message << "..." if topic.last_post.message.length > 60
|
74
|
+
%>
|
75
|
+
<div style="font-style:italic; font-size:10px">"<%=link_to(h(message), :action => :topic, :topic_id =>topic.id, :last_page => true)%>"</div>
|
76
|
+
<% end %>
|
77
|
+
|
78
|
+
</td>
|
79
|
+
</tr>
|
80
|
+
<% end %>
|
81
|
+
</table>
|
82
|
+
|
83
|
+
<%= platform_paginator_tag(@topics, :subject => "forum topic") %>
|
84
|
+
</div>
|
85
|
+
<% end %>
|
86
|
+
|
87
|
+
<%= render :partial => "new_topic", :locals => {:include_cancel_button => false} %>
|
88
|
+
|
89
|
+
<%= render :partial => "/platform/developer/common/footer" %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<%= render :partial => "/platform/developer/common/header" %>
|
2
|
+
|
3
|
+
<% if @topic %>
|
4
|
+
<div class="section_title">
|
5
|
+
|
6
|
+
<div style="float:right; padding-top:20px; font-size:12px; color: #ccc;">
|
7
|
+
<%=link_to(image_tag("platform/reply.png") + " " + tr("Reply", "Reply button for forum topics"), :topic_id => @topic.id, :page => params[:page], :anchor => :reply_message) %>
|
8
|
+
|
|
9
|
+
<%=link_to(image_tag("platform/plus.png") + " " + tr("Start a new discussion topic"), :mode => :create) %>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div style="color:grey;font-size:16px;font-weight:bold">
|
13
|
+
<%=link_to(tr("Developer Forum"), :action => :index)%>
|
14
|
+
» <%=link_to(@topic.topic, :topic_id => @topic.id)%>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div style="color:grey;font-size:12px;font-style:italic;padding-top:3px;padding-bottom:3px;">
|
18
|
+
<%= tr("Started by {user} on {date}", "",
|
19
|
+
{:user => [@topic.user, platform_user_tag(@topic.user, :linked => true)], :date => @topic.created_at.trl}) %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<%= render :partial => "messages" %>
|
23
|
+
<%= render :partial => "new_message" %>
|
24
|
+
<% else %>
|
25
|
+
<%= render :partial => "new_topic", :locals => {:include_cancel_button => true} %>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<%= render :partial => "/platform/developer/common/footer" %>
|
@@ -0,0 +1,95 @@
|
|
1
|
+
<%= render :partial => "/platform/developer/common/header" %>
|
2
|
+
|
3
|
+
<style>
|
4
|
+
.documentation_section_title {
|
5
|
+
background: none repeat scroll 0 0 #F5F5F5;
|
6
|
+
padding: 20px;
|
7
|
+
color: #888888 !important;
|
8
|
+
font-size: 20px;
|
9
|
+
}
|
10
|
+
|
11
|
+
.documentation_section {
|
12
|
+
padding:10px;
|
13
|
+
font-family: arial;
|
14
|
+
}
|
15
|
+
|
16
|
+
|
17
|
+
.screenshot {
|
18
|
+
-moz-box-shadow: 3px 3px 4px #000;
|
19
|
+
-webkit-box-shadow: 3px 3px 4px #000;
|
20
|
+
box-shadow: 3px 3px 4px #000;
|
21
|
+
margin:15px;
|
22
|
+
}
|
23
|
+
|
24
|
+
.documentation_section p {
|
25
|
+
margin-bottom: 15px;
|
26
|
+
font-family: arial;
|
27
|
+
}
|
28
|
+
|
29
|
+
.documentation_section h2 {
|
30
|
+
color: #888888;
|
31
|
+
font-size: 24px;
|
32
|
+
font-weight: normal;
|
33
|
+
letter-spacing: -1px;
|
34
|
+
margin: 0 0 5px;
|
35
|
+
padding: 3px 0 0;
|
36
|
+
}
|
37
|
+
|
38
|
+
.documentation_table {
|
39
|
+
}
|
40
|
+
|
41
|
+
.documentation_table th {
|
42
|
+
font-weight:bold;
|
43
|
+
padding: 5px;
|
44
|
+
border: 1px solid #ccc;
|
45
|
+
text-align:left;
|
46
|
+
}
|
47
|
+
|
48
|
+
.documentation_table td {
|
49
|
+
padding: 5px;
|
50
|
+
border: 1px solid #ccc;
|
51
|
+
}
|
52
|
+
|
53
|
+
.documentation_table tr {
|
54
|
+
background-color: white;
|
55
|
+
}
|
56
|
+
|
57
|
+
.documentation_table tr:hover {
|
58
|
+
background-color: #eee;
|
59
|
+
}
|
60
|
+
|
61
|
+
.documentaiton_note {
|
62
|
+
color: #666;
|
63
|
+
font-style:italic;
|
64
|
+
font-size: 10px;
|
65
|
+
}
|
66
|
+
|
67
|
+
.code_snippet {
|
68
|
+
margin-top:15px;
|
69
|
+
margin-bottom:15px;
|
70
|
+
background: #F6F7FA;
|
71
|
+
padding:5px;
|
72
|
+
border: 1px dotted #ccc;
|
73
|
+
font-size:12px;
|
74
|
+
font-family: arial;
|
75
|
+
}
|
76
|
+
|
77
|
+
.data_list {
|
78
|
+
margin-top:15px;
|
79
|
+
margin-bottom:15px;
|
80
|
+
padding:5px;
|
81
|
+
margin-left:20px;
|
82
|
+
list-style:circle;
|
83
|
+
}
|
84
|
+
|
85
|
+
</style>
|
86
|
+
|
87
|
+
<table style="width:100%">
|
88
|
+
<tr>
|
89
|
+
<td style="width:160px;vertical-align:top;text-align:left;padding:5px;">
|
90
|
+
<%= render :partial => "navigation" %>
|
91
|
+
</td>
|
92
|
+
<td style="width:4px;background-color:#F5F5F5;border-right:1px solid #ccc;">
|
93
|
+
|
94
|
+
</td>
|
95
|
+
<td style="vertical-align:top;text-align:left;padding:0px;">
|
@@ -0,0 +1,99 @@
|
|
1
|
+
<% @page_title = controller.action_name.titleize.gsub("_"," ") %>
|
2
|
+
|
3
|
+
<style>
|
4
|
+
.documentation_sidebar {
|
5
|
+
font: 11px Arial,Helvetica,sans-serif;
|
6
|
+
}
|
7
|
+
|
8
|
+
.navigation_header {
|
9
|
+
font: 12px Arial,Helvetica,sans-serif;
|
10
|
+
font-weight: bold;
|
11
|
+
padding-left: 3px;
|
12
|
+
padding-top: 10px;
|
13
|
+
padding-bottom: 10px;
|
14
|
+
text-transform: uppercase;
|
15
|
+
color: #888888 !important;
|
16
|
+
}
|
17
|
+
|
18
|
+
.section_link {
|
19
|
+
padding:3px;
|
20
|
+
}
|
21
|
+
|
22
|
+
.section_link a {
|
23
|
+
text-decoration:none;
|
24
|
+
}
|
25
|
+
|
26
|
+
.section_link a:hover {
|
27
|
+
text-decoration:none;
|
28
|
+
}
|
29
|
+
|
30
|
+
.section_link:hover {
|
31
|
+
background: #eee;
|
32
|
+
}
|
33
|
+
|
34
|
+
.section_link.selected {
|
35
|
+
background: #4096EE;
|
36
|
+
color:white;
|
37
|
+
}
|
38
|
+
|
39
|
+
.section_link.selected a {
|
40
|
+
color:white;
|
41
|
+
}
|
42
|
+
</style>
|
43
|
+
|
44
|
+
<%= form_tag({}, :id => "version_form", :method => :get) do %>
|
45
|
+
<%=hidden_field_tag(:path, params[:path])%>
|
46
|
+
<div class="documentation_sidebar">
|
47
|
+
<div class="navigation_header"><%=tr("Introduction")%></div>
|
48
|
+
<div class="section_link <%="selected" if controller.action_name == 'index' %>"><%=link_to(tr("Welcome"), :action => :index, :version => @version)%></div>
|
49
|
+
<div class="section_link <%="selected" if controller.action_name == 'reference' %>"><%=link_to(tr("Using the API Reference"), :action => :reference, :version => @version)%></div>
|
50
|
+
|
51
|
+
<div class="navigation_header"><%=tr("Authentication")%></div>
|
52
|
+
<div class="section_link <%="selected" if controller.action_name == 'oauth_intro' %>"><%=link_to(tr("Introduction"), :action => :oauth_intro, :version => @version)%></div>
|
53
|
+
<div class="section_link <%="selected" if controller.action_name == 'oauth_server_side' %>"><%=link_to(tr("Server Side Flow"), :action => :oauth_server_side, :version => @version)%></div>
|
54
|
+
<div class="section_link <%="selected" if controller.action_name == 'oauth_client_side' %>"><%=link_to(tr("Client Side Flow"), :action => :oauth_client_side, :version => @version)%></div>
|
55
|
+
<div style="padding-left:15px;" class="section_link <%="selected" if controller.action_name == 'oauth_desktop' %>"><%=link_to(tr("Desktop Apps"), :action => :oauth_desktop, :version => @version)%></div>
|
56
|
+
<div style="padding-left:15px;" class="section_link <%="selected" if controller.action_name == 'oauth_mobile' %>"><%=link_to(tr("Mobile Apps"), :action => :oauth_mobile, :version => @version)%></div>
|
57
|
+
<div style="padding-left:15px;" class="section_link <%="selected" if controller.action_name == 'oauth_trusted_client' %>"><%=link_to(tr("Trusted Apps"), :action => :oauth_trusted_client, :version => @version)%></div>
|
58
|
+
<div style="padding-left:15px;" class="section_link <%="selected" if controller.action_name == 'oauth_app_login' %>"><%=link_to(tr("App Login"), :action => :oauth_app_login, :version => @version)%></div>
|
59
|
+
|
60
|
+
<div class="section_link <%="selected" if controller.action_name == 'oauth_extensions' %>"><%=link_to(tr("{site_title} Extensions", "", :site_title => Platform::Config.site_title), :action => :oauth_extensions, :version => @version)%></div>
|
61
|
+
|
62
|
+
<div class="navigation_header"><%=tr("SDKs & Tools")%></div>
|
63
|
+
<div class="section_link <%="selected" if controller.action_name == 'sdk_js' %>"><%=link_to(tr("JavaScript SDK"), :action => :sdk_js, :version => @version)%></div>
|
64
|
+
<div class="section_link <%="selected" if controller.action_name == 'sdk_ios' %>"><%=link_to(tr("iOS SDK"), :action => :sdk_ios, :version => @version)%></div>
|
65
|
+
|
66
|
+
<div class="navigation_header" style="white-space:nowrap;"><%=tr("API Reference")%>
|
67
|
+
<% if Platform::Config.api_supported_versions.size > 1 %>
|
68
|
+
<span style="font-size:8px;">v</span> <%=select_tag("version", options_for_select(Platform::Config.api_supported_versions, @version), :style=>"height:15px;padding:0px;font-size:10px;", :onChange=>"Platform.element('version_form').submit();")%>
|
69
|
+
<% end %>
|
70
|
+
</div>
|
71
|
+
|
72
|
+
<% ref = Platform::Config.api_reference(@version) %>
|
73
|
+
<% @api ||= {} %>
|
74
|
+
<% path_parts = (@api[:path] || "").split("/") %>
|
75
|
+
|
76
|
+
<% ref.keys.sort.each do |api_key| %>
|
77
|
+
<% api = ref[api_key] %>
|
78
|
+
<% next if api[:type]=='struct' %>
|
79
|
+
<div class="section_link <%="selected" if @api[:path]==api[:path] %>" style="vertical-align:middle;">
|
80
|
+
<% expanded = (path_parts.first == api[:path]) %>
|
81
|
+
<%=raw(platform_toggler_tag("#{api_key}_api_actions", "", expanded, {:style => "text-align:center; vertical-align:top; width:10px;"}))%>
|
82
|
+
<%=link_to(api_key.titleize, {:action => :api, :path => api[:path], :version => @version})%>
|
83
|
+
<%=raw(platform_documentation_api_decorators_tag(api)) %>
|
84
|
+
</div>
|
85
|
+
<% if api[:actions] %>
|
86
|
+
<div id="<%=api_key%>_api_actions" style="margin-bottom:5px;<%='display:none' unless expanded%>">
|
87
|
+
<% api[:actions].keys.sort.each do |api_action_key| %>
|
88
|
+
<% api_action = api[:actions][api_action_key] %>
|
89
|
+
<div style="padding-left:25px;" class="section_link <%="selected" if @api[:path]==api_action[:path] %>">
|
90
|
+
<%=link_to(api_action_key, {:action => :api, :path => api_action[:path], :version => @version})%>
|
91
|
+
<%=raw(platform_documentation_api_decorators_tag(api_action)) %>
|
92
|
+
</div>
|
93
|
+
<% end %>
|
94
|
+
</div>
|
95
|
+
<% end %>
|
96
|
+
|
97
|
+
<% end %>
|
98
|
+
</div>
|
99
|
+
<% end %>
|