Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRYD-1403: Use 7.2 publicbrowser template #15

Merged
merged 3 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/plugins/recordTypes/collectionobject/forms/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import defaultForm from './default';
import miniForm from './mini';
import publicForm from './public';

export default (configContext) => ({
default: defaultForm(configContext),
mini: miniForm(configContext),
public: publicForm(configContext),
inventory: {
disabled: true,
},
Expand Down
166 changes: 166 additions & 0 deletions src/plugins/recordTypes/collectionobject/forms/public.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
import { defineMessages } from 'react-intl';

const template = (configContext) => {
const {
React,
} = configContext.lib;

const {
Col,
Panel,
Row,
} = configContext.layoutComponents;

const {
Field,
} = configContext.recordComponents;

const {
extensions,
} = configContext.config;

return (
<Field name="document">
<Panel name="id" collapsible>
<Row>
<Col>
<Field name="objectNumber" />

<Field name="responsibleDepartments">
<Field name="responsibleDepartment" />
</Field>
</Col>

<Col>
<Field name="briefDescriptions">
<Field name="briefDescription" />
</Field>
</Col>
</Row>

<Field name="titleGroupList">
<Field name="titleGroup">
<Panel>
<Row>
<Col>
<Field name="title" />
<Field name="titleLanguage" />
</Col>

<Col>
<Field name="titleType" />

<Field name="titleTranslationSubGroupList">
<Field name="titleTranslationSubGroup">
<Field name="titleTranslation" />
<Field name="titleTranslationLanguage" />
</Field>
</Field>
</Col>
</Row>
</Panel>
</Field>
</Field>

<Field name="objectNameList">
<Field name="objectNameGroup">
<Field name="objectName" />
<Field name="objectNameCurrency" />
<Field name="objectNameLevel" />
<Field name="objectNameSystem" />
<Field name="objectNameType" />
<Field name="objectNameLanguage" />
<Field name="objectNameNote" />
</Field>
</Field>
</Panel>

<Panel name="desc" collapsible>
<Field name="colors">
<Field name="color" />
</Field>

<Field name="materialGroupList">
<Field name="materialGroup">
<Field name="material" />
<Field name="materialComponent" />
<Field name="materialComponentNote" />
<Field name="materialName" />
<Field name="materialSource" />
</Field>
</Field>

{extensions.dimension.form}

<Panel name="content" collapsible>
<Field name="contentConcepts">
<Field name="contentConcept" />
</Field>
</Panel>
</Panel>

<Panel name="prod" collapsible>
<Row>
<Col>
<Field name="objectProductionDateGroupList">
<Field name="objectProductionDateGroup" />
</Field>

<Field name="objectProductionPlaceGroupList">
<Field name="objectProductionPlaceGroup">
<Field name="objectProductionPlace" />
<Field name="objectProductionPlaceRole" />
</Field>
</Field>
</Col>

<Col>
<Field name="objectProductionPeopleGroupList">
<Field name="objectProductionPeopleGroup">
<Field name="objectProductionPeople" />
<Field name="objectProductionPeopleRole" />
</Field>
</Field>

<Field name="objectProductionPersonGroupList">
<Field name="objectProductionPersonGroup">
<Field name="objectProductionPerson" />
<Field name="objectProductionPersonRole" />
</Field>
</Field>

<Field name="objectProductionOrganizationGroupList">
<Field name="objectProductionOrganizationGroup">
<Field name="objectProductionOrganization" />
<Field name="objectProductionOrganizationRole" />
</Field>
</Field>
</Col>
</Row>
</Panel>

<Panel name="hist" collapsible>
<Field name="objectHistoryNote" />
</Panel>

<Panel name="owner" collapsible>
<Field name="ownersContributionNote" />
</Panel>

<Panel name="viewer" collapsible>
<Field name="viewersContributionNote" />
</Panel>
</Field>
);
};

export default (configContext) => ({
messages: defineMessages({
name: {
id: 'form.collectionobject.public.name',
defaultMessage: 'Public Browser Template',
},
}),
sortOrder: 3,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

messages and sortOrder can be removed.

template: template(configContext),
});
Loading