Skip to content

Commit

Permalink
consolidate unit types for tei:biblScope (ticket: combo box content i…
Browse files Browse the repository at this point in the history
…n metadata editor is not alphabetical sosol#309)
  • Loading branch information
Elemmire committed Aug 24, 2017
1 parent 1dd2d7d commit f56cccb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 66 deletions.
17 changes: 4 additions & 13 deletions app/helpers/dclp_meta_identifier_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,30 +74,21 @@ def DclpEdition.extraOptions
[
[I18n.t('edition.extra.book'), :book],
[I18n.t('edition.extra.chapter'), :chapter],
[I18n.t('edition.extra.col'), :col],
[I18n.t('edition.extra.col'), :columns],
[I18n.t('edition.extra.fasc'), :fasc],
[I18n.t('edition.extra.fasc'), :fascicle],
[I18n.t('edition.extra.column'), :column],
[I18n.t('edition.extra.fascicle'), :fascicle],
[I18n.t('edition.extra.folio'), :folio],
[I18n.t('edition.extra.fragment'), :fragment],
[I18n.t('edition.extra.fragment'), :fragments],
[I18n.t('edition.extra.generic'), :generic],
[I18n.t('edition.extra.inventory'), :inventory],
[I18n.t('edition.extra.issue'), :issue],
[I18n.t('edition.extra.line'), :line],
[I18n.t('edition.extra.line'), :lines],
[I18n.t('edition.extra.no'), :no],
[I18n.t('edition.extra.numbers'), :number],
[I18n.t('edition.extra.numbers'), :numbers],
[I18n.t('edition.extra.number'), :number],
[I18n.t('edition.extra.page'), :page],
[I18n.t('edition.extra.pages'), :pages],
[I18n.t('edition.extra.pages'), :pp],
[I18n.t('edition.extra.parts'), :parts],
[I18n.t('edition.extra.part'), :part],
[I18n.t('edition.extra.plate'), :plate],
[I18n.t('edition.extra.poem'), :poem],
[I18n.t('edition.extra.side'), :side],
[I18n.t('edition.extra.tome'), :tome],
[I18n.t('edition.extra.volume'), :vol],
[I18n.t('edition.extra.volume'), :volume]
]
end
Expand Down
4 changes: 2 additions & 2 deletions config/dclp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
:attributes:
:unit:
:name: unit
:pattern: /\Abook|chapter|col|columns|fasc|fascicle|folio|fragment|fragments|generic|inventory|issue|line|lines|no|number|numbers|page|pages|parts|plate|poem|pp|side|tome|vol|volume\Z/
:pattern: /\Abook|chapter|column|fascicle|folio|fragment|generic|inventory|issue|line|number|page|part|plate|poem|side|tome|volume\Z/
:from:
:name: from
:pattern: /\A\d+\Z/
Expand Down Expand Up @@ -240,7 +240,7 @@
:attributes:
:unit:
:name: unit
:pattern: /\Abook|chapter|col|columns|fasc|fascicle|folio|fragment|fragments|generic|inventory|issue|line|lines|no|number|numbers|page|pages|parts|plate|poem|pp|side|tome|vol|volume\Z/
:pattern: /\Abook|chapter|column|fascicle|folio|fragment|generic|inventory|issue|line|number|page|part|plate|poem|side|tome|volume\Z/
:corresp:
:name: corresp
:pattern: '/\A#FR\d+( #FR\d+)*\Z/'
Expand Down
11 changes: 4 additions & 7 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -472,17 +472,14 @@ en:
fragment: Fragment
inventory: Inventory
line: Line
parts: Parts
part: Part
poem: Poem
volume: Volume
page: Page
pages: Pages
pp: Pages
'no': Number
numbers: Numbers
col: Column
number: Number
column: Column
tome: Tome
fasc: Fascicle
fascicle: Fascicle
issue: Issue
plate: Plate
side: Side
Expand Down
52 changes: 8 additions & 44 deletions public/javascripts/dclp.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,30 +146,21 @@ function multiAddEditionRaw(e){
' <select name="hgv_meta_identifier[edition][' + editionIndex + '][children][extra][0][attributes][unit]" id="hgv_meta_identifier_edition_' + editionIndex + '_children_extra_0_attributes_unit" class="observechange editionExtra">' +
' <option value="book">Book</option>' +
' <option value="chapter">Chapter</option>' +
' <option value="col">Column</option>' +
' <option value="columns">Column</option>' +
' <option value="fasc">Fascicle</option>' +
' <option value="column">Column</option>' +
' <option value="fascicle">Fascicle</option>' +
' <option value="folio">Folio</option>' +
' <option value="fragment">Fragment</option>' +
' <option value="fragments">Fragment</option>' +
' <option value="generic">Generic</option>' +
' <option value="inventory">Inventory</option>' +
' <option value="issue">Issue</option>' +
' <option value="line">Line</option>' +
' <option value="lines">Line</option>' +
' <option value="no">Number</option>' +
' <option value="number">Numbers</option>' +
' <option value="numbers">Numbers</option>' +
' <option value="page">Page</option>' +
' <option value="pages">Pages</option>' +
' <option value="pp">Pages</option>' +
' <option value="parts">Parts</option>' +
' <option value="part">Part</option>' +
' <option value="plate">Plate</option>' +
' <option value="poem">Poem</option>' +
' <option value="side">Side</option>' +
' <option value="tome">Tome</option>' +
' <option value="vol">Volume</option>' +
' <option value="volume" selected="selected">Volume</option></select>' +
' <input type="text" onchange="editionExtraChange(this);" name="hgv_meta_identifier[edition][' + editionIndex + '][children][extra][0][value]" id="hgv_meta_identifier_edition_' + editionIndex + '_children_extra_0_value" class="observechange editionExtra">' +
' <input type="text" name="hgv_meta_identifier[edition][' + editionIndex + '][children][extra][0][attributes][corresp]" id="hgv_meta_identifier_edition_' + editionIndex + '_children_extra_0_attributes_corresp" class="observechange editionExtra">' +
Expand All @@ -180,30 +171,21 @@ function multiAddEditionRaw(e){
' <select name="hgv_meta_identifier[edition][' + editionIndex + '][children][extra][1][attributes][unit]" id="hgv_meta_identifier_edition_' + editionIndex + '_children_extra_1_attributes_unit" class="observechange editionExtra">' +
' <option value="book">Book</option>' +
' <option value="chapter" selected="selected">Chapter</option>' +
' <option value="col">Column</option>' +
' <option value="columns">Column</option>' +
' <option value="fasc">Fascicle</option>' +
' <option value="column">Column</option>' +
' <option value="fascicle">Fascicle</option>' +
' <option value="folio">Folio</option>' +
' <option value="fragment">Fragment</option>' +
' <option value="fragments">Fragment</option>' +
' <option value="generic">Generic</option>' +
' <option value="inventory">Inventory</option>' +
' <option value="issue">Issue</option>' +
' <option value="line">Line</option>' +
' <option value="lines">Line</option>' +
' <option value="no">Number</option>' +
' <option value="number">Numbers</option>' +
' <option value="numbers">Numbers</option>' +
' <option value="page">Page</option>' +
' <option value="pages">Pages</option>' +
' <option value="pp">Pages</option>' +
' <option value="parts">Parts</option>' +
' <option value="part">Part</option>' +
' <option value="plate">Plate</option>' +
' <option value="poem">Poem</option>' +
' <option value="side">Side</option>' +
' <option value="tome">Tome</option>' +
' <option value="vol">Volume</option>' +
' <option value="volume">Volume</option></select>' +
' <input type="text" onchange="editionExtraChange(this);" name="hgv_meta_identifier[edition][' + editionIndex + '][children][extra][1][value]" id="hgv_meta_identifier_edition_' + editionIndex + '_children_extra_1_value" class="observechange editionExtra">' +
' <input type="text" name="hgv_meta_identifier[edition][' + editionIndex + '][children][extra][1][attributes][corresp]" id="hgv_meta_identifier_edition_' + editionIndex + '_children_extra_1_attributes_corresp" class="observechange editionExtra">' +
Expand All @@ -214,30 +196,21 @@ function multiAddEditionRaw(e){
' <select name="hgv_meta_identifier[edition][' + editionIndex + '][children][extra][2][attributes][unit]" id="hgv_meta_identifier_edition_' + editionIndex + '_children_extra_2_attributes_unit" class="observechange editionExtra">' +
' <option value="book">Book</option>' +
' <option value="chapter">Chapter</option>' +
' <option value="col">Column</option>' +
' <option value="columns">Column</option>' +
' <option value="fasc">Fascicle</option>' +
' <option value="column">Column</option>' +
' <option value="fascicle">Fascicle</option>' +
' <option value="folio">Folio</option>' +
' <option value="fragment">Fragment</option>' +
' <option value="fragments">Fragment</option>' +
' <option value="generic">Generic</option>' +
' <option value="inventory">Inventory</option>' +
' <option value="issue">Issue</option>' +
' <option value="line">Line</option>' +
' <option value="lines">Line</option>' +
' <option value="no">Number</option>' +
' <option value="number">Numbers</option>' +
' <option value="numbers">Numbers</option>' +
' <option value="page" selected="selected">Page</option>' +
' <option value="pages">Pages</option>' +
' <option value="pp">Pages</option>' +
' <option value="parts">Parts</option>' +
' <option value="part">Part</option>' +
' <option value="plate">Plate</option>' +
' <option value="poem">Poem</option>' +
' <option value="side">Side</option>' +
' <option value="tome">Tome</option>' +
' <option value="vol">Volume</option>' +
' <option value="volume">Volume</option></select>' +
' <input type="text" onchange="editionExtraChange(this);" name="hgv_meta_identifier[edition][' + editionIndex + '][children][extra][2][value]" id="hgv_meta_identifier_edition_' + editionIndex + '_children_extra_2_value" class="observechange editionExtra">' +
' <input type="text" name="hgv_meta_identifier[edition][' + editionIndex + '][children][extra][2][attributes][corresp]" id="hgv_meta_identifier_edition_' + editionIndex + '_children_extra_2_attributes_corresp" class="observechange editionExtra">' +
Expand Down Expand Up @@ -347,30 +320,21 @@ function multiAddWorkExtra(plusButton){
' <select class="observechange editionExtra" id="hgv_meta_identifier_work_' + workIndex + '_children_extra_' + workExtraIndex + '_attributes_unit" name="hgv_meta_identifier[work][' + workIndex + '][children][extra][' + workExtraIndex + '][attributes][unit]">' +
' <option value="book">Book</option>' +
' <option value="chapter">Chapter</option>' +
' <option value="col">Column</option>' +
' <option value="columns">Column</option>' +
' <option value="fasc">Fascicle</option>' +
' <option value="column">Column</option>' +
' <option value="fascicle">Fascicle</option>' +
' <option value="folio">Folio</option>' +
' <option value="fragment">Fragment</option>' +
' <option value="fragments">Fragment</option>' +
' <option value="generic">Generic</option>' +
' <option value="inventory">Inventory</option>' +
' <option value="issue">Issue</option>' +
' <option value="line">Line</option>' +
' <option value="lines">Line</option>' +
' <option value="no">Number</option>' +
' <option value="number">Numbers</option>' +
' <option value="numbers">Numbers</option>' +
' <option value="page">Page</option>' +
' <option value="pages">Pages</option>' +
' <option value="pp">Pages</option>' +
' <option value="parts">Parts</option>' +
' <option value="part">Part</option>' +
' <option value="plate">Plate</option>' +
' <option value="poem">Poem</option>' +
' <option value="side">Side</option>' +
' <option value="tome">Tome</option>' +
' <option value="vol">Volume</option>' +
' <option value="volume" selected="selected">Volume</option></select>' +
' <input class="observechange editionExtra" id="hgv_meta_identifier_work_' + workIndex + '_children_extra_' + workExtraIndex + '_value" name="hgv_meta_identifier[work][' + workIndex + '][children][extra][' + workExtraIndex + '][value]" onchange="editionExtraChange(this);" type="text">' +
' <input class="observechange editionExtra" id="hgv_meta_identifier_work_' + workIndex + '_children_extra_' + workExtraIndex + '_children_certainty_value" name="hgv_meta_identifier[work][' + workIndex + '][children][extra][' + workExtraIndex + '][children][certainty][value]" type="hidden">' +
Expand Down

0 comments on commit f56cccb

Please sign in to comment.