Skip to content

Commit

Permalink
Merge 0fa51f8 into ee56e7a
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvieed committed Apr 19, 2022
2 parents ee56e7a + 0fa51f8 commit c9b8cf8
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/work_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ def work_params
:ocr_correction,
:transcription_conventions,
:author,
:recipient,
:location_of_composition,
:identifier,
:pages_are_meaningful,
Expand Down
1 change: 1 addition & 0 deletions app/models/work.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class Work < ApplicationRecord
"permission_description",
"location_of_composition",
"author",
"recipient",
"identifier",
"genre",
"source_location",
Expand Down
11 changes: 11 additions & 0 deletions app/views/export/tei.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,17 @@ xml:id="export">
<% end %>
</listChange>
</revisionDesc>

<% unless @work.recipient.blank? %>
<correspDesc>
<correspAction type="sent">
<persName><%= @work.author %></persName>
</correspAction>
<correspAction type="received">
<persName><%= @work.recipient %></persName>
</correspAction>
</correspDesc>
<% end %>
</teiHeader>

<text>
Expand Down
2 changes: 2 additions & 0 deletions app/views/static/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ permission_description: ''
location_of_composition: Renan, Virginia
# author or creator (brief string)
author: Julia Ann Craddock Brumfield (1844-1938)
# Recipient -- the recipient of the document, i.e. for a letter or other targeted document
recipient: ''
# HTML transcription conventions. Only specified to override the transcription conventions for the collection
transcription_conventions: "<p><b>Transcription Conventions for 1918</b>\r\n<ul><li><i>Spelling:</i>Use
original spelling if possible.</li>\r\n<li><i>Capitalization:</i>Modernize for readability</li>\r\n<li><i>Punctuation:</i>Add
Expand Down
3 changes: 3 additions & 0 deletions app/views/work/edit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
tr
th =f.label :author
td =f.text_field :author, value: @work.author
tr
th =f.label :recipient
td =f.text_field :recipient, value: @work.recipient
tr
th =f.label :location_of_composition, 'Place of Creation'
td =f.text_field :location_of_composition, value: @work.location_of_composition
Expand Down
5 changes: 4 additions & 1 deletion app/views/work/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
-if @work.author.present?
h5 =t('.author_name')
.big =@work.author


-if @work.recipient.present?
h5 =t('.recipient_name')
.big =@work.recipient

-if @work.document_date.present?
h5 =t('.document_date')
Expand Down
5 changes: 5 additions & 0 deletions db/migrate/20220318232605_add_recipient_to_works.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddRecipientToWorks < ActiveRecord::Migration[6.0]
def change
add_column :works, :recipient, :string
end
end
1 change: 1 addition & 0 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,7 @@
t.integer "metadata_description_version_id"
t.string "description_status", default: "undescribed"
t.text "searchable_metadata"
t.string "recipient"
t.index ["collection_id"], name: "index_works_on_collection_id"
t.index ["metadata_description_version_id"], name: "index_works_on_metadata_description_version_id"
t.index ["owner_user_id"], name: "index_works_on_owner_user_id"
Expand Down

0 comments on commit c9b8cf8

Please sign in to comment.