crystal-ext 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Rakefile +66 -0
- data/lib/abstract_interface/controller_helper.rb +30 -0
- data/lib/abstract_interface/form_builders/abstract_form_builder.rb +79 -0
- data/lib/abstract_interface/form_builders/themed_form_builder.rb +46 -0
- data/lib/abstract_interface/form_builders/themed_form_tag_builder.rb +13 -0
- data/lib/abstract_interface/haml_builder.rb +56 -0
- data/lib/abstract_interface/model_stub.rb +20 -0
- data/lib/abstract_interface/support.rb +56 -0
- data/lib/abstract_interface/theme.rb +37 -0
- data/lib/abstract_interface/view_builder.rb +158 -0
- data/lib/abstract_interface/view_helper.rb +31 -0
- data/lib/abstract_interface.rb +78 -0
- data/lib/common_interface/MIT-LICENSE +20 -0
- data/lib/common_interface/README.md +51 -0
- data/lib/common_interface/app/controllers/theme_controller.rb +65 -0
- data/lib/common_interface/app/controllers/theme_site_controller.rb +2 -0
- data/lib/common_interface/app/views/layouts/theme.html.erb +1 -0
- data/lib/common_interface/app/views/layouts/theme.js.erb +11 -0
- data/lib/common_interface/app/views/theme/_dialog.html.haml +7 -0
- data/lib/common_interface/app/views/theme/_popup.html.haml +4 -0
- data/lib/common_interface/app/views/theme/aspects.html.haml +32 -0
- data/lib/common_interface/app/views/theme/basic.html.haml +123 -0
- data/lib/common_interface/app/views/theme/dialog.js.erb +1 -0
- data/lib/common_interface/app/views/theme/folder.html.haml +45 -0
- data/lib/common_interface/app/views/theme/help.html.haml +7 -0
- data/lib/common_interface/app/views/theme/index.html.haml +24 -0
- data/lib/common_interface/app/views/theme/items.html.haml +91 -0
- data/lib/common_interface/app/views/theme/list.html.haml +23 -0
- data/lib/common_interface/app/views/theme/page/_folder.html.haml +10 -0
- data/lib/common_interface/app/views/theme/page/_note.html.haml +4 -0
- data/lib/common_interface/app/views/theme/page/_toolbar.html.haml +5 -0
- data/lib/common_interface/app/views/theme/page.html.haml +19 -0
- data/lib/common_interface/app/views/theme/popup.js.erb +1 -0
- data/lib/common_interface/app/views/theme/selector.html.haml +38 -0
- data/lib/common_interface/app/views/theme/style.html.erb +113 -0
- data/lib/common_interface/app/views/theme/tmp.html.erb +31 -0
- data/lib/common_interface/app/views/theme/user.html.haml +16 -0
- data/lib/common_interface/app/views/theme_shared/_comments.html.haml +11 -0
- data/lib/common_interface/app/views/theme_shared/_core_tools.html.haml +6 -0
- data/lib/common_interface/app/views/theme_shared/_line_previews.html.haml +39 -0
- data/lib/common_interface/app/views/theme_shared/_paginator.html.haml +7 -0
- data/lib/common_interface/app/views/theme_shared/_tools.html.haml +27 -0
- data/lib/common_interface/app/views/theme_shared/_top_navigation_bottom.html.haml +32 -0
- data/lib/common_interface/app/views/theme_site/blog.html.haml +13 -0
- data/lib/common_interface/app/views/theme_site/home.html.haml +9 -0
- data/lib/common_interface/app/views/theme_site/post.html.haml +11 -0
- data/lib/common_interface/app/views/theme_site/style.html.haml +9 -0
- data/lib/common_interface/app/views/themes/default/_application_t.html.haml +29 -0
- data/lib/common_interface/app/views/themes/default/_help_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/aspects/_comment_t.html.haml +14 -0
- data/lib/common_interface/app/views/themes/default/aspects/_controls_t.html.haml +3 -0
- data/lib/common_interface/app/views/themes/default/aspects/_details_t.html.haml +6 -0
- data/lib/common_interface/app/views/themes/default/aspects/_discussion_t.html.haml +9 -0
- data/lib/common_interface/app/views/themes/default/aspects/_paginator_t.html.haml +8 -0
- data/lib/common_interface/app/views/themes/default/aspects/_tag_selector_t.html.haml +11 -0
- data/lib/common_interface/app/views/themes/default/basic/_bottom_panel_t.html.haml +9 -0
- data/lib/common_interface/app/views/themes/default/basic/_dialog_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/basic/_divider_t.html.haml +2 -0
- data/lib/common_interface/app/views/themes/default/basic/_html_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/basic/_inplace_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/basic/_message_t.html.haml +3 -0
- data/lib/common_interface/app/views/themes/default/basic/_more_t.html.haml +5 -0
- data/lib/common_interface/app/views/themes/default/basic/_narrow_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/basic/_navigation_t.html.haml +9 -0
- data/lib/common_interface/app/views/themes/default/basic/_popup_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/basic/_text_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/basic/_title_t.html.haml +3 -0
- data/lib/common_interface/app/views/themes/default/basic/_tool_t.html.haml +4 -0
- data/lib/common_interface/app/views/themes/default/basic/_top_panel_t.html.haml +18 -0
- data/lib/common_interface/app/views/themes/default/components/_basic_list_item_t.html.haml +4 -0
- data/lib/common_interface/app/views/themes/default/components/_basic_list_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/components/_table_row_t.html.haml +5 -0
- data/lib/common_interface/app/views/themes/default/components/_table_t.html.haml +12 -0
- data/lib/common_interface/app/views/themes/default/components/_tabs_item_t.html.haml +4 -0
- data/lib/common_interface/app/views/themes/default/components/_tabs_t.html.haml +4 -0
- data/lib/common_interface/app/views/themes/default/components/_toolbar_t.html.haml +14 -0
- data/lib/common_interface/app/views/themes/default/forms/_begin_t.html.erb +3 -0
- data/lib/common_interface/app/views/themes/default/forms/_end_t.html.erb +3 -0
- data/lib/common_interface/app/views/themes/default/forms/_errors_t.html.haml +5 -0
- data/lib/common_interface/app/views/themes/default/forms/_field_t.html.haml +19 -0
- data/lib/common_interface/app/views/themes/default/forms/_line_t.html.haml +6 -0
- data/lib/common_interface/app/views/themes/default/items/_file_t.html.haml +19 -0
- data/lib/common_interface/app/views/themes/default/items/_folder_t.html.haml +23 -0
- data/lib/common_interface/app/views/themes/default/items/_line_t.html.haml +34 -0
- data/lib/common_interface/app/views/themes/default/items/_list_item_t.html.haml +16 -0
- data/lib/common_interface/app/views/themes/default/items/_list_t.html.haml +35 -0
- data/lib/common_interface/app/views/themes/default/items/_note_t.html.haml +16 -0
- data/lib/common_interface/app/views/themes/default/items/_page_t.html.haml +29 -0
- data/lib/common_interface/app/views/themes/default/items/_selector_t.html.haml +18 -0
- data/lib/common_interface/app/views/themes/default/items/_thumb_t.html.haml +12 -0
- data/lib/common_interface/app/views/themes/default/items/_user_t.html.haml +12 -0
- data/lib/common_interface/app/views/themes/default/layout_templates/_dashboard_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/default/layout_templates/_default_t.html.haml +11 -0
- data/lib/common_interface/app/views/themes/default/metadata.rb +117 -0
- data/lib/common_interface/app/views/themes/simple_organization/_application_js_t.html.erb +12 -0
- data/lib/common_interface/app/views/themes/simple_organization/_application_t.html.erb +45 -0
- data/lib/common_interface/app/views/themes/simple_organization/_help_t.html.erb +1 -0
- data/lib/common_interface/app/views/themes/simple_organization/aspects/_comment_t.html.haml +21 -0
- data/lib/common_interface/app/views/themes/simple_organization/aspects/_discussion_t.html.haml +14 -0
- data/lib/common_interface/app/views/themes/simple_organization/aspects/_paginator_t.html.haml +5 -0
- data/lib/common_interface/app/views/themes/simple_organization/aspects/_tag_selector_t.html.haml +10 -0
- data/lib/common_interface/app/views/themes/simple_organization/basic/_bottom_panel_t.html.erb +12 -0
- data/lib/common_interface/app/views/themes/simple_organization/basic/_divider_t.html.erb +3 -0
- data/lib/common_interface/app/views/themes/simple_organization/basic/_message_t.html.erb +7 -0
- data/lib/common_interface/app/views/themes/simple_organization/basic/_more_t.html.haml +5 -0
- data/lib/common_interface/app/views/themes/simple_organization/basic/_navigation_t.html.erb +15 -0
- data/lib/common_interface/app/views/themes/simple_organization/basic/_text_t.html.haml +1 -0
- data/lib/common_interface/app/views/themes/simple_organization/basic/_tool_t.html.erb +9 -0
- data/lib/common_interface/app/views/themes/simple_organization/basic/_top_panel_t.html.erb +14 -0
- data/lib/common_interface/app/views/themes/simple_organization/items/_line_t.html.haml +17 -0
- data/lib/common_interface/app/views/themes/simple_organization/items/_note_t.html.haml +16 -0
- data/lib/common_interface/app/views/themes/simple_organization/items/_selector_t.html.haml +11 -0
- data/lib/common_interface/app/views/themes/simple_organization/layout_templates/_default_t.html.erb +20 -0
- data/lib/common_interface/app/views/themes/simple_organization/layout_templates/_home_t.html.erb +14 -0
- data/lib/common_interface/app/views/themes/simple_organization/metadata.rb +193 -0
- data/lib/common_interface/asset_packages.yml +89 -0
- data/lib/common_interface/init.rb +21 -0
- data/lib/common_interface/lib/common_interface_helper.rb +49 -0
- data/lib/common_interface/public/common_interface/images/img1.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img1_200.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img1_icon.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img1_thumb.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img2.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img2_200.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img2_icon.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img2_thumb.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img3.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img3_200.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img3_icon.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/img3_thumb.jpg +0 -0
- data/lib/common_interface/public/common_interface/images/video_icon.png +0 -0
- data/lib/common_interface/public/common_interface/js/aspects.js +0 -0
- data/lib/common_interface/public/common_interface/js/basic.js +229 -0
- data/lib/common_interface/public/common_interface/js/files_upload.js +115 -0
- data/lib/common_interface/public/common_interface/js/items.js +118 -0
- data/lib/common_interface/public/common_interface/js/style.js +50 -0
- data/lib/common_interface/public/common_interface/lib/jquery.elastic.js +117 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/blank.gif +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_close.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_loading.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_nav_left.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_nav_right.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_e.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_n.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_ne.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_nw.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_s.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_se.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_sw.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_w.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_title_left.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_title_main.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_title_over.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_title_right.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancybox-x.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancybox-y.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancybox.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/jquery.easing-1.3.pack.js +72 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/jquery.fancybox-1.3.1.js +1077 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/jquery.fancybox.css +363 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/jquery.fancybox.js +44 -0
- data/lib/common_interface/public/common_interface/lib/jquery.fancybox/jquery.mousewheel-3.0.2.pack.js +13 -0
- data/lib/common_interface/public/common_interface/lib/jquery.form.js +660 -0
- data/lib/common_interface/public/common_interface/lib/jquery.hoverIntent.js +111 -0
- data/lib/common_interface/public/common_interface/lib/jquery.jgrowl/jquery.jgrowl.css +128 -0
- data/lib/common_interface/public/common_interface/lib/jquery.jgrowl/jquery.jgrowl.js +307 -0
- data/lib/common_interface/public/common_interface/lib/jquery.js +4376 -0
- data/lib/common_interface/public/common_interface/lib/jquery.json.js +178 -0
- data/lib/common_interface/public/common_interface/lib/jquery.swfupload/cancel.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.swfupload/jquery.swfupload.js +64 -0
- data/lib/common_interface/public/common_interface/lib/jquery.swfupload/style.css +8 -0
- data/lib/common_interface/public/common_interface/lib/jquery.swfupload/swfupload/swfupload.js +980 -0
- data/lib/common_interface/public/common_interface/lib/jquery.swfupload/swfupload/swfupload.queue.js +98 -0
- data/lib/common_interface/public/common_interface/lib/jquery.swfupload/swfupload/swfupload.swf +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.swfupload/swfupload/wdp_buttons_upload_61x22.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.template.js +255 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-icons_222222_256x240.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-icons_228ef1_256x240.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-icons_ef8c08_256x240.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-icons_ffd27a_256x240.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-icons_ffffff_256x240.png +0 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/jquery.ui.css +406 -0
- data/lib/common_interface/public/common_interface/lib/jquery.ui/jquery.ui.js +71 -0
- data/lib/common_interface/public/common_interface/themes/default/_aspects.scss +58 -0
- data/lib/common_interface/public/common_interface/themes/default/_basic.scss +228 -0
- data/lib/common_interface/public/common_interface/themes/default/_components.scss +151 -0
- data/lib/common_interface/public/common_interface/themes/default/_custom_reset.scss +12 -0
- data/lib/common_interface/public/common_interface/themes/default/_elastic.scss +72 -0
- data/lib/common_interface/public/common_interface/themes/default/_items.scss +88 -0
- data/lib/common_interface/public/common_interface/themes/default/_mixins.scss +39 -0
- data/lib/common_interface/public/common_interface/themes/default/_special.scss +34 -0
- data/lib/common_interface/public/common_interface/themes/default/_variables.scss +15 -0
- data/lib/common_interface/public/common_interface/themes/default/_yui_reset.scss +127 -0
- data/lib/common_interface/public/common_interface/themes/default/elastic.js +307 -0
- data/lib/common_interface/public/common_interface/themes/default/elastic.print.css +8 -0
- data/lib/common_interface/public/common_interface/themes/default/reset.css +157 -0
- data/lib/common_interface/public/common_interface/themes/default/reset.scss +5 -0
- data/lib/common_interface/public/common_interface/themes/default/style.css +580 -0
- data/lib/common_interface/public/common_interface/themes/default/style.js +84 -0
- data/lib/common_interface/public/common_interface/themes/default/style.scss +11 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/_fixes.scss +130 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/_original.scss +852 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/comment-arrow.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/comment-gravatar.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/comment-reply.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/logo-small.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/logo.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/main-two-columns-left.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/main-two-columns.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/sample-event.jpg +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/sample-gravatar.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/sample-image.jpg +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/img/sample-thumbnail.jpg +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/archives.html +389 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/comments.html +486 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/empty-page.html +107 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/comment-arrow.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/comment-gravatar.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/comment-reply.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/logo-small.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/logo.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/main-two-columns-left.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/main-two-columns.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/sample-event.jpg +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/sample-gravatar.gif +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/sample-image.jpg +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/sample-thumbnail.jpg +0 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/index.html +307 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/left-sidebar.html +307 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/no-subnavigation.html +290 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/single-column.html +209 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/style-demo.html +355 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/original/style.css +658 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/style.css +965 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/style.scss +2 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/tmp/comments.html +486 -0
- data/lib/common_interface/public/common_interface/themes/simple_organization/tmp/tmp.html +307 -0
- data/lib/common_interface/spec/controllers/theme_controller_spec.rb +50 -0
- data/lib/common_interface/spec/spec.opts +4 -0
- data/lib/common_interface/spec/spec_helper.rb +1 -0
- data/lib/common_interface/tmp/html.html +39 -0
- data/lib/common_interface/tmp/js.js +78 -0
- data/lib/mongo_mapper_ext/db_config.rb +76 -0
- data/lib/mongo_mapper_ext/hacks/fixes.rb +32 -0
- data/lib/mongo_mapper_ext/hacks/time_measuring.rb +44 -0
- data/lib/mongo_mapper_ext/micelaneous.rb +9 -0
- data/lib/mongo_mapper_ext/migrate.rake +33 -0
- data/lib/mongo_mapper_ext/migration.rb +108 -0
- data/lib/mongo_mapper_ext/mongo_mapper.rb +25 -0
- data/lib/mongo_mapper_ext/plugins/attributes_cache.rb +22 -0
- data/lib/mongo_mapper_ext/plugins/default_scope.rb +76 -0
- data/lib/mongo_mapper_ext/plugins/micelaneous.rb +81 -0
- data/lib/mongo_mapper_ext/spec_helper.rb +10 -0
- data/lib/mongo_mapper_ext/view_helpers.rb +10 -0
- data/lib/mongo_mapper_ext.rb +29 -0
- data/lib/rails_ext/README.markdown +13 -0
- data/lib/rails_ext/action_controller/global_path_prefix.rb +56 -0
- data/lib/rails_ext/action_controller/micelaneous.rb +118 -0
- data/lib/rails_ext/action_controller/persistent_params.rb +96 -0
- data/lib/rails_ext/action_controller/redirect_helper.rb +14 -0
- data/lib/rails_ext/action_controller/reload_page.rb +7 -0
- data/lib/rails_ext/action_controller.rb +19 -0
- data/lib/rails_ext/action_view/common_helper.rb +96 -0
- data/lib/rails_ext/action_view/ruby_template.rb +13 -0
- data/lib/rails_ext/action_view.rb +5 -0
- data/lib/rails_ext/active_record/merge_default_scope/hash_poser.rb +40 -0
- data/lib/rails_ext/active_record/merge_default_scope.rb +16 -0
- data/lib/rails_ext/active_record/micelaneous.rb +14 -0
- data/lib/rails_ext/active_record.rb +7 -0
- data/lib/rails_ext/active_support/micelaneous.rb +7 -0
- data/lib/rails_ext/active_support.rb +1 -0
- data/lib/rails_ext/asset_packager/action_view.rb +47 -0
- data/lib/rails_ext/asset_packager/asset_packager.rb +112 -0
- data/lib/rails_ext/asset_packager/jsmin.rb +205 -0
- data/lib/rails_ext/asset_packager/tasks.rb +27 -0
- data/lib/rails_ext/asset_packager.rb +4 -0
- data/lib/rails_ext/basic/handy_environment.rb +45 -0
- data/lib/rails_ext/basic/user_error.rb +12 -0
- data/lib/rails_ext/basic.rb +6 -0
- data/lib/rails_ext/hacks/ajax_flash.rb +9 -0
- data/lib/rails_ext/hacks/ajax_redirect_to.rb +19 -0
- data/lib/rails_ext/hacks/defer_static_javascripts.rb +18 -0
- data/lib/rails_ext/hacks/global_path_prefix.rb +33 -0
- data/lib/rails_ext/hacks/link_to.rb +105 -0
- data/lib/rails_ext/hacks/merge_default_scope.rb +20 -0
- data/lib/rails_ext/hacks/persistent_params.rb +16 -0
- data/lib/rails_ext/hacks/rjs_layout.rb +2 -0
- data/lib/rails_ext/micelaneous/addressable_uri.rb +45 -0
- data/lib/rails_ext/micelaneous/config_files.rb +18 -0
- data/lib/rails_ext/micelaneous/create_public_symlinks.rb +11 -0
- data/lib/rails_ext/micelaneous/defer_static_javascripts.rb +50 -0
- data/lib/rails_ext/micelaneous/email_config.rb +8 -0
- data/lib/rails_ext/micelaneous/i18n_helper.rb +143 -0
- data/lib/rails_ext/micelaneous/rails_require.rb +4 -0
- data/lib/rails_ext/micelaneous/safe_hash.rb +104 -0
- data/lib/rails_ext/micelaneous.rb +17 -0
- data/lib/rails_ext/public/rails_ext/rails_ext.css +2 -0
- data/lib/rails_ext/public/rails_ext/rails_ext.js +283 -0
- data/lib/rails_ext/spec/mongo_mapper_ext/micelaneous_plugin_spec.rb +56 -0
- data/lib/rails_ext/spec/mongo_mapper_ext/micelaneous_spec.rb +51 -0
- data/lib/rails_ext/spec/mongo_mapper_ext/mongo_mapper_migration_spec.rb +76 -0
- data/lib/rails_ext/spec/mongo_mapper_ext/scope_spec.rb +125 -0
- data/lib/rails_ext/spec/rails_ext/haml_builder_spec.rb +136 -0
- data/lib/rails_ext/spec/rails_ext/safe_hash_spec.rb +71 -0
- data/lib/rails_ext/spec/spec.opts +3 -0
- data/lib/sunspot/mongo_mapper/adapters.rb +79 -0
- data/lib/sunspot/mongo_mapper/searchable.rb +409 -0
- data/lib/sunspot/spec_helper.rb +11 -0
- data/readme.md +1 -0
- data/spec/mongo_mapper_ext/micelaneous_plugin_spec.rb +56 -0
- data/spec/mongo_mapper_ext/micelaneous_spec.rb +51 -0
- data/spec/mongo_mapper_ext/mongo_mapper_migration_spec.rb +76 -0
- data/spec/mongo_mapper_ext/scope_spec.rb +125 -0
- data/spec/rails_ext/haml_builder_spec.rb +136 -0
- data/spec/rails_ext/safe_hash_spec.rb +71 -0
- data/spec/spec.opts +4 -0
- metadata +405 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 [name of plugin creator]
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# Common Interface
|
2
|
+
Common Interface is a tool for **Rapid Web Interface Creation**, Ruby on Rails Plugin (more exactly, it's the concrete implementation of the [Abstract Inteface][abstract-interface] plugin).
|
3
|
+
|
4
|
+
Instead of trying to provide one universal user interface API (like GWT) to fit all needs, the [Abstract Interface][abstract-interface] **provides you with tools that ease creation of your own custom interface**.
|
5
|
+
|
6
|
+
Define Your design only one time, in one place, and then reuse it, forget about HTML and CSS in your Views.
|
7
|
+
|
8
|
+
It acts like an abstraction layer, allowing you to define your custom API (or DSL if you like) to build your user interface. Key point here - it allows you build such API **very quick and easy**.
|
9
|
+
|
10
|
+
# Demo
|
11
|
+
|
12
|
+
* [Sample of HomePage][sample1], [sample of page (with another design)][sample2]
|
13
|
+
* [List of all Samples][list_of_samples]
|
14
|
+
|
15
|
+
Real-life sample - [http://bos-tec.com](http://bos-tec.com), [http://bom4.com](http://bom4.com), there's no any custom template, all pages are made with the [Abstract Interface][abstract-interface] plugin.
|
16
|
+
|
17
|
+
# Advantages
|
18
|
+
|
19
|
+
* **Themes support** not only CSS, you can use completelly different HTML and layouts
|
20
|
+
* **DRY**
|
21
|
+
* **Clean views**
|
22
|
+
* **Iterative development**
|
23
|
+
* **Loose coupling of Logic and Design**
|
24
|
+
* **Share the same design with many Apps**
|
25
|
+
* **Mix two complete different themes** simultaneously, in the same page
|
26
|
+
* Start with simple prototype and when App matures create professional design (with minimum changes in App)
|
27
|
+
* Theme/Skin support (not only CSS but also Templates, Images, ...)
|
28
|
+
* Outsource design without opening App code
|
29
|
+
* Designers can go ahead and create working html/css/js
|
30
|
+
* Programmers can go ahead and create working App with simple design
|
31
|
+
* Both of them can do iterative prototyping that will be updated later
|
32
|
+
|
33
|
+
# Usage
|
34
|
+
|
35
|
+
1. sudo gem install rails-ext
|
36
|
+
2. install this plugin in your rails App
|
37
|
+
3. create symlink (in linux) or copy <plugin>/public/themes/ directory to <your_rails_App>/public
|
38
|
+
4. start your rails App and go to /theme
|
39
|
+
|
40
|
+
|
41
|
+
**Notice!** Common Interface is the interface that I build for my own need (you can also use it, by the way).
|
42
|
+
But to create you own design you need to create your own 'Common Interface', using this code as a sample.
|
43
|
+
|
44
|
+
|
45
|
+
Copyright (c) 2009 Alexey Petrushin [http://bos-tec.com](http://www.bos-tec.com), released under the MIT license.
|
46
|
+
|
47
|
+
[abstract-interface]: http://github.com/alexeypetrushin/rails-ext
|
48
|
+
|
49
|
+
[sample1]: http://bos-tec.com/theme_site/home?_layout_template=home&_theme=simple_organization
|
50
|
+
[sample2]: http://bos-tec.com/theme/page
|
51
|
+
[list_of_samples]: http://bos-tec.com/theme/index
|
@@ -0,0 +1,65 @@
|
|
1
|
+
class ThemeController < ActionController::Base
|
2
|
+
before_filter :prepare_menu, :prepare_variables, :set_theme, :prepare_samples
|
3
|
+
|
4
|
+
def help
|
5
|
+
render :action => 'help', :layout => false
|
6
|
+
end
|
7
|
+
|
8
|
+
def index
|
9
|
+
@title = "Theme"
|
10
|
+
render :index, :layout => false
|
11
|
+
end
|
12
|
+
|
13
|
+
def select_menu
|
14
|
+
session[:top_menu] = params[:top_menu] if params[:top_menu]
|
15
|
+
session[:side_menu] = params[:side_menu] if params[:side_menu]
|
16
|
+
|
17
|
+
redirect_to :back
|
18
|
+
end
|
19
|
+
|
20
|
+
protected
|
21
|
+
def prepare_menu
|
22
|
+
@title = params[:action].humanize
|
23
|
+
|
24
|
+
@top_menu_items = %w{Email Contacts Calendar Files}
|
25
|
+
@active_top_menu = session[:top_menu] || @top_menu_items.first
|
26
|
+
|
27
|
+
@side_menu_items = %w{control_caption_0 control_caption_1 control_caption_2}
|
28
|
+
@active_side_menu = session[:side_menu] || @side_menu_items.first
|
29
|
+
end
|
30
|
+
|
31
|
+
def prepare_variables
|
32
|
+
@tabs = %w{Compose Contacts Import Categories}
|
33
|
+
@active_tab = @tabs.first
|
34
|
+
end
|
35
|
+
|
36
|
+
def set_theme
|
37
|
+
current_theme.name = params[:_theme]
|
38
|
+
current_theme.layout_template = params[:_layout_template]
|
39
|
+
end
|
40
|
+
before_filter :set_theme
|
41
|
+
|
42
|
+
def prepare_samples
|
43
|
+
@common_name = "Terminator Movie Series"
|
44
|
+
@common_tags = ['egypt', 'photo', 'travel'].collect{|w| "<a href='#'>#{w}</a>"}
|
45
|
+
@common_details = ["Today at 15:58", "by <a href='#'>admin</a>", "{7}"]
|
46
|
+
@comment_details = ["Today at 15:58", "by <a href='#'>admin</a>"]
|
47
|
+
@common_controls = %w{add edit delete}.collect{|w| "<a href='#'>#{w}</a>"}
|
48
|
+
|
49
|
+
@detail_text = <<END
|
50
|
+
<p>The Terminator (1984) <a href='#'>More at IMDbPro</a></p>
|
51
|
+
<p>Your future is in his hands.</p>
|
52
|
+
END
|
53
|
+
|
54
|
+
@note_text = <<END
|
55
|
+
<p>The Terminator (1984) <a href='#'>More at IMDbPro</a></p>
|
56
|
+
<p>In the Year of Darkness, 2029, the rulers of this planet devised the ultimate plan. They would reshape the Future by changing the Past. The plan required something that felt no pity. No pain. No fear. Something unstoppable. They created 'THE TERMINATOR'</p>
|
57
|
+
<p>The thing that won't die, in the nightmare that won't end. A human-looking, apparently unstoppable cyborg is sent from the future to kill Sarah Connor; Kyle Reese is sent to stop it.</p>
|
58
|
+
<p>Your future is in his hands.</p>
|
59
|
+
END
|
60
|
+
@comment_text = <<END
|
61
|
+
<p>Although the Stack Overflow engine was always designed with a technical audience in mind, I’m intrigued to see how far we can push the boundaries of that audience.</p>
|
62
|
+
<p>We’ve pushed a little bit when going from programmers, to sysadmins, to power computer users — and we may try pushing a tad further this year with yet another site.</p>
|
63
|
+
END
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= html = render :partial => themed_partial('application') -%>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
= render :partial => 'theme_shared/top_navigation_bottom'
|
2
|
+
|
3
|
+
= render :partial => 'theme_shared/tools'
|
4
|
+
|
5
|
+
- content_for :aspects do
|
6
|
+
= b.divider "Controls"
|
7
|
+
- b.controls :id => "controls_id", :class => "controls_class" do |o|
|
8
|
+
- o.left do |a|
|
9
|
+
- a.add link_to('Compose', "#", :class => 'icn_compose')
|
10
|
+
- a.add link_to('Move', "#")
|
11
|
+
- a.add link_to('Delete', "#")
|
12
|
+
|
13
|
+
- o.right do |a|
|
14
|
+
- a.add link_to('Archive', "#", :class => 'icn_compose')
|
15
|
+
- a.add link_to('Filter', "#")
|
16
|
+
|
17
|
+
= b.divider "Tags and Details"
|
18
|
+
- b.details :id => "details_id", :class => "details_class" do |o|
|
19
|
+
- o.tags @common_tags
|
20
|
+
- o.details @common_details
|
21
|
+
|
22
|
+
= b.divider "Comments"
|
23
|
+
= render :partial => 'theme_shared/comments'
|
24
|
+
|
25
|
+
= b.divider "Visibility Tags"
|
26
|
+
- visibility_tags = [['owner', '__owner_visibility'], ['member', '__member_visibility']].collect{|t, v| content_tag :div, t, :class => v}
|
27
|
+
- item_type = [content_tag :div, 'Note', :class => '__item_type']
|
28
|
+
- b.details do |o|
|
29
|
+
- o.tags @common_tags + visibility_tags + item_type
|
30
|
+
|
31
|
+
= b.divider "Paginator"
|
32
|
+
= render :partial => 'theme_shared/paginator'
|
@@ -0,0 +1,123 @@
|
|
1
|
+
= render :partial => 'theme_shared/top_navigation_bottom'
|
2
|
+
|
3
|
+
= render :partial => 'theme_shared/tools'
|
4
|
+
|
5
|
+
- content_for :content do
|
6
|
+
= b.divider "Dialog"
|
7
|
+
= link_to('Show Dialog', :action => 'dialog', :format => :js, :_theme => params[:_theme])
|
8
|
+
|
9
|
+
= b.divider "Title"
|
10
|
+
= b.title "The Title", :id => "title_id", :class => "title_class"
|
11
|
+
|
12
|
+
= b.divider "Messages"
|
13
|
+
|
14
|
+
= b.message 'Info message'
|
15
|
+
- b.message :type => :error do
|
16
|
+
Error Message
|
17
|
+
|
18
|
+
= b.narrow b.message('Narrow content')
|
19
|
+
|
20
|
+
|
21
|
+
= b.divider "Tabs"
|
22
|
+
|
23
|
+
- b.tabs :id => "tabs_id", :class => "tabs_class" do |o|
|
24
|
+
- o.content do
|
25
|
+
- @tabs.each do |name|
|
26
|
+
- if @active_tab == name
|
27
|
+
= b.tabs_item name, :active => true
|
28
|
+
- else
|
29
|
+
= b.tabs_item link_to(name, "#")
|
30
|
+
|
31
|
+
|
32
|
+
= b.divider "Toolbar"
|
33
|
+
|
34
|
+
- b.toolbar :id => "toolbar_id", :class => "toolbar_class" do |o|
|
35
|
+
- o.left do |a|
|
36
|
+
- a.add link_to('Compose', "#", :class => 'icn_compose')
|
37
|
+
- a.add link_to('Move', "#")
|
38
|
+
- a.add link_to('Delete', "#")
|
39
|
+
|
40
|
+
- o.right do |a|
|
41
|
+
- a.add link_to('Archive', "#", :class => 'icn_compose')
|
42
|
+
- a.add link_to('Filter', "#")
|
43
|
+
|
44
|
+
|
45
|
+
= b.divider "List"
|
46
|
+
|
47
|
+
- b.basic_list :id => "list_id", :class => "list_class" do |o|
|
48
|
+
- o.content do
|
49
|
+
= b.basic_list_item "First Line", :id => "list_id_1", :class => "list_class_1"
|
50
|
+
= b.basic_list_item "Second Line", :check_box => check_box_tag(:tmp), :id => "list_id_2", :class => "list_class_2"
|
51
|
+
|
52
|
+
|
53
|
+
= b.divider "Form"
|
54
|
+
|
55
|
+
- b.form do |f|
|
56
|
+
= f.error_messages "First", "Second"
|
57
|
+
|
58
|
+
= f.hidden_field_tag :name, "value"
|
59
|
+
|
60
|
+
= f.check_box_tag :active, true, :label => ""
|
61
|
+
= f.text_field_tag :name, "Some Name", :label => "Field with error", :errors => ["Error 1", "Error 2"]
|
62
|
+
= f.text_field_tag :name, "Some Name", :label => "Type something here", :description => "Add something valuable, (its description for this text_field)"
|
63
|
+
= f.text_area_tag :body, "Some text"
|
64
|
+
= f.text_field_tag :name, "", :required => true, :label => "Required field"
|
65
|
+
|
66
|
+
= f.field_tag %w{one two three}.collect{|n| radio_button_tag('group', n) + label_tag("group_#{n}", n)}.join(' '), :label => "Visibility"
|
67
|
+
|
68
|
+
- b.more :id => 'stub', :name => "...", :class => '_tiny' do
|
69
|
+
= f.text_field_tag :extra_field, "", :label => "Extra Fields"
|
70
|
+
|
71
|
+
= f.line f.submit("Ok"), link_to("Cancel", "#")
|
72
|
+
= f.line_with_delimiters f.submit("Ok"), link_to("Cancel", "#")
|
73
|
+
|
74
|
+
|
75
|
+
= b.divider "Form for"
|
76
|
+
|
77
|
+
- b.form_for Samples.build_stub!, :url => '' do |f|
|
78
|
+
= f.error_messages
|
79
|
+
|
80
|
+
= f.hidden_field_tag :some_hidden_field, "value"
|
81
|
+
= f.hidden_field :name
|
82
|
+
|
83
|
+
= f.check_box :active, :label => ""
|
84
|
+
= f.text_field :name, :label => "Type something here", :description => "Add something valuable, (its description for this text_field)"
|
85
|
+
= f.text_area :body, :label => false
|
86
|
+
|
87
|
+
= f.text_field_tag :name, "value"
|
88
|
+
|
89
|
+
= f.line f.submit("Ok"), link_to("Cancel", "#")
|
90
|
+
= f.line_with_delimiters f.submit("Ok"), link_to("Cancel", "#")
|
91
|
+
|
92
|
+
|
93
|
+
= b.divider "Table"
|
94
|
+
|
95
|
+
- b.table :id => "table_id", :class => "table_class", :on => 3 do |o|
|
96
|
+
- o.head ["Name", "Position", "Actions"]
|
97
|
+
- o.rows do |a|
|
98
|
+
- a.add b.table_row(["Alex", "Manager", "<a href='#'>Delete</a>"], :id => "table_id_1", :class => "table_class_1")
|
99
|
+
- a.add b.table_row(["Bob", "Worker", "<a href='#'>Delete</a>"])
|
100
|
+
- a.add b.table_row(["Fred", "Executer", "<a href='#'>Delete</a>"])
|
101
|
+
|
102
|
+
|
103
|
+
= b.divider "Table without header"
|
104
|
+
|
105
|
+
- b.table do |o|
|
106
|
+
- o.rows do |a|
|
107
|
+
= a.add b.table_row(["Alex", "Manager", "<a href='#'>Delete</a>"])
|
108
|
+
- a.add do
|
109
|
+
- b.table_row do |o|
|
110
|
+
- o.content do |a|
|
111
|
+
- a.add "Fred"
|
112
|
+
- a.add "Executer"
|
113
|
+
- a.add "<a href='#'>Delete</a>"
|
114
|
+
|
115
|
+
|
116
|
+
= b.divider "Text"
|
117
|
+
|
118
|
+
- b.text do
|
119
|
+
Some Text <a href='#'>Some Link</a>
|
120
|
+
|
121
|
+
= b.divider "Custom content"
|
122
|
+
|
123
|
+
= render :partial => themed_partial('basic/html')
|
@@ -0,0 +1 @@
|
|
1
|
+
target.showDialog("<%= js render('dialog') %>");
|
@@ -0,0 +1,45 @@
|
|
1
|
+
= render :partial => 'theme_shared/top_navigation_bottom'
|
2
|
+
|
3
|
+
= render :partial => 'theme_shared/tools'
|
4
|
+
|
5
|
+
- content_for :content do
|
6
|
+
- options = b.options :class => "_sortable_container", :html_attributes => {"data-item_class" => '_item'} do |o|
|
7
|
+
- o.name @common_name
|
8
|
+
- o.controls @common_controls
|
9
|
+
- o.tags @common_tags
|
10
|
+
|
11
|
+
= b.divider "Folder (Thumb without Title)"
|
12
|
+
- b.folder options do |o|
|
13
|
+
- o.content do
|
14
|
+
- 12.times do
|
15
|
+
- i = rand(3) + 1
|
16
|
+
- b.thumb :class => "_item" do |o|
|
17
|
+
- o.thumb url_for_path("/common_interface/images/img#{i}_thumb.jpg")
|
18
|
+
- o.url url_for_path("/common_interface/images/img#{i}.jpg")
|
19
|
+
- o.controls(@common_controls + [link_to('move', '#', :class => '_handle')])
|
20
|
+
|
21
|
+
|
22
|
+
= b.divider "Folder (Thumb with Title)"
|
23
|
+
- b.folder options do |o|
|
24
|
+
- o.content do
|
25
|
+
- 3.times do |i|
|
26
|
+
- i = i + 1
|
27
|
+
- b.thumb :name => "The Salvator", :class => "_item" do |o|
|
28
|
+
- o.thumb url_for_path("/common_interface/images/img#{i}_thumb.jpg")
|
29
|
+
- o.url url_for_path("/common_interface/images/img#{i}.jpg")
|
30
|
+
- o.controls(@common_controls + [link_to('move', '#', :class => '_handle')])
|
31
|
+
|
32
|
+
= b.divider "Folder (Lines)"
|
33
|
+
- b.folder options do |o|
|
34
|
+
- o.content do
|
35
|
+
- 3.times do |i|
|
36
|
+
- i = i + 1
|
37
|
+
- b.line :class => "_item" do |o|
|
38
|
+
- o.name @common_name
|
39
|
+
- o.icon url_for_path("/common_interface/images/img#{i}_icon.jpg")
|
40
|
+
- o.url url_for_path("/common_interface/images/img#{i}_icon.jpg")
|
41
|
+
- o.text @detail_text
|
42
|
+
- o.controls(@common_controls + [link_to('move', '#', :class => '_handle')])
|
43
|
+
- unless i == 2
|
44
|
+
- o.tags @common_tags
|
45
|
+
- o.details @common_details
|
@@ -0,0 +1,24 @@
|
|
1
|
+
- layouts = b.options do |o|
|
2
|
+
- o.default [[:home, :default], [:style, :default], [:blog, :default], [:post, :default]]
|
3
|
+
- o.simple_organization [[:home, :home], [:style, :default], [:blog, :default], [:post, :default]]
|
4
|
+
|
5
|
+
- AbstractInterface.available_themes.each do |theme|
|
6
|
+
%h1= "'#{theme.humanize}' Theme"
|
7
|
+
|
8
|
+
%b Core:
|
9
|
+
- %w{aspects basic folder items list page selector}.each do |action|
|
10
|
+
%a{:href => url_for(:controller => :theme, :action => action, :_theme => theme)} #{action.humanize}
|
11
|
+
%br
|
12
|
+
|
13
|
+
%b Special Cases:
|
14
|
+
- %w{user style}.each do |action|
|
15
|
+
%a{:href => url_for(:controller => :theme, :action => action, :_theme => theme)} #{action.humanize}
|
16
|
+
%br
|
17
|
+
|
18
|
+
%b Site:
|
19
|
+
- layouts[theme].each do |action, ltemplate|
|
20
|
+
%a{:href => url_for(:controller => :theme_site, :action => action, :_theme => theme, :_layout_template => ltemplate)} #{action.to_s.humanize}
|
21
|
+
%br
|
22
|
+
|
23
|
+
%p
|
24
|
+
Sources are <a href='http://github.com/alexeypetrushin/common_interface'>here</a>.
|
@@ -0,0 +1,91 @@
|
|
1
|
+
= render :partial => 'theme_shared/top_navigation_bottom'
|
2
|
+
|
3
|
+
= render :partial => 'theme_shared/tools'
|
4
|
+
|
5
|
+
- content_for :content do
|
6
|
+
= b.divider "Note"
|
7
|
+
- b.note :id => "note_id", :class => "note_class" do |o|
|
8
|
+
- o.name "Terminator movie series"
|
9
|
+
- o.text @note_text
|
10
|
+
- o.controls [link_to('edit', '#'), link_to('delete', '#')]
|
11
|
+
- o.tags @common_tags
|
12
|
+
- o.details @common_details
|
13
|
+
|
14
|
+
= b.divider "Thumb"
|
15
|
+
- b.thumb :id => 'thumb_id', :class => "thumb_class" do |o|
|
16
|
+
- o.controls @common_controls
|
17
|
+
- o.thumb url_for_path("/common_interface/images/img1_thumb.jpg")
|
18
|
+
- o.url url_for_path("/common_interface/images/img1.jpg")
|
19
|
+
- o.name 'Picture 1.jpg'
|
20
|
+
._clear
|
21
|
+
|
22
|
+
= b.divider "Line"
|
23
|
+
- b.line :id => "line_id", :class => "line_class" do |o|
|
24
|
+
- o.name @common_name
|
25
|
+
- o.icon url_for_path("/common_interface/images/img1_icon.jpg")
|
26
|
+
- o.url url_for_path("/common_interface/images/img1_icon.jpg")
|
27
|
+
- o.text @detail_text
|
28
|
+
- o.controls @common_controls
|
29
|
+
- o.tags @common_tags
|
30
|
+
- o.details @common_details
|
31
|
+
|
32
|
+
= b.divider "File"
|
33
|
+
- b.file :id => "file_id", :class => "file_class" do |o|
|
34
|
+
- o.name "Product Overview.pdf"
|
35
|
+
- o.icon url_for_path("/common_interface/images/img1_icon.jpg")
|
36
|
+
- o.url url_for_path("/common_interface/images/img1_icon.jpg")
|
37
|
+
- o.controls @common_controls
|
38
|
+
- o.tags @common_tags
|
39
|
+
- o.details @common_details
|
40
|
+
|
41
|
+
= b.divider "Selector"
|
42
|
+
- b.selector :id => "selector_id", :class => "selector_class" do |o|
|
43
|
+
- o.name "Top 10 Movies"
|
44
|
+
- o.controls @common_controls
|
45
|
+
- o.content do
|
46
|
+
- 2.times do |i|
|
47
|
+
- i = i + 1
|
48
|
+
- b.line :id => "line_id", :class => "line_class" do |o|
|
49
|
+
- o.name @common_name
|
50
|
+
- o.icon url_for_path("/common_interface/images/img#{i}_icon.jpg")
|
51
|
+
- o.url url_for_path("/common_interface/images/img#{i}_icon.jpg")
|
52
|
+
- o.text @detail_text
|
53
|
+
- o.controls @common_controls
|
54
|
+
- o.tags @common_tags if i == 1
|
55
|
+
- o.details @common_details if i == 1
|
56
|
+
|
57
|
+
= b.divider "Folder"
|
58
|
+
- b.folder :id => "folder_id", :class => "folder_class _item _sortable_container", :html_attributes => {"data-item_class" => '_item'} do |o|
|
59
|
+
- o.name "Pictures for Terminator Movie"
|
60
|
+
- o.controls @common_controls
|
61
|
+
- o.tags @common_tags
|
62
|
+
- o.details @common_details
|
63
|
+
- o.content do
|
64
|
+
- 7.times do |i|
|
65
|
+
- i = rand(3) + 1
|
66
|
+
- b.thumb :class => '_item' do |o|
|
67
|
+
- o.thumb url_for_path("/common_interface/images/img#{i}_thumb.jpg")
|
68
|
+
- o.url url_for_path("/common_interface/images/img#{i}.jpg")
|
69
|
+
- o.controls(@common_controls + [link_to('move', '#', :class => '_handle')])
|
70
|
+
|
71
|
+
= b.divider "List"
|
72
|
+
- b.list :id => "list_id", :class => "list_class _item _sortable_container", :html_attributes => {"data-item_class" => '_item'} do |o|
|
73
|
+
- o.name "List of Tasks"
|
74
|
+
- o.controls @common_controls
|
75
|
+
- o.tags @common_tags
|
76
|
+
- o.details @common_details
|
77
|
+
- o.content do
|
78
|
+
- 7.times do |i|
|
79
|
+
- b.list_item "First Line", :id => "list_id_#{i}", :class => "_item list_class_#{i}" do |o|
|
80
|
+
- o.check_box check_box_tag(:tmp) if i.odd? and i <= 4
|
81
|
+
- o.controls(@common_controls + [link_to('move', '#', :class => '_handle')])
|
82
|
+
- o.details @common_details
|
83
|
+
- o.finished true if i > 4
|
84
|
+
|
85
|
+
= b.divider "Selector"
|
86
|
+
- b.selector :id => "selector_id", :class => "selector_class" do |o|
|
87
|
+
- o.name @common_name
|
88
|
+
- o.text @detail_text
|
89
|
+
- o.controls @common_controls
|
90
|
+
- o.tags @common_tags
|
91
|
+
- o.details @common_details
|
@@ -0,0 +1,23 @@
|
|
1
|
+
= render :partial => 'theme_shared/top_navigation_bottom'
|
2
|
+
|
3
|
+
= render :partial => 'theme_shared/tools'
|
4
|
+
|
5
|
+
- content_for :content do
|
6
|
+
= b.divider "List"
|
7
|
+
- b.list :id => "list_id", :class => "_item list_class _sortable_container", :html_attributes => {"data-item_class" => '_item'} do |o|
|
8
|
+
- o.name "List of Tasks"
|
9
|
+
- o.controls @common_controls
|
10
|
+
- o.tags @common_tags
|
11
|
+
- o.details @common_details
|
12
|
+
- o.content do
|
13
|
+
- 5.times do |i|
|
14
|
+
- b.list_item "First Line", :id => "a#{i}", :class => '_item' do |o|
|
15
|
+
- o.check_box check_box_tag(:tmp)
|
16
|
+
- o.controls(@common_controls + [link_to('move', '#', :class => '_handle')])
|
17
|
+
- o.details @common_details
|
18
|
+
|
19
|
+
- 13.times do |i|
|
20
|
+
- b.list_item "First Line", :id => "b#{i}", :class => '_item' do |o|
|
21
|
+
- o.controls(@common_controls + [link_to('move', '#', :class => '_handle')])
|
22
|
+
- o.details @common_details
|
23
|
+
- o.finished true
|
@@ -0,0 +1,10 @@
|
|
1
|
+
- b.folder :class => "_item _sortable_container", :html_attributes => {"data-item_class" => '_item'} do |o|
|
2
|
+
- o.name "Pictures for Terminator Movie"
|
3
|
+
- o.controls [link_to('add', '#'), link_to('edit', '#'), link_to('delete', '#'), link_to('move', '#', :class => '_handle')]
|
4
|
+
- o.content do
|
5
|
+
- 5.times do
|
6
|
+
- i = rand(3) + 1
|
7
|
+
- b.thumb :name => "The Salvator", :class => '_item' do |o|
|
8
|
+
- o.thumb url_for_path("/common_interface/images/img#{i}_thumb.jpg")
|
9
|
+
- o.url url_for_path("/common_interface/images/img#{i}.jpg")
|
10
|
+
- o.controls [link_to('edit', '#'), link_to('delete', '#'), link_to('move', '#', :class => '_handle')]
|
@@ -0,0 +1,19 @@
|
|
1
|
+
= render :partial => 'theme_shared/top_navigation_bottom'
|
2
|
+
|
3
|
+
= render :partial => 'theme_shared/tools'
|
4
|
+
|
5
|
+
- content_for :content do
|
6
|
+
|
7
|
+
- b.page :class => "_sortable_container", :html_attributes => {"data-item_class" => '_item'} do |o|
|
8
|
+
- o.name "Pictures for Terminator Movie"
|
9
|
+
- o.controls @common_controls
|
10
|
+
- o.toolbar [link_to('Note', '#'), link_to('Folder', '#')]
|
11
|
+
- o.tags @common_tags
|
12
|
+
- o.icon url_for_path("/common_interface/images/img1_thumb.jpg")
|
13
|
+
- o.content do
|
14
|
+
= render(:partial => 'theme/page/note', :locals => {:text => "#{image_tag(url_for_path("/common_interface/images/img1_thumb.jpg"))} #{@note_text} #{@note_text}"})
|
15
|
+
= render(:partial => 'theme/page/note', :locals => {:text => @note_text})
|
16
|
+
= render(:partial => 'theme/page/folder')
|
17
|
+
= render(:partial => 'theme/page/note', :locals => {:text => @note_text})
|
18
|
+
|
19
|
+
= render :partial => 'theme_shared/comments'
|
@@ -0,0 +1 @@
|
|
1
|
+
target.showPopup("<%= js render('popup') %>");
|
@@ -0,0 +1,38 @@
|
|
1
|
+
= render :partial => 'theme_shared/top_navigation_bottom'
|
2
|
+
|
3
|
+
= render :partial => 'theme_shared/tools'
|
4
|
+
|
5
|
+
- content_for :content do
|
6
|
+
- options = b.options do |o|
|
7
|
+
- o.name @common_name
|
8
|
+
- o.controls @common_controls
|
9
|
+
- o.tags @common_tags
|
10
|
+
|
11
|
+
= b.divider "Selector (Thumb without Title)"
|
12
|
+
- b.selector options do |o|
|
13
|
+
- o.text @note_text
|
14
|
+
- 12.times do
|
15
|
+
- i = rand(3) + 1
|
16
|
+
- b.thumb :class => "_item" do |o|
|
17
|
+
- o.thumb url_for_path("/common_interface/images/img#{i}_thumb.jpg")
|
18
|
+
- o.url url_for_path("/common_interface/images/img#{i}.jpg")
|
19
|
+
- o.controls @common_controls
|
20
|
+
._clear
|
21
|
+
|
22
|
+
|
23
|
+
= b.divider "Selector (Thumb with Title)"
|
24
|
+
= b.selector options
|
25
|
+
- 3.times do |i|
|
26
|
+
- i = i + 1
|
27
|
+
- b.thumb :name => "The Salvator", :class => "_item" do |o|
|
28
|
+
- o.thumb url_for_path("/common_interface/images/img#{i}_thumb.jpg")
|
29
|
+
- o.url url_for_path("/common_interface/images/img#{i}.jpg")
|
30
|
+
- o.controls @common_controls
|
31
|
+
._clear
|
32
|
+
|
33
|
+
|
34
|
+
= b.divider "Selector (Lines)"
|
35
|
+
= b.selector options
|
36
|
+
|
37
|
+
= render :partial => 'theme_shared/line_previews'
|
38
|
+
._clear
|