Skip to content

Commit

Permalink
Changed inscription, acquisition, objectname to List type
Browse files Browse the repository at this point in the history
  • Loading branch information
cihanandac committed Dec 6, 2023
1 parent ca17c8b commit e4e1a6e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 28 deletions.
9 changes: 6 additions & 3 deletions backend/src/rietveld/src/rietveld/content/artwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ class IArtwork(model.Schema):
required=False,
)

materialTechnique = TextLine(
materialTechnique = List(
title="Material Technique",
value_type=TextLine(),
required=False,
)

Expand All @@ -44,8 +45,9 @@ class IArtwork(model.Schema):
required=False,
)

objectName = TextLine(
objectName = List(
title="Object Name",
value_type=TextLine(),
required=False,
)

Expand All @@ -54,8 +56,9 @@ class IArtwork(model.Schema):
required=False,
)

inscriptions = Text(
inscriptions = List(
title="Inscriptions",
value_type=TextLine(),
required=False,
)

Expand Down
54 changes: 29 additions & 25 deletions frontend/src/components/theme/View/ArtworkView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -445,23 +445,25 @@ export default function ArtworkView(props) {
</td>
<td className="columntwo">
<p>
<a
{/* <a
href={`/search?SearchableText=${content.materialTechnique}`}
>
{content.materialTechnique}
</a>
{/* {content.materialTechnique.map((technique, index) => (
<span>
<a
href={`/search?SearchableText=${content.technique}`}
>
{technique}
</a> */}
{content.materialTechnique.map((technique, index) => (
<>
<span>
<a href={`/search?SearchableText=${technique}`}>
{technique}
</a>
</span>
<span>
{index !== content.materialTechnique.length - 1
? ', '
: ''}
</a>
</span>
))} */}
</span>
</>
))}
</p>
</td>
</tr>
Expand All @@ -483,13 +485,17 @@ export default function ArtworkView(props) {
</td>
<td className="columntwo">
<p>
{/* {content.objectName.map((material, index) => (
{content.objectName.map((material, index) => (
<span>
<a href={`${intl.locale}/`}>{material}</a>
{index !== materials.length - 1 ? ', ' : ''}
<a href={`/search?SearchableText=${material}`}>
{material}
</a>
{index !== content.objectName.length - 1
? ', '
: ''}
</span>
))} */}
{content.objectName}
))}
{/* {content.objectName} */}
</p>
</td>
</tr>
Expand Down Expand Up @@ -523,9 +529,11 @@ export default function ArtworkView(props) {
</td>
<td className="columntwo">
<ul>
<li>
<p>{content.inscriptions}</p>
</li>
{content.inscriptions.map((inscription) => (
<li>
<p>{inscription} </p>
</li>
))}
</ul>
</td>
</tr>
Expand All @@ -539,14 +547,10 @@ export default function ArtworkView(props) {
<p>
{content.category.map((subject, index) => (
<span>
<a
href={`/search?SearchableText=${content.subject}`}
>
<a href={`/search?SearchableText=${subject}`}>
{subject}
{index !== content.subjects.length - 1
? ', '
: ''}
</a>
{index !== content.subjects.length - 1 ? ', ' : ''}
</span>
))}
</p>
Expand Down

0 comments on commit e4e1a6e

Please sign in to comment.