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
data/mod/core/set/all/rules.rb
CHANGED
@@ -113,12 +113,7 @@ def related_sets with_self=false
|
|
113
113
|
# refers to sets that users may configure from the current card -
|
114
114
|
# NOT to sets to which the current card belongs
|
115
115
|
|
116
|
-
# FIXME: change to use codenames!!
|
117
|
-
|
118
116
|
sets = []
|
119
|
-
if known? && type_id == Card::CardtypeID # FIXME: belongs in type/cardtype
|
120
|
-
sets << ["#{name}+*type", Card::Set::Type.label(name)]
|
121
|
-
end
|
122
117
|
sets << ["#{name}+*self", Card::Set::Self.label(name)] if with_self
|
123
118
|
if known? && name.simple?
|
124
119
|
sets << ["#{name}+*right", Card::Set::Right.label(name)]
|
@@ -62,6 +62,12 @@ RSpec.describe Card::Content::Chunk::Link do
|
|
62
62
|
text: "/*recent"
|
63
63
|
end
|
64
64
|
|
65
|
+
it "handles names with slashes" do
|
66
|
+
assert_link "[[he/she]]", class: "wanted-card",
|
67
|
+
href: "/he_she?card%5Bname%5D=he%2Fshe",
|
68
|
+
text: "he/she"
|
69
|
+
end
|
70
|
+
|
65
71
|
it "handles absolute urls" do
|
66
72
|
assert_link "[[http://google.com]]",
|
67
73
|
class: "external-link", target: "_blank",
|
@@ -166,11 +166,11 @@ RSpec.describe Card::Content::Chunk::Nest do
|
|
166
166
|
expect { adm.format.render_core }.to raise_error(Card::Error::UserError, /too deep/)
|
167
167
|
end
|
168
168
|
|
169
|
-
it "handles
|
169
|
+
it "handles unknown cards" do
|
170
170
|
@a = create! "boo", "hey {{+there}}"
|
171
171
|
r = @a.format.render_core
|
172
172
|
assert_view_select(
|
173
|
-
r, 'div[data-card-name="boo+there"][class~="
|
173
|
+
r, 'div[data-card-name="boo+there"][class~="unknown-view"]'
|
174
174
|
)
|
175
175
|
end
|
176
176
|
|
@@ -86,16 +86,6 @@ RSpec.describe Card::Set::All::Permissions do
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
-
it "is granted to admin if to anybody" do
|
90
|
-
Card::Auth.as_bot do
|
91
|
-
c1 = Card["c1"]
|
92
|
-
Card.create! name: "c1+*self+*comment", type: "Pointer",
|
93
|
-
content: "[[r1]]"
|
94
|
-
expect(c1.who_can(:comment)).to eq([Card["r1"].id])
|
95
|
-
expect(c1.ok?(:comment)).to be_truthy
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
89
|
it "reader setting", aggregate_failures: true do
|
100
90
|
Card.where(trash: false).each do |ca|
|
101
91
|
rule_id, rule_class = ca.permission_rule_id_and_class :read
|
@@ -14,19 +14,9 @@ describe Card::Set::All::Rules do
|
|
14
14
|
|
15
15
|
describe "#rule" do
|
16
16
|
it "retrieves Set based value" do
|
17
|
-
Card.create name: "Book+*type+*
|
18
|
-
|
19
|
-
expect(
|
20
|
-
end
|
21
|
-
|
22
|
-
it "retrieves default values" do
|
23
|
-
# Card.create name: 'all Basic cards', type: 'Set',
|
24
|
-
# content: "{\"type\": \"Basic\'}'
|
25
|
-
# defaults should work when other Sets are present
|
26
|
-
assert Card.create(name: "*all+*add help", content: "lobotomize")
|
27
|
-
# Card.default_rule(:add_help, fallback: :help).should == 'lobotomize'
|
28
|
-
add_help_rule = Card.new(type_id: Card::BasicID).rule(:add_help, fallback: :help)
|
29
|
-
expect(add_help_rule).to eq("lobotomize")
|
17
|
+
Card.create name: "Book+*type+*help", content: "authorize"
|
18
|
+
help_rule = Card.new(type: "Book").rule(:help)
|
19
|
+
expect(help_rule).to eq("authorize")
|
30
20
|
end
|
31
21
|
|
32
22
|
it "retrieves single values" do
|
@@ -38,19 +28,19 @@ describe Card::Set::All::Rules do
|
|
38
28
|
before do
|
39
29
|
Card.create name: "*all+*help", content: "edit any kind of card"
|
40
30
|
end
|
41
|
-
subject { Card.new(type: "Book").rule(:
|
31
|
+
subject { Card.new(type: "Book").rule(:csv_structure, fallback: :help) }
|
42
32
|
|
43
33
|
it "retrieves default setting" do
|
44
34
|
expect(subject).to eq("edit any kind of card")
|
45
35
|
end
|
46
36
|
|
47
37
|
it "retrieves primary setting" do
|
48
|
-
Card.create name: "*all+*
|
38
|
+
Card.create name: "*all+*csv_structure", content: "add any kind of card"
|
49
39
|
expect(subject).to eq("add any kind of card")
|
50
40
|
end
|
51
41
|
|
52
42
|
it "retrieves more specific default setting" do
|
53
|
-
Card.create name: "*all+*
|
43
|
+
Card.create name: "*all+*csv_structure", content: "add any kind of card"
|
54
44
|
Card.create name: "*Book+*type+*help", content: "edit a Book"
|
55
45
|
expect(subject).to eq("add any kind of card")
|
56
46
|
end
|
data/mod/date/set/type/date.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
format :html do
|
2
|
+
def account_details_items
|
3
|
+
[
|
4
|
+
["Email and Password", :account,
|
5
|
+
{ path: { slot: { hide: %i[help_link bridge_link] } } }],
|
6
|
+
["Roles", :roles,
|
7
|
+
{ path: { view: :content_with_edit_button } }],
|
8
|
+
["Notifications", :follow]
|
9
|
+
]
|
10
|
+
end
|
11
|
+
|
12
|
+
def account_content_items
|
13
|
+
[["Created", :created],
|
14
|
+
["Edited", :edited]]
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
format :html do
|
2
|
+
BRIDGE_PILL_UL_CLASSES =
|
3
|
+
"nav nav-pills _auto-single-select bridge-pills flex-column".freeze
|
4
|
+
|
5
|
+
BRIDGE_PILL_LI_CLASSES = "nav-item".freeze
|
6
|
+
|
7
|
+
def bridge_pills items
|
8
|
+
list_tag class: BRIDGE_PILL_UL_CLASSES, items: { class: BRIDGE_PILL_LI_CLASSES } do
|
9
|
+
items
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def bridge_pill_items data, breadcrumb
|
14
|
+
data.map do |text, field, extra_opts|
|
15
|
+
opts = bridge_pill_item_opts breadcrumb, extra_opts, text
|
16
|
+
mark = opts.delete(:mark) == :absolute ? field : [card, field]
|
17
|
+
link_to_card mark, text, opts
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def bridge_pill_item_opts breadcrumb, extra_opts, text
|
22
|
+
opts = bridge_link_opts.merge("data-toggle": "pill")
|
23
|
+
opts.merge! breadcrumb_data(breadcrumb)
|
24
|
+
|
25
|
+
if extra_opts
|
26
|
+
classes = extra_opts.delete :class
|
27
|
+
add_class opts, classes if classes
|
28
|
+
opts.deep_merge! extra_opts
|
29
|
+
end
|
30
|
+
opts["data-cy"] = "#{text.to_name.key}-pill"
|
31
|
+
add_class opts, "nav-link"
|
32
|
+
opts
|
33
|
+
end
|
34
|
+
|
35
|
+
def bridge_pill_sections tab_name
|
36
|
+
wrap_with :ul, class: BRIDGE_PILL_UL_CLASSES do
|
37
|
+
yield.map { |args| bridge_pill_section(tab_name, *args) }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def bridge_pill_section tab_name, title, items
|
42
|
+
wrap_with(:h6, title, class: "ml-1 mt-3") +
|
43
|
+
wrap_each_with(:li, class: BRIDGE_PILL_LI_CLASSES) do
|
44
|
+
bridge_pill_items(items, tab_name)
|
45
|
+
end.html_safe
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
format :html do
|
2
|
+
RELATED_ITEMS =
|
3
|
+
{
|
4
|
+
"by name" => [["children", :children],
|
5
|
+
["mates", :mates]],
|
6
|
+
# FIXME: optimize,
|
7
|
+
"by content" => [["links out", :links_to],
|
8
|
+
["links in", :linked_to_by],
|
9
|
+
["nests", :nests],
|
10
|
+
["nested by", :nested_by],
|
11
|
+
["references out", :refers_to],
|
12
|
+
["references in", :referred_to_by]]
|
13
|
+
# ["by edit", [["creator", :creator],
|
14
|
+
# ["editors", :editors],
|
15
|
+
# ["last edited", :last_edited]]]
|
16
|
+
}.freeze
|
17
|
+
|
18
|
+
def related_by_name_items
|
19
|
+
pills = []
|
20
|
+
if card.name.junction?
|
21
|
+
pills += card.name.ancestors.map { |a| [a, a, { mark: :absolute }] }
|
22
|
+
end
|
23
|
+
pills += RELATED_ITEMS["by name"]
|
24
|
+
pills
|
25
|
+
end
|
26
|
+
|
27
|
+
def related_by_content_items
|
28
|
+
RELATED_ITEMS["by content"]
|
29
|
+
end
|
30
|
+
|
31
|
+
def related_by_type_items
|
32
|
+
[["#{card.type} cards", [card.type, :type, :by_name], mark: :absolute]]
|
33
|
+
end
|
34
|
+
end
|
@@ -1,10 +1,4 @@
|
|
1
1
|
format :html do
|
2
|
-
RELATED_ITEMS = [["children", :children],
|
3
|
-
# ["mates", "bed", "*mates"],
|
4
|
-
# FIXME: optimize and restore
|
5
|
-
["references out", :refers_to],
|
6
|
-
["references in", :referred_to_by]].freeze
|
7
|
-
|
8
2
|
view :engage_tab, wrap: { div: { class: "m-3 mt-4 _engage-tab" } }, cache: :never do
|
9
3
|
[render_follow_section, discussion_section].compact
|
10
4
|
end
|
@@ -16,7 +10,11 @@ format :html do
|
|
16
10
|
end
|
17
11
|
|
18
12
|
view :related_tab do
|
19
|
-
|
13
|
+
bridge_pill_sections "Related" do
|
14
|
+
%w[name content type].map do |section_name|
|
15
|
+
["by #{section_name}", send("related_by_#{section_name}_items")]
|
16
|
+
end
|
17
|
+
end
|
20
18
|
end
|
21
19
|
|
22
20
|
view :rules_tab, unknown: true do
|
@@ -27,7 +25,10 @@ format :html do
|
|
27
25
|
end
|
28
26
|
|
29
27
|
view :account_tab do
|
30
|
-
|
28
|
+
bridge_pill_sections "Account" do
|
29
|
+
[["Settings", account_details_items],
|
30
|
+
["Content", account_content_items]]
|
31
|
+
end
|
31
32
|
end
|
32
33
|
|
33
34
|
view :follow_section, wrap: :slot, cache: :never do
|
@@ -44,36 +45,4 @@ format :html do
|
|
44
45
|
field_nest(:discussion, view: :titled, title: "Discussion", show: :comment_box,
|
45
46
|
hide: [:menu])
|
46
47
|
end
|
47
|
-
|
48
|
-
def account_items
|
49
|
-
%i[account roles created edited follow].map do |item|
|
50
|
-
if item == :account
|
51
|
-
[tr(:details), item, { view: :edit, hide: %i[edit_name_row edit_type_row] }]
|
52
|
-
else
|
53
|
-
[tr(item), item]
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
def bridge_pills items
|
59
|
-
list_tag class: "nav nav-pills _auto-single-select bridge-pills flex-column",
|
60
|
-
items: { class: "nav-item" } do
|
61
|
-
items
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
def bridge_pill_items data, breadcrumb
|
66
|
-
data.map do |text, field, extra_opts|
|
67
|
-
opts = bridge_link_opts.merge("data-toggle": "pill")
|
68
|
-
opts.merge! breadcrumb_data(breadcrumb)
|
69
|
-
if extra_opts
|
70
|
-
classes = extra_opts.delete :class
|
71
|
-
add_class opts, classes if classes
|
72
|
-
opts.deep_merge! extra_opts
|
73
|
-
end
|
74
|
-
opts["data-cy"] = "#{text.to_name.key}-pill"
|
75
|
-
add_class opts, "nav-link"
|
76
|
-
link_to_card [card, field], text, opts
|
77
|
-
end
|
78
|
-
end
|
79
48
|
end
|
@@ -10,7 +10,7 @@ format :html do
|
|
10
10
|
def show_account_tab?
|
11
11
|
return unless card.real?
|
12
12
|
|
13
|
-
card.account
|
13
|
+
card.account&.ok?(:update)
|
14
14
|
end
|
15
15
|
|
16
16
|
def show_engage_tab?
|
@@ -39,7 +39,7 @@ format :html do
|
|
39
39
|
d_card = discussion_card
|
40
40
|
return unless d_card
|
41
41
|
|
42
|
-
permission_task = d_card.new_card? ? :
|
42
|
+
permission_task = d_card.new_card? ? :update : :read
|
43
43
|
d_card.ok? permission_task
|
44
44
|
end
|
45
45
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
format :html do
|
2
|
-
view :
|
2
|
+
view :edit_form, wrap: :slot do
|
3
3
|
voo.show :edit_type_row
|
4
4
|
with_nest_mode :edit do
|
5
5
|
edit_form
|
@@ -19,7 +19,7 @@ format :html do
|
|
19
19
|
# render to get voo.slot_options to have the write home view in
|
20
20
|
# the slot wrap. Id think this would probably best be handled as an
|
21
21
|
# option to #wrap that triggers a new heir voo
|
22
|
-
|
22
|
+
_render_content_formgroups,
|
23
23
|
_render_edit_buttons
|
24
24
|
]
|
25
25
|
end
|
@@ -37,7 +37,7 @@ format :html do
|
|
37
37
|
wrap true do
|
38
38
|
[
|
39
39
|
frame_help,
|
40
|
-
|
40
|
+
_render_edit_form
|
41
41
|
]
|
42
42
|
end
|
43
43
|
end
|
@@ -5,7 +5,7 @@ format :html do
|
|
5
5
|
card_form :update, success: edit_success do
|
6
6
|
[
|
7
7
|
edit_view_hidden,
|
8
|
-
|
8
|
+
_render_content_formgroups,
|
9
9
|
_render_edit_inline_buttons
|
10
10
|
]
|
11
11
|
end
|
@@ -13,7 +13,7 @@ format :html do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
view :edit_name_row do
|
16
|
-
edit_row_fixed_width "Name", card.name, :
|
16
|
+
edit_row_fixed_width "Name", card.name, :name_form
|
17
17
|
end
|
18
18
|
|
19
19
|
view :edit_inline_buttons do
|
@@ -24,10 +24,21 @@ format :html do
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
|
27
|
+
# TODO: better styling for this so that is reusable
|
28
|
+
# At the moment it is used for the name and type field in the bridge
|
29
|
+
# (with fixed 50px width for the title column) and
|
30
|
+
# for password and email for accounts (with fixed 75px width for the title column)
|
31
|
+
# The view is very similar to labeled but with fixed edit link on the right
|
32
|
+
# and a fixed width for the labels so that the content column is aligned
|
33
|
+
# There is also the problem that label and content are not vertically aligned
|
34
|
+
view :edit_row do
|
35
|
+
edit_row_fixed_width render_title, render_core, :edit_inline, 75
|
36
|
+
end
|
37
|
+
|
38
|
+
def edit_row_fixed_width title, content, edit_view, width=50
|
28
39
|
class_up "card-slot", "d-flex"
|
29
40
|
wrap do
|
30
|
-
["<label class='w
|
41
|
+
["<label class='w-#{width}px'>#{title}</label>",
|
31
42
|
content,
|
32
43
|
edit_inline_link(edit_view, align: :right)]
|
33
44
|
end
|
@@ -1,17 +1,15 @@
|
|
1
1
|
format :html do
|
2
2
|
# note: depends on js with selector ".edit_name-view .card-form"
|
3
3
|
view :edit_name, perms: :update do
|
4
|
-
frame
|
5
|
-
edit_name_form
|
6
|
-
end
|
4
|
+
frame { name_form }
|
7
5
|
end
|
8
6
|
|
9
|
-
# note: depends on js with selector ".
|
10
|
-
view :
|
11
|
-
|
7
|
+
# note: depends on js with selector ".name_form-view .card-form"
|
8
|
+
view :name_form, perms: :update, wrap: :slot, cache: :never do
|
9
|
+
name_form :edit_name_row
|
12
10
|
end
|
13
11
|
|
14
|
-
def
|
12
|
+
def name_form success_view=nil
|
15
13
|
card_form({ action: :update, id: card.id },
|
16
14
|
# "main-success" => "REDIRECT",
|
17
15
|
"data-update-origin": "true",
|