Skip to content

Commit

Permalink
DRYD-1436: Add related link group (#230)
Browse files Browse the repository at this point in the history
Co-authored-by: Ray Lee <ray.lee@lyrasis.org>
  • Loading branch information
mikejritter and ray-lee authored Aug 13, 2024
1 parent a094f37 commit 5aace31
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
58 changes: 58 additions & 0 deletions src/plugins/recordTypes/collectionobject/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -3879,6 +3879,64 @@ export default (configContext) => {
},
},
},
publishedRelatedLinkGroupList: {
[config]: {
view: {
type: CompoundInput,
},
},
publishedRelatedLinkGroup: {
[config]: {
messages: defineMessages({
name: {
id: 'field.procedure.publishedRelatedLinkGroup.name',
defaultMessage: 'Published related link',
},
}),
repeating: true,
view: {
type: CompoundInput,
props: {
tabular: true,
},
},
},
relatedLink: {
[config]: {
messages: defineMessages({
fullName: {
id: 'field.collectionobjects_common.relatedLink.fullName',
defaultMessage: 'Published related link url',
},
name: {
id: 'field.collectionobjects_common.relatedLink.name',
defaultMessage: 'URL',
},
}),
view: {
type: URLInput,
},
},
},
descriptiveTitle: {
[config]: {
messages: defineMessages({
fullName: {
id: 'field.collectionobjects_common.descriptiveTitle.fullName',
defaultMessage: 'Published related link descriptive title',
},
name: {
id: 'field.collectionobjects_common.descriptiveTitle.name',
defaultMessage: 'Descriptive title',
},
}),
view: {
type: TextInput,
},
},
},
},
},
referenceGroupList: {
[config]: {
view: {
Expand Down
7 changes: 7 additions & 0 deletions src/plugins/recordTypes/collectionobject/forms/default.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,13 @@ const template = (configContext) => {
<Field name="referenceNote" />
</Field>
</Field>

<Field name="publishedRelatedLinkGroupList">
<Field name="publishedRelatedLinkGroup">
<Field name="relatedLink" />
<Field name="descriptiveTitle" />
</Field>
</Field>
</Panel>

<Panel name="collect" collapsible collapsed>
Expand Down
10 changes: 10 additions & 0 deletions src/plugins/recordTypes/collectionobject/forms/public.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,16 @@ const template = (configContext) => {
<Panel name="viewer" collapsible>
<Field name="viewersContributionNote" />
</Panel>

<Panel name="reference" collapsible>
<Field name="publishedRelatedLinkGroupList">
<Field name="publishedRelatedLinkGroup">
<Field name="relatedLink" />
<Field name="descriptiveTitle" />
</Field>
</Field>
</Panel>

</Field>
);
};
Expand Down

0 comments on commit 5aace31

Please sign in to comment.