refinerycms-core 2.1.5 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/refinery/add.png +0 -0
- data/app/assets/images/refinery/admin_bg.png +0 -0
- data/app/assets/images/refinery/ajax-loader.gif +0 -0
- data/app/assets/images/refinery/branch-end.gif +0 -0
- data/app/assets/images/refinery/branch.gif +0 -0
- data/app/assets/images/refinery/cross.png +0 -0
- data/app/assets/images/refinery/dialogLoadingAnimation.gif +0 -0
- data/app/assets/images/refinery/header_background.png +0 -0
- data/app/assets/images/refinery/hover-gradient.jpg +0 -0
- data/app/assets/images/refinery/icons/accept.png +0 -0
- data/app/assets/images/refinery/icons/add.png +0 -0
- data/app/assets/images/refinery/icons/ajax-loader.gif +0 -0
- data/app/assets/images/refinery/icons/application_edit.png +0 -0
- data/app/assets/images/refinery/icons/application_go.png +0 -0
- data/app/assets/images/refinery/icons/arrow_left.png +0 -0
- data/app/assets/images/refinery/icons/arrow_left_right.png +0 -0
- data/app/assets/images/refinery/icons/arrow_switch.png +0 -0
- data/app/assets/images/refinery/icons/arrow_up.png +0 -0
- data/app/assets/images/refinery/icons/arrow_up_down.png +0 -0
- data/app/assets/images/refinery/icons/bin.png +0 -0
- data/app/assets/images/refinery/icons/bin_closed.png +0 -0
- data/app/assets/images/refinery/icons/cancel.png +0 -0
- data/app/assets/images/refinery/icons/cog_add.png +0 -0
- data/app/assets/images/refinery/icons/cog_edit.png +0 -0
- data/app/assets/images/refinery/icons/cross.png +0 -0
- data/app/assets/images/refinery/icons/delete.png +0 -0
- data/app/assets/images/refinery/icons/doc.png +0 -0
- data/app/assets/images/refinery/icons/down.gif +0 -0
- data/app/assets/images/refinery/icons/edit.png +0 -0
- data/app/assets/images/refinery/icons/email.png +0 -0
- data/app/assets/images/refinery/icons/email_edit.png +0 -0
- data/app/assets/images/refinery/icons/email_go.png +0 -0
- data/app/assets/images/refinery/icons/email_open.png +0 -0
- data/app/assets/images/refinery/icons/eye.png +0 -0
- data/app/assets/images/refinery/icons/folder.png +0 -0
- data/app/assets/images/refinery/icons/folder_open.png +0 -0
- data/app/assets/images/refinery/icons/folder_page_white.png +0 -0
- data/app/assets/images/refinery/icons/image_add.png +0 -0
- data/app/assets/images/refinery/icons/image_edit.png +0 -0
- data/app/assets/images/refinery/icons/img.png +0 -0
- data/app/assets/images/refinery/icons/information.png +0 -0
- data/app/assets/images/refinery/icons/layout_add.png +0 -0
- data/app/assets/images/refinery/icons/layout_edit.png +0 -0
- data/app/assets/images/refinery/icons/locale-blue.svg +15 -0
- data/app/assets/images/refinery/icons/locale.svg +11 -0
- data/app/assets/images/refinery/icons/music.png +0 -0
- data/app/assets/images/refinery/icons/page.png +0 -0
- data/app/assets/images/refinery/icons/page_add.png +0 -0
- data/app/assets/images/refinery/icons/page_edit.png +0 -0
- data/app/assets/images/refinery/icons/page_white_edit.png +0 -0
- data/app/assets/images/refinery/icons/page_white_gear.png +0 -0
- data/app/assets/images/refinery/icons/page_white_put.png +0 -0
- data/app/assets/images/refinery/icons/pdf.png +0 -0
- data/app/assets/images/refinery/icons/ppt.png +0 -0
- data/app/assets/images/refinery/icons/star.png +0 -0
- data/app/assets/images/refinery/icons/tick.png +0 -0
- data/app/assets/images/refinery/icons/up.gif +0 -0
- data/app/assets/images/refinery/icons/user_add.png +0 -0
- data/app/assets/images/refinery/icons/user_comment.png +0 -0
- data/app/assets/images/refinery/icons/user_edit.png +0 -0
- data/app/assets/images/refinery/icons/xls.png +0 -0
- data/app/assets/images/refinery/icons/zip.png +0 -0
- data/app/assets/images/refinery/icons/zoom.png +0 -0
- data/app/assets/images/refinery/logo-large.png +0 -0
- data/app/assets/images/refinery/logo-medium.png +0 -0
- data/app/assets/images/refinery/logo-site-bar.png +0 -0
- data/app/assets/images/refinery/logo-small-medium.png +0 -0
- data/app/assets/images/refinery/logo-small.png +0 -0
- data/app/assets/images/refinery/logo-tiny.png +0 -0
- data/app/assets/images/refinery/logo.png +0 -0
- data/app/assets/images/refinery/nav-3-background.gif +0 -0
- data/app/assets/images/refinery/nav_inactive_background.png +0 -0
- data/app/assets/images/refinery/orange_button.png +0 -0
- data/app/assets/images/refinery/page_bg.png +0 -0
- data/app/assets/images/refinery/text_field_background.png +0 -0
- data/app/assets/images/refinery/tooltip-nib.gif +0 -0
- data/app/assets/images/refinery/tooltip-nib.png +0 -0
- data/app/assets/javascripts/admin.js +7 -6
- data/app/assets/javascripts/refinery/admin.js.erb +99 -60
- data/app/assets/javascripts/refinery/ajaxy_pagination.js.coffee +2 -5
- data/app/assets/javascripts/refinery/application.js +8 -0
- data/app/assets/javascripts/refinery/core.js +4 -18
- data/app/assets/javascripts/refinery/interface.js.coffee.erb +5 -29
- data/app/assets/javascripts/refinery/modal_dialogs.js.erb +0 -105
- data/app/assets/javascripts/refinery/nestedsortables.js +183 -110
- data/app/assets/javascripts/refinery/refinery.js.erb +3 -9
- data/app/assets/javascripts/refinery/serializelist.js +1 -1
- data/app/assets/javascripts/refinery/site_bar.js +0 -5
- data/app/assets/javascripts/refinery/sortable_list.js +10 -11
- data/app/assets/javascripts/refinery/submit_continue.js.coffee.erb +1 -1
- data/app/assets/stylesheets/application.scss +2 -0
- data/app/assets/stylesheets/refinery/_colours.scss +18 -0
- data/app/assets/stylesheets/refinery/_icons.scss +85 -0
- data/app/assets/stylesheets/refinery/{layout.css.scss → _layout.scss} +306 -338
- data/app/assets/stylesheets/refinery/_mixins.scss +84 -0
- data/app/assets/stylesheets/refinery/{submenu.css.scss → _submenu.scss} +2 -2
- data/app/assets/stylesheets/refinery/{tooltips.css.scss → _tooltips.scss} +0 -0
- data/app/assets/stylesheets/refinery/_ui.scss +252 -0
- data/app/assets/stylesheets/refinery/{formatting.css.scss → formatting.scss} +0 -0
- data/app/assets/stylesheets/refinery/refinery.scss +10 -0
- data/app/assets/stylesheets/refinery/site_bar.scss +126 -0
- data/app/assets/stylesheets/refinery/{theme.css.scss → theme.scss} +0 -0
- data/app/controllers/refinery/admin/core_controller.rb +2 -7
- data/app/controllers/refinery/admin/dialogs_controller.rb +4 -3
- data/app/controllers/refinery/admin_controller.rb +0 -1
- data/app/controllers/refinery/fast_controller.rb +0 -4
- data/app/helpers/refinery/admin/visual_editor_helper.rb +13 -0
- data/app/helpers/refinery/admin_helper.rb +4 -0
- data/app/helpers/refinery/custom_assets_helper.rb +2 -2
- data/app/helpers/refinery/image_helper.rb +9 -8
- data/app/helpers/refinery/meta_helper.rb +1 -1
- data/app/helpers/refinery/site_bar_helper.rb +16 -2
- data/app/helpers/refinery/tag_helper.rb +38 -5
- data/app/models/refinery/core/base_model.rb +3 -1
- data/app/views/layouts/refinery/admin.html.erb +12 -10
- data/app/views/layouts/refinery/admin_dialog.html.erb +1 -4
- data/app/views/refinery/_content_page.html.erb +1 -1
- data/app/views/refinery/_google_analytics.html.erb +8 -9
- data/app/views/refinery/_head.html.erb +1 -1
- data/app/views/refinery/_javascripts.html.erb +0 -15
- data/app/views/refinery/_message.html.erb +1 -1
- data/app/views/refinery/_site_bar.html.erb +9 -6
- data/app/views/refinery/admin/_error_messages.html.erb +4 -4
- data/app/views/refinery/admin/_form_actions.html.erb +1 -0
- data/app/views/refinery/admin/_form_advanced_options_menu.html.erb +3 -4
- data/app/views/refinery/admin/_head.html.erb +3 -0
- data/app/views/refinery/admin/_image_picker.html.erb +4 -5
- data/app/views/refinery/admin/_javascripts.html.erb +4 -9
- data/app/views/refinery/admin/_locale_picker.html.erb +9 -2
- data/app/views/refinery/admin/_make_sortable.html.erb +8 -6
- data/app/views/refinery/admin/_menu.html.erb +2 -15
- data/app/views/refinery/admin/_menu_item.html.erb +3 -0
- data/app/views/refinery/admin/_resource_picker.html.erb +12 -22
- data/app/views/refinery/admin/_search.html.erb +1 -1
- data/app/views/refinery/admin/_tabbed_fields.html.erb +2 -2
- data/app/views/refinery/admin/_wysiwyg.html.erb +1 -1
- data/{lib/generators/refinery/cms/templates/app/decorators/controllers/refinery/.gitkeep → app/views/refinery/admin/dialog_success.html.erb} +0 -0
- data/app/views/refinery/admin/dialogs/show.html.erb +1 -19
- data/config/initializers/assets.rb +6 -0
- data/config/locales/ca.yml +84 -0
- data/config/locales/cs.yml +12 -5
- data/config/locales/en.yml +6 -2
- data/config/locales/fr.yml +15 -11
- data/config/locales/hu.yml +3 -1
- data/config/locales/it.yml +5 -1
- data/config/locales/ja.yml +2 -2
- data/config/locales/pt.yml +5 -3
- data/config/locales/ru.yml +7 -0
- data/config/locales/sl.yml +0 -3
- data/config/locales/tr.yml +43 -41
- data/config/routes.rb +1 -4
- data/lib/generators/refinery/cms/cms_generator.rb +68 -26
- data/lib/generators/refinery/cms/templates/app/decorators/{models/refinery/.gitkeep → controllers/refinery/.keep} +0 -0
- data/lib/generators/refinery/{form/templates/.gitkeep → cms/templates/app/decorators/models/refinery/.keep} +0 -0
- data/lib/generators/refinery/cms/templates/config/database.yml.mysql +3 -3
- data/lib/generators/refinery/cms/templates/config/database.yml.postgresql +3 -3
- data/lib/generators/refinery/core/templates/config/initializers/refinery/core.rb.erb +18 -5
- data/lib/generators/refinery/dummy/dummy_generator.rb +3 -1
- data/lib/generators/refinery/dummy/templates/rails/application.js +3 -0
- data/lib/generators/refinery/dummy/templates/rails/application.rb.erb +0 -2
- data/lib/generators/refinery/dummy/templates/rails/blank.png +0 -0
- data/lib/generators/refinery/dummy/templates/rails/routes.rb +1 -1
- data/lib/generators/refinery/engine/engine_generator.rb +3 -2
- data/lib/generators/refinery/engine/templates/Gemfile +9 -4
- data/lib/generators/refinery/engine/templates/Rakefile +3 -4
- data/lib/generators/refinery/engine/templates/app/controllers/refinery/namespace/admin/plural_name_controller.rb.erb +11 -2
- data/lib/generators/refinery/engine/templates/app/controllers/refinery/namespace/plural_name_controller.rb.erb +2 -2
- data/lib/generators/refinery/engine/templates/app/models/refinery/namespace/singular_name.rb.erb +5 -5
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_actions.html.erb +7 -12
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_form.html.erb +8 -8
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_records.html.erb +3 -3
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_singular_name.html.erb +6 -11
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/index.html.erb +1 -1
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/plural_name/show.html.erb +4 -4
- data/lib/generators/refinery/engine/templates/db/migrate/1_create_namespace_plural_name.rb.erb +2 -9
- data/lib/generators/refinery/engine/templates/db/seeds.rb.erb +13 -19
- data/lib/generators/refinery/engine/templates/lib/refinery/plural_name/engine.rb.erb +0 -4
- data/lib/generators/refinery/engine/templates/readme.md +3 -3
- data/lib/generators/refinery/engine/templates/refinerycms-extension_plural_name.gemspec +1 -0
- data/lib/generators/refinery/engine/templates/spec/features/refinery/namespace/admin/plural_name_spec.rb.erb +25 -28
- data/lib/generators/refinery/engine/templates/spec/models/refinery/namespace/singular_name_spec.rb.erb +1 -1
- data/lib/generators/refinery/engine/templates/spec/spec_helper.rb +1 -1
- data/lib/refinery.rb +7 -9
- data/lib/refinery/admin/base_controller.rb +42 -32
- data/lib/refinery/application_controller.rb +25 -17
- data/lib/refinery/cli.rb +54 -19
- data/lib/refinery/core.rb +5 -0
- data/lib/refinery/core/authorisation_adapter.rb +11 -0
- data/lib/refinery/core/authorisation_manager.rb +14 -0
- data/lib/refinery/core/configuration.rb +25 -4
- data/lib/refinery/core/default_route.rb +16 -0
- data/lib/refinery/core/engine.rb +44 -25
- data/lib/refinery/core/nil_user.rb +42 -0
- data/lib/refinery/crud.rb +40 -29
- data/lib/refinery/extension_generation.rb +11 -22
- data/lib/refinery/generators/generated_attribute.rb +54 -0
- data/lib/refinery/generators/named_base.rb +16 -0
- data/lib/refinery/menu.rb +3 -2
- data/lib/refinery/menu_item.rb +1 -1
- data/lib/refinery/plugin.rb +27 -43
- data/lib/refinery/plugins.rb +22 -26
- data/lib/refinery/users_manager.rb +8 -0
- data/lib/refinery/version.rb +7 -3
- data/lib/tasks/refinery.rake +7 -0
- data/license.md +1 -1
- data/refinerycms-core.gemspec +11 -8
- data/spec/controllers/refinery/admin/dummy_controller_spec.rb +23 -11
- data/spec/controllers/refinery/sitemap_controller_spec.rb +2 -2
- data/spec/features/refinery/admin/custom_assets_spec.rb +12 -10
- data/spec/features/refinery/admin/dialogs_spec.rb +5 -5
- data/spec/features/refinery/admin/xhr_paging_spec.rb +24 -38
- data/spec/features/refinery/application_layout_spec.rb +3 -3
- data/spec/features/refinery/core_spec.rb +1 -1
- data/spec/features/refinery/site_bar_spec.rb +44 -23
- data/spec/helpers/refinery/admin_helper_spec.rb +15 -0
- data/spec/helpers/refinery/custom_assets_helper_spec.rb +15 -23
- data/spec/helpers/refinery/html_truncation_helper_spec.rb +10 -5
- data/spec/helpers/refinery/meta_helper_spec.rb +3 -3
- data/spec/helpers/refinery/pagination_helper_spec.rb +7 -7
- data/spec/helpers/refinery/tag_helper_spec.rb +4 -4
- data/spec/helpers/refinery/translation_helper_spec.rb +3 -3
- data/spec/lib/generators/refinery/cms/cms_generator_spec.rb +30 -25
- data/spec/lib/generators/refinery/core/core_generator_spec.rb +1 -1
- data/spec/lib/generators/refinery/engine/engine_generator_multiple_resources_spec.rb +7 -8
- data/spec/lib/generators/refinery/engine/engine_generator_sanity_check_spec.rb +15 -15
- data/spec/lib/generators/refinery/engine/engine_generator_spec.rb +9 -9
- data/spec/lib/generators/refinery/engine/engine_generator_with_i18n_spec.rb +1 -1
- data/spec/lib/generators/refinery/engine/engine_generator_without_frontend_spec.rb +1 -1
- data/spec/lib/refinery/application_controller_spec.rb +16 -16
- data/spec/lib/refinery/authorisation_manager_spec.rb +10 -0
- data/spec/lib/refinery/cli_spec.rb +83 -21
- data/spec/lib/refinery/core/configuration_spec.rb +5 -5
- data/spec/lib/refinery/core/nil_user_spec.rb +39 -0
- data/spec/lib/refinery/core_spec.rb +39 -30
- data/spec/lib/refinery/crud_spec.rb +70 -59
- data/spec/lib/refinery/menu_spec.rb +4 -4
- data/spec/lib/refinery/plugin_spec.rb +56 -45
- data/spec/lib/refinery/plugins_spec.rb +39 -87
- data/spec/lib/refinery/users_manager_spec.rb +9 -0
- data/spec/support/refinery.rb +3 -8
- data/vendor/assets/fonts/font-awesome/FontAwesome.otf +0 -0
- data/vendor/assets/fonts/font-awesome/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/font-awesome/fontawesome-webfont.svg +565 -0
- data/vendor/assets/fonts/font-awesome/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/font-awesome/fontawesome-webfont.woff +0 -0
- data/vendor/assets/fonts/font-awesome/fontawesome-webfont.woff2 +0 -0
- data/vendor/assets/stylesheets/_font-awesome-compass.scss +5 -0
- data/vendor/assets/stylesheets/_font-awesome-sprockets.scss +5 -0
- data/vendor/assets/stylesheets/_font-awesome.scss +17 -0
- data/vendor/assets/stylesheets/font-awesome/_animated.scss +34 -0
- data/vendor/assets/stylesheets/font-awesome/_bordered-pulled.scss +16 -0
- data/vendor/assets/stylesheets/font-awesome/_core.scss +12 -0
- data/vendor/assets/stylesheets/font-awesome/_extras.scss +44 -0
- data/vendor/assets/stylesheets/font-awesome/_fixed-width.scss +6 -0
- data/vendor/assets/stylesheets/font-awesome/_icons.scss +596 -0
- data/vendor/assets/stylesheets/font-awesome/_larger.scss +13 -0
- data/vendor/assets/stylesheets/font-awesome/_list.scss +19 -0
- data/vendor/assets/stylesheets/font-awesome/_mixins.scss +26 -0
- data/vendor/assets/stylesheets/font-awesome/_path.scss +14 -0
- data/vendor/assets/stylesheets/font-awesome/_rotated-flipped.scss +20 -0
- data/vendor/assets/stylesheets/font-awesome/_stacked.scss +20 -0
- data/vendor/assets/stylesheets/font-awesome/_variables.scss +606 -0
- metadata +144 -441
- data/app/assets/images/refinery/carousel-left.png +0 -0
- data/app/assets/images/refinery/carousel-right.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/arrow_redo.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/arrow_undo.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/eye.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/article.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/aside.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/blockquote.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/command.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/details.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/figcaption.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/figure.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/footer.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/h1.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/h2.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/h3.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/h4.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/h5.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/h6.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/header.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/hgroup.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/mark.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/meter.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/nav.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/p.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/pre.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/progress.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/readme.md +0 -1
- data/app/assets/images/wymeditor/skins/refinery/html5/rp.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/rt.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/ruby.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/section.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/summary.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/time.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-blockquote.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h1.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h2.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h3.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h4.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h5.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h6.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-p.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-pre.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/link_add.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/link_break.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/page_code.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/page_paste.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/photo_add.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/right.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/style.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/table_add.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_align_center.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_align_justify.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_align_left.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_align_right.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_bold.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_heading_1.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_heading_2.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_heading_3.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_heading_4.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_heading_5.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_heading_6.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_indent.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_indent_remove.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_italic.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_list_bullets.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_list_numbers.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_paragraph.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_strikethrough.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_subscript.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_superscript.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_underline.png +0 -0
- data/app/assets/images/wymeditor/skins/wymeditor_icon.png +0 -0
- data/app/assets/javascripts/refinery/boot_wym.js.erb +0 -285
- data/app/assets/javascripts/refinery/sortable_menu.js.coffee.erb +0 -20
- data/app/assets/javascripts/refinery/wymeditor.js +0 -37
- data/app/assets/javascripts/wymeditor/GPL-license.txt +0 -278
- data/app/assets/javascripts/wymeditor/MIT-license.txt +0 -20
- data/app/assets/javascripts/wymeditor/README +0 -35
- data/app/assets/javascripts/wymeditor/browsers/ie.js.erb +0 -224
- data/app/assets/javascripts/wymeditor/browsers/mozilla.js.erb +0 -292
- data/app/assets/javascripts/wymeditor/browsers/opera.js.erb +0 -123
- data/app/assets/javascripts/wymeditor/browsers/webkit.js.erb +0 -283
- data/app/assets/javascripts/wymeditor/classes.js.erb +0 -1575
- data/app/assets/javascripts/wymeditor/functions.js.erb +0 -222
- data/app/assets/javascripts/wymeditor/lang/bg.js +0 -57
- data/app/assets/javascripts/wymeditor/lang/ca.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/cs.js +0 -58
- data/app/assets/javascripts/wymeditor/lang/da.js +0 -48
- data/app/assets/javascripts/wymeditor/lang/de.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/en.js +0 -57
- data/app/assets/javascripts/wymeditor/lang/es.js +0 -58
- data/app/assets/javascripts/wymeditor/lang/fa.js +0 -46
- data/app/assets/javascripts/wymeditor/lang/fi.js +0 -57
- data/app/assets/javascripts/wymeditor/lang/fr.js +0 -58
- data/app/assets/javascripts/wymeditor/lang/he.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/hu.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/it.js +0 -48
- data/app/assets/javascripts/wymeditor/lang/ja.js +0 -47
- data/app/assets/javascripts/wymeditor/lang/lv.js +0 -47
- data/app/assets/javascripts/wymeditor/lang/nb.js +0 -48
- data/app/assets/javascripts/wymeditor/lang/nl.js +0 -57
- data/app/assets/javascripts/wymeditor/lang/nn.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/pl.js +0 -56
- data/app/assets/javascripts/wymeditor/lang/pt-BR.js +0 -58
- data/app/assets/javascripts/wymeditor/lang/pt.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/rs.js +0 -47
- data/app/assets/javascripts/wymeditor/lang/ru.js +0 -57
- data/app/assets/javascripts/wymeditor/lang/sk.js +0 -56
- data/app/assets/javascripts/wymeditor/lang/sl.js +0 -47
- data/app/assets/javascripts/wymeditor/lang/sv.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/tr.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/vi.js +0 -47
- data/app/assets/javascripts/wymeditor/lang/zh-CN.js +0 -47
- data/app/assets/javascripts/wymeditor/prototypes.js.erb +0 -1103
- data/app/assets/javascripts/wymeditor/setup.js.erb +0 -622
- data/app/assets/javascripts/wymeditor/skins/refinery/skin.js +0 -45
- data/app/assets/javascripts/wymeditor/validators.js.erb +0 -777
- data/app/assets/stylesheets/refinery/refinery.css +0 -15
- data/app/assets/stylesheets/refinery/site_bar.css.scss +0 -92
- data/app/assets/stylesheets/refinery/ui.css.scss +0 -103
- data/app/assets/stylesheets/wymeditor/skins/refinery/skin.css.scss +0 -530
- data/app/assets/stylesheets/wymeditor/skins/refinery/wymiframe.css.scss +0 -156
- data/app/helpers/refinery/admin/core_helper.rb +0 -6
- data/app/helpers/refinery/admin/dialogs_helper.rb +0 -6
- data/app/helpers/refinery/fast_helper.rb +0 -4
- data/app/helpers/refinery/sitemap_helper.rb +0 -4
- data/app/views/refinery/wymiframe.html.erb +0 -14
- data/lib/generators/refinery/form/USAGE +0 -20
- data/lib/generators/refinery/form/form_generator.rb +0 -25
- data/lib/generators/refinery/form/templates/.gitignore +0 -2
- data/lib/generators/refinery/form/templates/app/controllers/refinery/namespace/admin/plural_name_controller.rb.erb +0 -54
- data/lib/generators/refinery/form/templates/app/controllers/refinery/namespace/admin/settings_controller.rb.erb +0 -45
- data/lib/generators/refinery/form/templates/app/controllers/refinery/namespace/plural_name_controller.rb.erb +0 -53
- data/lib/generators/refinery/form/templates/app/mailers/refinery/namespace/mailer.rb.erb +0 -22
- data/lib/generators/refinery/form/templates/app/models/refinery/namespace/setting.rb.erb +0 -34
- data/lib/generators/refinery/form/templates/app/models/refinery/namespace/singular_name.rb.erb +0 -49
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/_records.html.erb +0 -23
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/_singular_name.html.erb +0 -25
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/_submenu.html.erb +0 -29
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/index.html.erb +0 -4
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/show.html.erb +0 -52
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/spam.html.erb +0 -27
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/settings/_confirmation_email_form.html.erb +0 -51
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/settings/_notification_recipients_form.html.erb +0 -21
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/settings/edit.html.erb +0 -5
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/mailer/confirmation.html.erb +0 -1
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/mailer/notification.html.erb +0 -17
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/plural_name/new.html.erb +0 -43
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/plural_name/thank_you.html.erb +0 -1
- data/lib/generators/refinery/form/templates/config/locales/cs.yml +0 -78
- data/lib/generators/refinery/form/templates/config/locales/da.yml +0 -66
- data/lib/generators/refinery/form/templates/config/locales/de.yml +0 -78
- data/lib/generators/refinery/form/templates/config/locales/en.yml +0 -78
- data/lib/generators/refinery/form/templates/config/locales/es.yml +0 -66
- data/lib/generators/refinery/form/templates/config/locales/fr.yml +0 -78
- data/lib/generators/refinery/form/templates/config/locales/it.yml +0 -66
- data/lib/generators/refinery/form/templates/config/locales/lv.yml +0 -77
- data/lib/generators/refinery/form/templates/config/locales/nb.yml +0 -75
- data/lib/generators/refinery/form/templates/config/locales/nl.yml +0 -78
- data/lib/generators/refinery/form/templates/config/locales/pt-BR.yml +0 -78
- data/lib/generators/refinery/form/templates/config/locales/ru.yml +0 -77
- data/lib/generators/refinery/form/templates/config/locales/sk.yml +0 -78
- data/lib/generators/refinery/form/templates/config/locales/sl.yml +0 -67
- data/lib/generators/refinery/form/templates/config/locales/tr.yml +0 -78
- data/lib/generators/refinery/form/templates/config/locales/zh-CN.yml +0 -78
- data/lib/generators/refinery/form/templates/config/routes.rb.erb +0 -26
- data/lib/generators/refinery/form/templates/db/migrate/1_create_plural_name.rb.erb +0 -39
- data/lib/generators/refinery/form/templates/db/seeds.rb.erb +0 -31
- data/lib/generators/refinery/form/templates/lib/generators/refinery/plural_name_generator.rb.erb +0 -20
- data/lib/generators/refinery/form/templates/lib/refinery/plural_name.rb.erb +0 -18
- data/lib/generators/refinery/form/templates/lib/refinery/plural_name/engine.rb.erb +0 -27
- data/lib/generators/refinery/form/templates/lib/refinerycms-plural_name.rb.erb +0 -1
- data/lib/generators/refinery/form/templates/refinerycms-plural_name.gemspec +0 -16
- data/lib/generators/refinery/form/templates/script/rails +0 -10
- data/lib/refinery/activity.rb +0 -113
- data/lib/refinery/ext/action_view/helpers/form_builder.rb +0 -9
- data/lib/refinery/ext/action_view/helpers/form_helper.rb +0 -20
- data/lib/refinery/ext/action_view/helpers/form_tag_helper.rb +0 -10
- data/spec/controllers/refinery/admin/refinery_core_controller_spec.rb +0 -19
- data/spec/controllers/refinery/fast_controller_spec.rb +0 -12
- data/spec/lib/generators/refinery/form/form_generator_spec.rb +0 -99
- data/spec/lib/refinery/activity_spec.rb +0 -46
- data/spec/support/background_selenium_firefox_driver.rb +0 -14
- data/vendor/assets/javascripts/jquery/jquery.jcarousel.js +0 -900
@@ -1,156 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* WYMeditor : what you see is What You Mean web-based editor
|
3
|
-
* Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/
|
4
|
-
* Dual licensed under the MIT (MIT-license.txt)
|
5
|
-
* and GPL (GPL-license.txt) licenses.
|
6
|
-
*
|
7
|
-
* For further information visit:
|
8
|
-
* http://www.wymeditor.org/
|
9
|
-
*
|
10
|
-
* File Name:
|
11
|
-
* wymeditor.css
|
12
|
-
* Main editor css file.
|
13
|
-
* See the documentation for more info.
|
14
|
-
*
|
15
|
-
* File Authors:
|
16
|
-
* Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg)
|
17
|
-
* Daniel Reszka (d.reszka a-t wymeditor dotorg)
|
18
|
-
*/
|
19
|
-
|
20
|
-
/* VISUAL FEEDBACK */
|
21
|
-
|
22
|
-
/* basic */
|
23
|
-
body { background: #fff;}
|
24
|
-
|
25
|
-
/* make HTML blocks visible */
|
26
|
-
p,
|
27
|
-
h1,
|
28
|
-
h2,
|
29
|
-
h3,
|
30
|
-
h4,
|
31
|
-
h5,
|
32
|
-
h6,
|
33
|
-
ul,
|
34
|
-
ol,
|
35
|
-
table,
|
36
|
-
blockquote,
|
37
|
-
pre,
|
38
|
-
article,
|
39
|
-
aside,
|
40
|
-
command,
|
41
|
-
details,
|
42
|
-
summary,
|
43
|
-
figure,
|
44
|
-
figcaption,
|
45
|
-
footer,
|
46
|
-
header,
|
47
|
-
hgroup,
|
48
|
-
mark,
|
49
|
-
meter,
|
50
|
-
nav,
|
51
|
-
progress,
|
52
|
-
ruby,
|
53
|
-
rt,
|
54
|
-
rp,
|
55
|
-
section,
|
56
|
-
time { background: transparent no-repeat 2px 2px;
|
57
|
-
padding:8px 5px 5px;
|
58
|
-
margin:6px 0px;
|
59
|
-
border: 1px dotted #cccccc;
|
60
|
-
}
|
61
|
-
td { background: #F0F4F8; }
|
62
|
-
th { background: #ffffcc; }
|
63
|
-
ul,
|
64
|
-
ol { border-left:20px solid #B9C4D0; padding:0px 5px; }
|
65
|
-
caption { background: #E4E4B0; padding: 5px; font-weight: bold; }
|
66
|
-
table { font-size: 12px; width: 500px; }
|
67
|
-
td { width: 25%; }
|
68
|
-
blockquote { margin-left: 30px; }
|
69
|
-
pre { background-color:transparent; border: 1px solid white; }
|
70
|
-
|
71
|
-
/* Gecko min height fix */
|
72
|
-
p { min-height: 1em; } /*min-height is needed under Firefox, because empty parargraphs */
|
73
|
-
html.ie p { min-height: auto; } /* but we have to remove it under IE7 because it triggers the 'haslayout' mode */
|
74
|
-
td { height: 1.6em; }
|
75
|
-
|
76
|
-
/* labels */
|
77
|
-
p { background-image: asset_url('wymeditor/skins/refinery/html5/p.png', image); }
|
78
|
-
h1 { background-image: asset_url('wymeditor/skins/refinery/html5/h1.png', image); }
|
79
|
-
h2 { background-image: asset_url('wymeditor/skins/refinery/html5/h2.png', image); }
|
80
|
-
h3 { background-image: asset_url('wymeditor/skins/refinery/html5/h3.png', image); }
|
81
|
-
h4 { background-image: asset_url('wymeditor/skins/refinery/html5/h4.png', image); }
|
82
|
-
h5 { background-image: asset_url('wymeditor/skins/refinery/html5/h5.png', image); }
|
83
|
-
h6 { background-image: asset_url('wymeditor/skins/refinery/html5/h6.png', image); }
|
84
|
-
blockquote { background-image: asset_url('wymeditor/skins/refinery/html5/blockquote.png', image); }
|
85
|
-
pre { background-image: asset_url('wymeditor/skins/refinery/html5/pre.png', image); }
|
86
|
-
meter { background-image: asset_url('wymeditor/skins/refinery/html5/meter.png', image); }
|
87
|
-
nav { background-image: asset_url('wymeditor/skins/refinery/html5/nav.png', image); }
|
88
|
-
ruby { background-image: asset_url('wymeditor/skins/refinery/html5/ruby.png', image); }
|
89
|
-
rt { background-image: asset_url('wymeditor/skins/refinery/html5/rt.png', image); }
|
90
|
-
rp { background-image: asset_url('wymeditor/skins/refinery/html5/rp.png', image); }
|
91
|
-
article { background-image: asset_url('wymeditor/skins/refinery/html5/article.png', image); }
|
92
|
-
aside { background-image: asset_url('wymeditor/skins/refinery/html5/aside.png', image); }
|
93
|
-
command { background-image: asset_url('wymeditor/skins/refinery/html5/command.png', image); }
|
94
|
-
details { background-image: asset_url('wymeditor/skins/refinery/html5/details.png', image); }
|
95
|
-
summary { background-image: asset_url('wymeditor/skins/refinery/html5/summary.png', image); }
|
96
|
-
figure { background-image: asset_url('wymeditor/skins/refinery/html5/figure.png', image); }
|
97
|
-
figcaption { background-image: asset_url('wymeditor/skins/refinery/html5/figcaption.png', image); }
|
98
|
-
footer { background-image: asset_url('wymeditor/skins/refinery/html5/footer.png', image); }
|
99
|
-
header { background-image: asset_url('wymeditor/skins/refinery/html5/header.png', image); }
|
100
|
-
hgroup { background-image: asset_url('wymeditor/skins/refinery/html5/hgroup.png', image); }
|
101
|
-
mark { background-image: asset_url('wymeditor/skins/refinery/html5/mark.png', image); }
|
102
|
-
progress { background-image: asset_url('wymeditor/skins/refinery/html5/progress.png', image); }
|
103
|
-
section { background-image: asset_url('wymeditor/skins/refinery/html5/section.png', image); }
|
104
|
-
time { background-image: asset_url('wymeditor/skins/refinery/html5/time.png', image); }
|
105
|
-
|
106
|
-
/* specific HTML elements */
|
107
|
-
caption { text-align: left; }
|
108
|
-
img { margin-right: 5px;
|
109
|
-
border: 1px solid transparent; }
|
110
|
-
a img { border: 1px dotted blue !important; }
|
111
|
-
acronym { border: 1px solid gray; }
|
112
|
-
|
113
|
-
/* visual feedback for non-valid nesting of elements*/
|
114
|
-
h1 h1, h1 h2, h1 h3, h1 h4, h1 h5, h1 h6, h1 p, h1 pre, h1 address,
|
115
|
-
h2 h1, h2 h2, h2 h3, h2 h4, h2 h5, h2 h6, h2 p, h2 pre, h2 address,
|
116
|
-
h3 h1, h3 h2, h3 h3, h3 h4, h3 h5, h3 h6, h3 p, h3 pre, h3 address,
|
117
|
-
h4 h1, h4 h2, h4 h3, h4 h4, h4 h5, h4 h6, h4 p, h4 pre, h4 address,
|
118
|
-
h5 h1, h5 h2, h5 h3, h5 h4, h5 h5, h5 h6, h5 p, h5 pre, h5 address,
|
119
|
-
h6 h1, h6 h2, h6 h3, h6 h4, h6 h4, h6 h6, h6 p, h6 pre, h6 address,
|
120
|
-
p h1, p h2, p h3, p h4, p h5, p h6, p pre, p address,
|
121
|
-
pre h1, pre h2, pre h3, pre h4, pre h5, pre h6, pre p, pre pre, pre address,
|
122
|
-
address h1, address h2, address h3, address h4, address h5, address h6,
|
123
|
-
address p, address pre, address address
|
124
|
-
{ background-color: #ff9999 !important;
|
125
|
-
border: 1px solid red !important;
|
126
|
-
font-size: 12px !important;
|
127
|
-
font-weight: normal; }
|
128
|
-
|
129
|
-
/* indicate invalid text area fields */
|
130
|
-
body.fieldWithErrors { background-color: #ffecf0 !important; }
|
131
|
-
|
132
|
-
img.selected_by_wym {
|
133
|
-
border: 1px dashed #22a7f2;
|
134
|
-
}
|
135
|
-
|
136
|
-
article,
|
137
|
-
aside,
|
138
|
-
command,
|
139
|
-
details,
|
140
|
-
summary,
|
141
|
-
figure,
|
142
|
-
figcaption,
|
143
|
-
footer,
|
144
|
-
header,
|
145
|
-
hgroup,
|
146
|
-
mark,
|
147
|
-
meter,
|
148
|
-
nav,
|
149
|
-
progress,
|
150
|
-
ruby,
|
151
|
-
rt,
|
152
|
-
rp,
|
153
|
-
section,
|
154
|
-
time {
|
155
|
-
display: block;
|
156
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>WYMeditor</title>
|
5
|
-
<meta charset='<%= ::Rails.application.config.encoding %>' />
|
6
|
-
<meta httpequiv="XUACompatible" content="IE=edge,chrome=1" />
|
7
|
-
<%= stylesheet_link_tag "wymeditor/skins/refinery/wymiframe", :media => "all" %>
|
8
|
-
<%= stylesheet_link_tag "formatting", :media => "all" %>
|
9
|
-
<%= stylesheet_link_tag "theme", :media => "all" %>
|
10
|
-
<%= javascript_include_tag 'modernizr-min' %>
|
11
|
-
</head>
|
12
|
-
<body class="wym_iframe<%= " #{params[:id]}" if params[:id].present? %>">
|
13
|
-
</body>
|
14
|
-
</html>
|
@@ -1,20 +0,0 @@
|
|
1
|
-
Description:
|
2
|
-
Generates a custom forms based extension for Refinery automatically.
|
3
|
-
It works very similarly to the Refinery Engine generator.
|
4
|
-
|
5
|
-
The first string attribute should always be the one which is the title or
|
6
|
-
name field in your model.
|
7
|
-
|
8
|
-
There must be at least one attribute.
|
9
|
-
|
10
|
-
Additional Supported Field Types
|
11
|
-
|
12
|
-
All field types that are supported by the Refinery Engine generator are supported
|
13
|
-
with the addition of these form specific ones:
|
14
|
-
|
15
|
-
radio - creates a set of radio buttons based off Model::FIELD_NAMES
|
16
|
-
checkbox - creates a checkbox for true/false values.
|
17
|
-
select - creates a select list with options using Model::FIELD_NAMES
|
18
|
-
|
19
|
-
Example:
|
20
|
-
rails generate refinery:form job_inquiry name:string message:text job_type:radio brochure:checkbox qualification:select
|
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'refinery/extension_generation'
|
2
|
-
require 'rails/generators/migration'
|
3
|
-
|
4
|
-
module Refinery
|
5
|
-
class FormGenerator < Rails::Generators::NamedBase
|
6
|
-
source_root Pathname.new(File.expand_path('../templates', __FILE__))
|
7
|
-
|
8
|
-
include Refinery::ExtensionGeneration
|
9
|
-
|
10
|
-
def description
|
11
|
-
"Generates an extension which is set up for frontend form submissions like a contact page."
|
12
|
-
end
|
13
|
-
|
14
|
-
def generate
|
15
|
-
default_generate!
|
16
|
-
end
|
17
|
-
|
18
|
-
protected
|
19
|
-
|
20
|
-
def generator_command
|
21
|
-
'rails generate refinery:form'
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
@@ -1,54 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
module <%= namespacing %>
|
3
|
-
module Admin
|
4
|
-
class <%= class_name.pluralize %>Controller < Refinery::AdminController
|
5
|
-
|
6
|
-
crudify :'refinery/<%= namespacing.underscore %>/<%= singular_name %>', <% if (title = attributes.detect { |a| a.type.to_s == "string" }).present? %>
|
7
|
-
:title_attribute => "<%= title.name %>", <% end %>
|
8
|
-
:order => "created_at DESC"
|
9
|
-
<% if @includes_spam -%>
|
10
|
-
|
11
|
-
before_filter :get_spam_count, :only => [:index, :spam]
|
12
|
-
|
13
|
-
def index
|
14
|
-
@<%= plural_name %> = find_all_<%= plural_name %>.ham
|
15
|
-
@<%= plural_name %> = @<%= plural_name %>.with_query(params[:search]) if searching?
|
16
|
-
|
17
|
-
@grouped_<%= plural_name %> = group_by_date(@<%= plural_name %>)
|
18
|
-
end
|
19
|
-
|
20
|
-
def spam
|
21
|
-
@<%= plural_name %> = find_all_<%= plural_name %>.spam
|
22
|
-
@<%= plural_name %> = @<%= plural_name %>.with_query(params[:search]) if searching?
|
23
|
-
|
24
|
-
@grouped_<%= plural_name %> = group_by_date(@<%= plural_name %>)
|
25
|
-
end
|
26
|
-
|
27
|
-
def toggle_spam
|
28
|
-
find_<%= singular_name %>
|
29
|
-
@<%= singular_name %>.toggle!(:spam)
|
30
|
-
|
31
|
-
redirect_to :back
|
32
|
-
end
|
33
|
-
|
34
|
-
protected
|
35
|
-
|
36
|
-
def get_spam_count
|
37
|
-
@spam_count = <%= class_name %>.count(:conditions => {:spam => true})
|
38
|
-
end
|
39
|
-
<% else %>
|
40
|
-
def index
|
41
|
-
unless searching?
|
42
|
-
find_all_<%= plural_name %>
|
43
|
-
else
|
44
|
-
search_all_<%= plural_name %>
|
45
|
-
end
|
46
|
-
|
47
|
-
@grouped_<%= plural_name %> = group_by_date(@<%= plural_name %>)
|
48
|
-
end
|
49
|
-
|
50
|
-
<% end -%>
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
module <%= class_name.pluralize %>
|
3
|
-
module Admin
|
4
|
-
class SettingsController < Refinery::AdminController
|
5
|
-
|
6
|
-
before_filter :check_setting, :only => [:edit, :update]
|
7
|
-
after_filter :save_subject_for_confirmation, :save_message_for_confirmation, :only => :update
|
8
|
-
|
9
|
-
def edit
|
10
|
-
@setting = Refinery::Setting.find(params[:id])
|
11
|
-
end
|
12
|
-
|
13
|
-
def update
|
14
|
-
@setting = Refinery::Setting.find(params[:id])
|
15
|
-
|
16
|
-
if @setting.update_attributes(params[:setting])
|
17
|
-
flash[:notice] = t('refinery.crudify.updated', :what => @setting.name.gsub("<%= singular_name %>_", "").titleize)
|
18
|
-
|
19
|
-
unless request.xhr? or from_dialog?
|
20
|
-
redirect_back_or_default(refinery.<%= namespacing.underscore %>_admin_<%= plural_name %>_path)
|
21
|
-
else
|
22
|
-
render :text => "<script type='text/javascript'>parent.window.location = '#{refinery.<%= namespacing.underscore %>_admin_<%= plural_name %>_path}';</script>"
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
protected
|
28
|
-
def check_setting
|
29
|
-
setting = params[:id].gsub("<%= singular_name %>_", "")
|
30
|
-
|
31
|
-
Refinery::<%= namespacing %>::Setting.send(setting) if Refinery::<%= namespacing %>::Setting.respond_to?(setting)
|
32
|
-
end
|
33
|
-
|
34
|
-
def save_subject_for_confirmation
|
35
|
-
Refinery::<%= namespacing %>::Setting.confirmation_subject = params[:subject] if params.keys.include?('subject')
|
36
|
-
end
|
37
|
-
|
38
|
-
def save_message_for_confirmation
|
39
|
-
Refinery::<%= namespacing %>::Setting.confirmation_message = params[:message] if params.keys.include?('message')
|
40
|
-
end
|
41
|
-
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
@@ -1,53 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
module <%= class_name.pluralize %>
|
3
|
-
class <%= class_name.pluralize %>Controller < ::ApplicationController
|
4
|
-
|
5
|
-
before_filter :find_page, :only => [:create, :new]
|
6
|
-
|
7
|
-
def index
|
8
|
-
redirect_to :action => "new"
|
9
|
-
end
|
10
|
-
|
11
|
-
def thank_you
|
12
|
-
@page = Refinery::Page.find_by_link_url("/<%= plural_name %>/thank_you", :include => [:parts])
|
13
|
-
end
|
14
|
-
|
15
|
-
def new
|
16
|
-
@<%= singular_name %> = <%= class_name %>.new
|
17
|
-
end
|
18
|
-
|
19
|
-
def create
|
20
|
-
@<%= singular_name %> = <%= class_name %>.new(params[:<%= singular_name %>])
|
21
|
-
|
22
|
-
if @<%= singular_name %>.save
|
23
|
-
begin
|
24
|
-
Mailer.notification(@<%= singular_name %>, request).deliver
|
25
|
-
rescue => e
|
26
|
-
logger.warn "There was an error delivering the <%= singular_name %> notification.\n#{e.message}\n"
|
27
|
-
end<% if @includes_spam %> if @<%= singular_name %>.ham?<% end %>
|
28
|
-
|
29
|
-
if <%= class_name %>.column_names.map(&:to_s).include?('email')
|
30
|
-
begin
|
31
|
-
Mailer.confirmation(@<%= singular_name %>, request).deliver
|
32
|
-
rescue => e
|
33
|
-
logger.warn "There was an error delivering the <%= singular_name %> confirmation:\n#{e.message}\n"
|
34
|
-
end<% if @includes_spam %> if @<%= singular_name %>.ham?<% end %>
|
35
|
-
else
|
36
|
-
logger.warn "Please add an 'email' field to <%= class_name %> if you wish to send confirmation emails when forms are submitted."
|
37
|
-
end
|
38
|
-
|
39
|
-
redirect_to refinery.thank_you_<%= namespacing.underscore %>_<%= plural_name %>_path
|
40
|
-
else
|
41
|
-
render :action => 'new'
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
protected
|
46
|
-
|
47
|
-
def find_page
|
48
|
-
@page = Refinery::Page.find_by_link_url('/<%= plural_name %>/new', :include => [:parts])
|
49
|
-
end
|
50
|
-
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
module <%= namespacing %>
|
3
|
-
class Mailer < ActionMailer::Base
|
4
|
-
|
5
|
-
def confirmation(<%= singular_name %>, request)
|
6
|
-
@<%= singular_name %> = <%= singular_name %>
|
7
|
-
mail :subject => Refinery::<%= namespacing %>::Setting.confirmation_subject,
|
8
|
-
:to => <%= singular_name %>.email,
|
9
|
-
:from => "\"#{Refinery::Core.site_name}\" <no-reply@#{request.domain}>",
|
10
|
-
:reply_to => Refinery::<%= namespacing %>::Setting.notification_recipients.split(',').first
|
11
|
-
end
|
12
|
-
|
13
|
-
def notification(<%= singular_name %>, request)
|
14
|
-
@<%= singular_name %> = <%= singular_name %>
|
15
|
-
mail :subject => Refinery::<%= namespacing %>::Setting.notification_subject,
|
16
|
-
:to => Refinery::<%= namespacing %>::Setting.notification_recipients,
|
17
|
-
:from => "\"#{Refinery::Core.site_name}\" <no-reply@#{request.domain}>"
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
module <%= namespacing %>
|
3
|
-
class Setting < Refinery::Core::BaseModel
|
4
|
-
|
5
|
-
class << self
|
6
|
-
def confirmation_body
|
7
|
-
Refinery::Setting.find_or_set(:<%= singular_name %>_confirmation_body,
|
8
|
-
"Thank you for your <%= singular_name.humanize.downcase %> %name%,\n\nThis email is a receipt to confirm we have received your <%= singular_name.humanize.downcase %> and we'll be in touch shortly.\n\nThanks."
|
9
|
-
)
|
10
|
-
end
|
11
|
-
|
12
|
-
def confirmation_subject
|
13
|
-
Refinery::Setting.find_or_set(:<%= singular_name %>_confirmation_subject,
|
14
|
-
"Thank you for your <%= singular_name.humanize.downcase %>")
|
15
|
-
end
|
16
|
-
|
17
|
-
def confirmation_subject=(value)
|
18
|
-
Refinery::Setting.set(:<%= singular_name %>_confirmation_subject, value)
|
19
|
-
end
|
20
|
-
|
21
|
-
def notification_recipients
|
22
|
-
Refinery::Setting.find_or_set(:<%= singular_name %>_notification_recipients,
|
23
|
-
(Role[:refinery].users.first.try(:email) if defined?(Role)).to_s)
|
24
|
-
end
|
25
|
-
|
26
|
-
def notification_subject
|
27
|
-
Refinery::Setting.find_or_set(:<%= singular_name %>_notification_subject,
|
28
|
-
"New <%= singular_name.humanize.downcase %> from your website")
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|