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
@@ -15,7 +15,7 @@
|
|
15
15
|
development:
|
16
16
|
adapter: postgresql
|
17
17
|
encoding: unicode
|
18
|
-
database:
|
18
|
+
database: <%= Rails.application.engine_name.gsub(/_application/,'').downcase %>_development
|
19
19
|
pool: 5
|
20
20
|
username: postgres
|
21
21
|
password: postgres
|
@@ -42,7 +42,7 @@ development:
|
|
42
42
|
test:
|
43
43
|
adapter: postgresql
|
44
44
|
encoding: unicode
|
45
|
-
database:
|
45
|
+
database: <%= Rails.application.engine_name.gsub(/_application/,'').downcase %>_test
|
46
46
|
pool: 5
|
47
47
|
username: postgres
|
48
48
|
password: postgres
|
@@ -51,7 +51,7 @@ test:
|
|
51
51
|
production:
|
52
52
|
adapter: postgresql
|
53
53
|
encoding: unicode
|
54
|
-
database:
|
54
|
+
database: <%= Rails.application.engine_name.gsub(/_application/,'').downcase %>_production
|
55
55
|
pool: 5
|
56
56
|
username: postgres
|
57
57
|
password: postgres
|
@@ -6,9 +6,16 @@ Refinery::Core.configure do |config|
|
|
6
6
|
# When true this will force SSL redirection in all Refinery backend controllers.
|
7
7
|
# config.force_ssl = <%= Refinery::Core.force_ssl.inspect %>
|
8
8
|
|
9
|
+
# Set the S3 options using means other than securely by environment variables.
|
10
|
+
# If you have to.
|
11
|
+
# config.s3_bucket_name = ENV['S3_BUCKET']
|
12
|
+
# config.s3_region = ENV['S3_REGION']
|
13
|
+
# config.s3_access_key_id = ENV['S3_KEY']
|
14
|
+
# config.s3_secret_access_key = ENV['S3_SECRET']
|
15
|
+
|
9
16
|
# When true will use Amazon's Simple Storage Service instead of
|
10
17
|
# the default file system for storing resources and images
|
11
|
-
config.s3_backend =
|
18
|
+
config.s3_backend = config.s3_access_key_id.present? || config.s3_secret_access_key.present?
|
12
19
|
|
13
20
|
# Use a custom Dragonfly storage backend instead of the default
|
14
21
|
# file system for storing resources and images
|
@@ -34,15 +41,21 @@ Refinery::Core.configure do |config|
|
|
34
41
|
# http://markevans.github.com/dragonfly/file.Configuration.html#Configuration
|
35
42
|
# config.dragonfly_secret = <%= Refinery::Core.dragonfly_secret.inspect %>
|
36
43
|
|
37
|
-
# Add extra tags to the wymeditor whitelist e.g. = {'tag' => {'attributes' => {'1' => 'href'}}} or just {'tag' => {}}
|
38
|
-
# config.wymeditor_whitelist_tags = <%= Refinery::Core.wymeditor_whitelist_tags.inspect %>
|
39
|
-
|
40
44
|
# Register extra javascript for backend
|
41
45
|
# config.register_javascript "prototype-rails"
|
42
46
|
|
43
47
|
# Register extra stylesheet for backend (optional options)
|
44
48
|
# config.register_stylesheet "custom", :media => 'screen'
|
45
49
|
|
46
|
-
# Specify a different backend path than the default of
|
50
|
+
# Specify a different backend path than the default of <%= Refinery::Core.backend_route.inspect %>.
|
51
|
+
# Make sure you clear the `tmp/cache` directory after changing this setting.
|
47
52
|
# config.backend_route = <%= Refinery::Core.backend_route.inspect %>
|
53
|
+
|
54
|
+
# Specify a different Refinery::Core::Engine mount path than the default of <%= Refinery::Core.mounted_path.inspect %>.
|
55
|
+
# Make sure you clear the `tmp/cache` directory after changing this setting.
|
56
|
+
# config.mounted_path = <%= Refinery::Core.mounted_path.inspect %>
|
57
|
+
|
58
|
+
# Specify the order Refinery plugins appear in the admin view.
|
59
|
+
# Plugins in the list are placed, as ordered, before any plugins not in the list.
|
60
|
+
# config.plugin_priority = %w(refinery_pages refinery_images)
|
48
61
|
end
|
@@ -22,7 +22,6 @@ module Refinery
|
|
22
22
|
opts[:database] = 'sqlite3' if opts[:database].blank?
|
23
23
|
opts[:force] = true
|
24
24
|
opts[:skip_bundle] = true
|
25
|
-
opts[:old_style_hash] = true
|
26
25
|
|
27
26
|
invoke Rails::Generators::AppGenerator, [ File.expand_path(dummy_path, destination_root) ], opts
|
28
27
|
end
|
@@ -35,6 +34,9 @@ module Refinery
|
|
35
34
|
template "rails/application.rb.erb", "#{dummy_path}/config/application.rb", :force => true
|
36
35
|
template "rails/routes.rb", "#{dummy_path}/config/routes.rb", :force => true
|
37
36
|
template "rails/Rakefile", "#{dummy_path}/Rakefile", :force => true
|
37
|
+
template "rails/application.js", "#{dummy_path}/app/assets/javascripts/application.js", :force => true
|
38
|
+
template 'rails/blank.png', "#{dummy_path}/public/apple-touch-icon.png", :force => true
|
39
|
+
template 'rails/blank.png', "#{dummy_path}/public/apple-touch-icon-precomposed.png", :force => true
|
38
40
|
end
|
39
41
|
|
40
42
|
def test_dummy_clean
|
Binary file
|
@@ -1,8 +1,9 @@
|
|
1
|
-
require 'rails/generators/named_base'
|
2
1
|
require 'refinery/extension_generation'
|
2
|
+
require 'refinery/generators/named_base'
|
3
|
+
require 'refinery/generators/generated_attribute'
|
3
4
|
|
4
5
|
module Refinery
|
5
|
-
class EngineGenerator <
|
6
|
+
class EngineGenerator < Refinery::Generators::NamedBase
|
6
7
|
source_root Pathname.new(File.expand_path('../templates', __FILE__))
|
7
8
|
|
8
9
|
include Refinery::ExtensionGeneration
|
@@ -1,8 +1,14 @@
|
|
1
|
-
source "
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
|
5
|
+
git 'https://github.com/refinery/refinerycms.git', :branch => 'master' do
|
6
|
+
gem 'refinerycms'
|
7
|
+
|
8
|
+
group :development, :test do
|
9
|
+
gem 'refinerycms-testing'
|
10
|
+
end
|
11
|
+
end
|
6
12
|
|
7
13
|
# Database Configuration
|
8
14
|
platforms :jruby do
|
@@ -19,8 +25,7 @@ platforms :ruby do
|
|
19
25
|
end
|
20
26
|
|
21
27
|
group :development, :test do
|
22
|
-
gem '
|
23
|
-
|
28
|
+
gem 'rspec-its' # for the model's validation tests.
|
24
29
|
platforms :ruby do
|
25
30
|
require 'rbconfig'
|
26
31
|
if RbConfig::CONFIG['target_os'] =~ /linux/i
|
@@ -6,15 +6,14 @@ rescue LoadError
|
|
6
6
|
end
|
7
7
|
|
8
8
|
ENGINE_PATH = File.dirname(__FILE__)
|
9
|
-
APP_RAKEFILE = File.expand_path
|
9
|
+
APP_RAKEFILE = File.expand_path "../spec/dummy/Rakefile", __FILE__
|
10
10
|
|
11
|
-
if File.exists?
|
11
|
+
if File.exists? APP_RAKEFILE
|
12
12
|
load 'rails/tasks/engine.rake'
|
13
13
|
end
|
14
14
|
|
15
15
|
require "refinerycms-testing"
|
16
|
-
Refinery::Testing::Railtie.
|
17
|
-
Refinery::Testing::Railtie.load_dummy_tasks(ENGINE_PATH)
|
16
|
+
Refinery::Testing::Railtie.load_dummy_tasks ENGINE_PATH
|
18
17
|
|
19
18
|
load File.expand_path('../tasks/testing.rake', __FILE__)
|
20
19
|
load File.expand_path('../tasks/rspec.rake', __FILE__)
|
@@ -5,9 +5,18 @@ module Refinery
|
|
5
5
|
|
6
6
|
crudify :'refinery/<%= namespacing.underscore %>/<%= singular_name %>'<% if (title = attributes.detect { |a| a.type.to_s =~ /string|text/ }).present? and title.name != 'title' -%>,
|
7
7
|
:title_attribute => '<%= title.name %>'<% end -%><% if plural_name == singular_name -%>,
|
8
|
-
:redirect_to_url => :refinery_<%= namespacing.underscore %>_admin_<%= singular_name %>_index_path<% end
|
9
|
-
:xhr_paging => true
|
8
|
+
:redirect_to_url => :refinery_<%= namespacing.underscore %>_admin_<%= singular_name %>_index_path<% end %>
|
10
9
|
|
10
|
+
private
|
11
|
+
|
12
|
+
# Only allow a trusted parameter "white list" through.
|
13
|
+
def <%= "#{singular_table_name}_params" %>
|
14
|
+
<%- if attributes_names.empty? -%>
|
15
|
+
params[:<%= singular_table_name %>]
|
16
|
+
<%- else -%>
|
17
|
+
params.require(:<%= singular_table_name %>).permit(<%= attributes.map { |attr| ":#{attr.column_name}" }.join(', ') %>)
|
18
|
+
<%- end -%>
|
19
|
+
end
|
11
20
|
end
|
12
21
|
end
|
13
22
|
end
|
@@ -2,8 +2,8 @@ module Refinery
|
|
2
2
|
module <%= namespacing %>
|
3
3
|
class <%= class_name.pluralize %>Controller < ::ApplicationController
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
before_action :find_all_<%= plural_name %>
|
6
|
+
before_action :find_page
|
7
7
|
|
8
8
|
def index
|
9
9
|
# you can use meta fields from your model instead (e.g. browser_title)
|
data/lib/generators/refinery/engine/templates/app/models/refinery/namespace/singular_name.rb.erb
CHANGED
@@ -4,14 +4,9 @@ module Refinery
|
|
4
4
|
<% if table_name == namespacing.underscore.pluralize -%>
|
5
5
|
self.table_name = 'refinery_<%= plural_name %>'
|
6
6
|
<% end %>
|
7
|
-
attr_accessible <%= names_for_attr_accessible.map { |n| ":#{n}" }.join(', ') %>, :position
|
8
7
|
<% if localized? -%>
|
9
8
|
|
10
9
|
translates <%= localized_attributes.map { |a| ":#{a.name}" }.join(', ') %>
|
11
|
-
|
12
|
-
class Translation
|
13
|
-
attr_accessible :locale
|
14
|
-
end
|
15
10
|
<% end -%>
|
16
11
|
<% if string_attributes.any? -%>
|
17
12
|
|
@@ -32,6 +27,11 @@ module Refinery
|
|
32
27
|
|
33
28
|
belongs_to :<%= a.name %>, :class_name => '::Refinery::Resource'
|
34
29
|
<% end -%>
|
30
|
+
|
31
|
+
# To enable admin searching, add acts_as_indexed on searchable fields, for example:
|
32
|
+
#
|
33
|
+
# acts_as_indexed :fields => [:title]
|
34
|
+
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
@@ -5,21 +5,16 @@
|
|
5
5
|
</li>
|
6
6
|
<%% end %>
|
7
7
|
<li>
|
8
|
-
<%%=
|
9
|
-
:class => "add_icon" %>
|
8
|
+
<%%= action_label :add, refinery.new_<%= namespacing.underscore %>_admin_<%= singular_name %>_path, t('.create_new') %>
|
10
9
|
</li>
|
11
10
|
<%% if !searching? && ::Refinery::<%= namespacing %>::Admin::<%= class_name.pluralize %>Controller.sortable? && ::Refinery::<%= namespacing %>::<%= class_name %>.many? %>
|
12
11
|
<li>
|
13
|
-
<%%=
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
refinery.<%= namespacing.underscore %>_admin_<%= plural_name %><%= "_index" if plural_name == singular_name%>_path,
|
20
|
-
:id => "reorder_action_done",
|
21
|
-
:style => "display: none;",
|
22
|
-
:class => "reorder_icon" %>
|
12
|
+
<%%= action_label :reorder,
|
13
|
+
refinery.<%= namespacing.underscore %>_admin_<%= plural_name %><%= "_index" if plural_name == singular_name%>_path,
|
14
|
+
t('.reorder', what: "<%= singular_name.titleize.pluralize %>"), id: 'reorder_action'%>
|
15
|
+
<%%= action_label :reorder_done,
|
16
|
+
refinery.<%= namespacing.underscore %>_admin_<%= plural_name %><%= "_index" if plural_name == singular_name%>_path,
|
17
|
+
t('.reorder_done', what: "<%= singular_name.titleize.pluralize %>"), id: 'reorder_action_done', class: 'hidden'%>
|
23
18
|
</li>
|
24
19
|
<%% end %>
|
25
20
|
</ul>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%
|
2
|
-
text_areas = attributes.reject{|a| a.field_type.to_s != 'text_area'}
|
2
|
+
text_areas = attributes.reject{ |a| a.field_type.to_s != 'text_area'}
|
3
3
|
generated_text_areas = false
|
4
4
|
-%>
|
5
5
|
<%%= form_for [refinery, :<%= namespacing.underscore %>_admin, @<%= singular_name %>] do |f| -%>
|
@@ -12,30 +12,30 @@
|
|
12
12
|
:current_locale => Globalize.locale %>
|
13
13
|
<% end -%>
|
14
14
|
<% attributes.each_with_index do |attribute, index| -%>
|
15
|
-
<% if attribute.
|
15
|
+
<% if attribute.refinery_type == :image -%>
|
16
16
|
<div class='field'>
|
17
17
|
<%%= f.label :<%= attribute.name %> -%>
|
18
18
|
<%%= render '/refinery/admin/image_picker',
|
19
19
|
:f => f,
|
20
|
-
:field => :<%=
|
21
|
-
:image => @<%= singular_name %>.<%= attribute.name
|
20
|
+
:field => :<%= attribute.column_name %>,
|
21
|
+
:image => @<%= singular_name %>.<%= attribute.name %>,
|
22
22
|
:toggle_image_display => false -%>
|
23
23
|
</div>
|
24
24
|
|
25
|
-
<% elsif attribute.
|
25
|
+
<% elsif attribute.refinery_type == :resource -%>
|
26
26
|
<div class='field'>
|
27
27
|
<%%= f.label :<%= attribute.name %> -%>
|
28
28
|
<%%= render '/refinery/admin/resource_picker',
|
29
29
|
:f => f,
|
30
|
-
:field => :<%=
|
31
|
-
:resource => @<%= singular_name %>.<%= attribute.name
|
30
|
+
:field => :<%= attribute.column_name %>,
|
31
|
+
:resource => @<%= singular_name %>.<%= attribute.name %> -%>
|
32
32
|
</div>
|
33
33
|
|
34
34
|
<% elsif attribute.field_type.to_s == "text_area" and !generated_text_areas -%>
|
35
35
|
<div class='field'>
|
36
36
|
<%%= render '/refinery/admin/wysiwyg',
|
37
37
|
:f => f,
|
38
|
-
:fields => <%= text_areas.map{|t| t.name.to_sym}.inspect -%>,
|
38
|
+
:fields => <%= text_areas.map{ |t| t.name.to_sym}.inspect -%>,
|
39
39
|
:object => "<%= namespacing.underscore -%>/<%= singular_name -%>" -%>
|
40
40
|
</div>
|
41
41
|
|
@@ -4,12 +4,12 @@
|
|
4
4
|
<%%= render '<%= plural_name %>' %>
|
5
5
|
<%% else %>
|
6
6
|
<p>
|
7
|
-
<%%
|
7
|
+
<%% if searching? %>
|
8
|
+
<%%= t('no_results', :scope => 'refinery.admin.search') %>
|
9
|
+
<%% else %>
|
8
10
|
<strong>
|
9
11
|
<%%= t('.no_items_yet') %>
|
10
12
|
</strong>
|
11
|
-
<%% else %>
|
12
|
-
<%%= t('no_results', :scope => 'refinery.admin.search') %>
|
13
13
|
<%% end %>
|
14
14
|
</p>
|
15
15
|
<%% end %>
|
@@ -18,16 +18,11 @@
|
|
18
18
|
</span>
|
19
19
|
<span class='actions'>
|
20
20
|
<% unless skip_frontend? %>
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
<%%= link_to refinery_icon_tag("delete.png"), refinery.<%= namespacing.underscore %>_admin_<%= singular_name %>_path(<%= singular_name %>),
|
28
|
-
:class => "cancel confirm-delete",
|
29
|
-
:title => t('.delete'),
|
30
|
-
:confirm => t('message', :scope => 'refinery.admin.delete', :title => <%= singular_name %>.<%= title_attribute %>),
|
31
|
-
:method => :delete %>
|
21
|
+
<%%= action_icon(:preview, refinery.<%= namespacing.underscore %>_<%= singular_name %>_path(<%= singular_name %>), t('.view_live_html')) %>
|
22
|
+
<%end %>
|
23
|
+
<%%= action_icon(:edit, refinery.edit_<%= namespacing.underscore %>_admin_<%= singular_name %>_path(<%= singular_name %>), t('.edit') ) %>
|
24
|
+
<%%= action_icon(:delete, refinery.<%= namespacing.underscore %>_admin_<%= singular_name %>_path(<%= singular_name %>), t('.delete'),
|
25
|
+
{ class: "cancel confirm-delete",
|
26
|
+
data: {confirm: t('message', scope: 'refinery.admin.delete', title: <%=singular_name%>.<%=title_attribute %>)}} ) %>
|
32
27
|
</span>
|
33
28
|
</li>
|
@@ -4,4 +4,4 @@
|
|
4
4
|
<aside id='actions'>
|
5
5
|
<%%= render 'actions' %>
|
6
6
|
</aside>
|
7
|
-
<%%= render '/refinery/admin/make_sortable', :tree
|
7
|
+
<%%= render '/refinery/admin/make_sortable', options: {tree: false} if !searching? and ::Refinery::<%= namespacing %>::Admin::<%= class_name.pluralize %>Controller.sortable? and ::Refinery::<%= namespacing %>::<%= class_name %>.many? %>
|
data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/plural_name/show.html.erb
CHANGED
@@ -7,11 +7,11 @@
|
|
7
7
|
<section>
|
8
8
|
<h1><%= attribute.name.titleize %></h1>
|
9
9
|
<p>
|
10
|
-
<% if attribute.
|
11
|
-
<%%= image_fu @<%= singular_name %>.<%= attribute.name %>, nil %>
|
12
|
-
<% elsif attribute.
|
10
|
+
<% if attribute.refinery_type == :image -%>
|
11
|
+
<%%= image_fu @<%= singular_name %>.<%= attribute.name.gsub('_id', '') %>, nil %>
|
12
|
+
<% elsif attribute.refinery_type == :resource -%>
|
13
13
|
<%% if @<%= singular_name %>.<%= attribute.name %>.present? %>
|
14
|
-
<%%= link_to <%= "'#{attribute.name}'" %>, @<%= singular_name %>.<%= attribute.name %>.url %>
|
14
|
+
<%%= link_to <%= "'#{attribute.name}'" %>, @<%= singular_name %>.<%= attribute.name.gsub('_id', '') %>.url %>
|
15
15
|
<%% else %>
|
16
16
|
<%= attribute.name %>
|
17
17
|
<%% end %>
|
data/lib/generators/refinery/engine/templates/db/migrate/1_create_namespace_plural_name.rb.erb
CHANGED
@@ -2,15 +2,8 @@ class Create<%= namespacing %><%= class_name.pluralize %> < ActiveRecord::Migrat
|
|
2
2
|
|
3
3
|
def up
|
4
4
|
create_table :refinery_<%= "#{namespacing.underscore}_" if table_name != namespacing.underscore.pluralize -%><%= table_name %> do |t|
|
5
|
-
<%
|
6
|
-
|
7
|
-
# turn image or resource into what it was supposed to be which is an integer reference to an image or resource.
|
8
|
-
if attribute.type.to_s =~ /^(image|resource)$/
|
9
|
-
attribute.type = 'integer'
|
10
|
-
attribute.name = "#{attribute.name}_id".gsub("_id_id", "_id")
|
11
|
-
end
|
12
|
-
-%>
|
13
|
-
t.<%= attribute.type %> :<%= attribute.name %>
|
5
|
+
<% attributes.each do |attribute| -%>
|
6
|
+
t.<%= attribute.type %> :<%= attribute.column_name %>
|
14
7
|
<% end -%>
|
15
8
|
t.integer :position
|
16
9
|
|
@@ -1,27 +1,21 @@
|
|
1
1
|
Refinery::I18n.frontend_locales.each do |lang|
|
2
2
|
I18n.locale = lang
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
4
|
+
Refinery::User.find_each do |user|
|
5
|
+
user.plugins.where(name: 'refinerycms-<%= namespacing.underscore %>').first_or_create!(
|
6
|
+
position: (user.plugins.maximum(:position) || -1) +1
|
7
|
+
)
|
8
|
+
end if defined?(Refinery::User)
|
12
9
|
|
13
10
|
<% unless skip_frontend? -%>
|
14
|
-
url = "/<%= [(namespacing.underscore if namespacing.underscore != plural_name), plural_name].compact.join('/') %>"
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
:
|
21
|
-
)
|
22
|
-
Refinery::Pages.default_parts.each_with_index do |default_page_part, index|
|
23
|
-
page.parts.create(:title => default_page_part, :body => nil, :position => index)
|
11
|
+
Refinery::Page.where(link_url: (url = "/<%= [(namespacing.underscore if namespacing.underscore != plural_name), plural_name].compact.join('/') %>")).first_or_create!(
|
12
|
+
title: '<%= class_name.pluralize.underscore.titleize %>',
|
13
|
+
deletable: false,
|
14
|
+
menu_match: "^#{url}(\/|\/.+?|)$"
|
15
|
+
) do |page|
|
16
|
+
Refinery::Pages.default_parts.each_with_index do |part, index|
|
17
|
+
page.parts.build title: part, body: nil, position: index
|
24
18
|
end
|
25
|
-
end
|
19
|
+
end if defined?(Refinery::Page)
|
26
20
|
<% end -%>
|
27
21
|
end
|
@@ -11,10 +11,6 @@ module Refinery
|
|
11
11
|
plugin.name = "<%= plural_name %>"
|
12
12
|
plugin.url = proc { Refinery::Core::Engine.routes.url_helpers.<%= namespacing.underscore %>_admin_<%= plural_name %>_path }
|
13
13
|
plugin.pathname = root
|
14
|
-
plugin.activity = {
|
15
|
-
:class_name => :'refinery/<%= namespacing.underscore %>/<%= singular_name %>'<% if (title = attributes.detect { |a| a.type.to_s == "string" }).present? and title.name != 'title' %>,
|
16
|
-
:title => '<%= title.name %>'<% end %>
|
17
|
-
}
|
18
14
|
<% unless namespacing.underscore == plural_name -%>plugin.menu_match = %r{refinery/<%= namespacing.underscore %>/<%= plural_name %>(/.*)?$}<% end %>
|
19
15
|
end
|
20
16
|
end
|