noodall-ui 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +29 -0
- data/Gemfile +29 -0
- data/Gemfile.lock +205 -0
- data/LICENSE +20 -0
- data/README.rdoc +17 -0
- data/Rakefile +17 -0
- data/app/controllers/noodall/admin/assets_controller.rb +241 -0
- data/app/controllers/noodall/admin/base_controller.rb +8 -0
- data/app/controllers/noodall/admin/components_controller.rb +22 -0
- data/app/controllers/noodall/admin/groups_controller.rb +11 -0
- data/app/controllers/noodall/admin/nodes_controller.rb +159 -0
- data/app/controllers/noodall/nodes_controller.rb +41 -0
- data/app/helpers/noodall/admin/assets_helper.rb +15 -0
- data/app/helpers/noodall/admin/base_helper.rb +14 -0
- data/app/helpers/noodall/admin/nodes_helper.rb +37 -0
- data/app/helpers/noodall/components_helper.rb +38 -0
- data/app/helpers/noodall/layout_helper.rb +25 -0
- data/app/helpers/noodall/nodes_helper.rb +72 -0
- data/app/models/asset.rb +103 -0
- data/app/views/layouts/noodall_admin.html.erb +66 -0
- data/app/views/noodall/admin/assets/_browser.html.erb +28 -0
- data/app/views/noodall/admin/assets/_form.html.erb +54 -0
- data/app/views/noodall/admin/assets/_menu.html.erb +8 -0
- data/app/views/noodall/admin/assets/_show.html.erb +48 -0
- data/app/views/noodall/admin/assets/_tags.html.erb +13 -0
- data/app/views/noodall/admin/assets/add.html.erb +10 -0
- data/app/views/noodall/admin/assets/form.html.erb +12 -0
- data/app/views/noodall/admin/assets/form.js.erb +2 -0
- data/app/views/noodall/admin/assets/index.html.erb +65 -0
- data/app/views/noodall/admin/assets/index.js.erb +1 -0
- data/app/views/noodall/admin/assets/show.html.erb +3 -0
- data/app/views/noodall/admin/assets/show.js.erb +1 -0
- data/app/views/noodall/admin/assets/tags.html.erb +3 -0
- data/app/views/noodall/admin/assets/tags.js.erb +1 -0
- data/app/views/noodall/admin/components/_component.erb +0 -0
- data/app/views/noodall/admin/nodes/_body.html.erb +5 -0
- data/app/views/noodall/admin/nodes/_branch.html.erb +10 -0
- data/app/views/noodall/admin/nodes/_home.html.erb +27 -0
- data/app/views/noodall/admin/nodes/_slot_form.html.erb +16 -0
- data/app/views/noodall/admin/nodes/change_template.html.erb +38 -0
- data/app/views/noodall/admin/nodes/index.html.erb +69 -0
- data/app/views/noodall/admin/nodes/new.html.erb +30 -0
- data/app/views/noodall/admin/nodes/show.html.erb +144 -0
- data/app/views/noodall/admin/nodes/tree.html.erb +3 -0
- data/app/views/noodall/admin/nodes/tree.js.erb +2 -0
- data/app/views/noodall/components/_component.erb +0 -0
- data/app/views/noodall/nodes/search.html.erb +14 -0
- data/app/views/noodall/nodes/sitemap.html.erb +3 -0
- data/app/views/noodall/nodes/sitemap.xml.rxml +22 -0
- data/config/application.rb +29 -0
- data/config/boot.rb +13 -0
- data/config/cucumber.yml +8 -0
- data/config/database.yml +14 -0
- data/config/environment.rb +5 -0
- data/config/environments/development.rb +30 -0
- data/config/environments/production.rb +50 -0
- data/config/environments/test.rb +35 -0
- data/config/locales/en.yml +5 -0
- data/config.ru +4 -0
- data/demo/controllers/application_controller.rb +22 -0
- data/demo/initializers/dragonfly.rb +1 -0
- data/demo/initializers/mongo_mapper.rb +13 -0
- data/demo/initializers/noodall.rb +2 -0
- data/demo/initializers/secret_token.rb +7 -0
- data/demo/initializers/session_store.rb +8 -0
- data/demo/models/gallery.rb +17 -0
- data/demo/models/page_a.rb +9 -0
- data/demo/models/page_b.rb +4 -0
- data/demo/models/page_c.rb +7 -0
- data/demo/models/promo.rb +22 -0
- data/demo/models/user.rb +12 -0
- data/demo/routes.rb +3 -0
- data/demo/seeds.rb +8 -0
- data/demo/views/admin/components/_gallery.html.erb +49 -0
- data/demo/views/admin/components/_promo.html.erb +34 -0
- data/demo/views/admin/nodes/_page_a.html.erb +47 -0
- data/demo/views/admin/nodes/_page_b.html.erb +35 -0
- data/demo/views/admin/nodes/_page_c.html.erb +35 -0
- data/demo/views/components/_gallery.html.erb +23 -0
- data/demo/views/components/_promo.html.erb +5 -0
- data/demo/views/layouts/application.html.erb +121 -0
- data/demo/views/nodes/page_a.html.erb +14 -0
- data/demo/views/nodes/page_b.html.erb +9 -0
- data/demo/views/nodes/page_c.html.erb +12 -0
- data/features/change_templates.feature +25 -0
- data/features/content_templates.feature +18 -0
- data/features/gallery_component.feature +22 -0
- data/features/manage_assets.feature +28 -0
- data/features/manage_content_tree.feature +42 -0
- data/features/preview.feature +8 -0
- data/features/promo_component.feature +18 -0
- data/features/publish_content.feature +28 -0
- data/features/search.feature +12 -0
- data/features/sitemap.feature +9 -0
- data/features/step_definitions/asset_steps.rb +66 -0
- data/features/step_definitions/cms_node_steps.rb +126 -0
- data/features/step_definitions/component_steps.rb +137 -0
- data/features/step_definitions/content_steps.rb +187 -0
- data/features/step_definitions/date_select_steps.rb +39 -0
- data/features/step_definitions/groups_access_steps.rb +92 -0
- data/features/step_definitions/node_steps.rb +25 -0
- data/features/step_definitions/preview_steps.rb +7 -0
- data/features/step_definitions/pubish_content_steps.rb +45 -0
- data/features/step_definitions/search_steps.rb +21 -0
- data/features/step_definitions/sign_in_steps.rb +3 -0
- data/features/step_definitions/web_steps.rb +219 -0
- data/features/support/env.rb +52 -0
- data/features/support/logo.png +0 -0
- data/features/support/paths.rb +56 -0
- data/generators/component/USAGE +8 -0
- data/generators/component/component_generator.rb +35 -0
- data/generators/component/lib/insert_commands.rb +61 -0
- data/generators/component/templates/admin_template.html.erb +50 -0
- data/generators/component/templates/factory.rb +5 -0
- data/generators/component/templates/model.rb +8 -0
- data/generators/component/templates/template.html.erb +41 -0
- data/generators/node/USAGE +8 -0
- data/generators/node/lib/insert_commands.rb +47 -0
- data/generators/node/node_generator.rb +35 -0
- data/generators/node/templates/admin_template.html.erb +49 -0
- data/generators/node/templates/factory.rb +5 -0
- data/generators/node/templates/model.rb +11 -0
- data/generators/node/templates/template.html.erb +41 -0
- data/generators/node_features/USAGE +8 -0
- data/generators/node_features/node_features_generator.rb +16 -0
- data/lib/generators/noodall/node/USAGE +8 -0
- data/lib/generators/noodall/node/node_generator.rb +21 -0
- data/lib/generators/noodall/node/templates/admin_template.html.erb +52 -0
- data/lib/generators/noodall/node/templates/factory.rb +8 -0
- data/lib/generators/noodall/node/templates/model.rb +13 -0
- data/lib/generators/noodall/node/templates/template.html.erb +12 -0
- data/lib/noodall/canable.rb +1 -0
- data/lib/noodall/dragonfly.rb +23 -0
- data/lib/noodall/engine.rb +13 -0
- data/lib/noodall/permalinks.rb +12 -0
- data/lib/noodall/routes.rb +45 -0
- data/lib/noodall/ui/version.rb +5 -0
- data/lib/noodall/ui.rb +17 -0
- data/lib/noodall/video_thumbnail_encoder.rb +31 -0
- data/lib/noodall-ui.rb +6 -0
- data/lib/tasks/cucumber.rake +53 -0
- data/log/.gitignore +0 -0
- data/noodall-ui.gemspec +28 -0
- data/public/favicon.ico +0 -0
- data/public/images/admin/add-small.png +0 -0
- data/public/images/admin/add.png +0 -0
- data/public/images/admin/add_file.gif +0 -0
- data/public/images/admin/advanced.gif +0 -0
- data/public/images/admin/back.png +0 -0
- data/public/images/admin/cancel-small.gif +0 -0
- data/public/images/admin/cancel.gif +0 -0
- data/public/images/admin/change-bg.gif +0 -0
- data/public/images/admin/change.gif +0 -0
- data/public/images/admin/check.png +0 -0
- data/public/images/admin/clear.gif +0 -0
- data/public/images/admin/close.png +0 -0
- data/public/images/admin/create.gif +0 -0
- data/public/images/admin/delete.gif +0 -0
- data/public/images/admin/delete.png +0 -0
- data/public/images/admin/doc-icon.png +0 -0
- data/public/images/admin/document.png +0 -0
- data/public/images/admin/down.png +0 -0
- data/public/images/admin/download.png +0 -0
- data/public/images/admin/draft.gif +0 -0
- data/public/images/admin/draft.png +0 -0
- data/public/images/admin/edit.gif +0 -0
- data/public/images/admin/edit.png +0 -0
- data/public/images/admin/image.png +0 -0
- data/public/images/admin/image_small.png +0 -0
- data/public/images/admin/info-white.png +0 -0
- data/public/images/admin/info.png +0 -0
- data/public/images/admin/media.gif +0 -0
- data/public/images/admin/nav-2.gif +0 -0
- data/public/images/admin/nav.gif +0 -0
- data/public/images/admin/next.png +0 -0
- data/public/images/admin/no-type-icon.png +0 -0
- data/public/images/admin/pagination.gif +0 -0
- data/public/images/admin/pdf-icon.png +0 -0
- data/public/images/admin/prev.png +0 -0
- data/public/images/admin/preview.gif +0 -0
- data/public/images/admin/publish.gif +0 -0
- data/public/images/admin/remove.gif +0 -0
- data/public/images/admin/reset.gif +0 -0
- data/public/images/admin/select_image.gif +0 -0
- data/public/images/admin/select_images.gif +0 -0
- data/public/images/admin/set.gif +0 -0
- data/public/images/admin/sort.png +0 -0
- data/public/images/admin/tag.png +0 -0
- data/public/images/admin/templates/article-page.gif +0 -0
- data/public/images/admin/templates/articles-list.gif +0 -0
- data/public/images/admin/templates/course-page.gif +0 -0
- data/public/images/admin/templates/event-page.gif +0 -0
- data/public/images/admin/templates/events-list.gif +0 -0
- data/public/images/admin/templates/home.gif +0 -0
- data/public/images/admin/templates/landing-page.gif +0 -0
- data/public/images/admin/templates/page-a.gif +0 -0
- data/public/images/admin/templates/page-b.gif +0 -0
- data/public/images/admin/templates/school-landing-page.gif +0 -0
- data/public/images/admin/templates/study-landing-page.gif +0 -0
- data/public/images/admin/top-level.png +0 -0
- data/public/images/admin/top-level_small.png +0 -0
- data/public/images/admin/txt-icon.png +0 -0
- data/public/images/admin/uncheck.png +0 -0
- data/public/images/admin/up.png +0 -0
- data/public/images/admin/update.gif +0 -0
- data/public/images/admin/upload.png +0 -0
- data/public/images/admin/video.png +0 -0
- data/public/images/admin/view.png +0 -0
- data/public/images/admin/xls-icon.png +0 -0
- data/public/images/fancybox/blank.gif +0 -0
- data/public/images/fancybox/fancy_close.png +0 -0
- data/public/images/fancybox/fancy_loading.png +0 -0
- data/public/images/fancybox/fancy_nav_left.png +0 -0
- data/public/images/fancybox/fancy_nav_right.png +0 -0
- data/public/images/fancybox/fancy_shadow_e.png +0 -0
- data/public/images/fancybox/fancy_shadow_n.png +0 -0
- data/public/images/fancybox/fancy_shadow_ne.png +0 -0
- data/public/images/fancybox/fancy_shadow_nw.png +0 -0
- data/public/images/fancybox/fancy_shadow_s.png +0 -0
- data/public/images/fancybox/fancy_shadow_se.png +0 -0
- data/public/images/fancybox/fancy_shadow_sw.png +0 -0
- data/public/images/fancybox/fancy_shadow_w.png +0 -0
- data/public/images/fancybox/fancy_title_left.png +0 -0
- data/public/images/fancybox/fancy_title_main.png +0 -0
- data/public/images/fancybox/fancy_title_over.png +0 -0
- data/public/images/fancybox/fancy_title_right.png +0 -0
- data/public/images/fancybox/fancybox-x.png +0 -0
- data/public/images/fancybox/fancybox-y.png +0 -0
- data/public/images/fancybox/fancybox.png +0 -0
- data/public/images/plupload/backgrounds.gif +0 -0
- data/public/images/plupload/buttons-disabled.png +0 -0
- data/public/images/plupload/buttons.png +0 -0
- data/public/images/plupload/delete.gif +0 -0
- data/public/images/plupload/done.gif +0 -0
- data/public/images/plupload/error.gif +0 -0
- data/public/images/plupload/throbber.gif +0 -0
- data/public/images/plupload/transp50.png +0 -0
- data/public/javascripts/admin/application.js +586 -0
- data/public/javascripts/admin/asset_edit.js +30 -0
- data/public/javascripts/admin/assets.js +98 -0
- data/public/javascripts/admin/gotham.font.js +20 -0
- data/public/javascripts/admin/jquery.jqtransform.js +366 -0
- data/public/javascripts/admin/nodes.js +30 -0
- data/public/javascripts/admin/tiny_mce_config.js +118 -0
- data/public/javascripts/ajaxify.js +20 -0
- data/public/javascripts/application.js +37 -0
- data/public/javascripts/carousel.lite.js +1 -0
- data/public/javascripts/cufon-yui.js +8 -0
- data/public/javascripts/fancybox.js +1078 -0
- data/public/javascripts/plupload/gears_init.js +86 -0
- data/public/javascripts/plupload/jquery.plupload.queue.min.js +1 -0
- data/public/javascripts/plupload/plupload.flash.swf +0 -0
- data/public/javascripts/plupload/plupload.full.min.js +1 -0
- data/public/javascripts/plupload/plupload.silverlight.xap +0 -0
- data/public/javascripts/rails.js +132 -0
- data/public/javascripts/tiny_mce/jquery.tinymce.js +1 -0
- data/public/javascripts/tiny_mce/langs/en.js +169 -0
- data/public/javascripts/tiny_mce/license.txt +504 -0
- data/public/javascripts/tiny_mce/plugins/advhr/css/advhr.css +5 -0
- data/public/javascripts/tiny_mce/plugins/advhr/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js +57 -0
- data/public/javascripts/tiny_mce/plugins/advhr/js/rule.js +43 -0
- data/public/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js +5 -0
- data/public/javascripts/tiny_mce/plugins/advhr/rule.htm +57 -0
- data/public/javascripts/tiny_mce/plugins/advimage/css/advimage.css +13 -0
- data/public/javascripts/tiny_mce/plugins/advimage/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js +50 -0
- data/public/javascripts/tiny_mce/plugins/advimage/image.htm +232 -0
- data/public/javascripts/tiny_mce/plugins/advimage/img/sample.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/advimage/js/image.js +443 -0
- data/public/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js +43 -0
- data/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css +8 -0
- data/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +61 -0
- data/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js +528 -0
- data/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js +52 -0
- data/public/javascripts/tiny_mce/plugins/advlink/link.htm +333 -0
- data/public/javascripts/tiny_mce/plugins/advlist/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/advlist/editor_plugin_src.js +154 -0
- data/public/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/autoresize/editor_plugin_src.js +117 -0
- data/public/javascripts/tiny_mce/plugins/autosave/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js +422 -0
- data/public/javascripts/tiny_mce/plugins/autosave/langs/en.js +4 -0
- data/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +120 -0
- data/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +127 -0
- data/public/javascripts/tiny_mce/plugins/directionality/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js +82 -0
- data/public/javascripts/tiny_mce/plugins/emotions/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js +43 -0
- data/public/javascripts/tiny_mce/plugins/emotions/emotions.htm +40 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/js/emotions.js +22 -0
- data/public/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js +20 -0
- data/public/javascripts/tiny_mce/plugins/example/dialog.htm +22 -0
- data/public/javascripts/tiny_mce/plugins/example/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/example/editor_plugin_src.js +84 -0
- data/public/javascripts/tiny_mce/plugins/example/img/example.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/example/js/dialog.js +19 -0
- data/public/javascripts/tiny_mce/plugins/example/langs/en.js +3 -0
- data/public/javascripts/tiny_mce/plugins/example/langs/en_dlg.js +3 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css +182 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +149 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/fullpage.htm +571 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js +471 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js +85 -0
- data/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +148 -0
- data/public/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm +109 -0
- data/public/javascripts/tiny_mce/plugins/iespell/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js +54 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +635 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/template.htm +387 -0
- data/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +83 -0
- data/public/javascripts/tiny_mce/plugins/layer/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js +212 -0
- data/public/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +136 -0
- data/public/javascripts/tiny_mce/plugins/media/css/content.css +6 -0
- data/public/javascripts/tiny_mce/plugins/media/css/media.css +16 -0
- data/public/javascripts/tiny_mce/plugins/media/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +414 -0
- data/public/javascripts/tiny_mce/plugins/media/img/flash.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/flv_player.swf +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/quicktime.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/realmedia.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/shockwave.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/trans.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/js/embed.js +73 -0
- data/public/javascripts/tiny_mce/plugins/media/js/media.js +630 -0
- data/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +103 -0
- data/public/javascripts/tiny_mce/plugins/media/media.htm +817 -0
- data/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +53 -0
- data/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +90 -0
- data/public/javascripts/tiny_mce/plugins/pagebreak/css/content.css +1 -0
- data/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +77 -0
- data/public/javascripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/pagebreak/img/trans.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/paste/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js +929 -0
- data/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js +36 -0
- data/public/javascripts/tiny_mce/plugins/paste/js/pasteword.js +51 -0
- data/public/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js +5 -0
- data/public/javascripts/tiny_mce/plugins/paste/pastetext.htm +27 -0
- data/public/javascripts/tiny_mce/plugins/paste/pasteword.htm +21 -0
- data/public/javascripts/tiny_mce/plugins/preview/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js +53 -0
- data/public/javascripts/tiny_mce/plugins/preview/example.html +28 -0
- data/public/javascripts/tiny_mce/plugins/preview/jscripts/embed.js +73 -0
- data/public/javascripts/tiny_mce/plugins/preview/preview.html +17 -0
- data/public/javascripts/tiny_mce/plugins/print/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/print/editor_plugin_src.js +34 -0
- data/public/javascripts/tiny_mce/plugins/save/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js +101 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css +6 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +57 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +130 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js +16 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm +99 -0
- data/public/javascripts/tiny_mce/plugins/spellchecker/css/content.css +1 -0
- data/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js +341 -0
- data/public/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/style/css/props.css +13 -0
- data/public/javascripts/tiny_mce/plugins/style/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/style/editor_plugin_src.js +55 -0
- data/public/javascripts/tiny_mce/plugins/style/js/props.js +641 -0
- data/public/javascripts/tiny_mce/plugins/style/langs/en_dlg.js +63 -0
- data/public/javascripts/tiny_mce/plugins/style/props.htm +726 -0
- data/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js +112 -0
- data/public/javascripts/tiny_mce/plugins/table/cell.htm +178 -0
- data/public/javascripts/tiny_mce/plugins/table/css/cell.css +17 -0
- data/public/javascripts/tiny_mce/plugins/table/css/row.css +25 -0
- data/public/javascripts/tiny_mce/plugins/table/css/table.css +13 -0
- data/public/javascripts/tiny_mce/plugins/table/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/table/editor_plugin_src.js +1118 -0
- data/public/javascripts/tiny_mce/plugins/table/js/cell.js +286 -0
- data/public/javascripts/tiny_mce/plugins/table/js/merge_cells.js +27 -0
- data/public/javascripts/tiny_mce/plugins/table/js/row.js +237 -0
- data/public/javascripts/tiny_mce/plugins/table/js/table.js +449 -0
- data/public/javascripts/tiny_mce/plugins/table/langs/en_dlg.js +74 -0
- data/public/javascripts/tiny_mce/plugins/table/merge_cells.htm +32 -0
- data/public/javascripts/tiny_mce/plugins/table/row.htm +155 -0
- data/public/javascripts/tiny_mce/plugins/table/table.htm +187 -0
- data/public/javascripts/tiny_mce/plugins/template/blank.htm +12 -0
- data/public/javascripts/tiny_mce/plugins/template/css/template.css +23 -0
- data/public/javascripts/tiny_mce/plugins/template/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/template/editor_plugin_src.js +159 -0
- data/public/javascripts/tiny_mce/plugins/template/js/template.js +106 -0
- data/public/javascripts/tiny_mce/plugins/template/langs/en_dlg.js +15 -0
- data/public/javascripts/tiny_mce/plugins/template/template.htm +32 -0
- data/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js +76 -0
- data/public/javascripts/tiny_mce/plugins/wordcount/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/wordcount/editor_plugin_src.js +98 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm +141 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm +141 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm +148 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm +141 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css +11 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css +9 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm +161 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +144 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm +161 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js +28 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js +28 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js +126 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js +28 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js +63 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js +231 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js +62 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +32 -0
- data/public/javascripts/tiny_mce/themes/advanced/about.htm +54 -0
- data/public/javascripts/tiny_mce/themes/advanced/anchor.htm +26 -0
- data/public/javascripts/tiny_mce/themes/advanced/charmap.htm +53 -0
- data/public/javascripts/tiny_mce/themes/advanced/color_picker.htm +73 -0
- data/public/javascripts/tiny_mce/themes/advanced/editor_template.js +1 -0
- data/public/javascripts/tiny_mce/themes/advanced/editor_template_src.js +1167 -0
- data/public/javascripts/tiny_mce/themes/advanced/image.htm +80 -0
- data/public/javascripts/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/about.js +72 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/anchor.js +37 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/charmap.js +335 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/color_picker.js +253 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/image.js +245 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/link.js +156 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/source_editor.js +62 -0
- data/public/javascripts/tiny_mce/themes/advanced/langs/en.js +62 -0
- data/public/javascripts/tiny_mce/themes/advanced/langs/en_dlg.js +51 -0
- data/public/javascripts/tiny_mce/themes/advanced/link.htm +58 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/content.css +35 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/dialog.css +117 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/ui.css +213 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/content.css +35 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +116 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +215 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +8 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
- data/public/javascripts/tiny_mce/themes/advanced/source_editor.htm +26 -0
- data/public/javascripts/tiny_mce/themes/simple/editor_template.js +1 -0
- data/public/javascripts/tiny_mce/themes/simple/editor_template_src.js +85 -0
- data/public/javascripts/tiny_mce/themes/simple/img/icons.gif +0 -0
- data/public/javascripts/tiny_mce/themes/simple/langs/en.js +11 -0
- data/public/javascripts/tiny_mce/themes/simple/skins/default/content.css +25 -0
- data/public/javascripts/tiny_mce/themes/simple/skins/default/ui.css +32 -0
- data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css +17 -0
- data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
- data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css +35 -0
- data/public/javascripts/tiny_mce/tiny_mce.js +1 -0
- data/public/javascripts/tiny_mce/tiny_mce_popup.js +5 -0
- data/public/javascripts/tiny_mce/tiny_mce_src.js +13134 -0
- data/public/javascripts/tiny_mce/utils/editable_selects.js +70 -0
- data/public/javascripts/tiny_mce/utils/form_utils.js +200 -0
- data/public/javascripts/tiny_mce/utils/mctabs.js +77 -0
- data/public/javascripts/tiny_mce/utils/validate.js +220 -0
- data/public/stylesheets/admin/fancybox.css +341 -0
- data/public/stylesheets/admin/forms.css +520 -0
- data/public/stylesheets/admin/handheld.css +6 -0
- data/public/stylesheets/admin/ie.css +118 -0
- data/public/stylesheets/admin/ie6.css +23 -0
- data/public/stylesheets/admin/ie8.css +16 -0
- data/public/stylesheets/admin/layout.css +723 -0
- data/public/stylesheets/admin/print.css +27 -0
- data/public/stylesheets/admin/reset.css +81 -0
- data/public/stylesheets/admin/skin.css +698 -0
- data/public/stylesheets/admin/tinymce.css +2 -0
- data/public/stylesheets/admin/typography.css +207 -0
- data/public/stylesheets/ellipsis.xml +15 -0
- data/public/stylesheets/fancybox.css +313 -0
- data/public/stylesheets/forms.css +7 -0
- data/public/stylesheets/ie.css +12 -0
- data/public/stylesheets/ie8.css +8 -0
- data/public/stylesheets/layout.css +31 -0
- data/public/stylesheets/plupload.queue.css +181 -0
- data/public/stylesheets/reset.css +84 -0
- data/public/stylesheets/sass/forms.scss +7 -0
- data/public/stylesheets/sass/ie.scss +12 -0
- data/public/stylesheets/sass/ie8.scss +8 -0
- data/public/stylesheets/sass/layout.scss +45 -0
- data/public/stylesheets/sass/skin.scss +35 -0
- data/public/stylesheets/sass/typography.scss +162 -0
- data/public/stylesheets/skin.css +22 -0
- data/public/stylesheets/typography.css +162 -0
- data/script/cucumber +10 -0
- data/script/rails +6 -0
- data/spec/factories/asset.rb +16 -0
- data/spec/factories/component.rb +9 -0
- data/spec/factories/node.rb +15 -0
- data/spec/factories/user.rb +5 -0
- data/spec/files/beef.png +0 -0
- data/spec/files/get_video.flv +0 -0
- data/spec/files/test.pdf +0 -0
- data/spec/noodall-ui_spec.rb +9 -0
- data/spec/spec_helper.rb +4 -0
- data/tmp/.gitignore +0 -0
- metadata +685 -0
@@ -0,0 +1,159 @@
|
|
1
|
+
module Noodall
|
2
|
+
module Admin
|
3
|
+
class NodesController < BaseController
|
4
|
+
include Canable::Enforcers
|
5
|
+
layout 'noodall_admin'
|
6
|
+
before_filter :set_title
|
7
|
+
|
8
|
+
def index
|
9
|
+
if params[:node_id].nil?
|
10
|
+
@nodes = Node.roots
|
11
|
+
else
|
12
|
+
@parent = Node.find(params[:node_id])
|
13
|
+
@nodes = @parent.children
|
14
|
+
end
|
15
|
+
|
16
|
+
respond_to do |format|
|
17
|
+
format.html # index.html.erb
|
18
|
+
format.xml { render :xml => @nodes }
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def tree
|
23
|
+
@options = {}
|
24
|
+
@options[:_type] = params[:allowed_types] if params[:allowed_types]
|
25
|
+
if params[:not_branch]
|
26
|
+
@options.merge!(
|
27
|
+
:_id => {"$ne" => BSON::ObjectId.from_string(params[:not_branch])},
|
28
|
+
Node.path_field => {"$ne" => BSON::ObjectId.from_string(params[:not_branch])}
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
32
|
+
respond_to do |format|
|
33
|
+
format.html
|
34
|
+
format.js
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def show
|
39
|
+
@node = Node.find(params[:id])
|
40
|
+
enforce_update_permission(@node)
|
41
|
+
enforce_publish_permission(@node) if @node.published?
|
42
|
+
|
43
|
+
respond_to do |format|
|
44
|
+
format.html
|
45
|
+
format.xml { render :xml => @node }
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def new
|
50
|
+
@parent = Node.find(params[:node_id])
|
51
|
+
@node = Node.new( :parent => @parent )
|
52
|
+
enforce_create_permission(@node)
|
53
|
+
|
54
|
+
@template_names = @parent.nil? ? Node.template_names : @parent.class.template_names
|
55
|
+
respond_to do |format|
|
56
|
+
format.html
|
57
|
+
format.xml { render :xml => @node }
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def create
|
62
|
+
template_class = params[:node].delete(:template).to_s.gsub(' ','').constantize
|
63
|
+
@node = template_class.new(params[:node])
|
64
|
+
enforce_create_permission(@node)
|
65
|
+
|
66
|
+
# Set user stamps
|
67
|
+
@node.creator = @node.updater = current_user
|
68
|
+
|
69
|
+
respond_to do |format|
|
70
|
+
if @node.save
|
71
|
+
flash[:notice] = "#{@node.class.name.titleize} '#{@node.title}' was successfully created."
|
72
|
+
format.html { redirect_to noodall_admin_node_path(@node) }
|
73
|
+
format.xml { render :xml => @node, :status => :created, :location => @node }
|
74
|
+
else
|
75
|
+
format.html do
|
76
|
+
@parent = @node.parent
|
77
|
+
@template_names = @parent.nil? ? Node.template_names : @parent.class.template_names
|
78
|
+
render :action => "new"
|
79
|
+
end
|
80
|
+
format.xml { render :xml => @node.errors, :status => :unprocessable_entity }
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
def update
|
86
|
+
@node = Node.find(params[:id])
|
87
|
+
enforce_update_permission(@node)
|
88
|
+
enforce_publish_permission(@node) if @node.published?
|
89
|
+
|
90
|
+
# Set user stamp
|
91
|
+
@node.updater = current_user
|
92
|
+
|
93
|
+
respond_to do |format|
|
94
|
+
if @node.update_attributes(params[:node])
|
95
|
+
flash[:notice] = "#{@node.class.name.titleize} '#{@node.title}' was successfully updated."
|
96
|
+
format.html {
|
97
|
+
if @node.parent.nil?
|
98
|
+
redirect_to noodall_admin_nodes_path
|
99
|
+
else
|
100
|
+
redirect_to noodall_admin_node_nodes_path(@node.parent.id)
|
101
|
+
end
|
102
|
+
}
|
103
|
+
format.xml { head :ok }
|
104
|
+
else
|
105
|
+
format.html { render :action => "show" }
|
106
|
+
format.xml { render :xml => @node.errors, :status => :unprocessable_entity }
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
def destroy
|
112
|
+
@node = Node.find(params[:id])
|
113
|
+
enforce_destroy_permission(@node)
|
114
|
+
|
115
|
+
@node.destroy
|
116
|
+
flash[:notice] = "#{@node.class.name.titleize} '#{@node.title}' was successfully deleted."
|
117
|
+
|
118
|
+
respond_to do |format|
|
119
|
+
format.html { redirect_to(noodall_admin_nodes_url) }
|
120
|
+
format.xml { head :ok }
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
def move_up
|
125
|
+
@node = Node.find(params[:id])
|
126
|
+
enforce_update_permission(@node)
|
127
|
+
@node.move_higher
|
128
|
+
redirect_to :back
|
129
|
+
end
|
130
|
+
|
131
|
+
def move_down
|
132
|
+
@node = Node.find(params[:id])
|
133
|
+
enforce_update_permission(@node)
|
134
|
+
@node.move_lower
|
135
|
+
redirect_to :back
|
136
|
+
end
|
137
|
+
|
138
|
+
def preview
|
139
|
+
@node = Node.find(params[:id])
|
140
|
+
@node.attributes = params[:node]
|
141
|
+
@node.permalink ||= 'preview'
|
142
|
+
render :template => "/nodes/#{@node.class.name.underscore}", :layout => 'application'
|
143
|
+
end
|
144
|
+
|
145
|
+
|
146
|
+
def change_template
|
147
|
+
@node = Node.find(params[:id])
|
148
|
+
enforce_update_permission(@node)
|
149
|
+
@template_names = @node.parent.nil? ? Node.template_names : @node.parent.class.template_names
|
150
|
+
end
|
151
|
+
|
152
|
+
|
153
|
+
private
|
154
|
+
def set_title
|
155
|
+
@page_title = 'Content'
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Noodall
|
2
|
+
class NodesController < ApplicationController
|
3
|
+
def show
|
4
|
+
if published_states_changed_since_global_update? or stale?(:last_modified => GlobalUpdateTime::Stamp.read, :public => true)
|
5
|
+
permalink = params[:permalink].is_a?(String) ? params[:permalink] : params[:permalink].join('/')
|
6
|
+
|
7
|
+
@node = Node.find_by_permalink(permalink)
|
8
|
+
@page_title = @node.title
|
9
|
+
@page_description = @node.description
|
10
|
+
@page_keywords = @node.keywords
|
11
|
+
|
12
|
+
respond_to do |format|
|
13
|
+
format.html { render "nodes/#{@node.class.name.underscore}" }
|
14
|
+
format.rss { render "nodes/#{@node.class.name.underscore}" }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def sitemap
|
20
|
+
if stale?(:last_modified => GlobalUpdateTime::Stamp.read, :public => true)
|
21
|
+
@page_title = 'Sitemap'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def search
|
26
|
+
@nodes = Node.search(params[:q], :per_page => 10, :page => params[:page], :published_at => { :$lte => Time.zone.now }, :published_to => { :$gte => Time.zone.now })
|
27
|
+
@page_title = 'Searching: '+ params[:q]
|
28
|
+
end
|
29
|
+
|
30
|
+
protected
|
31
|
+
|
32
|
+
def published_states_changed_since_global_update?
|
33
|
+
if Node.count(:published_at => { :$gte => GlobalUpdateTime::Stamp.read, :$lte => Time.zone.now }).zero? and Node.count(:published_to => { :$gte => GlobalUpdateTime::Stamp.read, :$lte => Time.zone.now }).zero?
|
34
|
+
false
|
35
|
+
else
|
36
|
+
GlobalUpdateTime::Stamp.update!
|
37
|
+
true
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Noodall::Admin::AssetsHelper
|
2
|
+
include SortableTable::App::Helpers::ApplicationHelper
|
3
|
+
|
4
|
+
def asset_icon(asset)
|
5
|
+
icon = case asset.file_ext
|
6
|
+
when "doc", "pdf", "txt", "xls"
|
7
|
+
"admin/#{asset.file_ext}-icon.png"
|
8
|
+
else
|
9
|
+
"admin/no-type-icon.png"
|
10
|
+
end
|
11
|
+
|
12
|
+
image_tag icon, :title => "#{asset.title} - #{asset.file.name}"
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Noodall::Admin::BaseHelper
|
2
|
+
include Noodall::LayoutHelper
|
3
|
+
def admin_page_title
|
4
|
+
@page_title ||= controller.controller_name.titleize +
|
5
|
+
(controller.action_name == 'index' ? ' ' : " | #{controller.action_name.titleize}" ) +
|
6
|
+
" | #{Noodall::UI.app_name}"
|
7
|
+
end
|
8
|
+
|
9
|
+
def admin_menu_items
|
10
|
+
Noodall::UI.menu_items.map do |title, link|
|
11
|
+
content_tag :li, link_to( title, send(link) )
|
12
|
+
end.join.html_safe
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Noodall
|
2
|
+
module Admin
|
3
|
+
module NodesHelper
|
4
|
+
include Noodall::Permalinks
|
5
|
+
|
6
|
+
def sorted_node_tree(tree)
|
7
|
+
nodes = []
|
8
|
+
tree.each do |node|
|
9
|
+
nodes << node
|
10
|
+
unless node.children.empty?
|
11
|
+
nodes += sorted_node_tree(node.children)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
nodes
|
16
|
+
end
|
17
|
+
|
18
|
+
def formatted_node_tree_options
|
19
|
+
sorted_node_tree(Node.roots).reject{|n| n._id == @node._id}.collect{|n|
|
20
|
+
[n.title, n._id]
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
def slot_link(node,type,index)
|
25
|
+
link_to( "#{type.to_s.titleize} Slot", {:anchor => "#{type}_component_form_#{index}"}, :id=> "#{type}_slot_#{index}_selector", :class => 'slot_link') +
|
26
|
+
"<span id=\"#{type}_slot_#{index}_tag\" class=\"slot_tag\">#{node.send("#{type}_slot_#{index}").class.name.titleize unless @node.send("#{type}_slot_#{index}").nil?}</span>".html_safe
|
27
|
+
end
|
28
|
+
|
29
|
+
def slot_form(node,type,index)
|
30
|
+
component = @node.send("#{type}_slot_#{index}")
|
31
|
+
options = options_for_select([''] + Component.positions_names(type), (component._type.titleize unless component.nil?))
|
32
|
+
|
33
|
+
render :partial => 'slot_form', :locals => { :type => type, :index => index, :component => component, :options => options, :slot_name => "#{ type }_slot_#{ index }" }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Noodall::ComponentsHelper
|
2
|
+
|
3
|
+
|
4
|
+
def component_row(*args)
|
5
|
+
node = args.shift
|
6
|
+
raise ActiveRecord::RecordNotFound if node.nil?
|
7
|
+
components = args.map { |slot_code| node.send(slot_code) }
|
8
|
+
|
9
|
+
# render each slot in the row
|
10
|
+
args.map do |slot_code|
|
11
|
+
index = args.index(slot_code)
|
12
|
+
component = components[index]
|
13
|
+
|
14
|
+
additional_classes = []
|
15
|
+
additional_classes << slot_code.split("_").shift unless slot_code.split("_").shift.nil?
|
16
|
+
additional_classes << 'penultimate' if slot_code == args[args.size - 2]
|
17
|
+
additional_classes << 'last' if args.last == slot_code
|
18
|
+
additional_classes << 'first' if args.first == slot_code
|
19
|
+
|
20
|
+
# pass a flag to the view to add an expanded html class
|
21
|
+
component(node, slot_code, ( components[index + 1].nil? && index < (args.size - 1) ), additional_classes.join(' ')).to_s
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def component(node, slot_code, expand = false, additional_classes = '')
|
26
|
+
component = node.send(slot_code)
|
27
|
+
# Add an empty blank to fill in
|
28
|
+
if component.respond_to?(:contents)
|
29
|
+
component.contents.reject!{|c| c.asset_id.blank? }
|
30
|
+
component.contents << Content.new
|
31
|
+
end
|
32
|
+
|
33
|
+
additional_classes = []
|
34
|
+
additional_classes << slot_code.split("_").shift unless slot_code.split("_").shift.nil?
|
35
|
+
|
36
|
+
render :partial => "components/#{component.class.name.underscore}", :locals => { :slot_code => slot_code, :component => component, :expand => expand, :additional_classes => additional_classes } unless component.nil?
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Noodall::LayoutHelper
|
2
|
+
def page_class
|
3
|
+
@node.nil? ? controller_name : "#{@node.class.name.underscore.parameterize} #{@node.permalink.join(' ')}"
|
4
|
+
end
|
5
|
+
|
6
|
+
def page_id
|
7
|
+
@node.nil? ? "#{controller_name}-#{action_name}" : @node.permalink.join('-')
|
8
|
+
end
|
9
|
+
|
10
|
+
def page_title
|
11
|
+
@page_title ||= controller.controller_name.titleize + (controller.action_name == 'index' ? " #{controller.action_name.titleize}" : ' ' )
|
12
|
+
end
|
13
|
+
|
14
|
+
attr_reader :page_description, :page_keywords
|
15
|
+
|
16
|
+
# Render flash messages
|
17
|
+
def flash_messages
|
18
|
+
return if flash.empty?
|
19
|
+
flash_divs = flash.collect do |key, value|
|
20
|
+
content_tag :div, h( value ), :class => "flash #{key}"
|
21
|
+
end
|
22
|
+
|
23
|
+
content_tag :div, flash_divs.join.html_safe, :id => "flash"
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
module Noodall
|
2
|
+
module NodesHelper
|
3
|
+
include Noodall::Permalinks
|
4
|
+
|
5
|
+
def sitemap(tree)
|
6
|
+
list_children(tree, nil, 'sitemap')
|
7
|
+
end
|
8
|
+
|
9
|
+
def list_children(tree, parent, id_prefix = nil, level_limit = 0)
|
10
|
+
# find the root node element or the parent's element
|
11
|
+
parent_id = (parent.nil? ? parent.to_s : parent.id.to_s)
|
12
|
+
|
13
|
+
return if tree[parent_id].blank?
|
14
|
+
content_tag 'ol', :id => (id_prefix.nil? ? '' : "#{id_prefix}-") + "node-tree-#{(parent.nil? ? 'root' : parent_id)}" do
|
15
|
+
tree[parent_id].collect do |n|
|
16
|
+
content = link_to(h(n.title), node_path(n))
|
17
|
+
# only recurse if there is no limit and the limit has not been exceeded and if there are child nodes
|
18
|
+
if (level_limit.zero? || level_limit > n.path.count) && !tree[n.id.to_s].nil?
|
19
|
+
class_name = " has-children"
|
20
|
+
content += list_children(tree, n, id_prefix, level_limit) + "\n"
|
21
|
+
end
|
22
|
+
content_tag('li', content, {:id => "nav-#{n.permalink.join('-')}", :class => class_name}) + "\n"
|
23
|
+
end.join
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def breadcrumb
|
28
|
+
return if @node.nil?
|
29
|
+
links = @node.ancestors.inject([]) do |l, n|
|
30
|
+
l << content_tag( :li, link_to(h(n.title), node_path(n)))
|
31
|
+
end
|
32
|
+
links << content_tag( :li, h(@node.title) )
|
33
|
+
end
|
34
|
+
|
35
|
+
# get an organised grouped index of nodes for the primary nav
|
36
|
+
def node_tree
|
37
|
+
@node_tree ||= Node.all({:fields => "title, permalink, parent_id, _id, path, _type", :published_at => { :$lte => Time.zone.now }, :published_to => { :$gte => Time.zone.now }, :order => 'parent_id ASC, position ASC'}).group_by{|n| n.parent_id.to_s }
|
38
|
+
end
|
39
|
+
|
40
|
+
def node_nav(node = nil)
|
41
|
+
# use a passed in node maybe
|
42
|
+
current_node = (node || @node)
|
43
|
+
|
44
|
+
return unless node_has_nav?(current_node)
|
45
|
+
|
46
|
+
content_tag('ul', :id => 'sub-page-nav', :class => 'level-1') do
|
47
|
+
node_tree[current_node.root.id.to_s].collect do |node|
|
48
|
+
render :partial => 'nodes/node_nav', :locals => {:current_node => current_node, :child_node => node}
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def node_has_nav?(node = nil)
|
54
|
+
current_node = (node || @node)
|
55
|
+
!(current_node.nil? or node_tree[current_node.root.id.to_s].nil?)
|
56
|
+
end
|
57
|
+
|
58
|
+
def related_content(ref_node, types =[], options = {})
|
59
|
+
options[:_type] = {'$in' => types} unless types.empty?
|
60
|
+
|
61
|
+
nodes = ref_node.related(publish_options(options.merge(:order => 'published_at DESC')))
|
62
|
+
return if nodes.empty?
|
63
|
+
|
64
|
+
content_tag('h2', 'Related Content') +
|
65
|
+
content_tag('ul', :id => 'related-content') do
|
66
|
+
nodes.collect do |node|
|
67
|
+
content_tag('li', link_to(h(node.title), node_path(node)) + node.published_at.to_formatted_s(:short_dot))
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
data/app/models/asset.rb
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
class Asset
|
2
|
+
include MongoMapper::Document
|
3
|
+
plugin Noodall::Tagging
|
4
|
+
|
5
|
+
# Set up dragonfly
|
6
|
+
extend Dragonfly::ActiveModelExtensions
|
7
|
+
register_dragonfly_app(:asset_accessor, Dragonfly::App[:noodall_assets])
|
8
|
+
|
9
|
+
asset_accessor :file
|
10
|
+
|
11
|
+
# Dragonfly fields
|
12
|
+
key :file_uid, String #For dragonfly file uid
|
13
|
+
key :file_name, String
|
14
|
+
key :file_ext, String
|
15
|
+
key :file_size, Integer
|
16
|
+
key :file_mime_type, String
|
17
|
+
key :video_thumbnail_offset, Integer, :default => 10
|
18
|
+
|
19
|
+
key :title, String
|
20
|
+
key :description, String
|
21
|
+
timestamps!
|
22
|
+
|
23
|
+
validates_presence_of :file, :title, :description
|
24
|
+
validates_length_of :tags, :minimum => 3, :message => "must have at least 3 items"
|
25
|
+
|
26
|
+
def image?
|
27
|
+
!(file_mime_type =~ self.class.image_reg_ex).nil?
|
28
|
+
end
|
29
|
+
|
30
|
+
def video?
|
31
|
+
file_ext == 'flv'
|
32
|
+
end
|
33
|
+
|
34
|
+
def url(*args)
|
35
|
+
if args.blank?
|
36
|
+
# Use the transparent url just the file is required with no processing
|
37
|
+
file.url
|
38
|
+
elsif video?
|
39
|
+
file.encode(:tiff, { :offset => "#{video_thumbnail_offset}%" }).thumb(*args).url
|
40
|
+
else
|
41
|
+
file.thumb(*args).url
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def file_uid
|
46
|
+
# Required to rerun the correct object for Dragonfly pending
|
47
|
+
return Dragonfly::ActiveRecordExtensions::PendingUID.new if @file_uid == "PENDING"
|
48
|
+
@file_uid
|
49
|
+
end
|
50
|
+
|
51
|
+
def log_usage(node_id, location)
|
52
|
+
# Check it's not been logged here before
|
53
|
+
if log_entries.select{|l| l.node_id.to_s == node_id.to_s and l.location == location }.empty?
|
54
|
+
log_entry = LogEntry.new(:node_id => node_id, :location => location)
|
55
|
+
if log_entry.valid?
|
56
|
+
self.log_entries << log_entry
|
57
|
+
self.save(:validate => false)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
protected
|
63
|
+
|
64
|
+
def set_title
|
65
|
+
self.title = file_name.gsub(/\.[\w\d]{3,4}$/,'').titleize if title.blank?
|
66
|
+
end
|
67
|
+
before_save :set_title
|
68
|
+
|
69
|
+
module ClassMethods
|
70
|
+
def images
|
71
|
+
Asset.all(:conditions => {:file_ext.in => self.image_extensions})
|
72
|
+
end
|
73
|
+
|
74
|
+
def files
|
75
|
+
Asset.all(:conditions => {:file_ext.nin => self.image_extensions + self.video_extensions})
|
76
|
+
end
|
77
|
+
|
78
|
+
def image_reg_ex
|
79
|
+
/^image\/(#{self.image_extensions.join('|')})$/
|
80
|
+
end
|
81
|
+
|
82
|
+
def image_extensions
|
83
|
+
['png','gif','jpg','jpeg']
|
84
|
+
end
|
85
|
+
|
86
|
+
def video_extensions
|
87
|
+
['flv', 'avi', 'mpeg', 'mpg']
|
88
|
+
end
|
89
|
+
end
|
90
|
+
extend ClassMethods
|
91
|
+
|
92
|
+
class LogEntry
|
93
|
+
include MongoMapper::EmbeddedDocument
|
94
|
+
|
95
|
+
key :location, String, :required => true
|
96
|
+
key :node_id, ObjectId, :required => true
|
97
|
+
|
98
|
+
belongs_to :node, :class => Noodall::Node
|
99
|
+
embedded_in :asset
|
100
|
+
end
|
101
|
+
|
102
|
+
many :log_entries, :class => LogEntry
|
103
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
5
|
+
<head>
|
6
|
+
<!-- START META TAGS -->
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
8
|
+
<meta http-equiv="content-language" content="en" />
|
9
|
+
<meta name="MSSmartTagsPreventParsing" content="true" />
|
10
|
+
<meta name="copyright" content="<%= Time.now.year %>, Beef" />
|
11
|
+
<meta name="web-author" content="Beef (www.wearebeef.co.uk)" />
|
12
|
+
<meta name="author" content="Beef"/>
|
13
|
+
|
14
|
+
<!-- END META TAGS -->
|
15
|
+
<title><%= admin_page_title %> | <%= Noodall::UI.app_name %> <%= Noodall::UI.system_name %></title>
|
16
|
+
|
17
|
+
<%= stylesheet_link_tag 'admin/reset', 'admin/layout', 'admin/skin', 'admin/typography', 'admin/forms', 'admin/fancybox', :media=>'screen,tv,projection' %>
|
18
|
+
<%= stylesheet_link_tag 'admin/print', :media=>'print' %>
|
19
|
+
<%= stylesheet_link_tag 'admin/handheld', :media=>'handheld' %>
|
20
|
+
<%= stylesheet_link_tag 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/themes/base/jquery.ui.all.css' %>
|
21
|
+
|
22
|
+
<!--[if IE 6]><link href="/stylesheets/admin/ie6.css" media="screen" rel="Stylesheet" type="text/css" /><![endif]-->
|
23
|
+
<!--[if IE 7]><link href="/stylesheets/admin/ie.css" media="screen" rel="Stylesheet" type="text/css" /><![endif]-->
|
24
|
+
<!--[if IE 8]><link href="/stylesheets/admin/ie8.css" media="screen" rel="Stylesheet" type="text/css" /><![endif]-->
|
25
|
+
|
26
|
+
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
|
27
|
+
<script type="text/javascript">
|
28
|
+
google.load("jquery", "1.4.2");
|
29
|
+
google.load("jqueryui", "1.8");
|
30
|
+
</script>
|
31
|
+
<%= javascript_include_tag 'rails', 'cufon-yui', 'admin/gotham.font.js', 'fancybox', 'ajaxify', 'admin/application' %>
|
32
|
+
<%= csrf_meta_tag %>
|
33
|
+
|
34
|
+
<%= yield :header %>
|
35
|
+
|
36
|
+
</head>
|
37
|
+
<body id="<%= self.controller_name %>" class="<%= self.action_name %>">
|
38
|
+
<!-- begin screen -->
|
39
|
+
<div id="screen">
|
40
|
+
<!-- begin header -->
|
41
|
+
<div id="header">
|
42
|
+
<h1><strong><%= Noodall::UI.app_name %></strong> <%= Noodall::UI.system_name %></h1>
|
43
|
+
<ul id="status">
|
44
|
+
<li><%= current_user.full_name %> is logged in</li>
|
45
|
+
<li><%= link_to 'Sign Out', destroy_user_session_path %></li>
|
46
|
+
<li><%= link_to 'Live Site', '/' %></li>
|
47
|
+
</ul>
|
48
|
+
</div>
|
49
|
+
<!-- end header -->
|
50
|
+
<!-- begin navigation -->
|
51
|
+
<ul id="topnav">
|
52
|
+
<%= admin_menu_items %>
|
53
|
+
</ul>
|
54
|
+
<!-- end navigation -->
|
55
|
+
|
56
|
+
<%= flash_messages %>
|
57
|
+
|
58
|
+
<div id="content">
|
59
|
+
<%= yield %>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
</div>
|
63
|
+
<!-- end screen -->
|
64
|
+
<!--[if IE]><script type="text/javascript"> Cufon.now(); </script><![endif]-->
|
65
|
+
</body>
|
66
|
+
</html>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<%= render 'menu' %>
|
2
|
+
<div id="browser-list">
|
3
|
+
<ul>
|
4
|
+
<% @assets.each do |asset| %>
|
5
|
+
<li class="file" title="<%= h( asset.title ) %>">
|
6
|
+
<div class="file-detail" id="asset-<%= asset.id %>">
|
7
|
+
<span class="file-title"><%= h( asset.title ) %></span>
|
8
|
+
|
9
|
+
<%= (asset.image? or asset.video?) ? image_tag( asset.url('70x70#', :jpg) ) : asset_icon(asset) %>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<%= link_to 'Show', noodall_admin_asset_path(asset, :readonly => readonly), :class => 'show button', :title => 'View this asset' %>
|
13
|
+
<%= link_to 'Add', asset.url, :class => 'add button', :title => 'Add this asset' %>
|
14
|
+
</li>
|
15
|
+
<% end %>
|
16
|
+
</ul>
|
17
|
+
<%= will_paginate(@assets, :previous_label => 'Previous', :next_label => 'Next') %>
|
18
|
+
</div>
|
19
|
+
<div id="tags">
|
20
|
+
<h2>Tags</h2>
|
21
|
+
<ul>
|
22
|
+
<% for tag in @tags %>
|
23
|
+
<li><%= link_to "#{h( tag.name )} (#{tag.count})", :tag => tag.name %></li>
|
24
|
+
<% end -%>
|
25
|
+
</ul>
|
26
|
+
<%= link_to 'All Tags', noodall_admin_asset_tags_path(controller.action_name) %>
|
27
|
+
</div>
|
28
|
+
|
@@ -0,0 +1,54 @@
|
|
1
|
+
<%= render 'menu' %>
|
2
|
+
|
3
|
+
<%= form_for([:noodall, :admin, @asset], :html => { :multipart => true, :id => ( 'uploader' if @asset.new_record? ) } ) do |f| %>
|
4
|
+
<div id="main-form">
|
5
|
+
<%= f.error_messages %>
|
6
|
+
<%= hidden_field_tag :pending, true if params[:pending] || controller.action_name == "pending" %>
|
7
|
+
<p>
|
8
|
+
<span class="tooltip" title="Enter a title for this asset"> </span>
|
9
|
+
<%= f.label :title %><br/>
|
10
|
+
<span class="input-wrap"><%= f.text_field :title %></span>
|
11
|
+
</p>
|
12
|
+
<p>
|
13
|
+
<span class="tooltip" title="Enter a description for this asset"> </span>
|
14
|
+
<%= f.label :description %><br/>
|
15
|
+
<span class="input-wrap"><%= f.text_area :description %></span>
|
16
|
+
</p>
|
17
|
+
<% if @asset.video? -%>
|
18
|
+
<p>
|
19
|
+
<span class="tooltip" title="What part of the video do you want the thumbnail genreated from"> </span>
|
20
|
+
<%= f.label :video_thumbnail_offset, "Thumbnail Offset" %><br/>
|
21
|
+
<span class="input-wrap"><%= f.select :video_thumbnail_offset, 1..100 %>%</span>
|
22
|
+
</p>
|
23
|
+
<% end -%>
|
24
|
+
<p>
|
25
|
+
<span class="tooltip" title="Choose a file for this asset"> </span>
|
26
|
+
<%= f.label :file %><br/>
|
27
|
+
<span class="input-wrap"><%= f.file_field :file %></span>
|
28
|
+
</p>
|
29
|
+
<p>
|
30
|
+
<span class="tooltip" title="Enter some tags for this asset"> </span>
|
31
|
+
<%= f.label :tag_list, "Tags" %><br/>
|
32
|
+
<span class="input-wrap"><%= f.text_field :tag_list %></span>
|
33
|
+
</p>
|
34
|
+
|
35
|
+
<p class="fixed-form">
|
36
|
+
<%= f.submit @asset.new_record? ? 'Create' : 'Update', :disable_with => 'Submitting...', :class => 'update' %>
|
37
|
+
|
38
|
+
<%= link_to 'Delete', noodall_admin_asset_path(@asset, :pending => true), :confirm => 'Are you sure?', :method => :delete, :class => 'delete', :title => 'Delete this asset' if params[:pending] || controller.action_name == "pending" %>
|
39
|
+
<%= link_to 'Cancel', admin_assets_type_url(@asset), :class => 'cancel' %>
|
40
|
+
</p>
|
41
|
+
</div>
|
42
|
+
<% end %>
|
43
|
+
|
44
|
+
<% unless @asset.new_record? %>
|
45
|
+
<div id="sub-form">
|
46
|
+
<div id="image">
|
47
|
+
<% if @asset.image? or @asset.video? %>
|
48
|
+
<%= image_tag( @asset.url('260x', :jpg), :alt => @asset.description, :id => "asset-#{@asset.id}" ) %>
|
49
|
+
<% else -%>
|
50
|
+
<%= link_to( @asset.file.name, @asset.url, :title => @asset.description, :id => "asset-#{@asset.id}" ) %>
|
51
|
+
<% end -%>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
<% end -%>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<ul class="choices">
|
2
|
+
<%= content_tag :li, '<a>Done</a>'.html_safe, :class => 'action' if params[:mode] == 'multi' %>
|
3
|
+
<%= content_tag :li, '<a>Cancel</a>'.html_safe, :class => 'cancel' %>
|
4
|
+
<li class="upload"><%= link_to 'Upload', new_noodall_admin_asset_path(:readonly => readonly) %></li>
|
5
|
+
<%= content_tag :li, link_to( 'Images', noodall_admin_assets_path(:readonly => readonly) ), :class => 'images' if params[:allowed_types].blank? or params[:allowed_types].include?('images') %>
|
6
|
+
<%= content_tag :li, link_to( 'Documents', documents_noodall_admin_assets_path(:readonly => readonly) ), :class => 'documents' if params[:allowed_types].blank? or params[:allowed_types].include?('documents') %>
|
7
|
+
<%= content_tag :li, link_to( 'Videos', videos_noodall_admin_assets_path(:readonly => readonly) ), :class => 'videos' if params[:allowed_types].blank? or params[:allowed_types].include?('videos') %>
|
8
|
+
</ul>
|