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,11 @@
|
|
1
|
+
<% form_tag({:controller => '/platform/oauth', :action => :authorize}, :id => 'auth_form') do %>
|
2
|
+
<%= hidden_field_tag "response_type", @response_type%>
|
3
|
+
<%= hidden_field_tag "client_id", params[:client_id]%>
|
4
|
+
<%= hidden_field_tag "redirect_url", @redirect_url %>
|
5
|
+
<%= hidden_field_tag "state", params[:state] %>
|
6
|
+
<%= hidden_field_tag "scope", @scope %>
|
7
|
+
<%= hidden_field_tag "origin", params[:origin]%>
|
8
|
+
<%= hidden_field_tag "callback", params[:callback]%>
|
9
|
+
<%= hidden_field_tag "display", @display%>
|
10
|
+
<%= hidden_field_tag 'authorize', 1 %>
|
11
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div class="section">
|
2
|
+
<div style="color:#888; padding-bottom:8px; font-size:12px; font-weight:bold;">
|
3
|
+
<%=tr("Category")%>
|
4
|
+
</div>
|
5
|
+
|
6
|
+
<div style="color:#666; font-size:11px;">
|
7
|
+
<% @app.categories.each do |cat| %>
|
8
|
+
<div><%=cat.name%></div>
|
9
|
+
<% end %>
|
10
|
+
</div>
|
11
|
+
</div>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<% if apps.any? %>
|
2
|
+
<%
|
3
|
+
block_width = "#{100/per_row}%"
|
4
|
+
block_height ||= "120px;"
|
5
|
+
%>
|
6
|
+
<div class="section_title" style="padding-top:0px;">
|
7
|
+
<span style="float:right; font-size:12px; font-weight:normal">
|
8
|
+
<%=render(:partial => "paginator", :locals => {:apps => apps, :element_id => "featured_apps"})%>
|
9
|
+
</span>
|
10
|
+
<%=tr(Platform::Config.featured_apps_title)%>
|
11
|
+
</div>
|
12
|
+
<div class="apps_body" style="">
|
13
|
+
<table style="width:100%;">
|
14
|
+
<tr>
|
15
|
+
<% apps.each_with_index do |app, index| %>
|
16
|
+
<td style="width:<%=block_width%>;text-align:left">
|
17
|
+
<div class="section" style="height:<%=block_height%>; padding:5px; margin:3px;">
|
18
|
+
<div style="float:right;padding-left:10px;padding-bottom:1px;">
|
19
|
+
<%= link_to(image_tag(app.logo_url), {:action => :view, :id => app.id}) %>
|
20
|
+
</div>
|
21
|
+
<div style="font-size:14px;padding-bottom:10px;">
|
22
|
+
<%= link_to(h(app.name), {:action => :view, :id => app.id}) %><br>
|
23
|
+
</div>
|
24
|
+
<div style="font-size:11px;">
|
25
|
+
<%= app.short_description %>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</td>
|
29
|
+
<% if (index+1) % per_row == 0 %>
|
30
|
+
</tr><tr>
|
31
|
+
<% end %>
|
32
|
+
<% end %>
|
33
|
+
<% 0.upto(per_row - (apps.size % per_row) -1).each do %>
|
34
|
+
<td style="width:<%=block_width%>;"> </td>
|
35
|
+
<% end %>
|
36
|
+
</tr>
|
37
|
+
</table>
|
38
|
+
</div>
|
39
|
+
<% end %>
|
40
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<div class="section" style="text-align:center">
|
2
|
+
<%= link_to(image_tag(@app.logo_url, :style => "width:75px;height:75px;"), :action => :view, :id => @app.id, :sec => 'Info') %>
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<div class="section grey">
|
6
|
+
<% @sections.each do |cat| %>
|
7
|
+
<% if cat == @section %>
|
8
|
+
<div class="cat_item cat_item_selected">
|
9
|
+
<% else %>
|
10
|
+
<div class="cat_item">
|
11
|
+
<% end %>
|
12
|
+
<%=link_to(cat, {:id => @app.id, :sec=>cat}) %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<%= render(:partial => "/platform/apps/rank_module", :locals => {:app => @app} )%>
|
18
|
+
<%= render(:partial => "/platform/apps/monthly_users_module", :locals => {:app => @app} )%>
|
19
|
+
<%= render(:partial => "/platform/apps/categories_module", :locals => {:app => @app} )%>
|
20
|
+
<%= render(:partial => "/platform/apps/actions_module", :locals => {:app => @app} )%>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<div class="section">
|
2
|
+
<div style="color:#888; padding-bottom:8px; font-size:18px; font-weight:bold;">
|
3
|
+
<%=(@app.last_monthly_metric ? @app.last_monthly_metric.active_user_count : 0)%>
|
4
|
+
</div>
|
5
|
+
<div style="color:#666; font-size:11px;">
|
6
|
+
<%=tr("monthly active {count|user}", '', :count => (@app.last_monthly_metric ? @app.last_monthly_metric.active_user_count : 0))%>
|
7
|
+
</div>
|
8
|
+
</div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%=tr("Page {num} of {count}", "", {:num => apps.current_page, :count => apps.num_pages})%>
|
2
|
+
|
3
|
+
<% if apps.first_page? %>
|
4
|
+
<%=link_to_function('<<', "", :class=>"button super gray small") %>
|
5
|
+
<% else %>
|
6
|
+
<%=link_to_function('<<', "goPage('#{element_id}', '#{apps.current_page-1}')", :class=>"button super blue small") %>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<% if apps.last_page? %>
|
10
|
+
<%=link_to_function('>>', "", :class=>"button super gray small") %>
|
11
|
+
<% else %>
|
12
|
+
<%=link_to_function('>>', "goPage('#{element_id}', '#{apps.current_page+1}')", :class=>"button super blue small") %>
|
13
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<div class="section">
|
2
|
+
<div style="color:#888; padding-bottom:8px; font-size:12px; font-weight:bold;">
|
3
|
+
<%=tr("Review Summary")%>
|
4
|
+
</div>
|
5
|
+
|
6
|
+
<% if app.rating_count == 0 %>
|
7
|
+
<div style="color:#666; font-size:11px;">
|
8
|
+
<%=tr("No reviews yet")%>
|
9
|
+
</div>
|
10
|
+
<% else %>
|
11
|
+
<div style="color:#666; padding-bottom:8px; font-size:12px;">
|
12
|
+
<%= platform_app_rank_tag(app) %> <%=tr("({rank} out of 5)", "", :rank => app.rank)%>
|
13
|
+
</div>
|
14
|
+
<div style="color:#666; font-size:11px;">
|
15
|
+
<%=tr("Based on [link: {count||review}]", "", :count => app.rating_count, :link => {:href => "/platform/apps/view?id=#{app.id}&sec=Reviews"})%>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<% if apps.any? %>
|
2
|
+
<div style="padding-bottom:20px;">
|
3
|
+
<div class="apps_header">
|
4
|
+
<span style="float:right; font-size:12px; font-weight:normal;">
|
5
|
+
<%=render(:partial => "paginator", :locals => {:apps => apps, :element_id => "searched_apps"})%>
|
6
|
+
</span>
|
7
|
+
<%=tr(Platform::Config.searched_apps_title)%>
|
8
|
+
</div>
|
9
|
+
<div class="apps_body">
|
10
|
+
<table style="width:100%;">
|
11
|
+
<% apps.each_with_index do |app, index| %>
|
12
|
+
<tr style="border-bottom:1px solid #ccc;">
|
13
|
+
<td style="width:100px;padding-bottom:5px;padding-top:5px;">
|
14
|
+
<%= link_to(image_tag(app.logo_url), {:action => :view, :id => app.id}) %>
|
15
|
+
</td>
|
16
|
+
<td style="padding-bottom:5px;padding-top:5px;">
|
17
|
+
<div style="float:right">
|
18
|
+
<%= platform_app_rank_tag(app) %>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<div style="margin-bottom:10px;">
|
22
|
+
<%= link_to(app.name, {:action => :view, :id => app.id}) %>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<div style="margin-bottom:5px;">
|
26
|
+
<%= app.description %>
|
27
|
+
</div>
|
28
|
+
</td>
|
29
|
+
</tr>
|
30
|
+
<% end %>
|
31
|
+
</table>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
<% end %>
|
35
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% if @app %>
|
2
|
+
<div style="margin-bottom:10px;">
|
3
|
+
<iframe id="app_content_frame" src="<%=raw(@canvas_url)%>" scrolling="<%=@app.auto_resize? ? 'no' : 'auto'%>" style="border:0px;width:100%;height:640px;"></iframe>
|
4
|
+
</div>
|
5
|
+
<% else %>
|
6
|
+
<div style="font-size:18px; text-align:center; padding-bottom:20px;">
|
7
|
+
Invalid application name. This application does not exist.
|
8
|
+
</div>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<script>
|
12
|
+
function resizeFrame(height) {
|
13
|
+
document.getElementById('app_content_frame').style.height = parseInt(height)+60 + "px";
|
14
|
+
}
|
15
|
+
</script>
|
@@ -0,0 +1,86 @@
|
|
1
|
+
<%= render :partial => "/platform/common/header" %>
|
2
|
+
|
3
|
+
<div class="module page_title lengthy">
|
4
|
+
<div class="inner">
|
5
|
+
<div class="hd">
|
6
|
+
<span style="float:right; padding-top:15px; font-size:12px;">
|
7
|
+
<%=tr("Have an idea for an app?")%>
|
8
|
+
<% if platform_current_user_is_developer? %>
|
9
|
+
<%=link_to(tr('Create a new application!', 'Client application action label'), {:controller => "/platform/developer/apps", :action=>:index}) %>
|
10
|
+
<% else %>
|
11
|
+
<%=link_to(tr('Become a developer!', 'Client application action label'), {:controller => "/platform/developer/apps", :action=>:index}) %>
|
12
|
+
<% end %>
|
13
|
+
</span>
|
14
|
+
|
15
|
+
<h1><%= tr('Application Directory', 'Client application section title') %></h1>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="module page_title lengthy">
|
21
|
+
<div class="inner">
|
22
|
+
<table style="width:100%">
|
23
|
+
<tr>
|
24
|
+
<td style="width:200px;padding-right:20px;">
|
25
|
+
<%= form_tag({:action => :index}, :method => :get) do %>
|
26
|
+
<%=text_field_tag(:search, params[:search], :style => "width:200px", :label => "Search Apps")%>
|
27
|
+
<% end %>
|
28
|
+
<div class="section grey" style="padding-top:10px; margin-top:10px; margin-bottom:25px; vertical-align:top;">
|
29
|
+
<% @categories.each do |cat| %>
|
30
|
+
<% if cat == @category %>
|
31
|
+
<div class="cat_item cat_item_selected">
|
32
|
+
<% else %>
|
33
|
+
<div class="cat_item">
|
34
|
+
<% end %>
|
35
|
+
<%=link_to(cat.name, {:cat_id=>cat.id}) %>
|
36
|
+
</div>
|
37
|
+
<% if @category and (cat == @category or cat.children.include?(@category)) %>
|
38
|
+
<% cat.children.each do |sub_cat| %>
|
39
|
+
<% if sub_cat == @category %>
|
40
|
+
<div class="sub_cat_item sub_cat_item_selected">
|
41
|
+
<% else %>
|
42
|
+
<div class="sub_cat_item">
|
43
|
+
<% end %>
|
44
|
+
<%=link_to(sub_cat.name, {:cat_id=>sub_cat.id}) %>
|
45
|
+
</div>
|
46
|
+
<% end %>
|
47
|
+
<% end %>
|
48
|
+
<% end %>
|
49
|
+
</div>
|
50
|
+
</td>
|
51
|
+
<td>
|
52
|
+
<% if @apps.empty? and @featured_apps.empty? and @search_apps.empty? %>
|
53
|
+
<div class="section" style="padding:10px;text-align:center;font-size:14px;">
|
54
|
+
<%=tr("There are no applications in this category.")%>
|
55
|
+
</div>
|
56
|
+
<% end %>
|
57
|
+
|
58
|
+
<% if Platform::Config.featured_apps_enabled?%>
|
59
|
+
<div id="featured_apps">
|
60
|
+
<%= render(:partial => 'featured_apps_module', :locals => {:apps => @featured_apps, :per_row => Platform::Config.featured_apps_per_row})%>
|
61
|
+
</div>
|
62
|
+
<% end %>
|
63
|
+
|
64
|
+
<div id="suggested_apps">
|
65
|
+
<%= render(:partial => 'apps_module', :locals => {:apps => @apps, :per_row => Platform::Config.suggested_apps_per_row})%>
|
66
|
+
</div>
|
67
|
+
|
68
|
+
<div id="searched_apps">
|
69
|
+
<%= render(:partial => 'search_apps_module', :locals => {:apps => @search_apps})%>
|
70
|
+
</div>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
|
77
|
+
|
78
|
+
<script>
|
79
|
+
function goPage(module, page) {
|
80
|
+
if (page == "") return;
|
81
|
+
Platform.Utils.update(module, "/platform/apps/paginate_module", {
|
82
|
+
parameters: {module:module, page:page, search:"<%=params[:search]%>", cat_id:"<%=@category ? @category.id : ''%>"}
|
83
|
+
});
|
84
|
+
}
|
85
|
+
</script>
|
86
|
+
<%= render :partial => "/platform/common/footer" %>
|
@@ -0,0 +1,71 @@
|
|
1
|
+
<%= render :partial => "/platform/apps/app_header" %>
|
2
|
+
|
3
|
+
<div style="padding-left:10px;">
|
4
|
+
<% if params[:sec] == 'Info' %>
|
5
|
+
<div class="section_title" style="padding-top:0px;">
|
6
|
+
<%=tr("Basic Information")%>
|
7
|
+
</div>
|
8
|
+
<div class="section blue">
|
9
|
+
<table>
|
10
|
+
<tr>
|
11
|
+
<th style="width:110px; text-align:left;">
|
12
|
+
<%=tr("Description:")%>
|
13
|
+
</th>
|
14
|
+
<td>
|
15
|
+
<%=@app.description%>
|
16
|
+
</td>
|
17
|
+
</tr>
|
18
|
+
<% if @app.developer.about %>
|
19
|
+
<tr>
|
20
|
+
<th style="text-align:left;">
|
21
|
+
<%=tr("Developer Info:")%>
|
22
|
+
</th>
|
23
|
+
<td>
|
24
|
+
<%=@app.developer.about%>
|
25
|
+
</td>
|
26
|
+
</tr>
|
27
|
+
<% end %>
|
28
|
+
<% if @app.developer.name %>
|
29
|
+
<tr>
|
30
|
+
<th style="text-align:left;">
|
31
|
+
<%=tr("Developer Name:")%>
|
32
|
+
</th>
|
33
|
+
<td>
|
34
|
+
<%=@app.developer.name%>
|
35
|
+
</td>
|
36
|
+
</tr>
|
37
|
+
<% end %>
|
38
|
+
<% if @app.developer.url %>
|
39
|
+
<tr>
|
40
|
+
<th style="text-align:left;">
|
41
|
+
<%=tr("Website:")%>
|
42
|
+
</th>
|
43
|
+
<td>
|
44
|
+
<%=@app.developer.url%>
|
45
|
+
</td>
|
46
|
+
</tr>
|
47
|
+
<% end %>
|
48
|
+
</table>
|
49
|
+
</div>
|
50
|
+
<%= render :partial => "/platform/ratings/list" %>
|
51
|
+
<% end %>
|
52
|
+
|
53
|
+
<% if params[:sec] == 'Reviews' %>
|
54
|
+
<%= render :partial => "/platform/ratings/list" %>
|
55
|
+
<% end %>
|
56
|
+
|
57
|
+
<% if params[:sec] == 'Discussions' %>
|
58
|
+
<% if @topic %>
|
59
|
+
<%= render :partial => "/platform/forum/topic" %>
|
60
|
+
<% else %>
|
61
|
+
<% if params[:mode] == 'create' %>
|
62
|
+
<%= render :partial => "/platform/forum/new_topic", :locals => {:include_cancel_button => true} %>
|
63
|
+
<% else %>
|
64
|
+
<%= render :partial => "/platform/forum/topics" %>
|
65
|
+
<% end %>
|
66
|
+
<% end %>
|
67
|
+
<% end %>
|
68
|
+
</div>
|
69
|
+
|
70
|
+
<%= render :partial => "/platform/apps/app_footer" %>
|
71
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
</div>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<div style="padding-bottom:10px;padding-top:5px;">
|
2
|
+
<table style="width:100%;">
|
3
|
+
<tr>
|
4
|
+
<td style="text-align:left; vertical-align:top;font-size:11px; font-family:arial;">
|
5
|
+
<%
|
6
|
+
entry_name = options[:subject] || (collection.empty? ? 'entry' : collection.first.class.name.underscore.gsub('_', ' '))
|
7
|
+
output = ""
|
8
|
+
if collection.num_pages < 2
|
9
|
+
case collection.size
|
10
|
+
when 0
|
11
|
+
output = tr("None found", "Paginator message", {}, options)
|
12
|
+
when 1
|
13
|
+
output = tr("Displaying [bold: 1] #{entry_name}", "Paginator message", {}, options)
|
14
|
+
else
|
15
|
+
output = tr("Displaying [bold: all {count}] #{entry_name.pluralize}", "Paginator message", {:count => collection.size}, options)
|
16
|
+
end
|
17
|
+
else
|
18
|
+
output = tr("Displaying #{entry_name.pluralize} [bold: {start_num} - {end_num}] of [bold: {total_count}] in total",
|
19
|
+
"Paginator message", {
|
20
|
+
:start_num => collection.offset_value + 1,
|
21
|
+
:end_num => collection.offset_value + collection.length,
|
22
|
+
:total_count => collection.total_count
|
23
|
+
}, options
|
24
|
+
)
|
25
|
+
end
|
26
|
+
%>
|
27
|
+
<%= output %>
|
28
|
+
</td>
|
29
|
+
<td style="text-align:right; vertical-align:top; font-size:11px; font-family:arial;"><%= paginate(collection) %></td>
|
30
|
+
</tr>
|
31
|
+
</table>
|
32
|
+
</div>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<ul class="<%=opts[:class]%>" style="<%=opts[:style]%>">
|
2
|
+
<% if !Platform::Config.current_user or Platform::Config.current_user_is_guest? %>
|
3
|
+
<li><%=link_to(trl("Login", "Platform user login link"), "/platform/login")%></li>
|
4
|
+
<% else %>
|
5
|
+
<li><%=tr("Welcome {user}!", "", :user => [Platform::Config.current_user, :name]) %></li>
|
6
|
+
<li><%=link_to(trl("Logout", "Platform user logout link"), "/platform/login/out")%></li>
|
7
|
+
<% end %>
|
8
|
+
<% if Tr8n::Config.enabled? and (Tr8n::Config.open_registration_mode? or Tr8n::Config.current_user_is_translator?) %>
|
9
|
+
<li><%= tr8n_language_selector_tag %></li>
|
10
|
+
<% end %>
|
11
|
+
</ul>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<div style="border-bottom: 1px solid #ccc; margin:10px; font-weight:bold;">
|
2
|
+
<div style="float:right">
|
3
|
+
<%=link_to_function(tr("clear history"), "clearApiHistory()")%>
|
4
|
+
</div>
|
5
|
+
<%=tr("API Call History")%>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<% if @api_history.empty? %>
|
9
|
+
|
10
|
+
<div style="padding:10px;">
|
11
|
+
<%=tr("None found")%>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<% else %>
|
15
|
+
<div style="margin:10px;font-size:10px;overflow:auto;max-height:300px;">
|
16
|
+
<table class="api_history">
|
17
|
+
<tr style="">
|
18
|
+
<th><%=tr("Path")%></th>
|
19
|
+
<th><%=tr("Method")%></th>
|
20
|
+
<th><%=tr("Params")%></th>
|
21
|
+
</tr>
|
22
|
+
<% @api_history.reverse.each_with_index do |hc, index| %>
|
23
|
+
<tr class="api_row <%="selected_row" if (@api_history.size - 1 - @api_history_index) == index %>" onClick='callHistoricApi(<%=@api_history.size - 1 - index%>)'>
|
24
|
+
<td>http://<%=Platform::Config.api_base_url%><%=hc["path"]%></td>
|
25
|
+
<td><%=hc["method"]%></td>
|
26
|
+
<td><%=hc["params"].to_json%></td>
|
27
|
+
</tr>
|
28
|
+
<% end %>
|
29
|
+
</table>
|
30
|
+
</div>
|
31
|
+
<% end %>
|