Skip to content

Commit

Permalink
Merge pull request #268 from performant-software/feature/basira259_sc…
Browse files Browse the repository at this point in the history
…ript_type

BASIRA #259 - Script Type
  • Loading branch information
dleadbetter authored Dec 9, 2024
2 parents 7dcf816 + 784ae41 commit 01a0219
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 19 deletions.
1 change: 1 addition & 0 deletions app/models/search/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def published
search_attribute :rubrication_color, object: 'Document', group: 'Color', form_field: 'rubrication_color', multiple: true, facet: true
search_attribute :legibility, object: 'Document', group: 'Legibility', multiple: true, facet: true
search_attribute :script, object: 'Document', group: 'Script', multiple: true, facet: true
search_attribute :script_type, object: 'Document', group: 'Script Type', multiple: true, facet: true
search_attribute :language, object: 'Document', group: 'Language', multiple: true, facet: true
search_attribute :identity
search_attribute :transcription
Expand Down
17 changes: 13 additions & 4 deletions client/src/components/SearchFacets.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,12 +536,11 @@ const SearchFacets = (props: any) => {
useRefinementList={useRefinementList}
/>
<FacetList
attribute='language_facet'
attribute='script_type_facet'
defaultActive={false}
limit={MAX_LIMIT}
ref={setRef}
showMore
showMoreLimit={MAX_SHOW_MORE_LIMIT}
title={getLabel('language_facet')}
title={getLabel('script_type_facet')}
toggleable
useRefinementList={useRefinementList}
/>
Expand All @@ -554,6 +553,16 @@ const SearchFacets = (props: any) => {
toggleable
useRefinementList={useRefinementList}
/>
<FacetList
attribute='language_facet'
defaultActive={false}
ref={setRef}
showMore
showMoreLimit={MAX_SHOW_MORE_LIMIT}
title={getLabel('language_facet')}
toggleable
useRefinementList={useRefinementList}
/>
<FacetList
attribute='illumination_type_facet'
defaultActive={false}
Expand Down
2 changes: 2 additions & 0 deletions client/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"ruling": "Ruling",
"rulingColor": "Ruling Color",
"script": "Script",
"scriptType": "Script Type",
"sewingSupportsVisible": "Sewing Supports Visible",
"simulatedScript": "Simulated Script",
"size": "Size",
Expand Down Expand Up @@ -511,6 +512,7 @@
"rulingColor": "Ruling Color",
"sewingSupportsVisible": "Sewing Supports Visible",
"script": "Script",
"scriptType": "Script Type",
"simulatedScript": "Simulated Script",
"size": "Size",
"spineFeatures": "Spine Features",
Expand Down
21 changes: 14 additions & 7 deletions client/src/pages/Document.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,20 @@ const Document = () => {
object: 'Document',
group: 'Script'
}
}, {
name: 'script_type',
label: t('Document.labels.scriptType'),
qualification: {
object: 'Document',
group: 'Script Type'
}
}, {
name: 'simulated_script',
label: t('Document.labels.simulatedScript'),
qualification: {
object: 'Document',
group: 'Simulated Script'
}
}, {
name: 'language',
label: t('Document.labels.language'),
Expand All @@ -357,13 +371,6 @@ const Document = () => {
}, {
name: 'transcription_translation',
label: t('Document.labels.transcriptionTranslation')
}, {
name: 'simulated_script',
label: t('Document.labels.simulatedScript'),
qualification: {
object: 'Document',
group: 'Simulated Script'
}
}, {
name: 'type_of_illumination',
label: t('Document.labels.typeOfIllumination'),
Expand Down
22 changes: 14 additions & 8 deletions client/src/pages/admin/Document.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,20 @@ const Document = (props: Props) => {
multiple
object='Document'
/>

<ValueListDropdown
{...props}
group='Script Type'
label={props.t('Document.labels.scriptType')}
multiple
object='Document'
/>
<ValueListDropdown
{...props}
group='Simulated Script'
label={props.t('Document.labels.simulatedScript')}
multiple
object='Document'
/>
<ValueListDropdown
{...props}
group='Language'
Expand Down Expand Up @@ -512,13 +525,6 @@ const Document = (props: Props) => {
rows={5}
value={props.item.transcription_translation || ''}
/>
<ValueListDropdown
{...props}
group='Simulated Script'
label={props.t('Document.labels.simulatedScript')}
multiple
object='Document'
/>
<ValueListDropdown
{...props}
group='Type of Illumination'
Expand Down

0 comments on commit 01a0219

Please sign in to comment.