locomotive_cms 0.0.2.5 → 0.0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/admin/asset_collections_controller.rb +1 -1
- data/app/controllers/admin/contents_controller.rb +1 -1
- data/app/controllers/admin/current_sites_controller.rb +2 -3
- data/app/controllers/admin/custom_fields_controller.rb +11 -5
- data/app/controllers/admin/layouts_controller.rb +2 -1
- data/app/controllers/admin/sites_controller.rb +0 -11
- data/app/controllers/admin/snippets_controller.rb +1 -1
- data/app/controllers/application_controller.rb +1 -1
- data/app/helpers/admin/custom_fields_helper.rb +14 -2
- data/app/helpers/admin/pages_helper.rb +10 -0
- data/app/models/asset_collection.rb +1 -1
- data/app/models/content_instance.rb +8 -0
- data/app/models/content_type.rb +25 -0
- data/app/models/page.rb +6 -2
- data/app/models/site.rb +3 -1
- data/app/views/admin/asset_collections/edit.html.haml +1 -1
- data/app/views/admin/assets/_form.html.haml +5 -6
- data/app/views/admin/content_types/_form.html.haml +6 -2
- data/app/views/admin/content_types/edit.html.haml +2 -2
- data/app/views/admin/contents/_form.html.haml +2 -17
- data/app/views/admin/contents/_list.html.haml +16 -0
- data/app/views/admin/contents/index.html.haml +6 -14
- data/app/views/admin/current_sites/_form.html.haml +6 -1
- data/app/views/admin/custom_fields/_custom_form.html.haml +18 -0
- data/app/views/admin/custom_fields/_edit_field.html.haml +3 -2
- data/app/views/admin/custom_fields/_index.html.haml +10 -6
- data/app/views/admin/custom_fields/edit_category.html.haml +1 -1
- data/app/views/admin/layouts/_form.html.haml +1 -1
- data/app/views/admin/pages/_form.html.haml +1 -4
- data/app/views/admin/shared/menu/_contents.html.haml +1 -1
- data/app/views/admin/sites/_form.html.haml +1 -1
- data/config/locales/admin_ui_en.yml +27 -5
- data/config/routes.rb +4 -4
- data/lib/locomotive.rb +2 -3
- data/lib/locomotive/liquid/drops/base.rb +2 -0
- data/lib/locomotive/liquid/drops/content.rb +1 -3
- data/lib/locomotive/liquid/drops/contents.rb +6 -1
- data/lib/locomotive/liquid/drops/page.rb +19 -0
- data/lib/locomotive/patches.rb +1 -2
- data/lib/locomotive/render.rb +9 -7
- data/lib/locomotive/routing/default_constraint.rb +3 -9
- data/lib/locomotive/routing/site_dispatcher.rb +8 -14
- data/public/javascripts/admin/application.js +13 -2
- data/public/javascripts/admin/asset_collections.js +1 -0
- data/public/javascripts/admin/assets.js +5 -0
- data/public/javascripts/admin/contents.js +7 -15
- data/public/javascripts/admin/custom_fields.js +18 -4
- data/public/javascripts/admin/custom_fields/category.js +13 -0
- data/public/javascripts/admin/plugins/tiny_mce/langs/en.js +170 -0
- data/public/javascripts/admin/plugins/tiny_mce/license.txt +504 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advhr/css/advhr.css +5 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advhr/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advhr/editor_plugin_src.js +57 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advhr/js/rule.js +43 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advhr/langs/en_dlg.js +5 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advhr/rule.htm +57 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/css/advimage.css +13 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/editor_plugin_src.js +50 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/image.htm +232 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/img/sample.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/js/image.js +443 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advimage/langs/en_dlg.js +43 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advlink/css/advlink.css +8 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advlink/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advlink/editor_plugin_src.js +61 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advlink/js/advlink.js +528 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advlink/langs/en_dlg.js +52 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advlink/link.htm +333 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advlist/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/advlist/editor_plugin_src.js +154 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/autoresize/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/autoresize/editor_plugin_src.js +119 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/autosave/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/autosave/editor_plugin_src.js +422 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/autosave/langs/en.js +4 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/bbcode/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/bbcode/editor_plugin_src.js +120 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/contextmenu/editor_plugin_src.js +147 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/directionality/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/directionality/editor_plugin_src.js +82 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/editor_plugin_src.js +43 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/emotions.htm +40 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/js/emotions.js +22 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/emotions/langs/en_dlg.js +20 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/example/dialog.htm +22 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/example/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/example/editor_plugin_src.js +84 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/example/img/example.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/example/js/dialog.js +19 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/example/langs/en.js +3 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/example/langs/en_dlg.js +3 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullpage/css/fullpage.css +182 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullpage/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullpage/editor_plugin_src.js +153 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullpage/fullpage.htm +571 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullpage/js/fullpage.js +471 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullpage/langs/en_dlg.js +85 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullscreen/editor_plugin_src.js +151 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/fullscreen/fullscreen.htm +109 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/iespell/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/iespell/editor_plugin_src.js +54 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +635 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/inlinepopups/template.htm +387 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +83 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/layer/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/layer/editor_plugin_src.js +212 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +136 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/css/content.css +6 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/css/media.css +16 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/editor_plugin_src.js +414 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/img/flash.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/img/flv_player.swf +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/img/quicktime.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/img/realmedia.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/img/shockwave.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/img/trans.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/img/windowsmedia.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/js/embed.js +73 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/js/media.js +630 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/langs/en_dlg.js +103 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/media/media.htm +817 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +53 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/noneditable/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/noneditable/editor_plugin_src.js +90 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/pagebreak/css/content.css +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/pagebreak/editor_plugin_src.js +77 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/pagebreak/img/pagebreak.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/pagebreak/img/trans.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/paste/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/paste/editor_plugin_src.js +940 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/paste/js/pastetext.js +36 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/paste/js/pasteword.js +51 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/paste/langs/en_dlg.js +5 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/paste/pastetext.htm +27 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/paste/pasteword.htm +21 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/preview/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/preview/editor_plugin_src.js +53 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/preview/example.html +28 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/preview/jscripts/embed.js +73 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/preview/preview.html +17 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/print/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/print/editor_plugin_src.js +34 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/save/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/save/editor_plugin_src.js +101 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/searchreplace/css/searchreplace.css +6 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/searchreplace/editor_plugin_src.js +57 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/searchreplace/js/searchreplace.js +130 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/searchreplace/langs/en_dlg.js +16 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/searchreplace/searchreplace.htm +99 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/spellchecker/css/content.css +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/spellchecker/editor_plugin_src.js +417 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/style/css/props.css +13 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/style/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/style/editor_plugin_src.js +55 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/style/js/props.js +641 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/style/langs/en_dlg.js +63 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/style/props.htm +723 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/tabfocus/editor_plugin_src.js +112 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/cell.htm +178 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/css/cell.css +17 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/css/row.css +25 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/css/table.css +13 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/editor_plugin_src.js +1125 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/js/cell.js +286 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/js/merge_cells.js +27 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/js/row.js +237 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/js/table.js +449 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/langs/en_dlg.js +74 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/merge_cells.htm +32 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/row.htm +155 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/table/table.htm +187 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/template/blank.htm +12 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/template/css/template.css +23 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/template/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/template/editor_plugin_src.js +159 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/template/js/template.js +106 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/template/langs/en_dlg.js +15 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/template/template.htm +31 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/visualchars/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/visualchars/editor_plugin_src.js +76 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/wordcount/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/wordcount/editor_plugin_src.js +98 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/abbr.htm +141 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/acronym.htm +141 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/attributes.htm +148 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/cite.htm +141 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/css/attributes.css +11 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/css/popup.css +9 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/del.htm +161 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +144 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/ins.htm +161 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/js/abbr.js +28 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/js/acronym.js +28 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/js/attributes.js +126 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/js/cite.js +28 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/js/del.js +63 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/js/element_common.js +231 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/js/ins.js +62 -0
- data/public/javascripts/admin/plugins/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +32 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/about.htm +54 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/anchor.htm +26 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/charmap.htm +52 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/color_picker.htm +73 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/editor_template.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/editor_template_src.js +1194 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/image.htm +80 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/js/about.js +72 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/js/anchor.js +37 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/js/charmap.js +335 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/js/color_picker.js +253 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/js/image.js +245 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/js/link.js +156 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/js/source_editor.js +62 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/langs/en.js +62 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/langs/en_dlg.js +51 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/link.htm +58 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/content.css +35 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/dialog.css +117 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/buttons.png +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/items.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/menu_arrow.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/menu_check.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/progress.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/img/tabs.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/skins/locomotive/ui.css +213 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/advanced/source_editor.htm +25 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/editor_template.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/editor_template_src.js +85 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/img/icons.gif +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/langs/en.js +11 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/skins/default/content.css +25 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/skins/default/ui.css +32 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/skins/o2k7/content.css +17 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
- data/public/javascripts/admin/plugins/tiny_mce/themes/simple/skins/o2k7/ui.css +35 -0
- data/public/javascripts/admin/plugins/tiny_mce/tiny_mce.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/tiny_mce_popup.js +5 -0
- data/public/javascripts/admin/plugins/tiny_mce/tiny_mce_src.js +13374 -0
- data/public/javascripts/admin/plugins/tiny_mce/tinymce.js +1 -0
- data/public/javascripts/admin/plugins/tiny_mce/utils/editable_selects.js +70 -0
- data/public/javascripts/admin/plugins/tiny_mce/utils/form_utils.js +200 -0
- data/public/javascripts/admin/plugins/tiny_mce/utils/mctabs.js +77 -0
- data/public/javascripts/admin/plugins/tiny_mce/utils/validate.js +220 -0
- data/public/stylesheets/admin/box.css +8 -0
- data/public/stylesheets/admin/formtastic_changes.css +15 -0
- data/public/stylesheets/admin/plugins/tiny_mce.css +105 -0
- data/spec/lib/locomotive/liquid/drops/contents_spec.rb +33 -0
- data/spec/lib/locomotive/liquid/drops/page_spec.rb +48 -0
- data/spec/lib/locomotive/render_spec.rb +12 -3
- data/vendor/plugins/custom_fields/Gemfile +1 -1
- data/vendor/plugins/custom_fields/lib/custom_fields.rb +3 -0
- data/vendor/plugins/custom_fields/lib/custom_fields/field.rb +9 -15
- data/vendor/plugins/custom_fields/lib/custom_fields/types/boolean.rb +29 -0
- data/vendor/plugins/custom_fields/lib/custom_fields/types/category.rb +15 -3
- data/vendor/plugins/custom_fields/lib/custom_fields/types/default.rb +21 -2
- data/vendor/plugins/custom_fields/lib/custom_fields/types/string.rb +13 -0
- data/vendor/plugins/custom_fields/lib/custom_fields/types/text.rb +15 -0
- data/vendor/plugins/custom_fields/spec/models/project.rb +2 -0
- data/vendor/plugins/custom_fields/spec/unit/types/boolean_spec.rb +81 -0
- data/vendor/plugins/custom_fields/spec/unit/types/category_spec.rb +15 -0
- metadata +251 -4
- data/lib/locomotive/devise/sessions_controller.rb +0 -2
@@ -21,11 +21,10 @@ module Admin
|
|
21
21
|
protected
|
22
22
|
|
23
23
|
def new_host_if_subdomain_changed
|
24
|
-
|
25
|
-
if request.host == host_from_site
|
24
|
+
if @site.domains.include?(request.host)
|
26
25
|
{}
|
27
26
|
else
|
28
|
-
{ :host => "#{
|
27
|
+
{ :host => "#{@site.subdomain}.#{Locomotive.config.default_domain}:#{request.port}" }
|
29
28
|
end
|
30
29
|
end
|
31
30
|
|
@@ -3,15 +3,15 @@ module Admin
|
|
3
3
|
|
4
4
|
layout false
|
5
5
|
|
6
|
-
before_filter :
|
6
|
+
before_filter :set_parent_and_fields
|
7
7
|
|
8
8
|
def edit
|
9
|
-
@field = @
|
9
|
+
@field = @fields.find(params[:id])
|
10
10
|
render :action => "edit_#{@field.kind.downcase}"
|
11
11
|
end
|
12
12
|
|
13
13
|
def update
|
14
|
-
@field = @
|
14
|
+
@field = @fields.find(params[:id])
|
15
15
|
@field.updated_at = Time.now # forces mongoid to save the object
|
16
16
|
|
17
17
|
params[:custom_field][:category_items_attributes].delete('-1')
|
@@ -25,8 +25,14 @@ module Admin
|
|
25
25
|
|
26
26
|
protected
|
27
27
|
|
28
|
-
def
|
29
|
-
|
28
|
+
def set_parent_and_fields
|
29
|
+
if params[:parent] == 'asset_collection'
|
30
|
+
@parent = current_site.asset_collections.where(:slug => params[:slug]).first
|
31
|
+
@fields = @parent.asset_custom_fields
|
32
|
+
else
|
33
|
+
@parent = current_site.content_types.where(:slug => params[:slug]).first
|
34
|
+
@fields = @parent.content_custom_fields
|
35
|
+
end
|
30
36
|
end
|
31
37
|
|
32
38
|
end
|
@@ -4,7 +4,7 @@ module Admin
|
|
4
4
|
sections 'settings'
|
5
5
|
|
6
6
|
def index
|
7
|
-
@layouts = current_site.layouts
|
7
|
+
@layouts = current_site.layouts.order_by([[:name, :asc]])
|
8
8
|
end
|
9
9
|
|
10
10
|
def new
|
@@ -22,6 +22,7 @@ module Admin
|
|
22
22
|
flash_success!
|
23
23
|
redirect_to edit_admin_layout_url(@layout)
|
24
24
|
else
|
25
|
+
logger.debug "===> #{@layout.errors.inspect}"
|
25
26
|
flash_error!
|
26
27
|
render :action => 'new'
|
27
28
|
end
|
@@ -32,17 +32,6 @@ module Admin
|
|
32
32
|
|
33
33
|
redirect_to edit_admin_my_account_url
|
34
34
|
end
|
35
|
-
|
36
|
-
protected
|
37
|
-
|
38
|
-
def new_host_if_subdomain_changed
|
39
|
-
host_from_site = "#{@site.subdomain}.#{Locomotive.config.default_domain}"
|
40
|
-
if request.host == host_from_site
|
41
|
-
{}
|
42
|
-
else
|
43
|
-
{ :host => "#{host_from_site}:#{request.port}" }
|
44
|
-
end
|
45
|
-
end
|
46
35
|
|
47
36
|
end
|
48
37
|
end
|
@@ -1,8 +1,7 @@
|
|
1
1
|
module Admin::CustomFieldsHelper
|
2
2
|
|
3
3
|
def options_for_field_kind(selected = nil)
|
4
|
-
|
5
|
-
options = %w{String Text Category}.map do |kind|
|
4
|
+
options = %w{String Text Category Boolean}.map do |kind|
|
6
5
|
[t("admin.custom_fields.kind.#{kind.downcase}"), kind]
|
7
6
|
end
|
8
7
|
end
|
@@ -21,4 +20,17 @@ module Admin::CustomFieldsHelper
|
|
21
20
|
collection.map { |field| [field.label, field._name] }
|
22
21
|
end
|
23
22
|
|
23
|
+
def options_for_group_by_field(content_type, collection_name)
|
24
|
+
custom_fields_collection_name = "ordered_#{collection_name.singularize}_custom_fields".to_sym
|
25
|
+
collection = content_type.send(custom_fields_collection_name)
|
26
|
+
collection.delete_if { |f| not f.category? }
|
27
|
+
collection.map { |field| [field.label, field._name] }
|
28
|
+
end
|
29
|
+
|
30
|
+
def options_for_text_formatting
|
31
|
+
options = %w{none html}.map do |option|
|
32
|
+
[t("admin.custom_fields.text_formatting.#{option}"), option]
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
24
36
|
end
|
@@ -20,4 +20,14 @@ module Admin::PagesHelper
|
|
20
20
|
list
|
21
21
|
end
|
22
22
|
|
23
|
+
def options_for_page_cache_expiration
|
24
|
+
[
|
25
|
+
[t('.expiration.never'), 0],
|
26
|
+
[t('.expiration.hour'), 1.hour],
|
27
|
+
[t('.expiration.day'), 1.day],
|
28
|
+
[t('.expiration.week'), 1.week],
|
29
|
+
[t('.expiration.month'), 1.month]
|
30
|
+
]
|
31
|
+
end
|
32
|
+
|
23
33
|
end
|
@@ -15,6 +15,9 @@ class ContentInstance
|
|
15
15
|
## associations ##
|
16
16
|
embedded_in :content_type, :inverse_of => :contents
|
17
17
|
|
18
|
+
## callbacks ##
|
19
|
+
before_create :add_to_list_bottom
|
20
|
+
|
18
21
|
## named scopes ##
|
19
22
|
named_scope :latest_updated, :order_by => [[:updated_at, :desc]], :limit => Locomotive.config.lastest_items_nb
|
20
23
|
|
@@ -26,6 +29,11 @@ class ContentInstance
|
|
26
29
|
|
27
30
|
protected
|
28
31
|
|
32
|
+
def add_to_list_bottom
|
33
|
+
Rails.logger.debug "add_to_list_bottom"
|
34
|
+
self._position_in_list = self.content_type.contents.size
|
35
|
+
end
|
36
|
+
|
29
37
|
def require_highlighted_field
|
30
38
|
_alias = self.content_type.highlighted_field._alias.to_sym
|
31
39
|
if self.send(_alias).blank?
|
data/app/models/content_type.rb
CHANGED
@@ -8,6 +8,7 @@ class ContentType
|
|
8
8
|
field :slug
|
9
9
|
field :order_by
|
10
10
|
field :highlighted_field_name
|
11
|
+
field :group_by_field_name
|
11
12
|
field :api_enabled, :type => Boolean, :default => false
|
12
13
|
|
13
14
|
## associations ##
|
@@ -28,6 +29,26 @@ class ContentType
|
|
28
29
|
|
29
30
|
## methods ##
|
30
31
|
|
32
|
+
def groupable?
|
33
|
+
self.group_by_field && group_by_field.category?
|
34
|
+
end
|
35
|
+
|
36
|
+
def list_or_group_contents
|
37
|
+
if self.groupable?
|
38
|
+
groups = self.contents.klass.send(:"group_by_#{self.group_by_field._alias}", :ordered_contents)
|
39
|
+
|
40
|
+
# look for items with no category or unknown ones
|
41
|
+
items_without_category = self.contents.find_all { |c| !self.group_by_field.category_ids.include?(c.send(self.group_by_field_name)) }
|
42
|
+
if not items_without_category.empty?
|
43
|
+
groups << { :name => nil, :items => items_without_category }
|
44
|
+
else
|
45
|
+
groups
|
46
|
+
end
|
47
|
+
else
|
48
|
+
self.ordered_contents
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
31
52
|
def ordered_contents(conditions = {})
|
32
53
|
column = self.order_by.to_sym
|
33
54
|
|
@@ -49,6 +70,10 @@ class ContentType
|
|
49
70
|
self.content_custom_fields.detect { |f| f._name == self.highlighted_field_name }
|
50
71
|
end
|
51
72
|
|
73
|
+
def group_by_field
|
74
|
+
@group_by_field ||= self.content_custom_fields.detect { |f| f._name == self.group_by_field_name }
|
75
|
+
end
|
76
|
+
|
52
77
|
protected
|
53
78
|
|
54
79
|
def set_default_values
|
data/app/models/page.rb
CHANGED
@@ -12,8 +12,7 @@ class Page
|
|
12
12
|
field :slug
|
13
13
|
field :fullpath
|
14
14
|
field :published, :type => Boolean, :default => false
|
15
|
-
field :
|
16
|
-
field :description
|
15
|
+
field :cache_expires_in, :type => Integer, :default => 0
|
17
16
|
|
18
17
|
## associations ##
|
19
18
|
belongs_to_related :site
|
@@ -36,6 +35,7 @@ class Page
|
|
36
35
|
named_scope :not_found, :where => { :slug => '404', :depth => 0, :published => true }
|
37
36
|
|
38
37
|
## behaviours ##
|
38
|
+
# liquid_methods :title, :fullpath
|
39
39
|
liquify_template :joined_parts
|
40
40
|
|
41
41
|
## methods ##
|
@@ -65,6 +65,10 @@ class Page
|
|
65
65
|
def url
|
66
66
|
"http://#{self.site.domains.first}/#{self.fullpath}.html"
|
67
67
|
end
|
68
|
+
|
69
|
+
def to_liquid(options = {})
|
70
|
+
Locomotive::Liquid::Drops::Page.new(self)
|
71
|
+
end
|
68
72
|
|
69
73
|
protected
|
70
74
|
|
data/app/models/site.rb
CHANGED
@@ -6,6 +6,8 @@ class Site
|
|
6
6
|
field :name
|
7
7
|
field :subdomain
|
8
8
|
field :domains, :type => Array, :default => []
|
9
|
+
field :meta_keywords
|
10
|
+
field :meta_description
|
9
11
|
|
10
12
|
## associations ##
|
11
13
|
has_many_related :pages
|
@@ -33,7 +35,7 @@ class Site
|
|
33
35
|
named_scope :match_domain_with_exclusion_of, lambda { |domain, site| { :where => { :domains => domain, :_id.ne => site.id } } }
|
34
36
|
|
35
37
|
## behaviours ##
|
36
|
-
liquid_methods :name
|
38
|
+
liquid_methods :name, :meta_keywords, :meta_description
|
37
39
|
|
38
40
|
## methods ##
|
39
41
|
|
@@ -26,7 +26,7 @@
|
|
26
26
|
= f.input :name
|
27
27
|
= f.input :slug, :required => false
|
28
28
|
|
29
|
-
= render 'admin/custom_fields/index', :
|
29
|
+
= render 'admin/custom_fields/index', :form => f, :collection_name => 'assets'
|
30
30
|
|
31
31
|
= render 'admin/shared/form_actions', :delete_button => link_to(content_tag(:span, t('.destroy')), admin_asset_collection_url(@collection), :confirm => t('admin.messages.confirm'), :method => :delete, :class => 'button small remove'), :button_label => :update
|
32
32
|
|
@@ -1,14 +1,13 @@
|
|
1
|
+
- content_for :head do
|
2
|
+
= javascript_include_tag 'admin/plugins/tiny_mce/tinymce', 'admin/plugins/json2', 'admin/plugins/fancybox', 'admin/custom_fields/category', 'admin/assets'
|
3
|
+
= stylesheet_link_tag 'admin/plugins/fancybox', 'admin/box'
|
4
|
+
|
1
5
|
= f.inputs :name => :information do
|
2
6
|
= f.input :name
|
3
7
|
= f.input :source
|
4
8
|
|
5
9
|
- unless @asset.custom_fields.empty?
|
6
|
-
= f
|
7
|
-
- @asset.custom_fields.each do |field|
|
8
|
-
- if field.string?
|
9
|
-
= f.input field._alias.to_sym, :label => field.label
|
10
|
-
- elsif field.text?
|
11
|
-
= f.input field._alias.to_sym, :label => field.label, :as => :text
|
10
|
+
= render 'admin/custom_fields/custom_form', :form => f, :title => :other_fields, :parent => @collection
|
12
11
|
|
13
12
|
- if @asset.image? && @asset.valid?
|
14
13
|
= f.foldable_inputs :name => "#{t('formtastic.titles.preview')} #{image_dimensions_and_size(@asset)}", :class => 'preview' do
|
@@ -7,12 +7,16 @@
|
|
7
7
|
= f.input :slug
|
8
8
|
= f.input :description
|
9
9
|
|
10
|
-
= render 'admin/custom_fields/index', :
|
10
|
+
= render 'admin/custom_fields/index', :form => f, :collection_name => 'contents'
|
11
11
|
|
12
12
|
- unless f.object.new_record?
|
13
|
-
= f.foldable_inputs :name => :
|
13
|
+
= f.foldable_inputs :name => :presentation, :class => 'switchable' do
|
14
14
|
= f.input :highlighted_field_name, :as => :select, :collection => options_for_highlighted_field(f.object, 'contents'), :include_blank => false
|
15
|
+
= f.input :group_by_field_name, :as => :select, :collection => options_for_group_by_field(f.object, 'contents')
|
16
|
+
|
17
|
+
= f.foldable_inputs :name => :options, :class => 'switchable' do
|
15
18
|
= f.input :order_by, :as => :select, :collection => options_for_order_by(f.object, 'contents'), :include_blank => false
|
16
19
|
= f.custom_input :api_enabled, :css => 'toggle' do
|
17
20
|
= f.check_box :api_enabled
|
21
|
+
|
18
22
|
|
@@ -9,9 +9,9 @@
|
|
9
9
|
|
10
10
|
%p= t('.help')
|
11
11
|
|
12
|
-
= semantic_form_for @content_type, :url => admin_content_type_url(@content_type) do |
|
12
|
+
= semantic_form_for @content_type, :url => admin_content_type_url(@content_type) do |f|
|
13
13
|
|
14
|
-
= render 'form', :f =>
|
14
|
+
= render 'form', :f => f
|
15
15
|
|
16
16
|
= render 'admin/shared/form_actions', :back_url => admin_contents_url(@content_type.slug), :button_label => :update
|
17
17
|
|
@@ -1,20 +1,5 @@
|
|
1
1
|
- content_for :head do
|
2
|
-
= javascript_include_tag 'admin/plugins/json2', 'admin/plugins/fancybox', 'admin/custom_fields/category', 'admin/contents'
|
2
|
+
= javascript_include_tag 'admin/plugins/tiny_mce/tinymce', 'admin/plugins/json2', 'admin/plugins/fancybox', 'admin/custom_fields/category', 'admin/contents'
|
3
3
|
= stylesheet_link_tag 'admin/plugins/fancybox', 'admin/box'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
= f.inputs :name => :other_fields do
|
8
|
-
- @content.custom_fields.each do |field|
|
9
|
-
- required = highlighted_field_name == field._name
|
10
|
-
|
11
|
-
- if field.string?
|
12
|
-
= f.input field._alias.to_sym, :label => field.label, :hint => field.hint, :required => required
|
13
|
-
- elsif field.text?
|
14
|
-
= f.input field._alias.to_sym, :label => field.label, :hint => field.hint, :as => :text, :required => required
|
15
|
-
- elsif field.category?
|
16
|
-
= f.custom_input field._alias.to_sym, :label => field.label, :hint => field.hint, :css => 'toggle' do
|
17
|
-
= f.select field._name.to_sym, field.ordered_category_items.collect { |item| [item.name, item.id] }
|
18
|
-
%button.button.light.edit-categories-link{ :type => 'button', :'data-url' => edit_admin_custom_field_path(@content_type.slug, field) }
|
19
|
-
%span= t('.edit_categories')
|
20
|
-
|
5
|
+
= render 'admin/custom_fields/custom_form', :form => f, :title => :attributes, :parent => @content_type
|
@@ -0,0 +1,16 @@
|
|
1
|
+
- if contents.empty?
|
2
|
+
%p.no-items= t('.no_items', :url => new_admin_content_url(@content_type.slug))
|
3
|
+
- else
|
4
|
+
- puts contents.inspect
|
5
|
+
%ul{ :id => 'contents-list', :class => "list #{'sortable' if @content_type.order_by == '_position_in_list'}" }
|
6
|
+
- contents.each do |content|
|
7
|
+
%li.content{ :id => "content-#{content._id}" }
|
8
|
+
%em
|
9
|
+
%strong
|
10
|
+
= link_to content.send(@content_type.highlighted_field_name), edit_admin_content_path(@content_type.slug, content)
|
11
|
+
.more
|
12
|
+
%span
|
13
|
+
= t('admin.contents.index.updated_at')
|
14
|
+
= l content.updated_at, :format => :short rescue 'n/a'
|
15
|
+
|
16
|
+
= link_to image_tag('admin/list/icons/trash.png'), admin_content_path(@content_type.slug, content), :class => 'remove', :confirm => t('admin.messages.confirm'), :method => :delete
|
@@ -13,21 +13,13 @@
|
|
13
13
|
- if @content_type.description.present?
|
14
14
|
%p= @content_type.description
|
15
15
|
|
16
|
-
- if @
|
17
|
-
|
16
|
+
- if @content_type.groupable?
|
17
|
+
- @contents.each do |group|
|
18
|
+
%h3= group[:name] || t('.category_noname')
|
19
|
+
= render 'list', :contents => group[:items]
|
20
|
+
%br
|
18
21
|
- else
|
19
|
-
|
20
|
-
- @contents.each do |content|
|
21
|
-
%li.content{ :id => "content-#{content._id}" }
|
22
|
-
%em
|
23
|
-
%strong
|
24
|
-
= link_to content.send(@content_type.highlighted_field_name), edit_admin_content_path(@content_type.slug, content)
|
25
|
-
.more
|
26
|
-
%span
|
27
|
-
= t('admin.contents.index.updated_at')
|
28
|
-
= l content.updated_at, :format => :short rescue 'n/a'
|
29
|
-
|
30
|
-
= link_to image_tag('admin/list/icons/trash.png'), admin_content_path(@content_type.slug, content), :class => 'remove', :confirm => t('admin.messages.confirm'), :method => :delete
|
22
|
+
= render 'list', :contents => @contents
|
31
23
|
|
32
24
|
= form_tag sort_admin_contents_path(@content_type.slug), :method => :put, :class => 'formtastic' do
|
33
25
|
= hidden_field_tag :order
|
@@ -3,6 +3,11 @@
|
|
3
3
|
|
4
4
|
= f.foldable_inputs :name => :information, :style => "#{'display: none' unless @site.new_record?}" do
|
5
5
|
= f.input :name, :required => false
|
6
|
+
|
7
|
+
= f.foldable_inputs :name => :meta do
|
8
|
+
|
9
|
+
= f.input :meta_keywords
|
10
|
+
= f.input :meta_description
|
6
11
|
|
7
12
|
= f.foldable_inputs :name => :access_points, :class => 'editable-list off' do
|
8
13
|
|
@@ -42,4 +47,4 @@
|
|
42
47
|
%em= account.email
|
43
48
|
- if account != current_admin
|
44
49
|
%span.actions
|
45
|
-
= link_to image_tag('admin/form/icons/trash.png'), admin_membership_url(membership), :class => 'remove first', :confirm => t('admin.messages.confirm'), :method => :delete
|
50
|
+
= link_to image_tag('admin/form/icons/trash.png'), admin_membership_url(membership), :class => 'remove first', :confirm => t('admin.messages.confirm'), :method => :delete
|
@@ -0,0 +1,18 @@
|
|
1
|
+
- highlighted_field_name = parent.highlighted_field_name rescue ''
|
2
|
+
|
3
|
+
= form.inputs :name => title || :attributes do
|
4
|
+
- form.object.custom_fields.each do |field|
|
5
|
+
- required = highlighted_field_name == field._name
|
6
|
+
|
7
|
+
- if field.string?
|
8
|
+
= form.input field._alias.to_sym, :label => field.label, :hint => field.hint, :required => required
|
9
|
+
- elsif field.text?
|
10
|
+
= form.input field._alias.to_sym, :label => field.label, :hint => field.hint, :as => :text, :required => required, :input_html => { :class => field.text_formatting }
|
11
|
+
- elsif field.category?
|
12
|
+
= form.custom_input field._alias.to_sym, :label => field.label, :hint => field.hint, :css => 'toggle' do
|
13
|
+
= form.select field._name.to_sym, field.ordered_category_items.collect { |item| [item.name, item.id] }
|
14
|
+
%button.button.light.edit-categories-link{ :type => 'button', :'data-url' => edit_admin_custom_field_path(parent.model_name.underscore, parent.slug, field) }
|
15
|
+
%span= t('.edit_categories')
|
16
|
+
- elsif field.boolean?
|
17
|
+
= form.custom_input field._alias.to_sym, :label => field.label, :hint => field.hint, :css => 'toggle' do
|
18
|
+
= form.check_box field._alias.to_sym
|