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
@@ -0,0 +1,18 @@
|
|
1
|
+
# Helpful serializer for including pagination meta
|
2
|
+
# Source: http://stackoverflow.com/a/23002614/131208
|
3
|
+
module Tenon
|
4
|
+
class PaginatingSerializer < ActiveModel::ArraySerializer
|
5
|
+
def initialize(object, options = {})
|
6
|
+
meta_key = options[:meta_key] || :meta
|
7
|
+
options[meta_key] ||= {}
|
8
|
+
options[meta_key][:pagination] = {
|
9
|
+
current_page: object.current_page,
|
10
|
+
per_page: object.per_page,
|
11
|
+
offset: object.offset,
|
12
|
+
total_pages: object.total_pages,
|
13
|
+
total_entries: object.total_entries
|
14
|
+
}
|
15
|
+
super(object, options)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,32 +1,42 @@
|
|
1
1
|
!!! Strict
|
2
|
-
%html{ :
|
2
|
+
%html{ lang: 'en' }
|
3
3
|
%head
|
4
4
|
= csrf_meta_tag
|
5
|
-
%meta{ :
|
6
|
-
%meta{ :
|
5
|
+
%meta{ content: "text/html; charset=utf-8", "http-equiv" => "Content-Type" }
|
6
|
+
%meta{ content: 'initial-scale=1,width=device-width,user-scalable=no', name: 'viewport' }
|
7
7
|
= platform_hints(Tenon.config.primary_color) if Tenon.config.primary_color.present?
|
8
8
|
|
9
9
|
%title
|
10
|
+
= @page_title + " | " if @page_title
|
10
11
|
= Tenon::MySettings.site_title.present? ? Tenon::MySettings.site_title : 'Tenon'
|
11
12
|
|
12
|
-
= stylesheet_link_tag '
|
13
|
+
= stylesheet_link_tag '//fonts.googleapis.com/icon?family=Material+Icons'
|
13
14
|
= javascript_include_tag '/ckeditor/ckeditor'
|
14
|
-
= javascript_include_tag 'tenon/
|
15
|
+
= javascript_include_tag 'tenon/application'
|
16
|
+
= javascript_include_tag '//cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js'
|
17
|
+
= javascript_include_tag '//cdnjs.cloudflare.com/ajax/libs/pickadate.js/3.5.6/compressed/picker.js'
|
18
|
+
= javascript_include_tag '//cdnjs.cloudflare.com/ajax/libs/pickadate.js/3.5.6/compressed/picker.date.js'
|
19
|
+
= javascript_include_tag '//cdnjs.cloudflare.com/ajax/libs/pickadate.js/3.5.6/compressed/picker.time.js'
|
20
|
+
- if Rails.env.development?
|
21
|
+
= javascript_include_tag 'http://localhost:9999/bundle.js'
|
15
22
|
|
16
|
-
|
17
|
-
|
23
|
+
%body{data: { controller: params[:controller], action: params[:action] } }
|
24
|
+
= flash_messages
|
18
25
|
|
26
|
+
= render 'tenon/shared/burger'
|
27
|
+
= render 'tenon/shared/util_nav', modifier: 'util-nav--in-toolbar'
|
19
28
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
- if content_for?(:sidebar)
|
24
|
-
.sidebar-container= yield :sidebar
|
25
|
-
.page-wrap
|
26
|
-
= yield
|
29
|
+
.main-nav-overlay{ data: { target: 'main-nav' } }
|
30
|
+
#main-nav.main-nav-drawer.drawer
|
31
|
+
= render 'tenon/shared/app_info'
|
27
32
|
|
28
|
-
|
29
|
-
|
33
|
+
.app-info.app-info--account
|
34
|
+
= link_to '#', class: 'app-info__link app-info__link--dropdown-button', data: { dropdown_activate: true } do
|
35
|
+
.app-info__avatar= i('person')
|
36
|
+
= current_user.email
|
37
|
+
= render 'tenon/shared/account_dropdown'
|
30
38
|
|
31
|
-
|
32
|
-
|
39
|
+
= render 'tenon/shared/main_nav'
|
40
|
+
|
41
|
+
|
42
|
+
= yield
|
@@ -1,16 +1,33 @@
|
|
1
|
-
|
2
|
-
#progress
|
1
|
+
.drawer-pusher
|
3
2
|
= form_for Tenon::Asset.new, format: 'json', builder: Tenon::FormBuilder do |f|
|
4
|
-
|
5
|
-
|
6
|
-
.
|
7
|
-
|
3
|
+
.toolbar
|
4
|
+
= render 'tenon/shared/breadcrumbs'
|
5
|
+
.toolbar__content
|
6
|
+
.toolbar__actions.toolbar__actions--right
|
7
|
+
- if policy(@asset).publish?
|
8
|
+
%button.btn.toolbar__btn.submit{ data: { disable_with: "Please wait..." } } Save
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
%span#choose-files= defined?(multiple) ? t('tenon.assets.choose_file') : t('tenon.assets.choose_files')
|
13
|
-
%input{ :type => 'file', :class => 'upload', multiple: defined?(multiple) && multiple, style: 'width: 100%;', name: 'asset[attachment]' }
|
10
|
+
.toolbar__action
|
11
|
+
%a.action-icon.dropdown-button{ href: '#!', data: { activates: 'form-dropdown'} }
|
12
|
+
= i('more_vert')
|
14
13
|
|
15
|
-
|
14
|
+
%ul.dropdown#form-dropdown
|
15
|
+
- if @asset.persisted?
|
16
|
+
%li.dropdown__item
|
17
|
+
= link_to @asset, data: { method: :delete, confirm: 'Are you sure you want to delete this?' }, class: 'dropdown__action action-icon delete-link' do
|
18
|
+
= i('delete')
|
19
|
+
%span Delete
|
16
20
|
|
21
|
+
%main
|
22
|
+
= error_messages_for :asset
|
23
|
+
|
24
|
+
= f.text_field :title, class: 'form-title-field', explanation: "Enter a title for your asset. You can leave this blank to just use the file name as the title. #{defined?(multiple) ? 'If you upload multiple assets a numerical series will be created.' : '' }"
|
25
|
+
|
26
|
+
.panel
|
27
|
+
.panel__content
|
28
|
+
.browse-button-holder
|
29
|
+
.fileupload.btn.btn-secondary.browse
|
30
|
+
%span#choose-files= defined?(multiple) ? 'Choose Files' : 'Choose File'
|
31
|
+
%input{ type: 'file', class: 'upload', multiple: defined?(multiple) && multiple, style: 'width: 100%;', name: 'asset[attachment]' }
|
32
|
+
|
33
|
+
.spacer
|
@@ -1,16 +1,16 @@
|
|
1
|
-
.
|
2
|
-
.
|
3
|
-
|
4
|
-
|
5
|
-
%button{ type: 'button', class: 'close', data: { dismiss: 'modal' }, :'aria-hidden' => 'true' } ×
|
6
|
-
%h4#myModalLabel{ class: 'modal-title'}= t('tenon.assets.crop')
|
7
|
-
.image-holder= image_tag(@asset.attachment.url, id: 'cropbox', data: { width: @asset.dimensions(:original)[0], height: @asset.dimensions(:original)[1] })
|
8
|
-
.spinner= fa_icon('spinner spin')
|
1
|
+
.modal.modal--fixed-footer.modal--xlg
|
2
|
+
.modal__content
|
3
|
+
.asset-cropping
|
4
|
+
= image_tag(@asset.attachment.url, id: 'cropbox', data: { width: @asset.dimensions(:original)[0], height: @asset.dimensions(:original)[1] })
|
9
5
|
|
10
|
-
|
6
|
+
.asset-cropping__explanation
|
7
|
+
Drag inside the image to crop
|
8
|
+
|
9
|
+
.modal__footer
|
10
|
+
= form_for @asset, data: { remote: true, crop_form: true } do |f|
|
11
11
|
- [:crop_x, :crop_y, :crop_w, :crop_h].each do |field|
|
12
12
|
= f.hidden_field field
|
13
|
-
.
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
= f.hidden_field :duplicate, value: true
|
14
|
+
|
15
|
+
.modal__action
|
16
|
+
= f.submit 'Save', class: 'save btn btn-comp', data: { disable_with: 'Please wait...' }
|
@@ -1,12 +1 @@
|
|
1
|
-
=
|
2
|
-
.modal-body
|
3
|
-
.fields.full
|
4
|
-
|
5
|
-
.form-group
|
6
|
-
= f.text_field :title
|
7
|
-
|
8
|
-
|
9
|
-
.spacer
|
10
|
-
|
11
|
-
.modal-footer
|
12
|
-
= f.submit t('tenon.common.save'), class: 'btn btn-comp', data: { disable_with: t('tenon.common.please_wait') }
|
1
|
+
= render 'form'
|
@@ -1,19 +1,5 @@
|
|
1
|
-
=
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
.tools
|
7
|
-
= render "tenon/shared/section_header/sidebar_toggle"
|
8
|
-
|
9
|
-
.header-button
|
10
|
-
= link_to '#', id: 'quick-search-toggle' do
|
11
|
-
.header-icon= fa_icon('fw search')
|
12
|
-
|
13
|
-
.toolbox
|
14
|
-
= render "tenon/shared/section_header/quick_search", record_list: '#assets'
|
15
|
-
|
16
|
-
.main-content
|
17
|
-
%ul#assets.record-grid{data: {role: 'records-list', records: {url: assets_path(format: 'json'), template: 'tenon/templates/assets/asset_row', name: 'asset'}}}
|
18
|
-
|
19
|
-
= link_to t('tenon.assets.load_more'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#assets'
|
1
|
+
= react_component 'ResourceIndexRoot',
|
2
|
+
title: 'Assets',
|
3
|
+
breadcrumbs: breadcrumb_links,
|
4
|
+
recordsPath: assets_path(format: 'json'),
|
5
|
+
newPath: new_asset_path
|
@@ -0,0 +1 @@
|
|
1
|
+
= render 'form'
|
@@ -1,32 +1,31 @@
|
|
1
|
-
=
|
1
|
+
= render layout: 'tenon/fields/base', locals: { f: f, method_name: method_name, opts: opts } do
|
2
|
+
%div{ class: opts[:wrapper_class] }
|
3
|
+
.asset-field
|
4
|
+
= f.hidden_field "#{method_name}_id", data: { asset_id_field: true }
|
2
5
|
|
3
|
-
-
|
4
|
-
|
6
|
+
.asset-field__thumbnail{ data: { asset_thumbnail: true } }
|
7
|
+
- if proxy_attachment.try(:asset)
|
8
|
+
= asset_icon(proxy_attachment.asset)
|
9
|
+
- else
|
10
|
+
= image_tag default_asset_thumbnail(proxy_attachment)
|
5
11
|
|
6
|
-
.
|
7
|
-
|
12
|
+
.asset-field__details
|
13
|
+
.asset-field__title{ data: { asset_info: true } }
|
14
|
+
- if proxy_attachment
|
15
|
+
= proxy_attachment.display_name
|
16
|
+
- else
|
17
|
+
No asset selected.
|
8
18
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
19
|
+
.asset-field__actions{ class: ('with-remove' if opts[:remove_association]) }
|
20
|
+
.asset-field__action
|
21
|
+
= link_to 'Browse', new_item_asset_path, class: 'action-text', data: { modal_remote: true, modal_title: "Select #{method_name.to_s.titleize}", modal_handler: 'AssetAttachment' }
|
22
|
+
- if opts[:remove_association]
|
23
|
+
.asset-field__action{ data: { asset_remove: true } }
|
24
|
+
= link_to_remove_association 'remove', f, class: 'action-text action-text--secondary'
|
25
|
+
- else
|
26
|
+
.asset-field__action{ data: { asset_remove: true }, style: ('display: none;' unless f.object.send("#{method_name}_id").present?) }
|
27
|
+
= link_to 'remove', '#', class: 'remove-asset action-text action-text--secondary', data: { confirm: 'Are you sure?' }
|
14
28
|
|
15
|
-
.details
|
16
|
-
.asset-info
|
17
|
-
- if proxy_attachment
|
18
|
-
= proxy_attachment.display_name
|
19
|
-
- else
|
20
|
-
No asset selected.
|
21
29
|
|
22
|
-
|
23
|
-
.
|
24
|
-
= link_to t('tenon.common.browse'), new_item_asset_path, class: 'btn btn-comp browse', data: { modal_remote: true, modal_title: "#{t('tenon.fields.select')} #{field.to_s.titleize}", modal_handler: 'Tenon.features.AssetAttachment' }
|
25
|
-
- if opts[:remove_association]
|
26
|
-
%small
|
27
|
-
or
|
28
|
-
= link_to_remove_association t('tenon.fields.remove'), f
|
29
|
-
- else
|
30
|
-
%small
|
31
|
-
or
|
32
|
-
= link_to t('tenon.fields.remove'), '#', class: 'remove-asset', data: { confirm: t('tenon.common.are_you_sure') }
|
30
|
+
|
31
|
+
.spacer
|
@@ -0,0 +1,9 @@
|
|
1
|
+
.input-block
|
2
|
+
= render layout: 'tenon/fields/base_inline', locals: { f: f, method_name: method_name, opts: opts } do
|
3
|
+
= f.super_check_box method_name, opts.merge(class: 'input-block__check-box')
|
4
|
+
|
5
|
+
.input-block__check-box-icon.input-block__checked-icon
|
6
|
+
= i('check')
|
7
|
+
|
8
|
+
- if opts[:explanation].present?
|
9
|
+
.input-block__explanation= raw opts[:explanation]
|
@@ -0,0 +1,2 @@
|
|
1
|
+
= render layout: 'tenon/fields/base', locals: { f: f, method_name: method_name, opts: opts }, class: 'row' do
|
2
|
+
= f.super_text_field "#{method_name}_date", value: f.object.send(method_name).try(:strftime, '%d %B, %Y'), data: { behavior: 'datepicker' }, class: 'input-block__text-field input-block__text-field--stacked', placeholder: 'Day Month, Year'
|
@@ -0,0 +1,6 @@
|
|
1
|
+
= render layout: 'tenon/fields/base', locals: { f: f, method_name: method_name, opts: opts }, class: 'row' do
|
2
|
+
.inner8
|
3
|
+
= f.super_text_field "#{method_name}_date", value: f.object.send(method_name).try(:strftime, '%d %B, %Y'), data: { behavior: 'datepicker' }, class: 'input-block__text-field input-block__text-field--stacked', placeholder: 'Day Month, Year'
|
4
|
+
.inner4.omega
|
5
|
+
= f.super_text_field "#{method_name}_time", value: f.object.send(method_name).try(:strftime, '%-l:%M %p %Z'), class: 'input-block__text-field', data: { behavior: 'timepicker' }, placeholder: '00:00 AM'
|
6
|
+
.spacer
|
@@ -0,0 +1,5 @@
|
|
1
|
+
= render layout: 'tenon/fields/base_inline', locals: { f: f, method_name: method_name, value: value, opts: opts } do
|
2
|
+
= f.super_radio_button method_name, value, opts.merge(class: 'input-block__radio-button')
|
3
|
+
|
4
|
+
.input-block__radio-button-icon.input-block__checked-icon
|
5
|
+
= i('check')
|
@@ -0,0 +1,9 @@
|
|
1
|
+
.input-block
|
2
|
+
= render layout: 'tenon/fields/base_inline', locals: { f: f, method_name: method_name, value: value, opts: opts } do
|
3
|
+
= f.super_radio_button method_name, value, opts.merge(class: 'input-block__radio-button')
|
4
|
+
|
5
|
+
.input-block__radio-button-icon.input-block__checked-icon
|
6
|
+
= i('check')
|
7
|
+
|
8
|
+
- if opts[:explanation].present?
|
9
|
+
.input-block__explanation= raw opts[:explanation]
|
@@ -1,8 +1,5 @@
|
|
1
|
-
=
|
1
|
+
= render layout: 'tenon/fields/base', locals: { f: f, method_name: method_name, opts: opts } do
|
2
2
|
|
3
|
-
-
|
4
|
-
.explanation= raw opts[:explanation]
|
3
|
+
.input-block__multiline-text-field{ contenteditable: 'true', data: { placeholder: opts[:placeholder] } }= raw f.object.try(method_name)
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
= f.hidden_field field
|
5
|
+
= f.hidden_field method_name
|
@@ -1,29 +1,8 @@
|
|
1
|
-
-
|
2
|
-
.
|
3
|
-
.
|
4
|
-
%
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
.notification= warning
|
10
|
-
|
11
|
-
%header
|
12
|
-
%h1= t('tenon.index.welcome_to_tenon')
|
13
|
-
|
14
|
-
.tools
|
15
|
-
= render "tenon/shared/section_header/sidebar_toggle"
|
16
|
-
|
17
|
-
.main-content
|
18
|
-
#dashboard-callouts.container
|
19
|
-
- # change the count to test various quantities of callouts - eimaj
|
20
|
-
- @tenon_callouts.each do |callout|
|
21
|
-
.callout
|
22
|
-
%h4.title
|
23
|
-
%i{class: "fa fa-fw fa-#{callout.icon}"}
|
24
|
-
= callout.title
|
25
|
-
|
26
|
-
.callout-content= raw callout.content
|
27
|
-
- if callout.uri.present?
|
28
|
-
%p
|
29
|
-
= link_to callout.button_text, callout.uri, class: "btn btn-primary btn-block", target: ("_" if callout.new_window)
|
1
|
+
.drawer-pusher
|
2
|
+
.toolbar
|
3
|
+
%ul.breadcrumbs
|
4
|
+
%li.breadcrumbs__item
|
5
|
+
Dashboard?
|
6
|
+
|
7
|
+
%main
|
8
|
+
-# %h1 Index#Index
|
@@ -1,24 +1,22 @@
|
|
1
|
-
.modal
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
.
|
9
|
-
.
|
10
|
-
.
|
11
|
-
|
12
|
-
%span#choose-files= t('tenon.common.browse')
|
13
|
-
%input{ :type => 'file', :class => 'upload', multiple: defined?(multiple) && multiple, style: 'width: 100%;', name: 'asset[attachment]' }
|
14
|
-
.spacer
|
1
|
+
.modal.modal--fixed-footer
|
2
|
+
.modal__content
|
3
|
+
%h2 Choose Asset
|
4
|
+
- unless params[:hide_upload]
|
5
|
+
.upload-asset
|
6
|
+
%h3 From Your Device
|
7
|
+
.progress-container
|
8
|
+
= form_for Tenon::Asset.new, format: 'json', builder: Tenon::FormBuilder do |f|
|
9
|
+
.input-block
|
10
|
+
%label.btn{ for: 'file-upload' } Browse
|
11
|
+
%input#file-upload.upload{ type: 'file', multiple: defined?(multiple) && multiple, style: 'position: absolute; left: -9999px;', name: 'asset[attachment]' }
|
15
12
|
|
16
|
-
|
17
|
-
|
13
|
+
%h3 From The Asset Library
|
14
|
+
#pick-asset
|
15
|
+
= react_component 'Tenon.RI.StandaloneList',
|
16
|
+
title: 'Assets',
|
17
|
+
recordsPath: assets_path(format: 'json'),
|
18
|
+
newPath: new_asset_path,
|
19
|
+
childComponentNames: { List: 'AssetList', Record: 'AssetRecord' }
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
-
.asset-list-scroller
|
22
|
-
%ul#modal-asset-list.asset-list.record-grid.infinite-scroll{ data: { records: { url: assets_path(format: 'json'), template: 'tenon/templates/assets/asset_row', name: 'asset' } } }
|
23
|
-
|
24
|
-
= link_to t('tenon.assets.load_more'), '#', :class => 'infinite-loader', 'data-record-list' => '#modal-asset-list'
|
21
|
+
.modal__footer
|
22
|
+
%a.modal__action{ href: '#!', data: { modal_close: true } } Cancel
|
@@ -1,8 +1,8 @@
|
|
1
|
-
json.title item_version.title.blank? ?
|
1
|
+
json.title item_version.title.blank? ? "(No Title)" : item_version.title
|
2
2
|
json.created_at item_version.created_at.strftime('%m/%d/%Y at %l:%M%p')
|
3
3
|
json.user_email item_version.user.try(:email)
|
4
4
|
if item_version.item
|
5
|
-
json.load_link action_link(
|
5
|
+
json.load_link action_link('View Draft', polymorphic_path([:edit, item_version.item], version: item_version.id), 'reply')
|
6
6
|
else
|
7
|
-
json.load_link action_link(
|
8
|
-
end
|
7
|
+
json.load_link action_link('View Draft', new_polymorphic_path(item_version.item_type.constantize, version: item_version.id), 'reply')
|
8
|
+
end
|
@@ -1,7 +1,15 @@
|
|
1
|
-
.modal-
|
2
|
-
|
1
|
+
.modal.modal--fixed-footer
|
2
|
+
.modal__content
|
3
|
+
.explanation
|
4
|
+
Choose a draft to load from the list below. Loading a draft will open it
|
5
|
+
but it will not overwrite the active version of your item until you
|
6
|
+
press Save.
|
7
|
+
#item-version-index
|
8
|
+
= react_component 'Tenon.RI.StandaloneList',
|
9
|
+
title: 'Item Versions',
|
10
|
+
recordsPath: list_item_versions_path(format: 'json', item_type: params[:item_type], item_id: params[:item_id]),
|
11
|
+
newPath: new_item_version_path,
|
12
|
+
childComponentNames: { Record: 'ItemVersionRecord' }
|
3
13
|
|
4
|
-
.
|
5
|
-
%
|
6
|
-
|
7
|
-
= link_to t('tenon.item_versions.load_other_drafts'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#item_versions'
|
14
|
+
.modal__footer
|
15
|
+
%button.modal__action{ data: { modal_close: true } } Cancel
|
@@ -1,12 +1,10 @@
|
|
1
|
-
= form_for @item_version, builder: Tenon::FormBuilder do |f|
|
2
|
-
.
|
3
|
-
.
|
4
|
-
|
5
|
-
|
6
|
-
= f.hidden_field :item_type
|
7
|
-
= f.hidden_field :item_id
|
1
|
+
= form_for @item_version, builder: Tenon::FormBuilder, html: { class: 'modal modal--thin' } do |f|
|
2
|
+
.modal__content
|
3
|
+
= f.text_field :title
|
4
|
+
= f.hidden_field :item_type
|
5
|
+
= f.hidden_field :item_id
|
8
6
|
|
9
|
-
.spacer
|
10
7
|
|
11
|
-
.
|
12
|
-
%button.
|
8
|
+
.modal__footer
|
9
|
+
%button.modal__action{ type: 'submit' } Save Draft
|
10
|
+
%button.modal__action{ type: 'button', data: { modal_close: true } } Cancel
|
@@ -1,19 +1,14 @@
|
|
1
|
-
|
2
|
-
.
|
3
|
-
.
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
.
|
15
|
-
.form-group.inline.bordered
|
16
|
-
= check_box_tag "settings[comment_email]", 1, Tenon::MySettings.comment_email, class: 'tn-checkbox-right'
|
17
|
-
%label{ for: 'settings_comment_email' }= t('tenon.settings.comment_email')
|
18
|
-
.explanation= t('tenon.settings.do_you_want_to_receive')
|
19
|
-
|
1
|
+
.panel-label Contact
|
2
|
+
.panel
|
3
|
+
.panel__content
|
4
|
+
.row
|
5
|
+
.inner4
|
6
|
+
= input_block 'Contact Email', explanation: 'Destination email address for alerts. Separate multiple email addresses with commas.' do
|
7
|
+
= text_field_tag 'settings[contact_email]', Tenon::MySettings.contact_email, class: 'input-block__text-field'
|
8
|
+
.inner4
|
9
|
+
= input_block 'Sender Email', explanation: '"From" email address for alerts.' do
|
10
|
+
= text_field_tag 'settings[from_email]', Tenon::MySettings.from_email, class: 'input-block__text-field'
|
11
|
+
.inner4.omega
|
12
|
+
= input_block 'Comment Email', explanation: 'Do you want to receive an email when someone posts a comment?' do
|
13
|
+
= check_box_tag 'settings[comment_email]', Tenon::MySettings.comment_email, class: 'input-block__text-field'
|
14
|
+
%label.input-block__label--inline Yes, send me emails
|
@@ -1,12 +1,16 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
|
1
|
+
.panel-label General
|
2
|
+
.panel
|
3
|
+
.panel__content
|
4
|
+
.row
|
5
|
+
.inner6
|
6
|
+
= input_block 'Site Name' do
|
7
|
+
= text_field_tag 'settings[site_title]', Tenon::MySettings.site_title, class: 'input-block__text-field'
|
8
|
+
.inner6.omega
|
9
|
+
= input_block 'Site Domain' do
|
10
|
+
= text_field_tag 'settings[site_url]', Tenon::MySettings.site_url, class: 'input-block__text-field'
|
4
11
|
|
5
|
-
.
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
.
|
10
|
-
%label= t('tenon.settings.google_analytics_code')
|
11
|
-
.explanation= link_to t('tenon.settings.create_a_new_profile_here'), 'https://www.google.com/analytics/settings/add_profile?scid=16153080', target: '_'
|
12
|
-
= text_area_tag 'settings[google_analytics]', Tenon::MySettings.google_analytics, style: 'height: 180px;'
|
12
|
+
.input-block
|
13
|
+
= input_block 'Google Analytics Code' do
|
14
|
+
= text_area_tag 'settings[google_analytics]', Tenon::MySettings.google_analytics, class: 'input-block__multiline-text-field'
|
15
|
+
.input-block__explanation
|
16
|
+
= link_to('Create a New Profile Here', 'https://www.google.com/analytics/settings/add_profile?scid=16153080', target: '_')
|