card 1.98.3 → 1.99.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/config/locales/de.yml +7 -7
- data/config/locales/en.yml +7 -7
- data/config/locales/es.yml +7 -7
- data/db/migrate_core_cards/20150610180019_add_recaptcha_key_and_admin_info_cards.rb +3 -3
- data/db/migrate_core_cards/20160801143221_change_bootstrap_card_type_to_scss.rb +1 -1
- data/db/migrate_core_cards/20160804112510_reorganize_scripts.rb +1 -1
- data/db/migrate_core_cards/20160908154210_add_trash_card.rb +1 -1
- data/db/migrate_core_cards/20180508210903_add_json_type.rb +3 -3
- data/db/migrate_core_cards/20180712042655_head_rule.rb +1 -1
- data/db/migrate_core_cards/{20180905061536_migrate_layouts.rb → 20180905061537_migrate_layouts.rb} +12 -1
- data/db/migrate_core_cards/20190204195039_add_rule_card.rb +3 -0
- data/db/migrate_core_cards/20190320091257_upgrade_recaptcha_to_v3.rb +5 -6
- data/db/migrate_core_cards/20190417142612_reorganize_scripts_2.rb +3 -3
- data/db/migrate_core_cards/20190502130029_add_shark_and_help_desk_role.rb +4 -5
- data/db/migrate_core_cards/20190618110446_add_dropdown_divider.rb +1 -1
- data/db/migrate_core_cards/20190710090209_homepage_tweaks.rb +17 -0
- data/db/migrate_core_cards/20190820155833_update_cardtype_type_structure.rb +7 -0
- data/db/migrate_core_cards/20190822093633_move_help_text_to_code.rb +38 -0
- data/db/migrate_core_cards/20190823220018_cleanup_for_decko_1_0.rb +21 -0
- data/db/migrate_core_cards/20190826132738_add_more_guides.rb +7 -0
- data/db/migrate_core_cards/20190829093961_cardtype_grouping.rb +16 -0
- data/db/migrate_core_cards/20190829205148_remove_add_help.rb +14 -0
- data/db/migrate_core_cards/20190830131820_setting_settings_aside.rb +17 -0
- data/db/migrate_core_cards/20190902161223_add_style_media.rb +7 -0
- data/db/migrate_core_cards/20190902193208_input_type.rb +22 -0
- data/db/migrate_core_cards/20190904174403_token_upgrade.rb +14 -0
- data/db/migrate_core_cards/20190909104250_add_cardtype_input_types.rb +10 -0
- data/db/migrate_core_cards/20190918200115_ensure_description_card.rb +13 -0
- data/db/migrate_core_cards/data/cards.yml +12 -8
- data/db/migrate_core_cards/data/cards/Xaccount +22 -0
- data/db/migrate_core_cards/data/cards/Xgetting_started +5 -5
- data/db/migrate_core_cards/data/cards/{Xgetting_started-link → Xgetting_started_link} +0 -0
- data/db/migrate_core_cards/data/cards/Xmain_menu +1 -1
- data/db/migrate_core_cards/data/cards/Xstructure-Xright-Xguide +12 -0
- data/db/migrate_core_cards/data/cards/administrator-dashboard +5 -0
- data/db/migrate_core_cards/data/cards/cardtype-Xtype-Xguide +24 -0
- data/db/migrate_core_cards/data/cards/cardtype-Xtype-Xstructure +3 -3
- data/db/migrate_core_cards/data/cards/shark-dashboard +2 -2
- data/db/migrate_core_cards/data/mailer/password_reset_email.html +6 -3
- data/db/migrate_core_cards/data/mailer/password_reset_email.txt +1 -1
- data/db/migrate_core_cards/data/mailer/verification_email.html +5 -2
- data/db/migrate_core_cards/data/mailer/verification_email.txt +2 -1
- data/db/seed/README.md +1 -1
- data/db/seed/new/card_actions.yml +2118 -2534
- data/db/seed/new/card_acts.yml +2 -2
- data/db/seed/new/card_references.yml +2326 -2466
- data/db/seed/new/cards.yml +2654 -3713
- data/db/seed/new/schema_migrations_core_cards.yml +77 -39
- data/db/seed/test/fixtures/card_actions.yml +3225 -3681
- data/db/seed/test/fixtures/card_acts.yml +503 -509
- data/db/seed/test/fixtures/card_changes.yml +66 -66
- data/db/seed/test/fixtures/card_references.yml +3135 -3275
- data/db/seed/test/fixtures/cards.yml +4187 -5516
- data/db/seed/test/fixtures/schema_migrations_core_cards.yml +77 -39
- data/db/{seed/test/seed.rb → test_seed.rb} +13 -11
- data/lib/card/auth.rb +1 -0
- data/lib/card/auth/current.rb +25 -27
- data/lib/card/auth/setup.rb +13 -12
- data/lib/card/auth/token.rb +38 -0
- data/lib/card/content.rb +34 -7
- data/lib/card/content/clean.rb +2 -1
- data/lib/card/content/truncate.rb +2 -0
- data/lib/card/env/success.rb +1 -14
- data/lib/card/error.rb +1 -0
- data/lib/card/format/content.rb +2 -2
- data/lib/card/format/error.rb +1 -1
- data/lib/card/format/nest.rb +1 -1
- data/lib/card/format/nesting.rb +2 -2
- data/lib/card/format/nesting/mode.rb +15 -15
- data/lib/card/mod/loader.rb +5 -0
- data/lib/card/model/save_helper.rb +2 -0
- data/lib/card/query.rb +1 -0
- data/lib/card/query/card_query/reference_attributes.rb +4 -2
- data/lib/card/seed_consts.rb +1 -1
- data/lib/card/set/format/abstract_format.rb +3 -5
- data/lib/card/set/format/abstract_format/view_opts.rb +1 -1
- data/lib/card/set/required_field.rb +8 -3
- data/lib/card/set_pattern.rb +10 -0
- data/lib/card/view/cache/stub.rb +3 -20
- data/lib/card/view/options.rb +4 -3
- data/lib/card/view/options/voo_api.rb +1 -1
- data/lib/cardio.rb +7 -1
- data/mod/Modfile +1 -0
- data/mod/account/set/abstract/account_field.rb +15 -0
- data/mod/account/set/abstract/accounted.rb +15 -0
- data/mod/account/set/all/account.rb +0 -4
- data/mod/account/set/right/account.rb +23 -151
- data/mod/account/set/right/account/events.rb +98 -0
- data/mod/account/set/right/account/views.rb +65 -0
- data/mod/account/set/right/api_key.rb +48 -0
- data/mod/account/set/right/email.rb +2 -2
- data/mod/account/set/right/password.rb +6 -9
- data/mod/account/set/right/salt.rb +5 -1
- data/mod/account/set/right/status.rb +10 -1
- data/mod/account/set/self/signin.rb +3 -3
- data/mod/account/set/type/role.rb +4 -0
- data/mod/account/set/type/signup.rb +31 -158
- data/mod/account/{template → set}/type/signup/core.haml +0 -0
- data/mod/account/set/type/signup/views.rb +93 -0
- data/mod/account/set/type/user.rb +16 -27
- data/mod/account/set/type/user/setup_help.haml +10 -0
- data/mod/account/spec/set/all/account_spec.rb +84 -98
- data/mod/account/spec/set/right/account_spec.rb +40 -33
- data/mod/account/spec/set/self/signin_spec.rb +2 -2
- data/mod/account/spec/set/type/signup_spec.rb +40 -78
- data/mod/ace_editor/db/migrate_core_cards/{20160805112548_delete_ace_help_card.rb → 20180805112548_delete_ace_help_card.rb} +1 -1
- data/mod/admin/set/self/debugger.rb +3 -0
- data/mod/admin/set/self/trash.rb +1 -1
- data/mod/basic_formats/set/all/all_css.rb +1 -1
- data/mod/basic_formats/set/all/all_csv.rb +1 -1
- data/mod/basic_formats/set/all/base.rb +19 -60
- data/mod/basic_formats/set/self/head.rb +1 -1
- data/mod/basic_types/set/type/html.rb +7 -3
- data/mod/basic_types/set/type/json.rb +1 -1
- data/mod/basic_types/set/type/plain_text.rb +1 -1
- data/mod/{standard → basic_types}/spec/set/type/html_spec.rb +6 -6
- data/mod/basic_types/spec/set/type/plain_text_spec.rb +7 -2
- data/mod/bootstrap/db/migrate_core_cards/20170719163733_update_bootswatch_themes_to_4_beta.rb +3 -3
- data/mod/bootstrap/db/migrate_core_cards/20180423160231_migrate_customized_bootstrap_skin.rb +2 -2
- data/mod/bootstrap/db/migrate_core_cards/20180423170283_add_type_bootswatch_skin.rb +1 -1
- data/mod/bootstrap/db/migrate_core_cards/lib/skin.rb +1 -1
- data/mod/bootstrap/lib/javascript/script_load_select2.js.coffee +26 -18
- data/mod/bootstrap/lib/stylesheets/style_bootstrap_cards.scss +18 -3
- data/mod/bootstrap/set/abstract/bootswatch_theme/html_views.rb +1 -1
- data/mod/bootstrap/set/all/bootstrap/helper.rb +9 -4
- data/mod/bootstrap/set/type/customized_bootswatch_skin.rb +1 -1
- data/mod/bootstrap/set/type_plus_right/customized_bootswatch_skin/colors.rb +1 -1
- data/mod/bootstrap/set/type_plus_right/customized_bootswatch_skin/colors/{editor.haml → input.haml} +0 -0
- data/mod/bootstrap/spec/set/all/bootstrap/form_spec.rb +2 -2
- data/mod/carrierwave/set/self/favicon.rb +5 -0
- data/mod/carrierwave/set/self/new_file.rb +1 -1
- data/mod/carrierwave/set/self/new_image.rb +1 -1
- data/mod/carrierwave/set/type/file.rb +1 -1
- data/mod/carrierwave/set/type/image.rb +2 -2
- data/mod/carrierwave/set/type/image/html_views.rb +0 -35
- data/mod/carrierwave/spec/set/type/image_spec.rb +1 -1
- data/mod/core/chunk/link.rb +4 -2
- data/mod/core/chunk/view_stub.rb +5 -4
- data/mod/core/set/abstract/code_file.rb +1 -1
- data/mod/core/set/all/codename.rb +2 -1
- data/mod/core/set/all/content.rb +59 -0
- data/mod/core/set/all/event_conditions.rb +17 -2
- data/mod/core/set/all/location_history.rb +1 -1
- data/mod/core/set/all/name.rb +1 -1
- data/mod/core/set/all/permissions.rb +6 -36
- data/mod/core/set/all/references.rb +9 -2
- data/mod/core/set/all/rules.rb +0 -5
- data/mod/core/set_pattern/03_type.rb +4 -0
- data/mod/core/set_pattern/07_right.rb +4 -0
- data/mod/core/set_pattern/08_type_plus_right.rb +4 -0
- data/mod/core/set_pattern/09_self.rb +4 -0
- data/mod/core/spec/chunk/link_spec.rb +6 -0
- data/mod/core/spec/chunk/nest_spec.rb +2 -2
- data/mod/core/spec/set/all/permissions_spec.rb +0 -10
- data/mod/core/spec/set/all/rules_spec.rb +6 -16
- data/mod/date/set/self/datepicker.rb +6 -0
- data/mod/date/set/type/date.rb +1 -1
- data/mod/date/spec/set/type/date_spec.rb +1 -1
- data/mod/edit/set/all/bridge/account_section.rb +16 -0
- data/mod/edit/set/all/bridge/bridge_pills.rb +47 -0
- data/mod/edit/set/all/bridge/related_section.rb +34 -0
- data/mod/edit/set/all/bridge/tab_views.rb +9 -40
- data/mod/edit/set/all/bridge/tab_visibility.rb +2 -2
- data/mod/edit/set/all/edit_content.rb +3 -3
- data/mod/edit/set/all/edit_inline.rb +15 -4
- data/mod/edit/set/all/edit_name.rb +5 -7
- data/mod/edit/set/all/edit_type.rb +25 -23
- data/mod/edit/set/all/editing.rb +5 -1
- data/mod/edit/set/all/editor.rb +28 -15
- data/mod/edit/set/all/form.rb +38 -17
- data/mod/edit/set/all/form_buttons.rb +11 -2
- data/mod/edit/set/all/formgroup.rb +5 -5
- data/mod/edit/set/all/nest_editor.rb +20 -4
- data/mod/edit/set/all/nest_editor/_help.haml +7 -0
- data/mod/edit/set/all/nest_editor/nest_editor.haml +3 -2
- data/mod/edit/set/all/new.rb +40 -23
- data/mod/edit/set/all/overlay_guide.haml +7 -0
- data/mod/edit/set/all/overlay_guide.rb +9 -0
- data/mod/edit/set/all/template_nest.rb +42 -0
- data/mod/edit/set/type/list.rb +15 -0
- data/mod/edit/set/type/plain_text.rb +13 -0
- data/mod/edit/set/type/pointer.rb +11 -0
- data/mod/edit/spec/set/all/bridge/tab_views_spec.rb +1 -1
- data/mod/email/set/all/email_html.rb +2 -2
- data/mod/email/set/all/email_text.rb +2 -2
- data/mod/follow/lib/card/follower_stash.rb +1 -1
- data/mod/follow/set/all/follow/followed_by.rb +1 -1
- data/mod/follow/set/all/notify/base_views.rb +3 -3
- data/mod/follow/set/right/following.rb +1 -1
- data/mod/follow/set/self/follow_defaults.rb +1 -1
- data/mod/follow/set/type/cardtype.rb +6 -0
- data/mod/follow/set/type_plus_right/user/follow.rb +1 -1
- data/mod/history/lib/card/act/act_renderer.rb +1 -1
- data/mod/history/lib/card/action.rb +2 -1
- data/mod/history/set/all/history_bridge.rb +0 -1
- data/mod/item/set/all/bar.rb +15 -7
- data/mod/machines/file/all_script_machine_output/file.js +38245 -69
- data/mod/machines/file/all_style_machine_output/file.css +4 -4
- data/mod/machines/file/script_html5shiv_printshiv_machine_output/file.js +1 -1
- data/mod/machines/lib/javascript/decko/bridge.js.coffee +4 -0
- data/mod/machines/lib/javascript/decko/card_menu.js.coffee +11 -0
- data/mod/machines/lib/javascript/decko/name_editor.js.coffee +1 -1
- data/mod/machines/lib/javascript/decko/nest_editor.js.coffee +3 -1
- data/mod/machines/lib/javascript/decko/nest_editor_name.js.coffee +29 -6
- data/mod/machines/lib/javascript/decko/overlay.js.coffee +3 -2
- data/mod/machines/lib/javascript/decko/slot.js.coffee +12 -2
- data/mod/machines/lib/stylesheets/style_cards.scss +43 -53
- data/mod/machines/lib/stylesheets/style_jquery_ui_smoothness.css +13 -13
- data/mod/machines/set/abstract/script.rb +1 -1
- data/mod/machines/set/type/css.rb +1 -1
- data/mod/media/lib/stylesheets/style_image_box.scss +79 -0
- data/mod/{utility → media}/set/abstract/media.rb +0 -0
- data/mod/{utility → media}/set/abstract/media/media_snippet.haml +0 -0
- data/mod/media/set/self/style_media.rb +6 -0
- data/mod/media/set/type/image.rb +38 -0
- data/mod/{utility → media}/spec/set/abstract/media_spec.rb +0 -0
- data/mod/navbar/set/right/enabled_roles.rb +1 -1
- data/mod/pointer/lib/javascript/script_pointer_config.js.coffee +13 -0
- data/mod/pointer/lib/javascript/script_pointer_list_editor.js.coffee +7 -2
- data/mod/pointer/set/abstract/02_pointer/html_views.rb +15 -6
- data/mod/pointer/set/abstract/02_pointer/html_views/checkbox_input.haml +1 -2
- data/mod/pointer/set/abstract/02_pointer/html_views/list_input.haml +1 -2
- data/mod/pointer/set/abstract/02_pointer/html_views/list_item.haml +2 -0
- data/mod/pointer/set/abstract/02_pointer/html_views/radio_input.haml +1 -2
- data/mod/pointer/set/abstract/02_pointer/options_api.rb +6 -13
- data/mod/pointer/set/right/{options.rb → content_options.rb} +0 -0
- data/mod/pointer/set/type/link_list.rb +23 -6
- data/mod/pointer/set/type/link_list/link_list_input.haml +24 -0
- data/mod/pointer/set/type/mirrored_list.rb +1 -1
- data/mod/pointer/spec/set/abstract/pointer/html_views_spec.rb +20 -18
- data/mod/pointer/spec/set/abstract/pointer/options_api_spec.rb +2 -1
- data/mod/pointer/spec/set/self/input_options_spec.rb +1 -1
- data/mod/rules/set/right/self.rb +3 -0
- data/mod/rules/set/rule/bar_view.rb +88 -0
- data/mod/rules/set/rule/bridge_rules_editor.rb +5 -10
- data/mod/rules/set/rule/editor.rb +40 -113
- data/mod/rules/set/rule/html_views.rb +13 -0
- data/mod/rules/set/rule/quick_editor.rb +39 -0
- data/mod/rules/set/rule/{editor → quick_editor}/quick_edit.haml +0 -0
- data/mod/rules/set/rule/{editor → quick_editor}/set_info.haml +1 -1
- data/mod/rules/set/rule/rule_form/buttons.rb +3 -1
- data/mod/rules/set/rule/rule_form/form_elements.rb +2 -2
- data/mod/rules/set/rule/rule_form/rule_set_radio.rb +3 -6
- data/mod/rules/set/rule/rule_form/set_selection.rb +3 -10
- data/mod/rules/set/rule/rules.rb +10 -1
- data/mod/rules/set/type/set.rb +37 -20
- data/mod/rules/set/type/set/html_views.rb +17 -35
- data/mod/rules/set/type/set/html_views/group_panel.haml +1 -1
- data/mod/rules/set/type/set/html_views/rule_lists.rb +42 -0
- data/mod/rules/set/type/set/html_views/template.rb +1 -32
- data/mod/rules/set/type/set/rules_filter.rb +24 -10
- data/mod/rules/set/type/set/setting_lists.rb +17 -24
- data/mod/rules/spec/set/rule/bar_view_spec.rb +15 -0
- data/mod/rules/spec/set/rule/editor_spec.rb +15 -1
- data/mod/rules/spec/set/type/set/html_views_spec.rb +0 -13
- data/mod/rules/spec/set/type/set/setting_lists_spec.rb +17 -0
- data/mod/rules/spec/set/type/set_spec.rb +3 -8
- data/mod/search/set/abstract/03_filter/form_helper.rb +9 -7
- data/mod/search/set/abstract/search/views.rb +2 -2
- data/mod/search/set/right/children.rb +4 -0
- data/mod/search/set/right/created.rb +3 -0
- data/mod/search/set/right/edited.rb +3 -0
- data/mod/search/set/right/editors.rb +3 -0
- data/mod/search/set/right/follow.rb +3 -0
- data/mod/search/set/right/linked_to_by.rb +3 -0
- data/mod/search/set/right/links_to.rb +3 -0
- data/mod/search/set/right/mates.rb +3 -0
- data/mod/search/set/right/nested_by.rb +3 -0
- data/mod/search/set/right/nests.rb +3 -0
- data/mod/search/set/right/referred_to_by.rb +3 -0
- data/mod/search/set/right/refers_to.rb +3 -0
- data/mod/search/set/self/search.rb +1 -1
- data/mod/search/set/type/search_type.rb +6 -5
- data/mod/settings/lib/card/setting.rb +17 -4
- data/mod/settings/set/abstract/permission.rb +6 -2
- data/mod/settings/set/all/supports_content_options.rb +7 -0
- data/mod/settings/set/right/content_option_view.rb +10 -0
- data/mod/settings/set/right/content_options.rb +18 -0
- data/mod/settings/set/right/default.rb +18 -2
- data/mod/settings/set/right/help.rb +2 -1
- data/mod/settings/set/right/input_type.rb +35 -0
- data/mod/settings/set/right/script.rb +6 -0
- data/mod/settings/set/right/structure.rb +7 -1
- data/mod/settings/set/right/style.rb +2 -2
- data/mod/settings/set/right/style/{editor.haml → input.haml} +0 -0
- data/mod/settings/set/self/autoname.rb +3 -1
- data/mod/settings/set/self/captcha.rb +4 -1
- data/mod/settings/set/self/content_option_view.rb +10 -0
- data/mod/settings/set/self/content_options.rb +10 -0
- data/mod/settings/set/self/create.rb +2 -1
- data/mod/settings/set/self/default.rb +1 -1
- data/mod/settings/set/self/delete.rb +2 -1
- data/mod/settings/set/self/guide.rb +1 -1
- data/mod/settings/set/self/head.rb +3 -1
- data/mod/settings/set/self/help.rb +3 -1
- data/mod/settings/set/self/input_type.rb +13 -0
- data/mod/settings/set/self/layout.rb +3 -1
- data/mod/settings/set/self/on_create.rb +2 -1
- data/mod/settings/set/self/on_delete.rb +2 -1
- data/mod/settings/set/self/on_update.rb +2 -1
- data/mod/settings/set/self/read.rb +2 -1
- data/mod/settings/set/self/structure.rb +3 -1
- data/mod/settings/set/self/style.rb +3 -1
- data/mod/settings/set/self/table_of_contents.rb +4 -1
- data/mod/settings/set/self/thanks.rb +3 -1
- data/mod/settings/set/self/update.rb +2 -1
- data/mod/settings/set/type/setting.rb +15 -37
- data/mod/settings/spec/set/right/comment_spec.rb +0 -27
- data/mod/settings/spec/set/right/create_spec.rb +1 -1
- data/mod/settings/spec/set/right/structure_spec.rb +13 -10
- data/mod/settings/spec/set/type/setting_spec.rb +1 -8
- data/mod/solid_cache/set/right/solid_cache.rb +3 -3
- data/mod/standard/set/all/comment.rb +1 -1
- data/mod/standard/set/all/error.rb +2 -2
- data/mod/standard/set/all/path.rb +7 -7
- data/mod/standard/set/all/rich_html/content.rb +41 -11
- data/mod/standard/set/all/rich_html/error.rb +14 -22
- data/mod/standard/set/all/rich_html/html_views/guide.rb +1 -1
- data/mod/standard/set/all/rich_html/html_views/help.rb +19 -7
- data/mod/standard/set/all/rich_html/html_views/info.rb +1 -1
- data/mod/standard/set/all/rich_html/menu.rb +50 -2
- data/mod/standard/set/all/rich_html/overlay.rb +23 -1
- data/mod/standard/set/all/rich_html/title.rb +3 -3
- data/mod/standard/set/right/discussion.rb +8 -2
- data/mod/standard/set/right/head.rb +4 -0
- data/mod/standard/set/right/type_plus_right.rb +4 -0
- data/mod/standard/set/self/cardtype.rb +42 -0
- data/mod/standard/set/self/sidebar.rb +5 -0
- data/mod/standard/set/type/basic.rb +1 -1
- data/mod/standard/set/type/cardtype.rb +25 -11
- data/mod/standard/set/type/number.rb +1 -1
- data/mod/standard/set/type/phrase.rb +1 -1
- data/mod/standard/set/type/toggle.rb +9 -1
- data/mod/standard/set/type/uri.rb +1 -1
- data/mod/standard/spec/set/all/error_spec.rb +1 -1
- data/mod/standard/spec/set/type/cardtype_spec.rb +4 -3
- data/mod/standard/spec/set/type/number_spec.rb +1 -1
- data/mod/standard/spec/set/type/phrase_spec.rb +1 -1
- data/mod/standard/spec/set/type/toggle_spec.rb +3 -4
- data/mod/standard/spec/set/type/uri_spec.rb +1 -1
- data/mod/tinymce_editor/set/self/tiny_mce.rb +7 -0
- metadata +116 -52
- data/db/migrate_core_cards/20190710090207_homepage_tweaks.rb +0 -12
- data/db/migrate_core_cards/data/cards/eagle-description +0 -1
- data/mod/account/set/right/token.rb +0 -55
- data/mod/account/spec/set/right/token_spec.rb +0 -23
- data/mod/bootstrap/set/abstract/bootswatch_theme/thumbnail.haml +0 -10
- data/mod/rules/set/rule/table.rb +0 -27
- data/mod/rules/set/rule/table_row.rb +0 -63
- data/mod/rules/set/type/set/html_views/nest_rules.rb +0 -14
- data/mod/rules/set/type/set/html_views/rules_bridge.rb +0 -21
- data/mod/rules/set/type/set/html_views/rules_table.haml +0 -11
- data/mod/rules/set/type/set/html_views/template/template_editor.haml +0 -6
- data/mod/rules/spec/set/rule/table_row_spec.rb +0 -9
- data/mod/rules/spec/set/rule/table_spec.rb +0 -15
- data/mod/settings/set/right/add_help.rb +0 -1
- data/mod/settings/set/self/accountable.rb +0 -3
- data/mod/settings/set/self/add_help.rb +0 -2
- data/mod/settings/set/self/input.rb +0 -3
- data/mod/settings/set/self/options.rb +0 -4
- data/mod/settings/set/self/options_label.rb +0 -4
- data/mod/settings/spec/set/right/add_help_spec.rb +0 -5
@@ -1,7 +1,3 @@
|
|
1
|
-
def show_comment_box_in_related?
|
2
|
-
false
|
3
|
-
end
|
4
|
-
|
5
1
|
format :html do
|
6
2
|
def prepare_content_slot
|
7
3
|
class_up "card-slot", "d0-card-content"
|
@@ -11,13 +7,36 @@ format :html do
|
|
11
7
|
before(:content) { prepare_content_slot }
|
12
8
|
|
13
9
|
view :content do
|
14
|
-
|
10
|
+
voo.hide :edit_button
|
11
|
+
wrap do
|
12
|
+
[_render_menu, _render_core, _render_edit_button(edit: :inline)]
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
before(:content_with_edit_button) do
|
17
|
+
prepare_content_slot
|
18
|
+
end
|
19
|
+
|
20
|
+
view :content_with_edit_button do
|
21
|
+
wrap do
|
22
|
+
[_render_menu, _render_core, _render_edit_button(edit: :inline)]
|
23
|
+
end
|
15
24
|
end
|
16
25
|
|
17
26
|
view :short_content, wrap: { div: { class: "text-muted" } } do
|
18
27
|
short_content
|
19
28
|
end
|
20
29
|
|
30
|
+
view :raw_one_line_content, unknown: :mini_unknown,
|
31
|
+
wrap: { div: { class: "text-muted" } } do
|
32
|
+
raw_one_line_content
|
33
|
+
end
|
34
|
+
|
35
|
+
view :one_line_content, unknown: :mini_unknown,
|
36
|
+
wrap: { div: { class: "text-muted" } } do
|
37
|
+
one_line_content
|
38
|
+
end
|
39
|
+
|
21
40
|
before(:content_with_title) { prepare_content_slot }
|
22
41
|
|
23
42
|
view :content_with_title do
|
@@ -39,14 +58,14 @@ format :html do
|
|
39
58
|
end
|
40
59
|
end
|
41
60
|
|
42
|
-
view :titled
|
61
|
+
view :titled do
|
43
62
|
@content_body = true
|
44
63
|
wrap do
|
45
64
|
[
|
46
65
|
naming { render_header },
|
47
66
|
render_flash,
|
48
67
|
wrap_body { render_titled_content },
|
49
|
-
render_comment_box
|
68
|
+
render_comment_box(optional: :hide)
|
50
69
|
]
|
51
70
|
end
|
52
71
|
end
|
@@ -68,19 +87,18 @@ format :html do
|
|
68
87
|
items: (opts[:items] || {}).merge(view: item_view))
|
69
88
|
end
|
70
89
|
|
71
|
-
view :open
|
90
|
+
view :open do
|
72
91
|
toggle_logic
|
73
92
|
@toggle_mode = :open
|
74
93
|
@content_body = true
|
75
94
|
frame do
|
76
|
-
[_render_open_content, render_comment_box]
|
95
|
+
[_render_open_content, render_comment_box(optional: :hide)]
|
77
96
|
end
|
78
97
|
end
|
79
98
|
|
80
99
|
view :closed do
|
81
|
-
with_nest_mode :
|
100
|
+
with_nest_mode :compact do
|
82
101
|
toggle_logic
|
83
|
-
voo.hide :closed_content
|
84
102
|
class_up "d0-card-body", "closed-content"
|
85
103
|
@content_body = false
|
86
104
|
@toggle_mode = :close
|
@@ -99,6 +117,18 @@ format :html do
|
|
99
117
|
Card.fetch(set_name)
|
100
118
|
end
|
101
119
|
|
120
|
+
def raw_one_line_content
|
121
|
+
cleaned = Card::Content.clean! render_raw, {}
|
122
|
+
cut_with_ellipsis cleaned
|
123
|
+
end
|
124
|
+
|
125
|
+
def one_line_content
|
126
|
+
# TODO: use a version of Card::Content.smart_truncate
|
127
|
+
# that counts characters instead of clean!
|
128
|
+
cleaned = Card::Content.clean! render_core, {}
|
129
|
+
cut_with_ellipsis cleaned
|
130
|
+
end
|
131
|
+
|
102
132
|
# LOCALIZE
|
103
133
|
def short_content
|
104
134
|
short_content_items || short_content_fields || short_content_from_core
|
@@ -7,33 +7,36 @@ format :html do
|
|
7
7
|
haml :debug_server_error, {}, error_page
|
8
8
|
end
|
9
9
|
|
10
|
-
view :
|
11
|
-
|
10
|
+
view :unknown do
|
11
|
+
createable { wrap { unknown_link "#{unknown_icon} #{render_title}" } }
|
12
12
|
end
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
end
|
14
|
+
# icon only, no wrap
|
15
|
+
view :mini_unknown, unknown: true, cache: :never do
|
16
|
+
createable { unknown_link unknown_icon }
|
18
17
|
end
|
19
18
|
|
20
19
|
def createable
|
21
20
|
card.ok?(:create) ? yield : ""
|
22
21
|
end
|
23
22
|
|
24
|
-
def
|
23
|
+
def unknown_link text
|
25
24
|
path_opts = voo.type ? { card: { type: voo.type } } : {}
|
26
|
-
link_to_view :new_in_modal, text, path: path_opts, class: classy("
|
25
|
+
link_to_view :new_in_modal, text, path: path_opts, class: classy("unknown-link")
|
26
|
+
end
|
27
|
+
|
28
|
+
def unknown_icon
|
29
|
+
fa_icon "plus-square"
|
27
30
|
end
|
28
31
|
|
29
|
-
view :
|
32
|
+
view :compact_missing, perms: :none do
|
30
33
|
wrap_with :span, h(title_in_context), class: "faint"
|
31
34
|
end
|
32
35
|
|
33
36
|
view :conflict, cache: :never do
|
34
37
|
actor_link = link_to_card card.last_action.act.actor.name
|
35
38
|
class_up "card-slot", "error-view"
|
36
|
-
wrap do #
|
39
|
+
wrap do # LOCALIZE
|
37
40
|
alert "warning" do
|
38
41
|
%(
|
39
42
|
<strong>Conflict!</strong>
|
@@ -68,18 +71,7 @@ format :html do
|
|
68
71
|
end
|
69
72
|
|
70
73
|
def view_for_unknown view
|
71
|
-
|
72
|
-
when main? && ok?(:create) then :new
|
73
|
-
when commentable?(view) then view
|
74
|
-
else super
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
def commentable? view
|
79
|
-
return false unless view_setting(:commentable, view) &&
|
80
|
-
show_view?(:comment_box, :hide)
|
81
|
-
|
82
|
-
ok? :comment
|
74
|
+
main? && ok?(:create) ? :new : super
|
83
75
|
end
|
84
76
|
|
85
77
|
def show_all_errors?
|
@@ -1,19 +1,27 @@
|
|
1
1
|
def help_rule_card
|
2
|
-
|
3
|
-
help_card = rule_card(*setting)
|
2
|
+
help_card = rule_card(:help)
|
4
3
|
help_card if help_card&.ok?(:read)
|
5
4
|
end
|
6
5
|
|
7
6
|
format :html do
|
8
7
|
view :help, unknown: true, cache: :never, wrap: :slot do
|
9
|
-
|
10
|
-
return "" unless
|
8
|
+
help = help_text
|
9
|
+
return "" unless help.present?
|
11
10
|
|
11
|
+
wrap_with :div, wrap_help_text(help), class: classy("help-text")
|
12
|
+
end
|
13
|
+
|
14
|
+
view :help_text, unknown: true, cache: :never do
|
15
|
+
wrap_help_text help_text
|
16
|
+
end
|
17
|
+
|
18
|
+
def wrap_help_text text
|
19
|
+
help = text
|
12
20
|
if (rule_card = card.help_rule_card)
|
13
21
|
edit_link = with_nest_mode(:normal) { nest(rule_card, view: :edit_link) }
|
14
|
-
|
22
|
+
help = "<span class='d-none'>#{edit_link}</span>#{text}"
|
15
23
|
end
|
16
|
-
|
24
|
+
help
|
17
25
|
end
|
18
26
|
|
19
27
|
view :lead do
|
@@ -21,8 +29,12 @@ format :html do
|
|
21
29
|
_view_content
|
22
30
|
end
|
23
31
|
|
32
|
+
def help_text
|
33
|
+
voo.help || rule_based_help
|
34
|
+
end
|
35
|
+
|
24
36
|
def raw_help_text
|
25
|
-
card.help_rule_card&.content
|
37
|
+
card.try(:raw_help_text) || card.help_rule_card&.content
|
26
38
|
end
|
27
39
|
|
28
40
|
def rule_based_help
|
@@ -3,7 +3,9 @@ format :html do
|
|
3
3
|
return "" if card.unknown?
|
4
4
|
|
5
5
|
wrap_with :div, class: "card-menu #{menu_link_classes}" do
|
6
|
-
[
|
6
|
+
[render_help_link,
|
7
|
+
menu_link,
|
8
|
+
(voo.show?(:bridge_link) ? bridge_link(false) : nil)]
|
7
9
|
end
|
8
10
|
end
|
9
11
|
|
@@ -18,8 +20,23 @@ format :html do
|
|
18
20
|
end
|
19
21
|
end
|
20
22
|
|
23
|
+
def edit_view
|
24
|
+
case voo.edit
|
25
|
+
when :inline
|
26
|
+
:edit_inline
|
27
|
+
when :full
|
28
|
+
:edit
|
29
|
+
else # :standard
|
30
|
+
edit_link
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
21
34
|
view :edit_link, unknown: true, denial: :blank do
|
22
|
-
edit_link
|
35
|
+
edit_link edit_link_view, link_text: voo.title
|
36
|
+
end
|
37
|
+
|
38
|
+
def edit_link_view
|
39
|
+
:edit
|
23
40
|
end
|
24
41
|
|
25
42
|
view :full_page_link do
|
@@ -39,6 +56,37 @@ format :html do
|
|
39
56
|
link_to_view :bridge, material_icon(:more_horiz), opts
|
40
57
|
end
|
41
58
|
|
59
|
+
# no caching because help_text view doesn't cache, and we can't have a
|
60
|
+
# stub in the data-content attribute or it will get html escaped.
|
61
|
+
view :help_link, cache: :never, unknown: true do
|
62
|
+
help_link
|
63
|
+
end
|
64
|
+
|
65
|
+
def help_link
|
66
|
+
opts = help_popover_opts
|
67
|
+
add_class opts, "_card-menu-popover"
|
68
|
+
link_to help_icon, opts
|
69
|
+
end
|
70
|
+
|
71
|
+
def help_popover_opts
|
72
|
+
opts = { "data-placement": :left, class: "help-link" }
|
73
|
+
popover_opts render_help_text, help_title, opts
|
74
|
+
end
|
75
|
+
|
76
|
+
def help_icon
|
77
|
+
material_icon("help")
|
78
|
+
end
|
79
|
+
|
80
|
+
def help_title
|
81
|
+
"#{name_parts_links} (#{render_type}) #{full_page_link unless card.simple?}"
|
82
|
+
end
|
83
|
+
|
84
|
+
def name_parts_links
|
85
|
+
card.name.parts.map do |part|
|
86
|
+
link_to_card part
|
87
|
+
end.join Card::Name.joint
|
88
|
+
end
|
89
|
+
|
42
90
|
def full_page_link
|
43
91
|
link_to_card full_page_card, full_page_icon, class: classy("full-page-link")
|
44
92
|
end
|
@@ -22,10 +22,27 @@ format :html do
|
|
22
22
|
|
23
23
|
view :overlay_menu do
|
24
24
|
wrap_with :div, class: "btn-group btn-group-sm align-self-start ml-auto" do
|
25
|
-
[slotify_overlay_link, close_overlay_link]
|
25
|
+
[render_overlay_help_link, slotify_overlay_link, close_overlay_link]
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
view :overlay_help_link, cache: :never, unknown: true do
|
30
|
+
opts = help_popover_opts
|
31
|
+
add_open_guide_opts opts
|
32
|
+
overlay_menu_link "question-circle", opts
|
33
|
+
end
|
34
|
+
|
35
|
+
def add_open_guide_opts opts
|
36
|
+
return unless card.guide_card
|
37
|
+
|
38
|
+
slot_selector = ".bridge-sidebar > ._overlay-container-placeholder > .card-slot"
|
39
|
+
opts.merge! remote: true,
|
40
|
+
href: path(mark: card, view: :overlay_guide),
|
41
|
+
"data-slot-selector": slot_selector,
|
42
|
+
"data-slotter-mode": "overlay"
|
43
|
+
add_class opts, "slotter"
|
44
|
+
end
|
45
|
+
|
29
46
|
def slotify_overlay_link
|
30
47
|
overlay_menu_link "external-link-square", card: card
|
31
48
|
end
|
@@ -41,6 +58,11 @@ format :html do
|
|
41
58
|
button_tag link_text, button_opts
|
42
59
|
end
|
43
60
|
|
61
|
+
def overlay_delete_button
|
62
|
+
opts = { no_success: true }.merge OVERLAY_CLOSE_OPTS
|
63
|
+
delete_button opts
|
64
|
+
end
|
65
|
+
|
44
66
|
def overlay_save_and_close_button
|
45
67
|
submit_button text: "Save and Close", class: "_close-on-success",
|
46
68
|
"data-cy": "submit-overlay"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
format do
|
2
|
-
view :title,
|
2
|
+
view :title, compact: true, perms: :none do
|
3
3
|
standard_title
|
4
4
|
end
|
5
5
|
|
@@ -13,11 +13,11 @@ format :html do
|
|
13
13
|
show_view?(:title_link, :hide) ? render_title_link : render_title_no_link
|
14
14
|
end
|
15
15
|
|
16
|
-
view :title_link,
|
16
|
+
view :title_link, compact: true, perms: :none do
|
17
17
|
link_to_card card.name, render_title_no_link
|
18
18
|
end
|
19
19
|
|
20
|
-
view :title_no_link,
|
20
|
+
view :title_no_link, compact: true, perms: :none do
|
21
21
|
wrapped_title standard_title
|
22
22
|
end
|
23
23
|
|
@@ -0,0 +1,42 @@
|
|
1
|
+
GROUP = {
|
2
|
+
"Text" => %w[RichText PlainText Markdown Phrase HTML],
|
3
|
+
"Data" => %w[Number Toggle Date URI],
|
4
|
+
"Upload" => %w[File Image],
|
5
|
+
"Custom" => [],
|
6
|
+
"Organize" => ["List", "Pointer", "Search", "Link list",
|
7
|
+
"Mirror List", "Mirrored List"],
|
8
|
+
"Template" => ["Notification template", "Email template", "Twitter template"],
|
9
|
+
"Admin" => ["Cardtype", "User", "Role", "Sign up", "Session", "Set", "Setting"],
|
10
|
+
"Styling" => ["Layout", "Skin", "Bootswatch skin", "Customized bootswatch skin", "CSS", "SCSS"],
|
11
|
+
"Scripting" => %w[JSON JavaScript CoffeeScript]
|
12
|
+
}.freeze
|
13
|
+
|
14
|
+
#DEFAULT_RULE_GROUPS = ["Text", "Data", "Upload", "Organize - Search"]
|
15
|
+
#STRUCTURE_RULE_GROUPS = ["Text", "Organize > Search"]
|
16
|
+
|
17
|
+
# group for each cardtype: { "RichText => "Content", "Layout" => "Admin", ... }
|
18
|
+
GROUP_MAP = GROUP.each_with_object({}) do |(cat, types), h|
|
19
|
+
types.each { |t| h[t] = cat }
|
20
|
+
end
|
21
|
+
|
22
|
+
format :html do
|
23
|
+
view :grouped_list do
|
24
|
+
GROUP.keys.map do |group|
|
25
|
+
type_list = group == "Custom" ? custom_types : GROUP[group]
|
26
|
+
next if type_list.empty?
|
27
|
+
|
28
|
+
[wrap_with(:h5, group), wrap_with(:p, listing(type_list))]
|
29
|
+
end.flatten.join "\n"
|
30
|
+
end
|
31
|
+
|
32
|
+
def custom_types
|
33
|
+
custom_types = []
|
34
|
+
|
35
|
+
Card.search(type_id: CardtypeID, return: "name").each do |name|
|
36
|
+
next if ::Card::Set::Self::Cardtype::GROUP_MAP[name]
|
37
|
+
|
38
|
+
custom_types << name
|
39
|
+
end
|
40
|
+
custom_types
|
41
|
+
end
|
42
|
+
end
|