Skip to content
Snippets Groups Projects
Commit e8e9af0d authored by Michael Lee's avatar Michael Lee
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
Showing
with 583 additions and 0 deletions
# ASC Finder Module (Forked from [Cornell's Finder Module](https://github.com/CU-CommunityApps/CD-finder))
**Maintained by: The Ohio State University - College of Arts and Sciences Web Services**
This software is a maintained fork of the Finder module originally created by the [Cornell Data Management Service Group and Cornell Information Technologies Custom Development Group](https://github.com/CU-CommunityApps).
Cornell University Research Data Management Service Group and Cornell Information Technologies Custom Development Group (2018). Finder Module. Drupal 8. [Original Repository](https://github.com/CU-CommunityApps/CD-finder)
## Overview
The purpose of the Finder module is to help users choose among a number of similar related alternatives.
In our initial use case, we had 18-20 computer data storage alternatives available for researchers. Our Help Desk created a list of questions to guide the researchers to specify their requirements. The Finder module allowed the researchers to enter requirements and interactively narrow the field of 18-20 to perhaps 2-3 alternatives.
After the users clicks checkboxes to enter their criteria, ineligible results are greyed out. The user can click on remaining eligible results; these are highlighted and detailed characteristics of this smallest group are presented in a table to allow the researchers to make their final choice.
Implementing this application in Drupal allows the service managers to easily edit the available services and supporting data without additional programming.
We believe other groups will have a similar need for a self-service product to guide end-users to narrow down a choice within a set of moderately complex alternatives.
## Planning
When using this module to help end-users choose between a number of complex alternatives, based on a number of criteria and the evaluation of information in several categories, expect that gathering the supporting information and designing useful questions will take a significant amount of planning and time. Changing questions or answers or adding or deleting categories of information after services have been entered requires editing each of the services.
We recommend starting with a simple example like that presented below to familiarize yourself with the data layout and editing workflow before beginning a “real” project.
## Setup of the Finder Module
* In the Control Type taxonomy (/admin/structure/taxonomy/manage/control_type/overview) add two terms: "checkbox" and "radio.".
* In the Facets taxonomy create a two-level hierarchy of terms representing criteria/questions and choices. For each of the criteria (top level facets), specify a control type: either “checkbox” (used when any, all or none of the choices may be selected) or “radio” (used when only one of the choices may be selected).
* Drag the Facet taxonomy terms into a two level hierarchy, representing the relationship between criteria/questions and choices.
Services (the things being chosen) can contain a lot of data, and so require a bit of planning. Once the end-user has narrowed down their choices, they will be presented with a comparison table containing data in several fields. These fields are represented by a Drupal Paragraph called “Service Paragraphs”. Service Paragraphs should be edited before you start entering Service data at
/admin/structure/paragraphs_type/service_paragraphs/fields
When delivered, the Finder module comes with two fields in Service Paragraphs: “First Category” and “Second Category.” You can rename or replace these, and add as many fields as you wish. We have found that Text (formatted, long) fields work best.
Now you may add Services. From the images above, you can see that a service has a title, summary (show on the cards in the first image. They are “eligible” to be chosen, depending on the choices the end-user has specified, and so need a set of “facet-matches” to indicate whether they are compatible with specific choices. They also have text data in several categories to be able to populate the comparison table.
Create your Services using the Drupal Service content-type. Add title and summary for each.
Then fill in the text for the Service Paragraphs you have chosen.
Required: Add an additional Service with the title “Help” and put text in each field describing what to expect in that field. This will be used by the Finder module to display help information for the each row in the comparison table. The comparison table may not appear if the Help Service is not defined.
## Tips
* You may wish to remove all sidebar blocks from this page, so that the Finder can use the full width of the page.
* The Finder module is displayed at the URL path /finder.
* There is a configuration page to edit titles and other data on the Finder page at /admin/config/content/finder
* Check out our production implementation at https://ascstoragefinder.osu.edu/
* Installation works only at a root site, not if installed in a subdirectory.
{
"name": "ascwebservices/finder",
"description": "ASC Finder is a forked version of Finder developed by Cornell to help users find services which meet their criteria",
"type": "drupal-module",
"authors": [
{
"name": "Rich Marisa (richmarisa)",
"email": "rjm2@cornell.edu",
"homepage": "https://wildgoosechase.net",
"role": "Original Author"
},
{
"name": "Nazrin Tingstrom",
"email": "nazrin.tingstrom@cornell.edu",
"role": "Co-maintainer"
},
{
"name": "Kevin McGuire",
"email": "kpm75@cornell.edu",
"role": "Designer"
},
{
"name": "Anthony Adinolfi",
"email": "ama39@cornell.edu",
"role": "Designer"
},
{
"name": "Michael Lee",
"email": "lee.5151@osu.edu",
"role": "Current Maintainer"
}
],
"license": "GPL-2.0-or-later",
"minimum-stability": "dev",
"require": {
"drupal/paragraphs": "^1.3"
}
}
uuid: dc6698f8-52aa-4aa4-9c43-2120a6343ed6
langcode: en
status: true
dependencies:
config:
- field.field.node.service.field_facet_matches
- field.field.node.service.field_service_paragraphs
- field.field.node.service.field_summary
- node.type.service
module:
- paragraphs
id: node.service.default
targetEntityType: node
bundle: service
mode: default
content:
field_facet_matches:
type: options_buttons
weight: 2
region: content
settings: { }
third_party_settings: { }
field_service_paragraphs:
type: paragraphs
weight: 3
region: content
settings:
title: Paragraph
title_plural: Paragraphs
edit_mode: open
closed_mode: summary
autocollapse: none
add_mode: dropdown
form_display_mode: default
default_paragraph_type: service_paragraphs
features:
duplicate: duplicate
collapse_edit_all: collapse_edit_all
add_above: '0'
third_party_settings: { }
field_summary:
type: string_textfield
weight: 1
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
status:
type: boolean_checkbox
settings:
display_label: true
weight: 4
region: content
third_party_settings: { }
title:
type: string_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
hidden:
created: true
path: true
promote: true
sticky: true
uid: true
uuid: 296e50a2-a1f6-4353-858d-f4dbbb774e51
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.service_paragraphs.field_first_category
- field.field.paragraph.service_paragraphs.field_second_category
- paragraphs.paragraphs_type.service_paragraphs
module:
- text
id: paragraph.service_paragraphs.default
targetEntityType: paragraph
bundle: service_paragraphs
mode: default
content:
field_first_category:
type: text_textarea
weight: 0
region: content
settings:
rows: 5
placeholder: ''
third_party_settings: { }
field_second_category:
type: text_textarea
weight: 1
region: content
settings:
rows: 5
placeholder: ''
third_party_settings: { }
hidden:
created: true
status: true
uid: true
uuid: 5e07006c-8898-4750-9e99-a366bad3fa9b
langcode: en
status: true
dependencies:
config:
- field.field.taxonomy_term.facets.field_control_type
- taxonomy.vocabulary.facets
id: taxonomy_term.facets.default
targetEntityType: taxonomy_term
bundle: facets
mode: default
content:
field_control_type:
type: entity_reference_autocomplete
weight: 1
region: content
settings:
match_operator: CONTAINS
size: 60
placeholder: ''
third_party_settings: { }
name:
type: string_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
hidden:
description: true
path: true
uuid: 3943b8f0-732f-4f2b-a5c4-01f755e5a17a
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.service_paragraphs.field_first_category
- field.field.paragraph.service_paragraphs.field_second_category
- paragraphs.paragraphs_type.service_paragraphs
module:
- text
id: paragraph.service_paragraphs.default
targetEntityType: paragraph
bundle: service_paragraphs
mode: default
content:
field_first_category:
type: text_default
weight: 0
region: content
label: above
settings: { }
third_party_settings: { }
field_second_category:
type: text_default
weight: 1
region: content
label: above
settings: { }
third_party_settings: { }
hidden: { }
uuid: cee23f63-12fb-4ff0-b4c4-f12eddf76e22
langcode: en
status: true
dependencies:
module:
- taxonomy
_core:
default_config_hash: '-PPKjsNQPvoIDjOuUAvlLocYD976MNjb9Zpgyz5_BWE'
id: taxonomy_term.full
label: 'Taxonomy term page'
targetEntityType: taxonomy_term
cache: true
uuid: 07a3b558-d3e8-4e88-aa47-bd009ad3043b
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_facet_matches
- node.type.service
- taxonomy.vocabulary.facets
_core:
default_config_hash: BSsidwmarhlKx9yoWjSTwu7kJjRh5MHEUDh2mSopD_o
id: node.service.field_facet_matches
field_name: field_facet_matches
entity_type: node
bundle: service
label: 'Facet Matches'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:taxonomy_term'
handler_settings:
target_bundles:
facets: facets
sort:
field: name
direction: asc
auto_create: false
auto_create_bundle: ''
field_type: entity_reference
uuid: e2042785-f628-42e0-a312-0e8b8e217e48
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_service_paragraphs
- node.type.service
- paragraphs.paragraphs_type.service_paragraphs
module:
- entity_reference_revisions
_core:
default_config_hash: odxUnLo2A2qEn1o-vxZP1C_EimpW34IwmSS8cShH__Q
id: node.service.field_service_paragraphs
field_name: field_service_paragraphs
entity_type: node
bundle: service
label: 'Service Paragraphs'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:paragraph'
handler_settings:
negate: 0
target_bundles:
service_paragraphs: service_paragraphs
target_bundles_drag_drop:
service_paragraphs:
enabled: true
weight: -3
field_type: entity_reference_revisions
uuid: 223dded3-82cc-4509-8aef-fcb52d70ea47
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_summary
- node.type.service
_core:
default_config_hash: QinCMUhHNsplyttrQbDNKOD59jmBgYksVIaHewiaEY4
id: node.service.field_summary
field_name: field_summary
entity_type: node
bundle: service
label: Summary
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string
uuid: 879fb0bf-0c63-428a-aa16-c37d2ec69dd6
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.field_first_category
- paragraphs.paragraphs_type.service_paragraphs
module:
- text
_core:
default_config_hash: YJsG2atWUf0SKRl2dCt0DJO6MrzyI-7viPh-x3Xugq8
id: paragraph.service_paragraphs.field_first_category
field_name: field_first_category
entity_type: paragraph
bundle: service_paragraphs
label: 'First Category'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: text_long
uuid: bb725f86-2933-4eb4-b598-3205289d6950
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.field_second_category
- paragraphs.paragraphs_type.service_paragraphs
module:
- text
_core:
default_config_hash: DNldmIx5lChSKe6Ta608-deB2-USf89sU7-tU4ZbydY
id: paragraph.service_paragraphs.field_second_category
field_name: field_second_category
entity_type: paragraph
bundle: service_paragraphs
label: 'Second Category'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: text_long
uuid: da82d0be-15c7-4df9-b298-4ab4ef8a46f7
langcode: en
status: true
dependencies:
config:
- field.storage.taxonomy_term.field_control_type
- taxonomy.vocabulary.control_type
- taxonomy.vocabulary.facets
content:
- 'taxonomy_term:control_type:e138e5a3-0eb3-4bd6-971c-094a2da11b51'
_core:
default_config_hash: uLcoXrP7ENedZBxNtr-a-cZg7vg7PqbbOcmEyYN288Q
id: taxonomy_term.facets.field_control_type
field_name: field_control_type
entity_type: taxonomy_term
bundle: facets
label: 'Control Type'
description: ''
required: false
translatable: false
default_value:
-
target_uuid: e138e5a3-0eb3-4bd6-971c-094a2da11b51
default_value_callback: ''
settings:
handler: 'default:taxonomy_term'
handler_settings:
target_bundles:
control_type: control_type
sort:
field: name
direction: asc
auto_create: false
auto_create_bundle: ''
field_type: entity_reference
uuid: a480e622-0b26-4ad2-9172-93098ca0ba10
langcode: en
status: true
dependencies:
module:
- node
- taxonomy
_core:
default_config_hash: kZi-GbyzcUBMgs_fwHU-thgGm2h9DOkc-uWO2-jrzKE
id: node.field_facet_matches
field_name: field_facet_matches
entity_type: node
type: entity_reference
settings:
target_type: taxonomy_term
module: core
locked: false
cardinality: -1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
uuid: 6726816b-0fd7-469b-a286-b56c7ddce82c
langcode: en
status: true
dependencies:
module:
- entity_reference_revisions
- node
- paragraphs
_core:
default_config_hash: 1iSnIACz13J7TmAiww75r04GsSLFLtpw4cCg0p9YZuM
id: node.field_service_paragraphs
field_name: field_service_paragraphs
entity_type: node
type: entity_reference_revisions
settings:
target_type: paragraph
module: entity_reference_revisions
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
uuid: 7298eb47-b99f-4632-aa0a-7912488acf9f
langcode: en
status: true
dependencies:
module:
- node
_core:
default_config_hash: gfztncf1u_tObgHy3-tMjHd-vUoFiYJoU9YPlI2AC4Y
id: node.field_summary
field_name: field_summary
entity_type: node
type: string
settings:
max_length: 255
is_ascii: false
case_sensitive: false
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
uuid: 72b56d19-2256-4b0f-a4f0-5de5fa3e26d2
langcode: en
status: true
dependencies:
module:
- paragraphs
- text
_core:
default_config_hash: 1A8HY9KlZEpk6Mv8Uw9tFJhH48WqH7JBuCBwcysFm44
id: paragraph.field_first_category
field_name: field_first_category
entity_type: paragraph
type: text_long
settings: { }
module: text
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
uuid: 45e28468-78a0-4b1a-b461-37f9a49a98d2
langcode: en
status: true
dependencies:
module:
- paragraphs
- text
_core:
default_config_hash: cxQVASWBnU8PuMnhsXXpUf_Ft5VFqjuWbmBPt_6-kRQ
id: paragraph.field_second_category
field_name: field_second_category
entity_type: paragraph
type: text_long
settings: { }
module: text
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
uuid: 9982e0de-bb37-4065-be91-efd979b449f3
langcode: en
status: true
dependencies:
module:
- taxonomy
_core:
default_config_hash: sA7wBy4gvqqQJ4H3uoHgBzNJoLxwt7wUiy5aobUzopQ
id: taxonomy_term.field_control_type
field_name: field_control_type
entity_type: taxonomy_term
type: entity_reference
settings:
target_type: taxonomy_term
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
uuid: 7441436c-3b5c-402e-9f6b-c049b12698a0
langcode: en
status: true
dependencies:
module:
- menu_ui
third_party_settings:
menu_ui:
available_menus:
- main
parent: 'main:'
_core:
default_config_hash: EyvNo1oZazY9kHGtHDlaLCzDlkxzbRgc089SL00ylo8
name: Service
type: service
description: 'Part of the Finder module'
help: ''
new_revision: true
preview_mode: 1
display_submitted: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment