Skip to content

Commit fd9a260

Browse files
authored
Merge pull request #6521 from avalonmediasystem/audio_description
Backend and edit form for audio description support
2 parents 31d840d + 19054b0 commit fd9a260

12 files changed

Lines changed: 394 additions & 324 deletions

app/assets/stylesheets/avalon.scss

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -931,13 +931,24 @@ h5.card-title {
931931
.file-remove {
932932
display: none;
933933
}
934-
.mb-3 {
935-
margin-bottom: 0.2rem;
936-
}
937934
.fa-gears {
938935
display: none;
939936
}
940937
display: flex;
938+
939+
.ms-3 {
940+
margin-left: 0 !important;
941+
}
942+
943+
.form-check-inline {
944+
margin-right: 0;
945+
white-space: nowrap;
946+
947+
&:first-of-type {
948+
margin-left: 0.5rem;
949+
margin-right: -0.5rem;
950+
}
951+
}
941952
}
942953
margin-top: 0.75rem;
943954

@@ -956,7 +967,7 @@ h5.card-title {
956967
}
957968

958969
div.supplemental-file-data.is-editing:not(.edit-item)+div.supplemental-file-data {
959-
margin-top: 2.5rem;
970+
margin-top: 2.75rem;
960971
}
961972

962973
.supplemental-file-form {
@@ -981,11 +992,9 @@ h5.card-title {
981992
height: 25px;
982993
}
983994

984-
&.captions,
985-
&.transcripts {
986-
div.supplemental-file-data.is-editing:last-child {
987-
margin-bottom: 1.75rem;
988-
}
995+
996+
div.supplemental-file-data.is-editing:last-child {
997+
margin-bottom: 2rem;
989998
}
990999
}
9911000
}

app/models/concerns/iiif_supplemental_file_behavior.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ module IiifSupplementalFileBehavior
1616
private
1717

1818
def supplemental_files_rendering(object)
19-
tags = ['caption', nil]
19+
tags = ['caption', 'description', nil]
2020
supplemental_files = []
2121
tags.each do |tag|
2222
supplemental_files += object.supplemental_files(tag: tag).collect do |sf|
23-
{
24-
"@id" => object_supplemental_file_url(object, sf),
25-
"type" => determine_rendering_type(sf.file.content_type),
26-
"label" => { "en" => [sf.label] },
27-
"format" => sf.file.content_type
28-
}
23+
{
24+
"@id" => object_supplemental_file_url(object, sf),
25+
"type" => determine_rendering_type(sf.file.content_type),
26+
"label" => { "en" => [sf.label] },
27+
"format" => sf.file.content_type
28+
}
2929
end
3030
end
3131

0 commit comments

Comments
 (0)