tenon 1.1.8 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +768 -69
- data/Rakefile +7 -13
- data/app/assets/javascripts/tenon/application.js +4 -0
- data/app/controllers/tenon/assets_controller.rb +22 -23
- data/app/controllers/tenon/base_controller.rb +22 -13
- data/app/controllers/tenon/index_controller.rb +0 -4
- data/app/controllers/tenon/item_versions_controller.rb +20 -8
- data/app/controllers/tenon/resources_controller.rb +100 -30
- data/app/controllers/tenon/simple_resources_controller.rb +7 -7
- data/app/controllers/tenon/styleguides_controller.rb +10 -0
- data/app/decorators/tenon/application_decorator.rb +4 -8
- data/app/decorators/tenon/asset_decorator.rb +0 -25
- data/app/filterers/tenon/generic_filterer.rb +24 -0
- data/app/form_builders/tenon/form_builder.rb +189 -19
- data/app/helpers/tenon/active_link_to_helper.rb +9 -0
- data/app/helpers/tenon/application_helper.rb +4 -23
- data/app/helpers/tenon/asset_helper.rb +2 -2
- data/app/helpers/tenon/back_to_index_path_helper.rb +13 -0
- data/app/helpers/tenon/breadcrumbs_helper.rb +33 -0
- data/app/helpers/tenon/flash_helper.rb +14 -0
- data/app/helpers/tenon/icon_helper.rb +7 -0
- data/app/helpers/tenon/input_block_helper.rb +25 -0
- data/app/helpers/tenon/item_version_helper.rb +22 -9
- data/app/helpers/tenon/nav_helper.rb +21 -17
- data/app/helpers/tenon/piece_helper.rb +2 -7
- data/app/helpers/tenon/platform_hints_helper.rb +3 -5
- data/app/helpers/tenon/styleguide_helper.rb +15 -0
- data/app/helpers/tenon/tenon_content_helper.rb +11 -6
- data/app/helpers/tenon/tenon_helper.rb +19 -9
- data/app/models/tenon/application_record.rb +5 -0
- data/app/models/tenon/asset.rb +2 -2
- data/app/models/tenon/item_asset.rb +1 -1
- data/app/models/tenon/item_version.rb +1 -1
- data/app/models/tenon/styleguide.rb +11 -0
- data/app/models/tenon/tenon_content/piece.rb +13 -13
- data/app/models/tenon/tenon_content/row.rb +1 -1
- data/app/models/tenon/tenon_content/row_types/four_column_image.rb +4 -4
- data/app/models/tenon/tenon_content/row_types/four_column_image_and_text.rb +8 -8
- data/app/models/tenon/tenon_content/row_types/four_column_text.rb +4 -4
- data/app/models/tenon/tenon_content/row_types/full_width_embedded_content.rb +1 -1
- data/app/models/tenon/tenon_content/row_types/full_width_image.rb +1 -1
- data/app/models/tenon/tenon_content/row_types/full_width_text.rb +1 -1
- data/app/models/tenon/tenon_content/row_types/left_image_right_text.rb +2 -2
- data/app/models/tenon/tenon_content/row_types/left_text_right_image.rb +2 -2
- data/app/models/tenon/tenon_content/row_types/left_wrapped_image_with_text.rb +2 -2
- data/app/models/tenon/tenon_content/row_types/right_wrapped_image_with_text.rb +2 -2
- data/app/models/tenon/tenon_content/row_types/six_column_image.rb +6 -6
- data/app/models/tenon/tenon_content/row_types/six_column_image_and_text.rb +12 -12
- data/app/models/tenon/tenon_content/row_types/three_column_image.rb +3 -3
- data/app/models/tenon/tenon_content/row_types/three_column_image_and_text.rb +6 -6
- data/app/models/tenon/tenon_content/row_types/three_column_text.rb +3 -3
- data/app/models/tenon/tenon_content/row_types/two_column_image.rb +2 -2
- data/app/models/tenon/tenon_content/row_types/two_column_image_and_text.rb +4 -4
- data/app/models/tenon/tenon_content/row_types/two_column_text.rb +2 -2
- data/app/models/tenon/tenon_content/row_types/two_column_with_background_image.rb +3 -3
- data/app/models/tenon/tenon_content/row_types.rb +17 -17
- data/app/policies/my_settings_policy.rb +2 -0
- data/app/policies/tenon/application_policy.rb +63 -0
- data/app/policies/tenon/asset_policy.rb +4 -0
- data/app/policies/tenon/item_version_policy.rb +4 -0
- data/app/serializers/item_version_serializer.rb +23 -0
- data/app/serializers/tenon/application_serializer.rb +37 -0
- data/app/serializers/tenon/asset_serializer.rb +5 -0
- data/app/serializers/tenon/paginating_serializer.rb +18 -0
- data/app/views/layouts/tenon/application.html.haml +28 -18
- data/app/views/tenon/assets/_form.html.haml +29 -12
- data/app/views/tenon/assets/crop.html.haml +13 -13
- data/app/views/tenon/assets/edit.html.haml +1 -12
- data/app/views/tenon/assets/index.html.haml +5 -19
- data/app/views/tenon/assets/new.html.haml +1 -0
- data/app/views/tenon/fields/_asset.html.haml +26 -27
- data/app/views/tenon/fields/_base.html.haml +7 -0
- data/app/views/tenon/fields/_base_inline.html.haml +4 -0
- data/app/views/tenon/fields/_check_box.html.haml +9 -0
- data/app/views/tenon/fields/_collection_select.html.haml +4 -0
- data/app/views/tenon/fields/_color_field.html.haml +3 -0
- data/app/views/tenon/fields/_date_picker.html.haml +2 -0
- data/app/views/tenon/fields/_date_time_picker.html.haml +6 -0
- data/app/views/tenon/fields/_email_field.html.haml +2 -0
- data/app/views/tenon/fields/_inline_check_box.html.haml +5 -0
- data/app/views/tenon/fields/_inline_radio_button.html.haml +5 -0
- data/app/views/tenon/fields/_number_field.html.haml +2 -0
- data/app/views/tenon/fields/_password_field.html.haml +2 -0
- data/app/views/tenon/fields/_phone_field.html.haml +2 -0
- data/app/views/tenon/fields/_radio_button.html.haml +9 -0
- data/app/views/tenon/fields/_rich_text.html.haml +3 -6
- data/app/views/tenon/fields/_select.html.haml +3 -0
- data/app/views/tenon/fields/_text_area.html.haml +2 -0
- data/app/views/tenon/fields/_text_field.html.haml +2 -0
- data/app/views/tenon/fields/_title_text_field.html.haml +2 -0
- data/app/views/tenon/fields/_url_field.html.haml +2 -0
- data/app/views/tenon/index/index.html.haml +8 -29
- data/app/views/tenon/item_assets/new.html.haml +20 -22
- data/app/views/tenon/item_versions/_item_version.json.jbuilder +4 -4
- data/app/views/tenon/item_versions/index.html.haml +14 -6
- data/app/views/tenon/item_versions/new.html.haml +8 -10
- data/app/views/tenon/settings/_contact.html.haml +14 -19
- data/app/views/tenon/settings/_general.html.haml +15 -11
- data/app/views/tenon/settings/_seo.html.haml +10 -9
- data/app/views/tenon/settings/show.html.haml +12 -31
- data/app/views/tenon/shared/_account_dropdown.html.haml +6 -0
- data/app/views/tenon/shared/_app_info.html.haml +5 -0
- data/app/views/tenon/shared/_breadcrumbs.html.haml +1 -0
- data/app/views/tenon/shared/_burger.html.haml +5 -0
- data/app/views/tenon/shared/_default_form_toolbar.html.haml +26 -0
- data/app/views/tenon/shared/_draft_controls.html.haml +18 -0
- data/app/views/tenon/shared/_i18n_language_nav.html.haml +2 -2
- data/app/views/tenon/shared/_main_nav.html.haml +3 -14
- data/app/views/tenon/shared/_platform_hints.html.haml +15 -15
- data/app/views/tenon/shared/_seo_fields.html.haml +8 -6
- data/app/views/tenon/shared/_site_title.html.haml +6 -0
- data/app/views/tenon/shared/_util_nav.html.haml +4 -27
- data/app/views/tenon/shared/_version_warning.html.haml +11 -11
- data/app/views/tenon/styleguides/_buttons.html.haml +118 -0
- data/app/views/tenon/styleguides/_colors.html.haml +59 -0
- data/app/views/tenon/styleguides/_forms.html.haml +4 -0
- data/app/views/tenon/styleguides/_icons.html.haml +21 -0
- data/app/views/tenon/styleguides/_typography.html.haml +27 -0
- data/app/views/tenon/styleguides/buttons/_colors.html.haml +43 -0
- data/app/views/tenon/styleguides/buttons/_styles.html.haml +59 -0
- data/app/views/tenon/styleguides/colors/_helpers.html.haml +48 -0
- data/app/views/tenon/styleguides/colors/_variables.html.haml +31 -0
- data/app/views/tenon/styleguides/forms/_default.html.haml +92 -0
- data/app/views/tenon/styleguides/forms/_html5.html.haml +31 -0
- data/app/views/tenon/styleguides/forms/_tenon_content.html.haml +15 -0
- data/app/views/tenon/styleguides/index.html.haml +52 -0
- data/app/views/tenon/styleguides/typography/_blockquote.html.haml +7 -0
- data/app/views/tenon/styleguides/typography/_inline.html.haml +8 -0
- data/app/views/tenon/styleguides/typography/_lists.html.haml +40 -0
- data/app/views/tenon/styleguides/typography/_paragraphs.html.haml +17 -0
- data/app/views/tenon/styleguides/typography/_small.html.haml +18 -0
- data/app/views/tenon/styleguides/typography/_styles.html.haml +14 -0
- data/app/views/tenon/styleguides/typography/_variables.html.haml +43 -0
- data/app/views/tenon/tenon_content/_display.html.haml +2 -2
- data/app/views/tenon/tenon_content/_embed_modal.html.haml +3 -3
- data/app/views/tenon/tenon_content/_fields.html.haml +21 -35
- data/app/views/tenon/tenon_content/_row.html.haml +14 -13
- data/app/views/tenon/tenon_content/{_builder.html.haml → _tenon_content.html.haml} +2 -2
- data/app/views/tenon/tenon_content/piece_types/form/_background_image.html.haml +6 -6
- data/app/views/tenon/tenon_content/piece_types/form/_embedded_content.html.haml +2 -1
- data/app/views/tenon/tenon_content/piece_types/form/_image.html.haml +37 -29
- data/app/views/tenon/tenon_content/row_types/display/_four_column_image.html.haml +4 -4
- data/app/views/tenon/tenon_content/row_types/display/_four_column_image_and_text.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/display/_four_column_text.html.haml +4 -4
- data/app/views/tenon/tenon_content/row_types/display/_full_width_embedded_content.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/display/_full_width_image.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/display/_full_width_text.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/display/_left_image_right_text.html.haml +8 -8
- data/app/views/tenon/tenon_content/row_types/display/_left_text_right_image.html.haml +7 -7
- data/app/views/tenon/tenon_content/row_types/display/_left_wrapped_image_with_text.html.haml +6 -6
- data/app/views/tenon/tenon_content/row_types/display/_right_wrapped_image_with_text.html.haml +7 -7
- data/app/views/tenon/tenon_content/row_types/display/_six_column_image.html.haml +4 -4
- data/app/views/tenon/tenon_content/row_types/display/_six_column_image_and_text.html.haml +5 -5
- data/app/views/tenon/tenon_content/row_types/display/_three_column_image.html.haml +4 -4
- data/app/views/tenon/tenon_content/row_types/display/_three_column_image_and_text.html.haml +4 -4
- data/app/views/tenon/tenon_content/row_types/display/_three_column_text.html.haml +4 -4
- data/app/views/tenon/tenon_content/row_types/display/_two_column_image.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/display/_two_column_image_and_text.html.haml +4 -4
- data/app/views/tenon/tenon_content/row_types/display/_two_column_text.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/display/_two_column_with_background_image.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/form/_four_column_image.html.haml +2 -2
- data/app/views/tenon/tenon_content/row_types/form/_four_column_image_and_text.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/form/_four_column_text.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/form/_full_width_embedded_content.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/form/_full_width_image.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/form/_full_width_text.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/form/_left_image_right_text.html.haml +9 -8
- data/app/views/tenon/tenon_content/row_types/form/_left_text_right_image.html.haml +6 -6
- data/app/views/tenon/tenon_content/row_types/form/_left_wrapped_image_with_text.html.haml +7 -7
- data/app/views/tenon/tenon_content/row_types/form/_right_wrapped_image_with_text.html.haml +7 -7
- data/app/views/tenon/tenon_content/row_types/form/_six_column_image.html.haml +2 -2
- data/app/views/tenon/tenon_content/row_types/form/_six_column_image_and_text.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/form/_three_column_image.html.haml +2 -2
- data/app/views/tenon/tenon_content/row_types/form/_three_column_image_and_text.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/form/_three_column_text.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/form/_two_column_image.html.haml +2 -2
- data/app/views/tenon/tenon_content/row_types/form/_two_column_image_and_text.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/form/_two_column_text.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/form/_two_column_with_background_image.html.haml +2 -2
- data/config/initializers/class_extensions/hash.rb +1 -1
- data/config/initializers/client_side_validations.rb +27 -0
- data/config/initializers/tenon.rb +0 -14
- data/config/routes.rb +10 -46
- data/db/migrate/20151117171000_drop_default_tenon_resources.rb +15 -0
- data/db/migrate/20160119185645_remove_tenon_users.rb +7 -0
- data/db/migrate/20160126123154_remove_tenon_callouts_subscribers.rb +8 -0
- data/db/migrate/20160126194219_convert_piece_size_to_int.rb +6 -0
- data/lib/ckeditor/plugins/pastefromword/filter/default.js +1 -1
- data/lib/generators/tenon/scaffold/scaffold_generator.rb +52 -27
- data/lib/generators/tenon/scaffold/templates/controller.rb +7 -4
- data/lib/generators/tenon/scaffold/templates/policy.rb +2 -0
- data/lib/generators/tenon/scaffold/templates/serializer.rb +2 -0
- data/lib/generators/tenon/scaffold/templates/view__form.html.haml +49 -54
- data/lib/generators/tenon/scaffold/templates/view_edit.html.haml +1 -8
- data/lib/generators/tenon/scaffold/templates/view_index.html.haml +8 -24
- data/lib/generators/tenon/scaffold/templates/view_new.html.haml +1 -8
- data/lib/tasks/tenon_tasks.rake +2 -2
- data/lib/templates/active_record/model/model.rb +12 -13
- data/lib/templates/migration/templates/create_table_migration.rb +1 -1
- data/lib/tenon/can_be_foreign.rb +1 -1
- data/lib/tenon/engine.rb +26 -32
- data/lib/tenon/filterers/base_filterer.rb +64 -0
- data/lib/tenon/has_history/attr_serializer.rb +6 -6
- data/lib/tenon/proxy_attachment.rb +2 -2
- data/lib/tenon/version.rb +1 -1
- data/lib/tenon.rb +1 -3
- data/vendor/assets/javascripts/bootstrap.modal.js +1 -1
- data/vendor/assets/javascripts/date_picker/picker.date.js +1429 -0
- data/vendor/assets/javascripts/date_picker/picker.js +1122 -0
- data/vendor/assets/javascripts/number-to-words.es6 +35 -0
- data/vendor/assets/stylesheets/bootstrap.scss +1 -1
- metadata +206 -972
- data/app/assets/images/tenon/icons/delete.png +0 -0
- data/app/assets/images/tenon/icons/edit.png +0 -0
- data/app/assets/images/tenon/icons/thumbdown.png +0 -0
- data/app/assets/images/tenon/icons/thumbup.png +0 -0
- data/app/assets/images/tenon/select2-spinner.gif +0 -0
- data/app/assets/images/tenon/select2.png +0 -0
- data/app/assets/images/tenon/select2x2.png +0 -0
- data/app/assets/javascripts/tenon/controllers/assets.js.coffee +0 -3
- data/app/assets/javascripts/tenon/controllers/index.js.coffee +0 -6
- data/app/assets/javascripts/tenon/controllers/tenon.js.coffee +0 -1
- data/app/assets/javascripts/tenon/features/asset_attachment.js.coffee +0 -37
- data/app/assets/javascripts/tenon/features/asset_cropping.js.coffee +0 -49
- data/app/assets/javascripts/tenon/features/asset_detachment.js.coffee +0 -11
- data/app/assets/javascripts/tenon/features/asset_list_post_crop_handler.js.coffee +0 -15
- data/app/assets/javascripts/tenon/features/asset_uploader.js.coffee +0 -88
- data/app/assets/javascripts/tenon/features/box_toggles.js.coffee +0 -17
- data/app/assets/javascripts/tenon/features/cocoon_hooks.js.coffee +0 -12
- data/app/assets/javascripts/tenon/features/date_time_picker.js.coffee +0 -25
- data/app/assets/javascripts/tenon/features/editor.js.coffee +0 -24
- data/app/assets/javascripts/tenon/features/file_select_widget.js.erb +0 -39
- data/app/assets/javascripts/tenon/features/flash.js.coffee +0 -13
- data/app/assets/javascripts/tenon/features/focus_first_field.js.coffee +0 -8
- data/app/assets/javascripts/tenon/features/hamburger_navigation.js.coffee +0 -26
- data/app/assets/javascripts/tenon/features/header_menu.js.coffee +0 -20
- data/app/assets/javascripts/tenon/features/i18n_fields.js.coffee +0 -23
- data/app/assets/javascripts/tenon/features/infinite_loading.js.coffee +0 -12
- data/app/assets/javascripts/tenon/features/item_version_autosave.js.coffee +0 -35
- data/app/assets/javascripts/tenon/features/item_version_index_handler.js.coffee +0 -3
- data/app/assets/javascripts/tenon/features/main_menu.js.coffee +0 -11
- data/app/assets/javascripts/tenon/features/modal_forms.js.coffee +0 -44
- data/app/assets/javascripts/tenon/features/modal_windows.js.coffee +0 -104
- data/app/assets/javascripts/tenon/features/multiple_asset_attachment.js.coffee +0 -8
- data/app/assets/javascripts/tenon/features/nested_fields.js +0 -95
- data/app/assets/javascripts/tenon/features/nested_lists.js +0 -10
- data/app/assets/javascripts/tenon/features/nested_set_writer.js.coffee +0 -65
- data/app/assets/javascripts/tenon/features/new_item_version_handler.js.coffee +0 -32
- data/app/assets/javascripts/tenon/features/pagination.js.coffee +0 -21
- data/app/assets/javascripts/tenon/features/protect_changes.js.coffee +0 -25
- data/app/assets/javascripts/tenon/features/quick_search.js.coffee +0 -41
- data/app/assets/javascripts/tenon/features/record_approval.js.coffee +0 -33
- data/app/assets/javascripts/tenon/features/record_boolean_toggle.js.coffee +0 -37
- data/app/assets/javascripts/tenon/features/record_deletion.js.coffee +0 -24
- data/app/assets/javascripts/tenon/features/record_list.js.coffee +0 -86
- data/app/assets/javascripts/tenon/features/record_list_updater.js.coffee +0 -56
- data/app/assets/javascripts/tenon/features/s3_direct_upload.js.coffee +0 -43
- data/app/assets/javascripts/tenon/features/sidebar_active_links.js.coffee +0 -20
- data/app/assets/javascripts/tenon/features/sortable_nested_fields.js.coffee +0 -17
- data/app/assets/javascripts/tenon/features/tenon_content/aesthetics.js.coffee +0 -31
- data/app/assets/javascripts/tenon/features/tenon_content/asset_attachment.js.coffee +0 -15
- data/app/assets/javascripts/tenon/features/tenon_content/asset_link.js.coffee +0 -11
- data/app/assets/javascripts/tenon/features/tenon_content/base.js.coffee +0 -16
- data/app/assets/javascripts/tenon/features/tenon_content/bottombar_toggler.js.coffee +0 -15
- data/app/assets/javascripts/tenon/features/tenon_content/caption_toggler.js.coffee +0 -11
- data/app/assets/javascripts/tenon/features/tenon_content/column_sizing.js.coffee +0 -53
- data/app/assets/javascripts/tenon/features/tenon_content/column_swap.js.coffee +0 -44
- data/app/assets/javascripts/tenon/features/tenon_content/editor.js.coffee +0 -34
- data/app/assets/javascripts/tenon/features/tenon_content/embedded_content_modal_handler.js.coffee +0 -12
- data/app/assets/javascripts/tenon/features/tenon_content/image_asset_link.js.coffee +0 -5
- data/app/assets/javascripts/tenon/features/tenon_content/image_controls.js.coffee +0 -63
- data/app/assets/javascripts/tenon/features/tenon_content/image_links.js.coffee +0 -54
- data/app/assets/javascripts/tenon/features/tenon_content/library.js.coffee +0 -39
- data/app/assets/javascripts/tenon/features/tenon_content/library_filter.js.coffee +0 -17
- data/app/assets/javascripts/tenon/features/tenon_content/pop_out.js.coffee +0 -46
- data/app/assets/javascripts/tenon/features/tenon_content/post_crop_handler.js.coffee +0 -22
- data/app/assets/javascripts/tenon/features/tenon_content/sidebar_navigation.js.coffee +0 -26
- data/app/assets/javascripts/tenon/features/tenon_content/sortable.js.coffee +0 -18
- data/app/assets/javascripts/tenon/features/tenon_content/stretch_to_fill.js.coffee +0 -50
- data/app/assets/javascripts/tenon/features/tenon_content/wrapped_sizing.js.coffee +0 -48
- data/app/assets/javascripts/tenon/features/tenon_content.js.coffee +0 -1
- data/app/assets/javascripts/tenon/features/video_feeds.js.coffee +0 -4
- data/app/assets/javascripts/tenon/manifest.json +0 -44
- data/app/assets/javascripts/tenon/medium-on-tenon.js +0 -1465
- data/app/assets/javascripts/tenon/templates/assets/asset_field.jst.eco +0 -17
- data/app/assets/javascripts/tenon/templates/assets/asset_progress.jst.eco +0 -8
- data/app/assets/javascripts/tenon/templates/assets/asset_row.jst.eco +0 -21
- data/app/assets/javascripts/tenon/templates/assets/asset_select.jst.eco +0 -1
- data/app/assets/javascripts/tenon/templates/comments/comment_row.jst.eco +0 -23
- data/app/assets/javascripts/tenon/templates/contacts/contact_row.jst.eco +0 -56
- data/app/assets/javascripts/tenon/templates/errors.jst.eco +0 -13
- data/app/assets/javascripts/tenon/templates/events/event_row.jst.eco +0 -22
- data/app/assets/javascripts/tenon/templates/galleries/gallery_row.jst.eco +0 -12
- data/app/assets/javascripts/tenon/templates/item_versions/item_version_row.jst.eco +0 -22
- data/app/assets/javascripts/tenon/templates/modal.jst.eco +0 -14
- data/app/assets/javascripts/tenon/templates/pages/page_row.jst.eco +0 -21
- data/app/assets/javascripts/tenon/templates/post_categories/post_category_row.jst.eco +0 -12
- data/app/assets/javascripts/tenon/templates/posts/post_row.jst.eco +0 -30
- data/app/assets/javascripts/tenon/templates/redirects/redirect_row.jst.eco +0 -18
- data/app/assets/javascripts/tenon/templates/tenon_callouts/tenon_callout_row.jst.eco +0 -19
- data/app/assets/javascripts/tenon/templates/tenon_content/popped_out.jst.eco +0 -6
- data/app/assets/javascripts/tenon/templates/users/user_row.jst.eco +0 -21
- data/app/assets/javascripts/tenon/tenon.js +0 -68
- data/app/assets/javascripts/tenon/tenon_dispatcher.js.coffee +0 -25
- data/app/assets/javascripts/tenon/tenon_manifest.js +0 -45
- data/app/assets/stylesheets/tenon/colors-custom.scss +0 -25
- data/app/assets/stylesheets/tenon/colors-named.scss +0 -22
- data/app/assets/stylesheets/tenon/helpers.scss +0 -28
- data/app/assets/stylesheets/tenon/layout/assets.scss +0 -49
- data/app/assets/stylesheets/tenon/layout/breakpoints.scss +0 -48
- data/app/assets/stylesheets/tenon/layout/global.scss +0 -36
- data/app/assets/stylesheets/tenon/layout/grid.scss +0 -145
- data/app/assets/stylesheets/tenon/layout/main-nav.scss +0 -149
- data/app/assets/stylesheets/tenon/layout/margins.scss +0 -3
- data/app/assets/stylesheets/tenon/layout/mobile.scss +0 -5
- data/app/assets/stylesheets/tenon/layout/sidebar.scss +0 -102
- data/app/assets/stylesheets/tenon/layout/util-nav.scss +0 -51
- data/app/assets/stylesheets/tenon/mixins.scss +0 -81
- data/app/assets/stylesheets/tenon/styleguide.scss +0 -6
- data/app/assets/stylesheets/tenon/tenon.scss +0 -71
- data/app/assets/stylesheets/tenon/typography.scss +0 -65
- data/app/assets/stylesheets/tenon/ui/alerts.scss +0 -65
- data/app/assets/stylesheets/tenon/ui/asset-attachment.scss +0 -136
- data/app/assets/stylesheets/tenon/ui/asset-cropping.scss +0 -51
- data/app/assets/stylesheets/tenon/ui/asset-uploads.scss +0 -26
- data/app/assets/stylesheets/tenon/ui/buttons.scss +0 -65
- data/app/assets/stylesheets/tenon/ui/callouts.scss +0 -26
- data/app/assets/stylesheets/tenon/ui/comments.scss +0 -57
- data/app/assets/stylesheets/tenon/ui/forms.scss +0 -204
- data/app/assets/stylesheets/tenon/ui/generic-loader.scss +0 -21
- data/app/assets/stylesheets/tenon/ui/header-tools.scss +0 -116
- data/app/assets/stylesheets/tenon/ui/i18n.scss +0 -18
- data/app/assets/stylesheets/tenon/ui/list-style-toggle.scss +0 -39
- data/app/assets/stylesheets/tenon/ui/login.scss +0 -97
- data/app/assets/stylesheets/tenon/ui/medium-editor.scss +0 -114
- data/app/assets/stylesheets/tenon/ui/modals.scss +0 -179
- data/app/assets/stylesheets/tenon/ui/pagination.scss +0 -113
- data/app/assets/stylesheets/tenon/ui/progress-bars.scss +0 -131
- data/app/assets/stylesheets/tenon/ui/quick-search.scss +0 -20
- data/app/assets/stylesheets/tenon/ui/record-grids.scss +0 -95
- data/app/assets/stylesheets/tenon/ui/record-lists.scss +0 -154
- data/app/assets/stylesheets/tenon/ui/section-headers.scss +0 -30
- data/app/assets/stylesheets/tenon/ui/select2-custom.scss +0 -70
- data/app/assets/stylesheets/tenon/ui/tables.scss +0 -19
- data/app/assets/stylesheets/tenon/ui/tabs.scss +0 -7
- data/app/assets/stylesheets/tenon/ui/tenon-content-library.scss +0 -80
- data/app/assets/stylesheets/tenon/ui/tenon-content-popped-out.scss +0 -92
- data/app/assets/stylesheets/tenon/ui/tenon-content.scss +0 -318
- data/app/assets/stylesheets/tenon/ui/thinking.scss +0 -3
- data/app/assets/stylesheets/tenon/ui/toolbox.scss +0 -31
- data/app/assets/stylesheets/tenon/z-indexes.scss +0 -35
- data/app/assets/stylesheets/tenon_addons.scss +0 -1
- data/app/controllers/tenon/comments_controller.rb +0 -51
- data/app/controllers/tenon/contacts_controller.rb +0 -65
- data/app/controllers/tenon/events_controller.rb +0 -9
- data/app/controllers/tenon/galleries_controller.rb +0 -9
- data/app/controllers/tenon/pages_controller.rb +0 -51
- data/app/controllers/tenon/post_categories_controller.rb +0 -9
- data/app/controllers/tenon/posts_controller.rb +0 -28
- data/app/controllers/tenon/redirects_controller.rb +0 -25
- data/app/controllers/tenon/tenon_callouts_controller.rb +0 -7
- data/app/controllers/tenon/users_controller.rb +0 -64
- data/app/decorators/tenon/comment_decorator.rb +0 -22
- data/app/decorators/tenon/contact_decorator.rb +0 -13
- data/app/decorators/tenon/event_decorator.rb +0 -11
- data/app/decorators/tenon/gallery_decorator.rb +0 -4
- data/app/decorators/tenon/page_decorator.rb +0 -11
- data/app/decorators/tenon/post_category_decorator.rb +0 -4
- data/app/decorators/tenon/post_decorator.rb +0 -4
- data/app/decorators/tenon/redirect_decorator.rb +0 -2
- data/app/decorators/tenon/tenon_callout_decorator.rb +0 -4
- data/app/decorators/tenon/user_decorator.rb +0 -4
- data/app/mailers/tenon/comment_mailer.rb +0 -16
- data/app/mailers/tenon/contact_mailer.rb +0 -15
- data/app/models/ability.rb +0 -32
- data/app/models/tenon/comment.rb +0 -47
- data/app/models/tenon/comment_subscriber.rb +0 -7
- data/app/models/tenon/contact.rb +0 -46
- data/app/models/tenon/event.rb +0 -45
- data/app/models/tenon/gallery.rb +0 -15
- data/app/models/tenon/page.rb +0 -105
- data/app/models/tenon/photo.rb +0 -10
- data/app/models/tenon/post.rb +0 -35
- data/app/models/tenon/post_category.rb +0 -7
- data/app/models/tenon/redirect.rb +0 -17
- data/app/models/tenon/role.rb +0 -8
- data/app/models/tenon/role_assignment.rb +0 -6
- data/app/models/tenon/s3_direct_upload.rb +0 -75
- data/app/models/tenon/tenon_callout.rb +0 -16
- data/app/models/tenon/user.rb +0 -60
- data/app/views/devise/confirmations/new.html.erb +0 -12
- data/app/views/devise/confirmations/new.html.haml +0 -0
- data/app/views/devise/mailer/confirmation_instructions.html.haml +0 -7
- data/app/views/devise/mailer/reset_password_instructions.html.haml +0 -15
- data/app/views/devise/mailer/unlock_instructions.html.haml +0 -9
- data/app/views/devise/passwords/edit.html.haml +0 -22
- data/app/views/devise/passwords/new.html.haml +0 -17
- data/app/views/devise/registrations/edit.html.haml +0 -0
- data/app/views/devise/registrations/new.html.haml +0 -22
- data/app/views/devise/sessions/new.html.haml +0 -28
- data/app/views/devise/shared/_links.erb +0 -19
- data/app/views/devise/shared/_links.haml +0 -0
- data/app/views/devise/unlocks/new.html.erb +0 -12
- data/app/views/devise/unlocks/new.html.haml +0 -0
- data/app/views/layouts/tenon/login.html.haml +0 -19
- data/app/views/tenon/assets/_asset.json.jbuilder +0 -7
- data/app/views/tenon/assets/_sidebar_index.html.haml +0 -18
- data/app/views/tenon/assets/create.json.jbuilder +0 -1
- data/app/views/tenon/assets/index.json.jbuilder +0 -5
- data/app/views/tenon/assets/update.json.jbuilder +0 -1
- data/app/views/tenon/comment_mailer/comment_notification.html.haml +0 -7
- data/app/views/tenon/comments/_sidebar_index.html.haml +0 -22
- data/app/views/tenon/comments/index.html.haml +0 -19
- data/app/views/tenon/comments/index.json.jbuilder +0 -22
- data/app/views/tenon/contact_mailer/contact_notification.html.haml +0 -15
- data/app/views/tenon/contacts/_sidebar_index.html.haml +0 -32
- data/app/views/tenon/contacts/index.html.haml +0 -19
- data/app/views/tenon/contacts/index.json.jbuilder +0 -15
- data/app/views/tenon/events/_form.html.haml +0 -44
- data/app/views/tenon/events/edit.html.haml +0 -8
- data/app/views/tenon/events/index.html.haml +0 -23
- data/app/views/tenon/events/index.json.jbuilder +0 -16
- data/app/views/tenon/events/new.html.haml +0 -8
- data/app/views/tenon/galleries/_form.html.haml +0 -38
- data/app/views/tenon/galleries/_photo_fields.html.haml +0 -3
- data/app/views/tenon/galleries/edit.html.haml +0 -8
- data/app/views/tenon/galleries/index.html.haml +0 -22
- data/app/views/tenon/galleries/index.json.jbuilder +0 -15
- data/app/views/tenon/galleries/new.html.haml +0 -8
- data/app/views/tenon/pages/_form.html.haml +0 -58
- data/app/views/tenon/pages/edit.html.haml +0 -8
- data/app/views/tenon/pages/index.html.haml +0 -23
- data/app/views/tenon/pages/index.json.jbuilder +0 -22
- data/app/views/tenon/pages/new.html.haml +0 -8
- data/app/views/tenon/post_categories/_form.html.haml +0 -11
- data/app/views/tenon/post_categories/_post_category.json.jbuilder +0 -2
- data/app/views/tenon/post_categories/create.json.jbuilder +0 -1
- data/app/views/tenon/post_categories/edit.html.haml +0 -1
- data/app/views/tenon/post_categories/index.html.haml +0 -30
- data/app/views/tenon/post_categories/index.json.jbuilder +0 -5
- data/app/views/tenon/post_categories/update.json.jbuilder +0 -1
- data/app/views/tenon/posts/_form.html.haml +0 -65
- data/app/views/tenon/posts/edit.html.haml +0 -8
- data/app/views/tenon/posts/index.html.haml +0 -27
- data/app/views/tenon/posts/index.json.jbuilder +0 -20
- data/app/views/tenon/posts/new.html.haml +0 -8
- data/app/views/tenon/redirects/_form.html.haml +0 -42
- data/app/views/tenon/redirects/_redirect.json.jbuilder +0 -3
- data/app/views/tenon/redirects/edit.html.haml +0 -8
- data/app/views/tenon/redirects/index.html.haml +0 -29
- data/app/views/tenon/redirects/index.json.jbuilder +0 -5
- data/app/views/tenon/redirects/new.html.haml +0 -8
- data/app/views/tenon/shared/_posts_nav.html.haml +0 -8
- data/app/views/tenon/shared/menu_items/_assets.html.haml +0 -3
- data/app/views/tenon/shared/menu_items/_comments.html.haml +0 -2
- data/app/views/tenon/shared/menu_items/_events.html.haml +0 -6
- data/app/views/tenon/shared/menu_items/_galleries.html.haml +0 -6
- data/app/views/tenon/shared/menu_items/_pages.html.haml +0 -6
- data/app/views/tenon/shared/menu_items/_posts.html.haml +0 -7
- data/app/views/tenon/shared/menu_items/_settings.html.haml +0 -2
- data/app/views/tenon/shared/menu_items/_users.html.haml +0 -2
- data/app/views/tenon/shared/section_header/_quick_search.html.haml +0 -3
- data/app/views/tenon/shared/section_header/_sidebar_toggle.html.haml +0 -1
- data/app/views/tenon/tenon_callouts/_form.html.haml +0 -45
- data/app/views/tenon/tenon_callouts/_tenon_callout.json.jbuilder +0 -1
- data/app/views/tenon/tenon_callouts/edit.html.haml +0 -8
- data/app/views/tenon/tenon_callouts/index.html.haml +0 -24
- data/app/views/tenon/tenon_callouts/index.json.jbuilder +0 -5
- data/app/views/tenon/tenon_callouts/new.html.haml +0 -8
- data/app/views/tenon/users/_form.html.haml +0 -50
- data/app/views/tenon/users/edit.html.haml +0 -8
- data/app/views/tenon/users/index.html.haml +0 -23
- data/app/views/tenon/users/index.json.jbuilder +0 -28
- data/app/views/tenon/users/new.html.haml +0 -8
- data/config/initializers/devise.rb +0 -258
- data/config/locales/devise.en.yml +0 -60
- data/config/locales/tenon.en.yml +0 -313
- data/db/seeds.rb +0 -47
- data/lib/generators/tenon/scaffold/templates/view__item.json.jbuilder +0 -1
- data/lib/generators/tenon/scaffold/templates/view_index.json.jbuilder +0 -5
- data/lib/generators/tenon/scaffold/templates/view_item_row.jst.eco +0 -13
- data/lib/generators/tenon/scaffold_small/scaffold_small_generator.rb +0 -8
- data/lib/generators/tenon/scaffold_small/templates/controller.rb +0 -19
- data/lib/generators/tenon/scaffold_small/templates/decorator.rb +0 -2
- data/lib/generators/tenon/scaffold_small/templates/view__form.html.haml +0 -26
- data/lib/generators/tenon/scaffold_small/templates/view__item.json.jbuilder +0 -2
- data/lib/generators/tenon/scaffold_small/templates/view_create.json.jbuilder +0 -1
- data/lib/generators/tenon/scaffold_small/templates/view_index.html.haml +0 -27
- data/lib/generators/tenon/scaffold_small/templates/view_index.json.jbuilder +0 -5
- data/lib/generators/tenon/scaffold_small/templates/view_item_row.jst.eco +0 -12
- data/lib/generators/tenon/scaffold_small/templates/view_update.json.jbuilder +0 -1
- data/lib/tenon/can_have_comments.rb +0 -16
- data/lib/tenon/config/events.rb +0 -29
- data/lib/tenon/factories/comments.rb +0 -10
- data/lib/tenon/factories/contacts.rb +0 -9
- data/lib/tenon/factories/events.rb +0 -7
- data/lib/tenon/factories/galleries.rb +0 -5
- data/lib/tenon/factories/pages.rb +0 -5
- data/lib/tenon/factories/posts.rb +0 -10
- data/lib/tenon/factories/redirects.rb +0 -9
- data/lib/tenon/factories/tenon_callouts.rb +0 -9
- data/lib/tenon/factories/users.rb +0 -26
- data/lib/tenon/warning_generator.rb +0 -29
- data/spec/controllers/tenon/assets_controller_spec.rb +0 -262
- data/spec/controllers/tenon/comments_controller_spec.rb +0 -173
- data/spec/controllers/tenon/contacts_controller_spec.rb +0 -174
- data/spec/controllers/tenon/index_controller_spec.rb +0 -31
- data/spec/controllers/tenon/item_assets_controller_spec.rb +0 -29
- data/spec/controllers/tenon/pages_controller_spec.rb +0 -67
- data/spec/controllers/tenon/posts_controller_spec.rb +0 -31
- data/spec/controllers/tenon/resources_controller_spec.rb +0 -352
- data/spec/controllers/tenon/settings_controller_spec.rb +0 -65
- data/spec/controllers/tenon/simple_resources_controller_spec.rb +0 -42
- data/spec/controllers/tenon/users_controller_spec.rb +0 -112
- data/spec/decorators/tenon/application_decorator_spec.rb +0 -75
- data/spec/decorators/tenon/asset_decorator_spec.rb +0 -101
- data/spec/decorators/tenon/comment_decorator_spec.rb +0 -43
- data/spec/decorators/tenon/contact_decorator_spec.rb +0 -24
- data/spec/decorators/tenon/event_decorator_spec.rb +0 -26
- data/spec/decorators/tenon/page_decorator_spec.rb +0 -23
- data/spec/decorators/tenon/tenon_content/row_type_decorator_spec.rb +0 -20
- data/spec/features/settings_spec.rb +0 -75
- data/spec/features/tenon/assets_spec.rb +0 -88
- data/spec/features/tenon/comments_spec.rb +0 -51
- data/spec/features/tenon/contacts_spec.rb +0 -51
- data/spec/features/tenon/events_spec.rb +0 -104
- data/spec/features/tenon/galleries_spec.rb +0 -107
- data/spec/features/tenon/i18n_spec.rb +0 -106
- data/spec/features/tenon/pages_spec.rb +0 -97
- data/spec/features/tenon/post_categories_spec.rb +0 -91
- data/spec/features/tenon/posts_spec.rb +0 -93
- data/spec/features/tenon/tenon_callouts_spec.rb +0 -101
- data/spec/features/tenon/users_spec.rb +0 -98
- data/spec/fixtures/files/test.png +0 -0
- data/spec/lib/tenon/asset_style_generator_spec.rb +0 -84
- data/spec/lib/tenon/can_be_foreign_spec.rb +0 -20
- data/spec/lib/tenon/can_have_comments_spec.rb +0 -22
- data/spec/lib/tenon/has_asset_spec.rb +0 -46
- data/spec/lib/tenon/has_history/attr_serializer_spec.rb +0 -63
- data/spec/lib/tenon/i18n_lookup_spec.rb +0 -88
- data/spec/lib/tenon/proxy_attachment_spec.rb +0 -96
- data/spec/lib/tenon/reorderable_spec.rb +0 -25
- data/spec/lib/tenon/tenon_content_spec.rb +0 -22
- data/spec/lib/tenon/warning_generator_spec.rb +0 -153
- data/spec/models/tenon/asset_spec.rb +0 -98
- data/spec/models/tenon/comment_spec.rb +0 -81
- data/spec/models/tenon/contact_spec.rb +0 -62
- data/spec/models/tenon/event_spec.rb +0 -79
- data/spec/models/tenon/gallery_spec.rb +0 -12
- data/spec/models/tenon/item_asset_spec.rb +0 -19
- data/spec/models/tenon/my_settings_spec.rb +0 -27
- data/spec/models/tenon/page_spec.rb +0 -60
- data/spec/models/tenon/post_spec.rb +0 -48
- data/spec/models/tenon/redirect_spec.rb +0 -31
- data/spec/models/tenon/tenon_callout_spec.rb +0 -10
- data/spec/models/tenon/tenon_content/row_spec.rb +0 -34
- data/spec/models/tenon/user_spec.rb +0 -59
- data/spec/services/tenon/redirector_spec.rb +0 -30
- data/spec/spec_helper.rb +0 -79
- data/spec/support/integration_example_group.rb +0 -35
- data/spec/support/request_helpers.rb +0 -10
- data/vendor/assets/javascripts/backstretch.js +0 -4
- data/vendor/assets/javascripts/bootstrap.collapse.js +0 -179
- data/vendor/assets/javascripts/bootstrap.datetimepicker.js +0 -954
- data/vendor/assets/javascripts/bootstrap.tabs.js +0 -135
- data/vendor/assets/javascripts/cufon/Aller_400.font.js +0 -7
- data/vendor/assets/javascripts/cufon/Aller_700.font.js +0 -7
- data/vendor/assets/javascripts/cufon/cufon.js +0 -7
- data/vendor/assets/javascripts/jquery.corner.js +0 -249
- data/vendor/assets/javascripts/jquery.hoverIntent.js +0 -115
- data/vendor/assets/javascripts/jquery.radioSlider.js +0 -55
- data/vendor/assets/javascripts/jscrollpane.js +0 -1435
- data/vendor/assets/javascripts/select2.js +0 -3
- data/vendor/assets/javascripts/underscore.inflection.js +0 -177
- data/vendor/assets/stylesheets/bootstrap.datetimepicker.css +0 -152
- data/vendor/assets/stylesheets/bootstrap.tables.scss +0 -201
- data/vendor/assets/stylesheets/jscrollpane.scss +0 -20
- data/vendor/assets/stylesheets/select2.css +0 -1
@@ -2,12 +2,12 @@
|
|
2
2
|
= f.hidden_field :row_type
|
3
3
|
= f.hidden_field :list_order
|
4
4
|
-[[0,1], [2,3]].each do |positions|
|
5
|
-
.
|
6
|
-
= f.fields_for :pieces, f.object.pieces.select
|
5
|
+
.inner6{ class: cycle('', 'omega') }
|
6
|
+
= f.fields_for :pieces, f.object.pieces.select{ |p| positions.include?(p.position) } do |piece|
|
7
7
|
= piece.hidden_field :piece_type
|
8
8
|
- if piece.object.piece_type == 'Image'
|
9
9
|
.tn-tc-piece.tn-tc-asset-field
|
10
|
-
= render
|
10
|
+
= render 'tenon/tenon_content/piece_types/form/image', f: piece, style: 'half'
|
11
11
|
- else
|
12
12
|
.tn-tc-piece
|
13
13
|
= render 'tenon/tenon_content/piece_types/form/text', f: piece
|
@@ -2,6 +2,6 @@
|
|
2
2
|
= f.hidden_field :list_order
|
3
3
|
= f.hidden_field :row_type
|
4
4
|
= f.fields_for :pieces do |piece|
|
5
|
-
.tn-tc-piece.
|
6
|
-
= render
|
7
|
-
.spacer
|
5
|
+
.tn-tc-piece.inner6{ class: cycle('', 'omega') }
|
6
|
+
= render 'tenon/tenon_content/piece_types/form/text', f: piece, position: piece.object.position
|
7
|
+
.spacer
|
data/app/views/tenon/tenon_content/row_types/form/_two_column_with_background_image.html.haml
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
= f.hidden_field :row_type
|
4
4
|
= f.fields_for :pieces do |piece|
|
5
5
|
- if piece.object.position == 0
|
6
|
-
.tn-tc-piece.tn-tc-background-image.tn-tc-asset-field.
|
6
|
+
.tn-tc-piece.tn-tc-background-image.tn-tc-asset-field.inner12
|
7
7
|
= render 'tenon/tenon_content/piece_types/form/background_image', f: piece, position: 0, style: 'full'
|
8
8
|
- else
|
9
9
|
.tn-tc-piece.tn-text-overlay{class: cycle('', 'omega')}
|
10
10
|
= render 'tenon/tenon_content/piece_types/form/text', f: piece, position: piece.object.position
|
11
11
|
|
12
|
-
.spacer
|
12
|
+
.spacer
|
@@ -4,7 +4,7 @@ class Hash
|
|
4
4
|
# symbolize each hash in .values
|
5
5
|
values.each { |h| h.recursive_symbolize_keys! if h.is_a?(Hash) }
|
6
6
|
# symbolize each hash inside an array in .values
|
7
|
-
values.select
|
7
|
+
values.select{ |v| v.is_a?(Array) }.flatten.each { |h| h.recursive_symbolize_keys! if h.is_a?(Hash) }
|
8
8
|
self
|
9
9
|
end
|
10
10
|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# ClientSideValidations Initializer
|
2
|
+
|
3
|
+
# Disabled validators. The uniqueness validator is disabled by default for security issues. Enable it on your own responsibility!
|
4
|
+
# ClientSideValidations::Config.disabled_validators = [:uniqueness]
|
5
|
+
|
6
|
+
# Uncomment to validate number format with current I18n locale
|
7
|
+
# ClientSideValidations::Config.number_format_with_locale = true
|
8
|
+
|
9
|
+
# Uncomment the following block if you want each input field to have the validation messages attached.
|
10
|
+
#
|
11
|
+
# Note: client_side_validation requires the error to be encapsulated within
|
12
|
+
# <label for="#{instance.send(:tag_id)}" class="message"></label>
|
13
|
+
#
|
14
|
+
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
|
15
|
+
if html_tag =~ /^<label/
|
16
|
+
html_tag.html_safe
|
17
|
+
else
|
18
|
+
%(
|
19
|
+
<div class="input-block__field-with-errors">
|
20
|
+
#{html_tag}
|
21
|
+
<label for="#{instance.send(:tag_id)}" class="input-block__error-message">
|
22
|
+
#{instance.error_message.first}
|
23
|
+
</label>
|
24
|
+
</div>
|
25
|
+
).html_safe
|
26
|
+
end
|
27
|
+
end
|
@@ -73,18 +73,4 @@ Tenon.configure do |config|
|
|
73
73
|
# If you need to add further config options you can add them
|
74
74
|
# in lib/tenon.rb as attr_accessors to Tenon::Configuration
|
75
75
|
|
76
|
-
# config.front_end is DEPRECATED as of 1.0.57
|
77
|
-
config.front_end = {
|
78
|
-
breakpoints: {
|
79
|
-
desktop: 1400,
|
80
|
-
laptop: 960,
|
81
|
-
tablet: 768
|
82
|
-
},
|
83
|
-
columns: 24,
|
84
|
-
gutter: 20,
|
85
|
-
|
86
|
-
content_columns: {
|
87
|
-
default: 18
|
88
|
-
}
|
89
|
-
}
|
90
76
|
end
|
data/config/routes.rb
CHANGED
@@ -1,54 +1,18 @@
|
|
1
1
|
Tenon::Engine.routes.draw do
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
resources :item_versions, only: [:create, :new, :index]
|
3
|
+
get 'item_versions/:item_type(/:item_id)',
|
4
|
+
controller: :item_versions,
|
5
|
+
action: :index,
|
6
|
+
as: :list_item_versions
|
5
7
|
|
6
8
|
resources :assets, path: 'asset-library', except: [:show] do
|
7
|
-
post 'encode_notify', :
|
8
|
-
get :crop, :
|
9
|
-
end
|
10
|
-
|
11
|
-
resources :comments, :only => [:index, :destroy] do
|
12
|
-
get 'toggle_approved', :on => :member
|
13
|
-
end
|
14
|
-
|
15
|
-
resources :contacts, :only => [:index, :destroy] do
|
16
|
-
get 'toggle_read', :on => :member
|
17
|
-
get 'toggle_replied', :on => :member
|
9
|
+
post 'encode_notify', on: :collection
|
10
|
+
get :crop, on: :member
|
18
11
|
end
|
19
12
|
|
20
|
-
resources :
|
21
|
-
|
22
|
-
resources :galleries, :except => [:show] do
|
23
|
-
post 'reorder', :on => :collection
|
24
|
-
end
|
25
|
-
|
26
|
-
resources :item_assets, :except => [:index, :show]
|
27
|
-
|
28
|
-
resources :pages do
|
29
|
-
post 'reorder', :on => :collection
|
30
|
-
end
|
13
|
+
resources :item_assets, except: [:index, :show]
|
31
14
|
|
32
|
-
resources :
|
33
|
-
|
34
|
-
resources :posts do
|
35
|
-
post :reorder, :on => :collection
|
36
|
-
end
|
37
|
-
|
38
|
-
resource :settings, :only => [:show, :update]
|
39
|
-
|
40
|
-
resources :tenon_callouts do
|
41
|
-
post 'reorder', :on => :collection
|
42
|
-
end
|
43
|
-
|
44
|
-
resources :redirects do
|
45
|
-
post 'reorder', :on => :collection
|
46
|
-
get 'toggle_active', :on => :member
|
47
|
-
end
|
48
|
-
|
49
|
-
resources :users, path: :user_management, :except => [:show] do
|
50
|
-
get 'approve', :on => :member
|
51
|
-
end
|
15
|
+
resources :styleguides, only: [:index]
|
52
16
|
|
53
|
-
root :
|
17
|
+
root to: Tenon.config.routing.root
|
54
18
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class DropDefaultTenonResources < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
drop_table :tenon_comment_subscribers
|
4
|
+
drop_table :tenon_comments
|
5
|
+
drop_table :tenon_contacts
|
6
|
+
drop_table :tenon_events
|
7
|
+
drop_table :tenon_galleries
|
8
|
+
drop_table :tenon_pages
|
9
|
+
drop_table :tenon_photos
|
10
|
+
drop_table :tenon_post_categories
|
11
|
+
drop_table :tenon_post_categories_posts
|
12
|
+
drop_table :tenon_posts
|
13
|
+
drop_table :tenon_redirects
|
14
|
+
end
|
15
|
+
end
|
@@ -29,4 +29,4 @@ null,function(a,b,c){if(b.name in{p:1,div:1}){b="ltr"==d.contentsLangDirection?"
|
|
29
29
|
"transparent")}],[/^margin$/,G],["text-indent","0cm"],["page-break-before"],["tab-stops"],["display","none"],r?[/font-?/]:null],w),width:function(a,c){if(c.name in b.$tableContent)return!1},border:function(a,c){if(c.name in b.$tableContent)return!1},"class":function(a,b){return b.classWhiteList&&-1!=b.classWhiteList.indexOf(" "+a+" ")?a:!1},bgcolor:k,valign:w?k:function(a,b){b.addStyle("vertical-align",a);return!1}},comment:CKEDITOR.env.ie?k:function(a,b){var c=a.match(/<img.*?>/),d=a.match(/^\[if !supportLists\]([\s\S]*?)\[endif\]$/);
|
30
30
|
return d?(d=(c=d[1]||c&&"l.")&&c.match(/>(?:[(]?)([^\s]+?)([.)]?)</),h(d,c)):CKEDITOR.env.gecko&&c?(c=CKEDITOR.htmlParser.fragment.fromHtml(c[0]).children[0],(d=(d=(d=b.previous)&&d.value.match(/<v:imagedata[^>]*o:href=['"](.*?)['"]/))&&d[1])&&(c.attributes.src=d),c):!1}}}},J=function(){this.dataFilter=new CKEDITOR.htmlParser.filter};J.prototype={toHtml:function(a){a=CKEDITOR.htmlParser.fragment.fromHtml(a);var c=new CKEDITOR.htmlParser.basicWriter;a.writeHtml(c,this.dataFilter);return c.getHtml(!0)}};
|
31
31
|
CKEDITOR.cleanWord=function(a,c){a=a.replace(/<!\[([^\]]*?)\]>/g,"\x3c!--[$1]--\x3e");CKEDITOR.env.gecko&&(a=a.replace(/(\x3c!--\[if[^<]*?\])--\x3e([\S\s]*?)\x3c!--(\[endif\]--\x3e)/gi,"$1$2$3"));CKEDITOR.env.webkit&&(a=a.replace(/(class="MsoListParagraph[^>]+>\x3c!--\[if !supportLists\]--\x3e)([^<]+<span[^<]+<\/span>)(\x3c!--\[endif\]--\x3e)/gi,"$1\x3cspan\x3e$2\x3c/span\x3e$3"));var b=new J,f=b.dataFilter;f.addRules(CKEDITOR.plugins.pastefromword.getRules(c,f));c.fire("beforeCleanWord",{filter:f});
|
32
|
-
try{a=b.toHtml(a)}catch(d){c.showNotification(c.lang.pastefromword.error)}a=a.replace(/cke:.*?".*?"/g,"");a=a.replace(/style=""/g,"");return a=a.replace(/<span>/g,"")}})();
|
32
|
+
try{a=b.toHtml(a)}catch(d){c.showNotification(c.lang.pastefromword.error)}a=a.replace(/cke:.*?".*?"/g,"");a=a.replace(/style=""/g,"");return a=a.replace(/<span>/g,"")}})();
|
@@ -7,32 +7,38 @@ module Tenon
|
|
7
7
|
invoke :model
|
8
8
|
|
9
9
|
def copy_files
|
10
|
-
style = options.small? ? 'small' : 'full'
|
11
|
-
|
12
10
|
# Controller, helper, views, test and stylesheets directories.
|
13
11
|
empty_directory(File.join('app/views/tenon', plural_table_name))
|
14
|
-
empty_directory(File.join('app/assets/javascripts/tenon/templates', plural_table_name))
|
15
12
|
|
16
13
|
actions = %w(
|
17
14
|
index.html.haml new.html.haml edit.html.haml _form.html.haml
|
18
|
-
|
19
|
-
|
15
|
+
)
|
16
|
+
|
20
17
|
actions.each do |action|
|
21
18
|
src_path = File.join(self.class.source_root, "view_#{action}")
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
next unless File.exist?(src_path)
|
20
|
+
template(
|
21
|
+
"view_#{action}",
|
22
|
+
File.join('app/views/tenon', plural_table_name, action)
|
23
|
+
)
|
25
24
|
end
|
26
25
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
26
|
+
%w( decorator policy serializer ).each do |file_type|
|
27
|
+
template(
|
28
|
+
"#{file_type}.rb",
|
29
|
+
File.join(
|
30
|
+
"app/#{file_type.pluralize}",
|
31
|
+
"#{file_name}_#{file_type}.rb"
|
32
|
+
)
|
33
|
+
)
|
34
|
+
end
|
33
35
|
|
34
36
|
template(
|
35
|
-
'controller.rb',
|
37
|
+
'controller.rb',
|
38
|
+
File.join(
|
39
|
+
'app/controllers/tenon',
|
40
|
+
"#{file_name.pluralize}_controller.rb"
|
41
|
+
)
|
36
42
|
)
|
37
43
|
end
|
38
44
|
|
@@ -42,7 +48,7 @@ module Tenon
|
|
42
48
|
# Prepare the routes
|
43
49
|
filename = File.join(Rails.root, 'config', 'routes.rb')
|
44
50
|
pattern = 'Tenon::Engine.routes.draw do'
|
45
|
-
reorder = attributes.select { |a| a.name == 'list_order' }.empty? ? '' : "do \n post 'reorder', :
|
51
|
+
reorder = attributes.select { |a| a.name == 'list_order' }.empty? ? '' : "do \n post 'reorder', on: :collection \n end"
|
46
52
|
contents = File.read(filename)
|
47
53
|
|
48
54
|
# Write the initial Tenon routes block if it's not there already
|
@@ -90,13 +96,22 @@ module Tenon
|
|
90
96
|
end
|
91
97
|
end
|
92
98
|
|
99
|
+
def add_menu_item
|
100
|
+
case behavior
|
101
|
+
when :invoke
|
102
|
+
say 'Add the following line to app/views/tenon/shared/_main_nav.html.haml:'
|
103
|
+
say " = nav_item '#{class_name.pluralize.titleize}', #{plural_name}_path, 'star'"
|
104
|
+
when :revoke
|
105
|
+
say %(Don't forget to remove the nav_item entry from app/views/tenon/shared/_main_nav.html.haml)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
93
109
|
no_tasks do
|
94
110
|
def collections
|
95
|
-
@collections
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
end.uniq
|
111
|
+
return @collections if @collections
|
112
|
+
collections = attributes.select { |a| a.name.match(/_id$/) }
|
113
|
+
collections = collections.map { |a| a.name.gsub(/_id$/, '') }
|
114
|
+
@collections = collections.uniq
|
100
115
|
end
|
101
116
|
|
102
117
|
def assets
|
@@ -106,22 +121,26 @@ module Tenon
|
|
106
121
|
def text_fields
|
107
122
|
return @text_fields if @text_fields
|
108
123
|
@text_fields = attributes.select { |a| a.type.to_s == 'string' }
|
109
|
-
@text_fields
|
124
|
+
@text_fields -= seo_fields
|
110
125
|
end
|
111
126
|
|
112
127
|
def text_areas
|
113
128
|
return @text_areas if @text_areas
|
114
129
|
@text_areas = attributes.select { |a| a.type.to_s == 'text' }
|
115
|
-
@text_areas
|
130
|
+
@text_areas -= seo_fields
|
116
131
|
end
|
117
132
|
|
118
133
|
def timestamps
|
119
134
|
@timestamps ||= attributes.select do |a|
|
120
135
|
%w(datetime timestamp).include?(a.type.to_s) &&
|
121
|
-
|
136
|
+
a.name != 'publish_at'
|
122
137
|
end
|
123
138
|
end
|
124
139
|
|
140
|
+
def dates
|
141
|
+
@dates ||= attributes.select { |a| a.type.to_s == 'date' }
|
142
|
+
end
|
143
|
+
|
125
144
|
def booleans
|
126
145
|
@booleans ||= attributes.select { |a| a.type.to_s == 'boolean' }
|
127
146
|
end
|
@@ -129,7 +148,8 @@ module Tenon
|
|
129
148
|
def numbers
|
130
149
|
@numbers ||= attributes.select do |a|
|
131
150
|
%w(float integer decimal).include?(a.type.to_s) &&
|
132
|
-
|
151
|
+
!a.name.match(/.*_id$/) &&
|
152
|
+
a.name != 'list_order'
|
133
153
|
end
|
134
154
|
end
|
135
155
|
|
@@ -139,8 +159,13 @@ module Tenon
|
|
139
159
|
@seo_fields = attributes.select { |a| names.include?(a.name) }
|
140
160
|
end
|
141
161
|
|
142
|
-
def
|
143
|
-
|
162
|
+
def tenon_contents
|
163
|
+
@tenon_contents ||= attributes.select { |a| a.type.to_s == 'content' }
|
164
|
+
end
|
165
|
+
|
166
|
+
def reorderable?
|
167
|
+
return @reorderable if @reorderable
|
168
|
+
@reorderable = attributes.any? { |a| a.name.to_s == 'list_order' }
|
144
169
|
end
|
145
170
|
end
|
146
171
|
end
|
@@ -1,11 +1,13 @@
|
|
1
|
-
<% collections = attributes.select
|
2
|
-
|
1
|
+
<% collections = attributes.select{|a| a.name.match(/_id$/)}.map{|a| a.name.gsub(/_id$/, '')}.uniq -%>
|
2
|
+
module Tenon
|
3
|
+
class <%= class_name.pluralize %>Controller < ResourcesController # :nodoc:
|
3
4
|
<% unless collections.blank? -%>
|
4
|
-
|
5
|
+
before_filter :get_collections, only: [:edit, :update, :new, :create]
|
5
6
|
<% end -%>
|
6
7
|
|
7
8
|
<% unless collections.blank? -%>
|
8
|
-
|
9
|
+
private
|
10
|
+
|
9
11
|
def get_collections
|
10
12
|
<% collections.each do |c| -%>
|
11
13
|
@<%= c.pluralize %> = <%= c.camelize %>.all
|
@@ -16,4 +18,5 @@ class Tenon::<%= class_name.pluralize %>Controller < Tenon::ResourcesController
|
|
16
18
|
def resource_params
|
17
19
|
params.require(:<%= singular_name %>).permit!
|
18
20
|
end
|
21
|
+
end
|
19
22
|
end
|
@@ -1,80 +1,75 @@
|
|
1
|
-
-
|
2
|
-
|
3
|
-
|
4
|
-
%h2 <%= plural_name.titleize %>
|
5
|
-
= link_to "New <%= singular_name.titleize %>", new_<%= singular_name %>_path, class: 'btn btn-block btn-primary'
|
1
|
+
.drawer-pusher
|
2
|
+
= autosaving_form_for @<%= singular_name %> do |f|
|
3
|
+
= render 'tenon/shared/default_form_toolbar', obj: @<%= singular_name %>
|
6
4
|
|
7
|
-
|
5
|
+
%main
|
6
|
+
<% if attributes.map(&:name).include? 'title' -%>
|
7
|
+
= f.title_text_field :title
|
8
8
|
|
9
|
-
<%
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
%li= link_to "Search Optimization", '#seo', data: {toggle: 'tab'}
|
15
|
-
<% end -%>
|
16
|
-
= autosaving_form_for @<%= singular_name %> do |f|
|
17
|
-
= error_messages_for :<%= singular_name %>
|
18
|
-
.fields.large.tabs
|
19
|
-
.tab-pane.active#details
|
20
|
-
<% text_fields.each do |field| -%>
|
21
|
-
.form-group
|
9
|
+
<% end -%>
|
10
|
+
<% if text_fields.reject { |f| f.name == 'title' }.present? -%>
|
11
|
+
.panel-label Text Fields
|
12
|
+
.panel.panel--padded
|
13
|
+
<% text_fields.reject { |f| f.name == 'title' }.each do |field| -%>
|
22
14
|
= f.text_field :<%= field.name %>
|
23
15
|
<% end -%>
|
16
|
+
<% end -%>
|
17
|
+
<% if assets.present? -%>
|
18
|
+
.panel-label Assets
|
24
19
|
<% assets.each do |field| -%>
|
25
|
-
.
|
26
|
-
|
20
|
+
= f.asset :<%= field.name %>
|
21
|
+
<% end -%>
|
22
|
+
|
27
23
|
<% end -%>
|
24
|
+
<% if text_areas.present? -%>
|
25
|
+
.panel-label Text Areas
|
26
|
+
.panel.panel--padded
|
28
27
|
<% text_areas.each do |field| -%>
|
29
|
-
.form-group
|
30
28
|
= f.text_area :<%= field.name %>
|
31
29
|
<% end -%>
|
32
|
-
|
33
|
-
|
30
|
+
|
31
|
+
<% end -%>
|
32
|
+
|
33
|
+
<% if tenon_contents.present? -%>
|
34
|
+
.panel-label Tenon Content Fields
|
35
|
+
.panel.panel--padded
|
36
|
+
<% tenon_contents.each do |field| -%>
|
37
|
+
= f.tenon_content :<%= field.name %>
|
34
38
|
<% end -%>
|
35
39
|
|
36
|
-
|
37
|
-
<% unless [collections, booleans, timestamps].flatten.empty? -%>
|
38
|
-
|
39
|
-
|
40
|
+
<% end -%>
|
41
|
+
<% unless [collections, booleans, dates, numbers, timestamps].flatten.empty? -%>
|
42
|
+
.panel-label Details
|
43
|
+
.panel.panel--padded
|
40
44
|
<% collections.each do |c| %>
|
41
|
-
.form-group.bordered
|
42
|
-
= f.super_label :<%= c %>, '<%= c.titleize %>'
|
43
45
|
= f.collection_select :<%= c %>_id, @<%= c.pluralize %>, :id, :title, prompt: '--'
|
46
|
+
|
47
|
+
<% end -%>
|
48
|
+
<% dates.each do |field| -%>
|
49
|
+
= f.date_picker :<%= field.name %>
|
44
50
|
<% end -%>
|
45
51
|
<% timestamps.each do |field| -%>
|
46
|
-
|
47
|
-
= f.text_field :<%= field.name %>, data: {behaviour: 'datetime-picker'}, placeholder: '--'
|
52
|
+
= f.date_time_picker :<%= field.name %>
|
48
53
|
<% end -%>
|
49
54
|
<% booleans.each do |field| %>
|
50
|
-
|
51
|
-
= f.check_box :<%= field.name %>, class: 'tn-checkbox-right'
|
52
|
-
= f.super_label :<%= field.name %>
|
55
|
+
= f.check_box :<%= field.name %>
|
53
56
|
<% end -%>
|
54
57
|
<% numbers.each do |field| %>
|
55
|
-
|
56
|
-
= f.text_field :<%= field.name %>, placeholder: '--'
|
58
|
+
= f.number_field :<%= field.name %>
|
57
59
|
<% end -%>
|
58
60
|
|
59
61
|
<% end -%>
|
60
62
|
|
61
|
-
%h4.box-label Actions
|
62
|
-
.box
|
63
63
|
<% if attributes.map(&:name).include? 'publish_at' -%>
|
64
|
-
.
|
65
|
-
|
66
|
-
|
67
|
-
.content
|
68
|
-
- if can?(:publish, @<%= singular_name %>)
|
69
|
-
%button.btn.btn-block.btn-comp{ data: { disable_with: "Please wait..." } } Save
|
70
|
-
- if can?(:create, Tenon::ItemVersion)
|
71
|
-
= save_draft_button(@<%= singular_name %>)
|
72
|
-
.last-autosave
|
64
|
+
.panel-label Publishing
|
65
|
+
.panel.panel--padded
|
66
|
+
= f.date_time_picker :publish_at, label: 'Publish Date'
|
73
67
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
68
|
+
<% end -%>
|
69
|
+
<% if seo_fields.present? -%>
|
70
|
+
.panel-label SEO
|
71
|
+
.panel.panel--padded
|
72
|
+
= render "tenon/shared/seo_fields", :f => f
|
73
|
+
|
74
|
+
<% end -%>
|
80
75
|
.spacer
|
@@ -1,24 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
.tools
|
11
|
-
= render "tenon/shared/section_header/sidebar_toggle"
|
12
|
-
|
13
|
-
.header-button
|
14
|
-
= link_to '#', id: 'quick-search-toggle' do
|
15
|
-
.header-icon= fa_icon('fw search')
|
16
|
-
|
17
|
-
.toolbox
|
18
|
-
= render "tenon/shared/section_header/quick_search", record_list: '#<%= plural_name %>'
|
19
|
-
|
20
|
-
.main-content
|
21
|
-
= error_messages_for :<%= singular_name %>
|
22
|
-
%ul#<%= plural_name %>.record-list<% if attributes.map(&:name).include?('list_order') %>.sortable<% end -%>{data: {records: {url: <%= plural_name %>_path(format: 'json'), template: 'tenon/templates/<%= plural_name %>/<%= singular_name %>_row', name: '<%= singular_name %>'}<% if attributes.map(&:name).include?('list_order') %>, :'reorder-path' => reorder_<%= plural_name %>_path<% end %>}}
|
23
|
-
|
24
|
-
= link_to "Load More <%= plural_name.titleize %>", '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#<%= plural_name %>'
|
1
|
+
= react_component 'ResourceIndexRoot',
|
2
|
+
title: '<%= plural_name.titleize %>',
|
3
|
+
breadcrumbs: breadcrumb_links,
|
4
|
+
recordsPath: <%= plural_name %>_path(format: 'json'),
|
5
|
+
<% if reorderable? -%>
|
6
|
+
reorderPath: reorder_<%= plural_name %>_path,
|
7
|
+
<% end -%>
|
8
|
+
newPath: new_<%= singular_name %>_path
|
data/lib/tasks/tenon_tasks.rake
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
namespace :tenon do
|
2
2
|
desc "Generate Asset responsive styles"
|
3
|
-
task :
|
3
|
+
task generate_responsive_styles: :environment do
|
4
4
|
styles = [
|
5
5
|
:tenon_tenon_content_piece_image_x2000,
|
6
6
|
:tenon_tenon_content_piece_image_x1800,
|
@@ -30,7 +30,7 @@ namespace :tenon do
|
|
30
30
|
end
|
31
31
|
|
32
32
|
desc "Regenerate all Asset styles"
|
33
|
-
task :
|
33
|
+
task regenerate_asset_styles: :environment do
|
34
34
|
total_assets = Tenon::Asset.all.count
|
35
35
|
|
36
36
|
Tenon::Asset.all.each_with_index do |asset, i|
|
@@ -1,23 +1,22 @@
|
|
1
|
-
class <%= class_name %> <
|
2
|
-
# Scopes, attachments, etc.
|
1
|
+
class <%= class_name %> < ApplicationRecord # :nodoc:
|
3
2
|
has_history
|
4
|
-
<% unless attributes.select{|a| a.name == 'list_order' }.empty? -%>
|
3
|
+
<% unless attributes.select {|a| a.name == 'list_order' }.empty? -%>
|
5
4
|
include Tenon::Reorderable
|
6
|
-
default_scope { order(
|
5
|
+
default_scope { order(:list_order) }
|
7
6
|
<% end -%>
|
8
|
-
<% attributes.select {|a| a.type.to_s == 'asset'}.each do |f| -%>
|
7
|
+
<% attributes.select { |a| a.type.to_s == 'asset' }.each do |f| -%>
|
9
8
|
has_asset :<%= f.name %>
|
10
9
|
<% end -%>
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
<% if attributes.any? { |a| a.name.to_s == 'publish_at' } -%>
|
11
|
+
scope :published, -> { where('<%= table_name %>.publish_at < ?', Time.now) }
|
12
|
+
<% end -%>
|
13
|
+
<% attributes.select{ |a| a.type.to_s == 'content' }.each do |f| -%>
|
14
|
+
tenon_content :<%= f.name %>
|
15
|
+
<% end -%>
|
16
|
+
<% attributes.select { |a| a.type.to_s == 'reference' }.each do |attribute| -%>
|
16
17
|
belongs_to :<%= attribute.name %>
|
17
18
|
<% end -%>
|
18
|
-
<% attributes.select
|
19
|
+
<% attributes.select{|a| a.name.match(/_id$/)}.each do |attribute| -%>
|
19
20
|
belongs_to :<%= attribute.name.gsub(/_id$/, '') %>
|
20
21
|
<% end -%>
|
21
|
-
|
22
|
-
private
|
23
22
|
end
|
@@ -4,7 +4,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration
|
|
4
4
|
<% attributes.each do |attribute| -%>
|
5
5
|
<% if attribute.password_digest? -%>
|
6
6
|
t.string :password_digest<%= attribute.inject_options %>
|
7
|
-
<% elsif attribute.type.to_s
|
7
|
+
<% elsif !%w(asset content).include?(attribute.type.to_s) -%>
|
8
8
|
t.<%= attribute.type %> :<%= attribute.name %><%= attribute.inject_options %>
|
9
9
|
<% end -%>
|
10
10
|
<% end -%>
|