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
@@ -9,16 +9,16 @@ format :html do
|
|
9
9
|
tag = @rule_context.rule_user_setting_name
|
10
10
|
narrower = []
|
11
11
|
|
12
|
-
bridge_option_list "
|
12
|
+
bridge_option_list "Set" do
|
13
13
|
rule_set_options.map do |set_name, state|
|
14
14
|
RuleSetRadio.new(self, set_name, tag, state).html narrower
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
def bridge_option_list
|
19
|
+
def bridge_option_list title
|
20
20
|
index = -1
|
21
|
-
formgroup
|
21
|
+
formgroup title, input: "set", class: "col-xs-6", help: false do
|
22
22
|
yield.inject("") do |res, radio|
|
23
23
|
index += 1
|
24
24
|
# TODO
|
@@ -36,11 +36,4 @@ format :html do
|
|
36
36
|
def rule_set_options
|
37
37
|
@rule_set_options ||= @rule_context.set_options
|
38
38
|
end
|
39
|
-
|
40
|
-
def selected_rule_set
|
41
|
-
if @rule_set_options.length == 1 then true
|
42
|
-
elsif params[:type_reload] then card.rule_set_name
|
43
|
-
else false
|
44
|
-
end
|
45
|
-
end
|
46
39
|
end
|
data/mod/rules/set/rule/rules.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
event :save_recently_edited_settings, :integrate,
|
1
|
+
event :save_recently_edited_settings, :integrate,
|
2
|
+
on: :save, changed: %i[type content] do
|
2
3
|
if (recent = Card[:recent_settings])
|
3
4
|
recent.insert_item 0, name.right
|
4
5
|
attach_subcard recent
|
@@ -17,6 +18,10 @@ def rule_set_name
|
|
17
18
|
end
|
18
19
|
end
|
19
20
|
|
21
|
+
def rule_set_pattern_name
|
22
|
+
rule_set_name.tag_name
|
23
|
+
end
|
24
|
+
|
20
25
|
def rule_set
|
21
26
|
if is_preference?
|
22
27
|
self[0..-3]
|
@@ -25,6 +30,10 @@ def rule_set
|
|
25
30
|
end
|
26
31
|
end
|
27
32
|
|
33
|
+
def rule_setting
|
34
|
+
right
|
35
|
+
end
|
36
|
+
|
28
37
|
def rule_setting_name
|
29
38
|
name.tag
|
30
39
|
end
|
data/mod/rules/set/type/set.rb
CHANGED
@@ -1,33 +1,41 @@
|
|
1
1
|
include_set Type::SearchType
|
2
2
|
|
3
|
+
def anchor_name
|
4
|
+
name.left_name
|
5
|
+
end
|
6
|
+
|
7
|
+
def anchor
|
8
|
+
Card[anchor_name]
|
9
|
+
end
|
10
|
+
|
11
|
+
def pattern_name
|
12
|
+
name.tag_name
|
13
|
+
end
|
14
|
+
|
15
|
+
def pattern
|
16
|
+
tag
|
17
|
+
end
|
18
|
+
|
3
19
|
def inheritable?
|
4
|
-
|
20
|
+
junction_only? || (anchor_name&.junction? && self_set?)
|
21
|
+
end
|
5
22
|
|
6
|
-
|
7
|
-
|
23
|
+
def self_set?
|
24
|
+
pattern_name == Card::Set::Self.pattern.key
|
8
25
|
end
|
9
26
|
|
10
27
|
def subclass_for_set
|
11
|
-
current_set_pattern_code =
|
12
|
-
Card.set_patterns.find
|
13
|
-
current_set_pattern_code == set.pattern_code
|
14
|
-
end
|
28
|
+
current_set_pattern_code = pattern.codename
|
29
|
+
Card.set_patterns.find { |set| set.pattern_code == current_set_pattern_code }
|
15
30
|
end
|
16
31
|
|
17
32
|
def junction_only?
|
18
|
-
|
19
|
-
@junction_only = subclass_for_set.junction_only
|
20
|
-
else
|
21
|
-
@junction_only
|
22
|
-
end
|
33
|
+
@junction_only.nil? ? (@junction_only = subclass_for_set.junction_only) : @junction_only
|
23
34
|
end
|
24
35
|
|
25
36
|
def label
|
26
|
-
|
27
|
-
|
28
|
-
else
|
29
|
-
""
|
30
|
-
end
|
37
|
+
klass = subclass_for_set
|
38
|
+
klass ? klass.label(anchor_name) : ""
|
31
39
|
end
|
32
40
|
|
33
41
|
def uncapitalized_label
|
@@ -56,11 +64,12 @@ def visible_setting_codenames
|
|
56
64
|
@visible_setting_codenames ||= visible_settings.map(&:codename)
|
57
65
|
end
|
58
66
|
|
59
|
-
def visible_settings group=nil
|
67
|
+
def visible_settings group=nil, cardtype_id=nil
|
68
|
+
cardtype_id ||= prototype.type_id
|
60
69
|
settings =
|
61
70
|
(group && Card::Setting.groups[group]) || Card::Setting.groups.values.flatten.compact
|
62
71
|
settings.reject do |setting|
|
63
|
-
!setting || !setting.applies_to_cardtype(
|
72
|
+
!setting || !setting.applies_to_cardtype(cardtype_id)
|
64
73
|
end
|
65
74
|
end
|
66
75
|
|
@@ -69,10 +78,18 @@ def broader_sets
|
|
69
78
|
end
|
70
79
|
|
71
80
|
def prototype
|
72
|
-
opts = subclass_for_set.prototype_args
|
81
|
+
opts = subclass_for_set.prototype_args anchor_name
|
73
82
|
Card.fetch opts[:name], new: opts
|
74
83
|
end
|
75
84
|
|
85
|
+
def prototype_default_type_id
|
86
|
+
prototype_default_card.type_id
|
87
|
+
end
|
88
|
+
|
89
|
+
def prototype_default_card
|
90
|
+
prototype.rule_card(:default)
|
91
|
+
end
|
92
|
+
|
76
93
|
def related_sets with_self=false
|
77
94
|
if subclass_for_set.anchorless?
|
78
95
|
prototype.related_sets with_self
|
@@ -4,29 +4,25 @@ format :html do
|
|
4
4
|
end
|
5
5
|
|
6
6
|
view :core, cache: :never do
|
7
|
-
|
7
|
+
filtered_rule_list :bar_rule_list
|
8
8
|
end
|
9
9
|
|
10
|
-
view :
|
11
|
-
|
10
|
+
view :nest_rules, cache: :never, unknown: true, wrap: :slot do
|
11
|
+
filtered_rule_list :quick_edit_rule_list, :field_related_rules, :related, mark: ""
|
12
12
|
end
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
setting_select,
|
22
|
-
content_tag(:span, "rules that apply to #{_render_set_label}".html_safe,
|
23
|
-
class: "mx-2 small")
|
24
|
-
]
|
25
|
-
end
|
14
|
+
view :modal_nest_rules, cache: :never, unknown: true,
|
15
|
+
wrap: { modal: { title: "Rules for nest" } } do
|
16
|
+
filtered_rule_list :quick_edit_rule_list, :field_related_rules, :self
|
17
|
+
end
|
18
|
+
|
19
|
+
view :bridge_rules_tab, cache: :never do
|
20
|
+
filtered_rule_list :pill_rule_list, :common, :related, mark: ""
|
26
21
|
end
|
27
22
|
|
28
|
-
def
|
29
|
-
|
23
|
+
def filtered_rule_list view, *filter_args
|
24
|
+
[rules_filter(view, *filter_args),
|
25
|
+
render(view)]
|
30
26
|
end
|
31
27
|
|
32
28
|
view :set_label do
|
@@ -41,29 +37,15 @@ format :html do
|
|
41
37
|
end
|
42
38
|
end
|
43
39
|
|
44
|
-
def
|
45
|
-
|
46
|
-
wrap do
|
47
|
-
haml :rules_table, settings: settings,
|
48
|
-
item_view: voo.show?(:content) ? :closed_rule : :rule_link
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
def rule_table_row setting
|
53
|
-
return "" unless show_view? setting
|
54
|
-
|
55
|
-
rule_card = card.fetch trait: setting, new: {}
|
56
|
-
row_view, optional_content =
|
57
|
-
voo.hide?(:content) ? %i[rule_link hide] : %i[rule_row show]
|
58
|
-
|
59
|
-
nest(rule_card, view: row_view, optional_content => :content).html_safe
|
40
|
+
def setting_group default=:common
|
41
|
+
voo&.filter&.to_sym || params[:group]&.to_sym || default
|
60
42
|
end
|
61
43
|
|
62
|
-
view :
|
44
|
+
view :input do
|
63
45
|
"Cannot currently edit Sets" # LOCALIZE
|
64
46
|
end
|
65
47
|
|
66
|
-
view :
|
48
|
+
view :one_line_content, wrap: {} do
|
67
49
|
""
|
68
50
|
end
|
69
51
|
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
format :html do
|
2
|
+
view :quick_edit_rule_list, cache: :never, wrap: { slot: { class: "rule-list" } } do
|
3
|
+
quick_edit_rule_list setting_list_from_params(:field_related)
|
4
|
+
end
|
5
|
+
|
6
|
+
view :bar_rule_list, cache: :never, wrap: { slot: { class: "rule-list" } } do
|
7
|
+
bar_rule_list setting_list_from_params
|
8
|
+
end
|
9
|
+
|
10
|
+
view :pill_rule_list, cache: :never, wrap: { slot: { class: "rule-list" } } do
|
11
|
+
pill_rule_list setting_list_from_params
|
12
|
+
end
|
13
|
+
|
14
|
+
def quick_edit_rule_list settings
|
15
|
+
list_tag class: "nav nav-pills flex-column bridge-pills" do
|
16
|
+
settings.map { |setting| rule_list_item setting, :quick_edit }
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def pill_rule_list settings
|
21
|
+
list_items =
|
22
|
+
settings.map { |setting| rule_list_item setting, :rule_bridge_link }
|
23
|
+
bridge_pills list_items
|
24
|
+
end
|
25
|
+
|
26
|
+
def bar_rule_list settings
|
27
|
+
list_items =
|
28
|
+
settings.map { |setting| rule_list_item setting, :bar, hide: :full_name }
|
29
|
+
list_items.join("\n").html_safe
|
30
|
+
end
|
31
|
+
|
32
|
+
def rule_list_item setting, view, opts={}
|
33
|
+
return "" unless show_view? setting
|
34
|
+
|
35
|
+
rule_card = card.fetch trait: setting, new: {}
|
36
|
+
nest(rule_card, opts.merge(view: view)).html_safe
|
37
|
+
end
|
38
|
+
|
39
|
+
def setting_list_from_params default=:common
|
40
|
+
setting_list setting_group(default)
|
41
|
+
end
|
42
|
+
end
|
@@ -7,37 +7,6 @@ format :html do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def link_to_template_editor
|
10
|
-
link_to_view :
|
11
|
-
end
|
12
|
-
|
13
|
-
# TODO: hamlize
|
14
|
-
view :template_editor do
|
15
|
-
wrap { haml :template_editor }
|
16
|
-
end
|
17
|
-
|
18
|
-
def frame_header
|
19
|
-
voo.show?(:template_closer) ? template_frame_header : super
|
20
|
-
end
|
21
|
-
|
22
|
-
def template_frame_header
|
23
|
-
[render_template_closer, _render_header]
|
24
|
-
end
|
25
|
-
|
26
|
-
# no slot, because frame is inside template_editor's slot
|
27
|
-
def standard_frame slot=true
|
28
|
-
voo.show?(:template_closer) ? super(false) : super
|
29
|
-
end
|
30
|
-
|
31
|
-
view :template_editor_frame do
|
32
|
-
voo.title = card.label
|
33
|
-
frame do
|
34
|
-
_render_core
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
view :template_closer do
|
39
|
-
wrap_with "div", class: "card-menu template-closer" do
|
40
|
-
link_to_view :template_link, icon_tag("remove")
|
41
|
-
end
|
10
|
+
link_to_view :modal_nest_rules, voo.title
|
42
11
|
end
|
43
12
|
end
|
@@ -1,27 +1,41 @@
|
|
1
1
|
format :html do
|
2
|
-
def rules_filter selected_setting
|
3
|
-
form_tag path(
|
2
|
+
def rules_filter view, selected_setting=nil, set_options=nil, path_opts={}
|
3
|
+
form_tag path(path_opts.merge(view: view)),
|
4
4
|
remote: true, method: "get", role: "filter",
|
5
|
-
"data-slot-selector": ".card-slot.
|
5
|
+
"data-slot-selector": ".card-slot.rule-list",
|
6
6
|
class: classy("nodblclick slotter form-inline slim-select2 m-2") do
|
7
7
|
output [
|
8
8
|
label_tag(:view, icon_tag("filter_list"), class: "mr-2"),
|
9
9
|
setting_select(selected_setting),
|
10
|
-
content_tag(:span, "rules that apply to set ...", class: "mx-2 small"),
|
11
10
|
set_select(set_options)
|
12
|
-
]
|
11
|
+
].flatten
|
13
12
|
end
|
14
13
|
end
|
15
14
|
|
15
|
+
def set_select set_options
|
16
|
+
return filter_text.html_safe unless set_options
|
17
|
+
|
18
|
+
[content_tag(:span, "rules that apply to set ...", class: "mx-2 small"),
|
19
|
+
set_select_tag(set_options)]
|
20
|
+
end
|
21
|
+
|
16
22
|
def setting_select selected=nil
|
17
23
|
select_tag(:group, grouped_options_for_select(setting_options, selected),
|
18
|
-
class: "_submit-on-select form-control"
|
24
|
+
class: "_submit-on-select form-control",
|
25
|
+
"data-select2-id": "#{unique_id}-#{Time.now.to_i}")
|
19
26
|
end
|
20
27
|
|
21
|
-
def
|
28
|
+
def filter_text
|
29
|
+
wrap_with :span, class: "mx-2 small" do
|
30
|
+
"rules that apply to #{_render_set_label.downcase}" # LOCALIZE
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def set_select_tag set_options=:related
|
22
35
|
select_tag(:mark, set_select_options(set_options),
|
23
|
-
class: "_submit-on-select form-control",
|
24
|
-
"data-minimum-results-for-search": "Infinity"
|
36
|
+
class: "_submit-on-select form-control _close-rule-overlay-on-select",
|
37
|
+
"data-minimum-results-for-search": "Infinity",
|
38
|
+
"data-select2-id": "#{unique_id}-#{Time.now.to_i}")
|
25
39
|
end
|
26
40
|
|
27
41
|
def selected_set
|
@@ -30,7 +44,7 @@ format :html do
|
|
30
44
|
|
31
45
|
def set_select_options set_options
|
32
46
|
options =
|
33
|
-
if set_options == :related
|
47
|
+
if set_options == :related
|
34
48
|
related_set_options
|
35
49
|
else
|
36
50
|
[[card.label, card.name.url_key]]
|
@@ -13,6 +13,10 @@ format :html do
|
|
13
13
|
["Single rules", card.visible_setting_codenames]]
|
14
14
|
end
|
15
15
|
|
16
|
+
def field_settings
|
17
|
+
%i[default help input_type content_options content_option_view]
|
18
|
+
end
|
19
|
+
|
16
20
|
# @param val setting category, setting group or single setting
|
17
21
|
def setting_list val
|
18
22
|
category_setting_list(val) || group_setting_list(val) || [val]
|
@@ -32,17 +36,18 @@ format :html do
|
|
32
36
|
card.visible_setting_codenames & COMMON_SETTINGS
|
33
37
|
when :field_related, :field_related_rules
|
34
38
|
field_related_settings
|
39
|
+
when :nest_editor_field_related
|
40
|
+
nest_editor_field_related_settings
|
35
41
|
end
|
36
42
|
end
|
37
43
|
|
44
|
+
def nest_editor_field_related_settings
|
45
|
+
field_settings
|
46
|
+
# & card.visible_settings(nil, card.prototype_default_type_id).map(&:codename)
|
47
|
+
end
|
48
|
+
|
38
49
|
def field_related_settings
|
39
|
-
field_settings
|
40
|
-
if card.collection?
|
41
|
-
# FIXME: isn't card always of type set???
|
42
|
-
# FIXME: should be done with override in pointer set module
|
43
|
-
field_settings += %i[input options options_label]
|
44
|
-
end
|
45
|
-
card.visible_setting_codenames & field_settings
|
50
|
+
field_settings # card.visible_setting_codenames &
|
46
51
|
end
|
47
52
|
|
48
53
|
def recent_settings
|
@@ -51,33 +56,21 @@ format :html do
|
|
51
56
|
end
|
52
57
|
|
53
58
|
view :all_rules_list do
|
54
|
-
|
55
|
-
end
|
56
|
-
|
57
|
-
view :grouped_rules_list do
|
58
|
-
with_label_and_navbars :grouped_rules do
|
59
|
-
wrap_with :div, class: "panel-group", id: "accordion",
|
60
|
-
role: "tablist", "aria-multiselectable": "true" do
|
61
|
-
Card::Setting.groups.keys.map do |group_key|
|
62
|
-
_render group_key
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
59
|
+
pill_rule_list card.visible_setting_codenames.sort
|
66
60
|
end
|
67
61
|
|
68
62
|
view :recent_rules_list do
|
69
63
|
recent_settings = Card[:recent_settings].item_cards.map(&:codename)
|
70
64
|
settings = recent_settings.map(&:to_sym) & card.visible_setting_codenames
|
71
|
-
|
65
|
+
pill_rule_list settings
|
72
66
|
end
|
73
67
|
|
74
68
|
view :common_rules_list do
|
75
|
-
settings = card.visible_setting_codenames & COMMON_SETTINGS
|
76
|
-
|
77
|
-
rules_list :common, settings
|
69
|
+
settings = card.visible_setting_codenames & COMMON_SETTINGS # "&" = set intersection
|
70
|
+
pill_rule_list settings
|
78
71
|
end
|
79
72
|
|
80
73
|
view :field_related_rules_list do
|
81
|
-
|
74
|
+
pill_rule_list field_related_settings
|
82
75
|
end
|
83
76
|
end
|