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,22 @@
|
|
1
|
+
<%
|
2
|
+
links = []
|
3
|
+
current_tab ||= ""
|
4
|
+
[
|
5
|
+
["Categories", {:action => :index}]
|
6
|
+
].each do |link|
|
7
|
+
if controller.action_name == link.last[:action].to_s
|
8
|
+
current_tab = link.first if current_tab.blank?
|
9
|
+
links << link.first
|
10
|
+
else
|
11
|
+
links << link_to(link.first, link.last)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
%>
|
15
|
+
|
16
|
+
<div class="section_title">
|
17
|
+
<span style="font-size:12px; float:right; padding-top:5px;">
|
18
|
+
<%=links.join(" | ")%>
|
19
|
+
</span>
|
20
|
+
<%=current_tab %>
|
21
|
+
</div>
|
22
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<div id="categoryAssigner" style="width:100%; height:100%;">
|
2
|
+
<div style="padding:10px; background-color:#eee;">
|
3
|
+
<div style="float:right;">
|
4
|
+
<%=link_to_function(trl("close", "Platform lightbox close button"), "platformLightbox.hide()", :class => "platform_cancel_link") %>
|
5
|
+
</div>
|
6
|
+
<%=@app.name%> Categories
|
7
|
+
</div>
|
8
|
+
<iframe style="width:100%; height:90%; border:1px dotted #ccc;" src="/platform/admin/categories/category_assigner_tree?app_id=<%=@app.id%>"></iframe>
|
9
|
+
</div>
|
@@ -0,0 +1,81 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<%=javascript_include_tag("platform/ua.js")%>
|
4
|
+
<%=javascript_include_tag("platform/ftiens4.js")%>
|
5
|
+
<style>
|
6
|
+
.tree_root {
|
7
|
+
font-size: 12pt;
|
8
|
+
font-family: verdana, helvetica;
|
9
|
+
text-decoration: none;
|
10
|
+
color: black;
|
11
|
+
}
|
12
|
+
|
13
|
+
.tree_item {
|
14
|
+
font-size: 10pt;
|
15
|
+
font-family: verdana, helvetica;
|
16
|
+
text-decoration: none;
|
17
|
+
color: black;
|
18
|
+
}
|
19
|
+
</style>
|
20
|
+
<script>
|
21
|
+
function $(elmId) {
|
22
|
+
return document.getElementById(elmId);
|
23
|
+
}
|
24
|
+
|
25
|
+
function hide(elmId) {
|
26
|
+
$(elmId).style.display = "none";
|
27
|
+
}
|
28
|
+
function show(elmId) {
|
29
|
+
$(elmId).style.display = "block";
|
30
|
+
}
|
31
|
+
|
32
|
+
function setToLoading() {
|
33
|
+
hide("assignerTree");
|
34
|
+
show("loadingTree");
|
35
|
+
}
|
36
|
+
|
37
|
+
function assignCategory(chk) {
|
38
|
+
category_id = chk.id.split("_")[1];
|
39
|
+
top.assignCategory('<%=@app.id%>', category_id, chk.checked);
|
40
|
+
}
|
41
|
+
|
42
|
+
function checkCategory(id, flag) {
|
43
|
+
if ($(id)) {
|
44
|
+
$(id).checked = flag;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
function checkAssignedCategories() {
|
49
|
+
<%
|
50
|
+
@app.categories.each do |category|
|
51
|
+
next unless category
|
52
|
+
%>
|
53
|
+
checkCategory("check_<%=category.id%>", true);
|
54
|
+
<% end %>
|
55
|
+
}
|
56
|
+
|
57
|
+
USETEXTLINKS = 0
|
58
|
+
STARTALLOPEN = 0
|
59
|
+
HIGHLIGHT = 0
|
60
|
+
PRESERVESTATE = 1
|
61
|
+
USEICONS = 0
|
62
|
+
BUILDALL = 1
|
63
|
+
|
64
|
+
<%= generate_categories_javascript(@root, true) %>
|
65
|
+
</script>
|
66
|
+
</head>
|
67
|
+
<body topmargin=0>
|
68
|
+
<A style="font-size:7pt;text-decoration:none;color:silver;visibility:hidden;" href="http://www.treemenu.net/" target=_blank>Javascript Tree Menu</A>
|
69
|
+
<div id="loadingTree" style="display:none">
|
70
|
+
<center><br><br><br><img alt="Spinner" src="/images/spinner.gif" /></center>
|
71
|
+
</div>
|
72
|
+
<div id="assignerTree" style="">
|
73
|
+
<FORM name="ft" method="">
|
74
|
+
<SCRIPT>
|
75
|
+
initializeDocument();
|
76
|
+
checkAssignedCategories();
|
77
|
+
</SCRIPT>
|
78
|
+
</FORM>
|
79
|
+
</div>
|
80
|
+
</body>
|
81
|
+
</html>
|
@@ -0,0 +1,106 @@
|
|
1
|
+
<%= render :partial => "/platform/admin/common/header" %>
|
2
|
+
<%= render :partial => "tabs" %>
|
3
|
+
|
4
|
+
<SCRIPT>
|
5
|
+
|
6
|
+
var selectedCategoryId = '<%=@category.id%>';
|
7
|
+
var selectedCategoryName = '<%=@category.name%>';
|
8
|
+
|
9
|
+
function openSubCategory(id, name) {
|
10
|
+
selectedCategoryId = id;
|
11
|
+
selectedCategoryName = name;
|
12
|
+
|
13
|
+
Platform.element("subCategories").innerHTML = "<div style='padding:10px;text-align:center;'><img alt='Spinner' src='/assets/platform/spinner.gif?1215809373'></div>";
|
14
|
+
Platform.element("subTabTitle").innerHTML = name;
|
15
|
+
|
16
|
+
Platform.Utils.update('subCategories', '/platform/admin/categories/items', {
|
17
|
+
parameters: {
|
18
|
+
parent_id: id,
|
19
|
+
sub_categories: true,
|
20
|
+
objects: true
|
21
|
+
},
|
22
|
+
onComplete: findAndHighlight(id)
|
23
|
+
});
|
24
|
+
}
|
25
|
+
|
26
|
+
function showEditControl(width, height) {
|
27
|
+
screenW = screen.width;
|
28
|
+
screenH = screen.height;
|
29
|
+
|
30
|
+
$("editControl").innerHTML = "<div style='padding:10px;text-align:center;'><img alt='Spinner' src='/assets/platform/spinner.gif?1215809373'></div>";
|
31
|
+
$("editControl").style.left = ((screenW - width)/2) + "px";
|
32
|
+
$("editControl").style.top = ((screenH - height -200)/2) + "px";
|
33
|
+
$("editControl").style.width = width + "px";
|
34
|
+
$("editControl").style.height = height + "px";
|
35
|
+
$("editControl").show();
|
36
|
+
}
|
37
|
+
|
38
|
+
function addCategory() {
|
39
|
+
platformLightbox.show('/platform/admin/categories/lb_update_category?parent_id=' + selectedCategoryId, {"width":"500", "height":"270"});
|
40
|
+
}
|
41
|
+
|
42
|
+
function editCategory(categoryId, parentId) {
|
43
|
+
platformLightbox.show('/platform/admin/categories/lb_update_category?parent_id=' + parentId + '&category_id=' + categoryId, {"width":"500", "height":"270"});
|
44
|
+
}
|
45
|
+
|
46
|
+
function deleteCategory(categoryId) {
|
47
|
+
if (confirm("Are you sure you want to delete this category?")) {
|
48
|
+
location.href="/platform/admin/categories/delete_category?category_id=" + categoryId;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
function editApplicationCategory(categoryId, appId) {
|
53
|
+
platformLightbox.show('/platform/admin/categories/lb_update_application_category?category_id=' + categoryId + "&app_id=" + appId, {"width":"500", "height":"230"});
|
54
|
+
}
|
55
|
+
|
56
|
+
function deleteApplicationCategory(categoryId, appId) {
|
57
|
+
if (confirm("Are you sure you want to unassign this object?")) {
|
58
|
+
Platform.Utils.ajax('/platform/admin/categories/assign_category', {
|
59
|
+
parameters: {
|
60
|
+
category_id: categoryId,
|
61
|
+
app_id: appId
|
62
|
+
},
|
63
|
+
onComplete: function(){
|
64
|
+
openSubCategory(categoryId, selectedCategoryName)
|
65
|
+
}
|
66
|
+
});
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
function cancelEditCategory() {
|
71
|
+
$("editControl").hide();
|
72
|
+
}
|
73
|
+
|
74
|
+
function findAndHighlight(id) {
|
75
|
+
window.frames.categoriesFrame.findAndHighlight(id);
|
76
|
+
}
|
77
|
+
</SCRIPT>
|
78
|
+
|
79
|
+
<div style="height:500px;">
|
80
|
+
<table width="100%" style="height:450px; border: 1px dotted #ccc;">
|
81
|
+
<tr>
|
82
|
+
<td width="25%" style="padding:5px;border-bottom:1px solid #ccc;border-right:1px solid #ccc;background:#eee;">
|
83
|
+
<span style="float:right;">
|
84
|
+
<%=link_to_function("+ Add category", "addCategory();")%>
|
85
|
+
</span>
|
86
|
+
<span>
|
87
|
+
Category Tree
|
88
|
+
</span>
|
89
|
+
</td>
|
90
|
+
<td width="75%" style="padding:5px;border-bottom:1px solid #ccc;background:#eee;">
|
91
|
+
<span id="subTabTitle"><%=@category.name%></span>
|
92
|
+
</td>
|
93
|
+
</tr>
|
94
|
+
<tr>
|
95
|
+
<td valign="top" style="vertical-align:top;border-right:1px solid #ccc; height:100%">
|
96
|
+
<iframe id="categoriesFrame" name="categoriesFrame" style="width:100%; height:100%; border:0px" src="/platform/admin/categories/tree?category_id=<%=@category.id%>&t=<%=Time.now.to_i%>"> </iframe>
|
97
|
+
</td>
|
98
|
+
<td valign="top" style="vertical-align:top;">
|
99
|
+
<div id="subCategories" style="width:100%;height:450px;overflow:auto;">
|
100
|
+
</div>
|
101
|
+
</td>
|
102
|
+
</tr>
|
103
|
+
</table>
|
104
|
+
</div>
|
105
|
+
|
106
|
+
<%= render :partial => "/platform/admin/common/footer" %>
|
@@ -0,0 +1,153 @@
|
|
1
|
+
<%= stylesheet_link_tag("will_filter/filter.css") -%>
|
2
|
+
|
3
|
+
<% if @children %>
|
4
|
+
<div style="border-bottom:1px dotted #ccc; font-size: 12px;padding:5px; background:#eee;">
|
5
|
+
<%=platform_toggler_tag("sub_categories_container")%> Sub Categories (<%=@children.size%>)
|
6
|
+
</div>
|
7
|
+
<div id="sub_categories_container">
|
8
|
+
<% if @children.size == 0 %>
|
9
|
+
<div style="padding:10px;">None found</div>
|
10
|
+
<% else %>
|
11
|
+
|
12
|
+
<table class='wf_results_table'>
|
13
|
+
<thead>
|
14
|
+
<tr>
|
15
|
+
<th class="sortable" style="">
|
16
|
+
<div class="table_head_container">Name</div>
|
17
|
+
</th>
|
18
|
+
<th class="" style="">
|
19
|
+
<div class="table_head_container">Keyword</div>
|
20
|
+
</th>
|
21
|
+
<th class="" style="">
|
22
|
+
<div class="table_head_container">Position</div>
|
23
|
+
</th>
|
24
|
+
<th class="" style="">
|
25
|
+
<div class="table_head_container">Count</div>
|
26
|
+
</th>
|
27
|
+
<th class="" style="width:100px;">
|
28
|
+
<div class="table_head_container">Actions</div>
|
29
|
+
</th>
|
30
|
+
</tr>
|
31
|
+
</thead>
|
32
|
+
<tbody>
|
33
|
+
<%
|
34
|
+
@children.each_with_index do |child, index|
|
35
|
+
child_name = child.name.gsub("'", "\\'")
|
36
|
+
%>
|
37
|
+
<tr class='data_row <%=(index % 2 == 0) ? "wf_row_even" : "wf_row_odd"%>'>
|
38
|
+
<td style="padding:3px;"><%=link_to_function(child_name, "javascript:openSubCategory(\"#{child.id}\", \"#{child_name}\");")%></td>
|
39
|
+
<td style="padding:3px;"><%=child.keyword%></td>
|
40
|
+
<td style="padding:3px;"><%=child.position%></td>
|
41
|
+
<td style="padding:3px;"><%=child.children.size%></td>
|
42
|
+
<td style="padding:3px;text-align:right">
|
43
|
+
<%=link_to_function("Edit", "editCategory('#{child.id}', '#{@parent.id}');")%>
|
44
|
+
| <%=link_to_function("Delete", "deleteCategory('#{child.id}');")%>
|
45
|
+
|
46
|
+
</td>
|
47
|
+
</tr>
|
48
|
+
<% end %>
|
49
|
+
</tbody>
|
50
|
+
</table>
|
51
|
+
<% end %>
|
52
|
+
</div>
|
53
|
+
<% end %>
|
54
|
+
|
55
|
+
<% if @featured_apps %>
|
56
|
+
<div style="border-bottom:1px dotted #ccc; font-size: 12px;padding:5px; background:#eee; margin-top:10px;">
|
57
|
+
<%=platform_toggler_tag("featured_items_container")%> Featured Applications (<%=@featured_apps.size%>)
|
58
|
+
</div>
|
59
|
+
|
60
|
+
<div id="featured_items_container">
|
61
|
+
<% if @featured_apps.size == 0 %>
|
62
|
+
<div style="padding:10px;">None found</div>
|
63
|
+
<% else %>
|
64
|
+
|
65
|
+
<table class='wf_results_table'>
|
66
|
+
<thead>
|
67
|
+
<tr>
|
68
|
+
<th class="" style="width:20px;">
|
69
|
+
<div class="table_head_container">Icon</div>
|
70
|
+
</th>
|
71
|
+
<th class="" style="">
|
72
|
+
<div class="table_head_container">Name</div>
|
73
|
+
</th>
|
74
|
+
<th class="" style="width:20px;">
|
75
|
+
<div class="table_head_container">Position</div>
|
76
|
+
</th>
|
77
|
+
<th class="" style="width:100px;">
|
78
|
+
<div class="table_head_container">Actions</div>
|
79
|
+
</th>
|
80
|
+
</tr>
|
81
|
+
</thead>
|
82
|
+
<tbody>
|
83
|
+
|
84
|
+
<%
|
85
|
+
@featured_apps.each_with_index do |item, index|
|
86
|
+
next unless item.application
|
87
|
+
%>
|
88
|
+
<tr class='data_row <%=(index % 2 == 0) ? "wf_row_even" : "wf_row_odd"%>'>
|
89
|
+
<td style="padding:3px;"><%=link_to(image_tag(item.application.icon_url), :controller => "/platform/admin/apps", :action => :view, :app_id => item.application.id)%></td>
|
90
|
+
<td style="padding:3px;"><%=link_to(item.application.name, :controller => "/platform/admin/apps", :action => :view, :app_id => item.application.id)%></td>
|
91
|
+
<td style="padding:3px;"><%=item.position%></td>
|
92
|
+
<td style="padding:3px;text-align:right">
|
93
|
+
<%=link_to_function("Edit", "editApplicationCategory('#{item.category.id}', '#{item.application.id}');")%>
|
94
|
+
| <%=link_to_function("Delete", "deleteApplicationCategory('#{item.category.id}', '#{item.application.id}');")%>
|
95
|
+
|
96
|
+
</td>
|
97
|
+
|
98
|
+
</tr>
|
99
|
+
<% end %>
|
100
|
+
</table>
|
101
|
+
<% end %>
|
102
|
+
</div>
|
103
|
+
<% end %>
|
104
|
+
|
105
|
+
<% if @apps %>
|
106
|
+
<div style="border-bottom:1px dotted #ccc; font-size: 12px;padding:5px; background:#eee; margin-top:10px;">
|
107
|
+
<%=platform_toggler_tag("items_container")%> Applications (<%=@apps.size%>)
|
108
|
+
</div>
|
109
|
+
|
110
|
+
<div id="items_container">
|
111
|
+
<% if @apps.size == 0 %>
|
112
|
+
<div style="padding:10px;">None found</div>
|
113
|
+
<% else %>
|
114
|
+
|
115
|
+
<table class='wf_results_table'>
|
116
|
+
<thead>
|
117
|
+
<tr>
|
118
|
+
<th class="" style="width:20px;">
|
119
|
+
<div class="table_head_container">Icon</div>
|
120
|
+
</th>
|
121
|
+
<th class="" style="">
|
122
|
+
<div class="table_head_container">Name</div>
|
123
|
+
</th>
|
124
|
+
<th class="" style="width:20px;">
|
125
|
+
<div class="table_head_container">Position</div>
|
126
|
+
</th>
|
127
|
+
<th class="" style="width:100px;">
|
128
|
+
<div class="table_head_container">Actions</div>
|
129
|
+
</th>
|
130
|
+
</tr>
|
131
|
+
</thead>
|
132
|
+
<tbody>
|
133
|
+
|
134
|
+
<%
|
135
|
+
@apps.each_with_index do |item, index|
|
136
|
+
next unless item.application
|
137
|
+
%>
|
138
|
+
<tr class='data_row <%=(index % 2 == 0) ? "wf_row_even" : "wf_row_odd"%>'>
|
139
|
+
<td style="padding:3px;"><%=link_to(image_tag(item.application.icon_url), :controller => "/platform/admin/apps", :action => :view, :app_id => item.application.id)%></td>
|
140
|
+
<td style="padding:3px;"><%=link_to(item.application.name, :controller => "/platform/admin/apps", :action => :view, :app_id => item.application.id)%></td>
|
141
|
+
<td style="padding:3px;"><%=item.position%></td>
|
142
|
+
<td style="padding:3px;text-align:right">
|
143
|
+
<%=link_to_function("Edit", "editApplicationCategory('#{item.category.id}', '#{item.application.id}');")%>
|
144
|
+
| <%=link_to_function("Delete", "deleteApplicationCategory('#{item.category.id}', '#{item.application.id}');")%>
|
145
|
+
|
146
|
+
</td>
|
147
|
+
|
148
|
+
</tr>
|
149
|
+
<% end %>
|
150
|
+
</table>
|
151
|
+
<% end %>
|
152
|
+
</div>
|
153
|
+
<% end %>
|
@@ -0,0 +1,54 @@
|
|
1
|
+
<div style="font-weight:bold; border-bottom:1px solid #ccc;">
|
2
|
+
Application Category Details
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<div style="margin-top:10px;">
|
6
|
+
<% form_for(:application_category, @app_cat, :url => {:action => :update_application_category}, :html => {:method => 'post', :id => 'platform_form'}) do |form| %>
|
7
|
+
<div class="content">
|
8
|
+
<%= form.hidden_field :id %>
|
9
|
+
<table class="admin_table">
|
10
|
+
<tr>
|
11
|
+
<th width="150px">
|
12
|
+
Category Keyword:
|
13
|
+
</th>
|
14
|
+
<td>
|
15
|
+
<%=@app_cat.category.keyword %>
|
16
|
+
</td>
|
17
|
+
</tr>
|
18
|
+
<tr>
|
19
|
+
<th width="150px">
|
20
|
+
Category Name:
|
21
|
+
</th>
|
22
|
+
<td>
|
23
|
+
<%=@app_cat.category.full_name %>
|
24
|
+
</td>
|
25
|
+
</tr>
|
26
|
+
<tr>
|
27
|
+
<th>
|
28
|
+
Application:
|
29
|
+
</th>
|
30
|
+
<td>
|
31
|
+
<%=@app_cat.application.name %>
|
32
|
+
</td>
|
33
|
+
</tr>
|
34
|
+
<tr>
|
35
|
+
<th>
|
36
|
+
Position:
|
37
|
+
</th>
|
38
|
+
<td>
|
39
|
+
<%= form.text_field :position, :size=>"50" %>
|
40
|
+
</td>
|
41
|
+
</tr>
|
42
|
+
<tr>
|
43
|
+
<th>
|
44
|
+
Featured:
|
45
|
+
</th>
|
46
|
+
<td>
|
47
|
+
<%= form.check_box :featured %>
|
48
|
+
</td>
|
49
|
+
</tr>
|
50
|
+
</table>
|
51
|
+
</div>
|
52
|
+
<%= render('/platform/admin/common/lightbox_buttons') %>
|
53
|
+
<% end %>
|
54
|
+
</div>
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<div style="font-weight:bold; border-bottom:1px solid #ccc;">
|
2
|
+
Category Details
|
3
|
+
</div>
|
4
|
+
<div style="margin-top:10px;">
|
5
|
+
<%= form_for(@category, :as => :category, :url => {:action => :update_category}, :html => {:method => 'post', :id => 'platform_form'}) do |form| %>
|
6
|
+
<div class="content">
|
7
|
+
<%= form.hidden_field :parent_id %>
|
8
|
+
<%= form.hidden_field :id %>
|
9
|
+
<table class="admin_table">
|
10
|
+
<tr>
|
11
|
+
<th width="150px">
|
12
|
+
Parent Category:
|
13
|
+
</th>
|
14
|
+
<td>
|
15
|
+
<%=@parent.name %>
|
16
|
+
</td>
|
17
|
+
</tr>
|
18
|
+
<tr>
|
19
|
+
<th>
|
20
|
+
Name:
|
21
|
+
</th>
|
22
|
+
<td>
|
23
|
+
<%= form.text_field :name, :size=>"50" %>
|
24
|
+
</td>
|
25
|
+
</tr>
|
26
|
+
<tr>
|
27
|
+
<th>
|
28
|
+
Keyword:
|
29
|
+
</th>
|
30
|
+
<td>
|
31
|
+
<%= form.text_field :keyword, :size=>"50" %>
|
32
|
+
</td>
|
33
|
+
</tr>
|
34
|
+
<tr>
|
35
|
+
<th>
|
36
|
+
Position:
|
37
|
+
</th>
|
38
|
+
<td>
|
39
|
+
<%= form.text_field :position, :size=>"50" %>
|
40
|
+
</td>
|
41
|
+
</tr>
|
42
|
+
<tr>
|
43
|
+
<th>
|
44
|
+
Enable On:
|
45
|
+
</th>
|
46
|
+
<td>
|
47
|
+
<%= form.text_field :enable_on, :size=>"50" %>
|
48
|
+
</td>
|
49
|
+
</tr>
|
50
|
+
<tr>
|
51
|
+
<th>
|
52
|
+
Disable On:
|
53
|
+
</th>
|
54
|
+
<td>
|
55
|
+
<%= form.text_field :disable_on, :size=>"50" %>
|
56
|
+
</td>
|
57
|
+
</tr>
|
58
|
+
</table>
|
59
|
+
</div>
|
60
|
+
|
61
|
+
<%= render('/platform/admin/common/lightbox_buttons') %>
|
62
|
+
|
63
|
+
<% end %>
|
64
|
+
</div>
|