Skip to content

Commit

Permalink
[C] make previous questions a table cell
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgoff authored and blnkt committed Apr 18, 2024
1 parent 94ac745 commit f7353cf
Show file tree
Hide file tree
Showing 9 changed files with 185 additions and 166 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: 'Display Table'
searchable: false
settings:
blockTypeFields: 0
changedFieldIndicator: 503386703
changedFieldIndicator: 123055138
columns:
__assoc__:
-
Expand All @@ -17,13 +17,6 @@ settings:
-
- width
- ''
-
- 301c4afd-e88a-4847-a0ce-1b134b5c3741 # Previous Question
-
__assoc__:
-
- width
- ''
contentTable: '{{%stc_displaytable}}'
fieldLayout: row
maxRows: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: 'Question Table'
searchable: false
settings:
blockTypeFields: 0
changedFieldIndicator: 185232517
changedFieldIndicator: 1583081771
columns:
__assoc__:
-
Expand All @@ -17,21 +17,14 @@ settings:
-
- width
- ''
-
- c74bb176-8889-459f-a14a-b9d4601786a6 # Previous Question
-
__assoc__:
-
- width
- ''
contentTable: '{{%stc_questiontable}}'
fieldLayout: row
maxRows: null
maxRows: 1
minRows: 1
propagationKeyFormat: null
propagationMethod: all
selectionLabel: null
staticField: null
staticField: true
translationKeyFormat: null
translationMethod: none
type: verbb\supertable\fields\SuperTableField
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
field: 839bfa4f-5a09-4b32-b1eb-e0fef7b7beda # Table Row
fieldLayouts:
df58f88f-d5c6-42ee-9caa-c4b38a2b8568:
tabs:
-
elementCondition: null
elements:
-
elementCondition: null
fieldUid: 6f2f6107-ea5d-44cd-9e5d-9372061e7c38 # Question
instructions: null
label: null
required: false
tip: null
type: craft\fieldlayoutelements\CustomField
uid: 27fa64e2-3cf5-4d08-9541-ac15e88485cc
userCondition: null
warning: null
width: 100
name: Content
uid: ce17ee68-46d5-4229-9c00-af0d10d7aad8
userCondition: null
fields:
6f2f6107-ea5d-44cd-9e5d-9372061e7c38: # Question
columnSuffix: null
contentColumnType: string
fieldGroup: null
handle: question
instructions: null
name: Question
searchable: false
settings:
allowSelfRelations: false
branchLimit: null
localizeRelations: false
maintainHierarchy: false
maxRelations: 1
minRelations: null
selectionCondition:
__assoc__:
-
- elementType
- craft\elements\Entry
-
- fieldContext
- global
-
- class
- craft\elements\conditions\entries\EntryCondition
-
- conditionRules
-
-
__assoc__:
-
- class
- craft\fields\conditions\OptionsFieldConditionRule
-
- uid
- c46907a3-3a54-47c2-aa5f-baf331e8440f
-
- operator
- in
-
- values
-
- text
- textarea
- number
- tabular
-
- fieldUid
- a966d509-84b0-43ab-9a5b-42590a5fb537 # Answer Type
selectionLabel: null
showSiteMenu: false
sources:
- 'section:9068dd8e-ad92-4925-ba1d-1fe180598462' # Questions
targetSiteId: null
validateRelatedElements: false
viewMode: null
translationKeyFormat: null
translationMethod: site
type: craft\fields\Entries
handle: previousQuestion
name: 'Previous Question'
sortOrder: 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
field: 8b781860-2b8c-4100-969a-2f13c5272420 # Table Row
fieldLayouts:
9c9ef127-d7f8-4c26-8d90-40d59594ec4f:
tabs:
-
elementCondition: null
elements:
-
elementCondition: null
fieldUid: 6bd2c008-ff4d-45c9-9cd6-5a8a2c61f8e6 # Question
instructions: null
label: null
required: false
tip: null
type: craft\fieldlayoutelements\CustomField
uid: d178d6f0-963c-432e-ba78-5dd709fc9f72
userCondition: null
warning: null
width: 100
name: Content
uid: abfbc5c5-6d65-470d-89b4-df6b3c1ccc81
userCondition: null
fields:
6bd2c008-ff4d-45c9-9cd6-5a8a2c61f8e6: # Question
columnSuffix: null
contentColumnType: string
fieldGroup: null
handle: question
instructions: null
name: Question
searchable: false
settings:
allowSelfRelations: false
branchLimit: null
localizeRelations: false
maintainHierarchy: false
maxRelations: 1
minRelations: null
selectionCondition:
__assoc__:
-
- elementType
- craft\elements\Entry
-
- fieldContext
- global
-
- class
- craft\elements\conditions\entries\EntryCondition
-
- conditionRules
-
-
__assoc__:
-
- class
- craft\fields\conditions\OptionsFieldConditionRule
-
- uid
- 92cc7e21-6d04-470d-a7ae-cef6883b2b34
-
- operator
- in
-
- values
-
- text
- textarea
- number
- tabular
-
- fieldUid
- a966d509-84b0-43ab-9a5b-42590a5fb537 # Answer Type
selectionLabel: null
showSiteMenu: false
sources:
- 'section:9068dd8e-ad92-4925-ba1d-1fe180598462' # Questions
targetSiteId: null
validateRelatedElements: false
viewMode: null
translationKeyFormat: null
translationMethod: site
type: craft\fields\Entries
handle: previousQuestion
name: 'Previous Question'
sortOrder: 4
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fields:
searchable: false
settings:
blockTypeFields: 0
changedFieldIndicator: 1612934111
changedFieldIndicator: 977951587
columns:
__assoc__:
-
Expand Down
8 changes: 5 additions & 3 deletions api/config/project/project.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dateModified: 1713460581
dateModified: 1713468765
elementSources:
craft\elements\Entry:
-
Expand Down Expand Up @@ -115,11 +115,13 @@ meta:
5dc7dc5c-2390-4eb4-9714-818aa35f5772: Investigations # Investigations
5e789abf-cfef-4ed4-b795-a4dcfe4fd284: 'Supernova & Galaxy Observations' # Supernova & Galaxy Observations
6b8e1421-5b57-4c4d-bd1f-de5a2cd186e2: 'Filter Color Options' # Filter Color Options
6bd2c008-ff4d-45c9-9cd6-5a8a2c61f8e6: Question # Question
6caa0b9c-4aa9-418b-847c-f6b8e3807cdd: 'Option Label' # Option Label
6dbf8441-fd70-4b44-a2f8-7b9ba10b20d9: Distance # Distance
6e046cd9-797f-4e30-9959-143cfa694b2f: Question # Question
6efbdc96-00f5-4e37-953b-d36344f6e1fb: 'Configured Widgets' # Configured Widgets
6f0c128e-9978-41c2-b982-dcdf3933b0e2: Homepage # Homepage
6f2f6107-ea5d-44cd-9e5d-9372061e7c38: Question # Question
7a4c811e-eb74-4c4b-ae64-134f2a4e2c3e: Datasets # Datasets
7b30c218-6328-41a2-a3e3-2575559f4c9c: Table # Table
7bd60210-4767-46b3-b735-61a1499b90b7: 'Redirect Page' # Redirect Page
Expand Down Expand Up @@ -171,7 +173,6 @@ meta:
210fad18-08a1-4042-821c-bf4a09c06ec6: 'Question Type' # Question Type
222de7cf-741d-4d1f-b274-acc85a3c454c: 'Link To' # Link To
297d2268-f298-40a1-bec3-a1c836a69e38: 'Source Selector' # Source Selector
301c4afd-e88a-4847-a0ce-1b134b5c3741: 'Previous Question' # Previous Question
356c97b0-54e5-44bb-901e-9d92a314134f: FR # FR
367fe8fa-1963-4fe0-9e02-3c0866c0b5bb: 'Color Filter Tool Block' # Color Filter Tool Block
418ea0f0-379d-4ee5-8dab-f82b6a62c191: Header # Header
Expand All @@ -188,6 +189,7 @@ meta:
852df24b-f90e-486b-a371-b47ca241a84e: 'Y-axis Label' # Y-axis Label
919ed98f-d33e-4fae-adc0-2253a155246f: 'Question Text' # Question Text
986be506-1a98-4a56-9a16-1e2270071a95: isActive # isActive
997d2cc5-340b-48d0-9f44-032b2c6ec179: 'Previous Question' # Previous Question
1601c7a8-2437-4b8f-b2f2-116f4c043402: 'Site Information' # Site Information
2599f40c-bfbc-4db6-bf56-cb9f48ad01bf: 'Question Widgets Block' # Question Widgets Block
2922f7b5-8979-4fa5-8221-b442515b48c1: Equation # Equation
Expand Down Expand Up @@ -255,7 +257,6 @@ meta:
c4a0ba18-ffd2-4399-b068-0fac98fee410: 'Number Validator' # Number Validator
c6d1924e-d9ec-4547-bb6d-bddb9b46b774: Description # Description
c22e4947-7fbb-488a-994f-246c31e27b95: Image # Image
c74bb176-8889-459f-a14a-b9d4601786a6: 'Previous Question' # Previous Question
c489f84c-509c-4078-9b71-1e3493e17620: 'Image Album' # Image Album
c2356ed1-1e49-4056-83c7-ed615a2694b1: 'Reference Modals' # Reference Modals
c49579aa-2d5c-4b05-a9f0-153bb0830d8e: 'Object Caption' # Object Caption
Expand All @@ -273,6 +274,7 @@ meta:
d9df041c-3556-450e-94e1-f37369daf5f3: 'X-axis Label' # X-axis Label
d18f36fd-9d74-4ba6-b860-25958b1d9182: 'Alert Sources' # Alert Sources
d5901e55-99c9-441a-937e-05a065d6e60b: Maximum # Maximum
d6180a2a-48c9-42ce-a80f-8721282a126d: 'Previous Question' # Previous Question
dc1c3484-f028-4653-982b-a84e287d4c61: Equation # Equation
dd3a1151-8de9-46f6-995f-c721fa29a07b: Option # Option
dd4f7c39-ff32-47e4-b4eb-129bbf44b4a7: 'RTE Caption' # RTE Caption
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
changedFieldIndicator: 246424054
changedFieldIndicator: 1875156105
field: 56bdf2e8-b9b4-425d-a189-fc7b22f5d169 # Display Table
fieldLayouts:
5286515a-8954-4555-b8a8-da61ee01b204:
Expand All @@ -18,82 +18,10 @@ fieldLayouts:
userCondition: null
warning: null
width: 100
-
elementCondition: null
fieldUid: 301c4afd-e88a-4847-a0ce-1b134b5c3741 # Previous Question
instructions: null
label: null
required: false
tip: null
type: craft\fieldlayoutelements\CustomField
uid: 7139bea6-eea9-432e-a98b-1765cbb9c1fd
userCondition: null
warning: null
width: 100
name: Content
uid: 442d40cd-3fe9-44e3-a862-a0245cd4be94
userCondition: null
fields:
301c4afd-e88a-4847-a0ce-1b134b5c3741: # Previous Question
columnSuffix: null
contentColumnType: string
fieldGroup: null
handle: previousQuestion
instructions: 'Picking a previous question will display it''s table contents as read-only cells, using the table header from the current table.'
name: 'Previous Question'
searchable: false
settings:
allowSelfRelations: false
branchLimit: null
localizeRelations: false
maintainHierarchy: false
maxRelations: null
minRelations: null
selectionCondition:
__assoc__:
-
- elementType
- craft\elements\Entry
-
- fieldContext
- global
-
- class
- craft\elements\conditions\entries\EntryCondition
-
- conditionRules
-
-
__assoc__:
-
- class
- craft\fields\conditions\OptionsFieldConditionRule
-
- uid
- 4f97a8ea-88d5-4a8d-87d4-ecfcf0380ea1
-
- operator
- in
-
- values
-
- text
- textarea
- number
- tabular
-
- fieldUid
- a966d509-84b0-43ab-9a5b-42590a5fb537 # Answer Type
selectionLabel: null
showSiteMenu: false
sources:
- 'section:9068dd8e-ad92-4925-ba1d-1fe180598462' # Questions
targetSiteId: null
validateRelatedElements: false
viewMode: null
translationKeyFormat: null
translationMethod: site
type: craft\fields\Entries
839bfa4f-5a09-4b32-b1eb-e0fef7b7beda: # Table Row
columnSuffix: null
contentColumnType: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
changedFieldIndicator: 50212551
changedFieldIndicator: 89214412
field: a531c6b8-3ef6-480b-8840-babb586617bc # Options
fieldLayouts:
6e5fb2a4-5b61-4705-9ec7-b17cfae7156e:
Expand Down
Loading

0 comments on commit f7353cf

Please sign in to comment.