From 3f473cc92ffc8983f36dd9472cc30877e99d4121 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Fernadez Date: Tue, 14 Sep 2021 16:00:49 -0600 Subject: [PATCH 1/2] Fix add/remove button styles --- .../work-modal/work-modal.component.html | 51 ++++++++++--------- .../work-modal/work-modal.component.scss | 10 ++++ .../work-modal/work-modal.component.ts | 14 ++++- .../properties/works/works.ca.properties | 2 +- .../properties/works/works.en.properties | 2 +- 5 files changed, 52 insertions(+), 27 deletions(-) diff --git a/src/app/record/components/work-modal/work-modal.component.html b/src/app/record/components/work-modal/work-modal.component.html index 750d05d9cb..8dcc819641 100644 --- a/src/app/record/components/work-modal/work-modal.component.html +++ b/src/app/record/components/work-modal/work-modal.component.html @@ -177,28 +177,31 @@ -
- - -
add_circle_outline + + + Add translated title + + + + - - hide translation title -
+ remove_circle_outline + + + Hide translation title + + +
@@ -759,13 +762,15 @@ -
- - Add other identifier +
diff --git a/src/app/record/components/work-modal/work-modal.component.scss b/src/app/record/components/work-modal/work-modal.component.scss index 6810ae3395..ba8c362198 100644 --- a/src/app/record/components/work-modal/work-modal.component.scss +++ b/src/app/record/components/work-modal/work-modal.component.scss @@ -76,3 +76,13 @@ mat-radio-group { padding-bottom: 1.475em; padding-left: 0; } + +.add-more { + margin-top: 16px; + margin-bottom: 16px; + mat-icon { + padding-inline-end: 8px; + } + display: flex; + align-items: center; +} diff --git a/src/app/record/components/work-modal/work-modal.component.ts b/src/app/record/components/work-modal/work-modal.component.ts index 0d2fd6f5cd..e052bd8e50 100644 --- a/src/app/record/components/work-modal/work-modal.component.ts +++ b/src/app/record/components/work-modal/work-modal.component.ts @@ -194,6 +194,12 @@ export class WorkModalComponent implements OnInit { [], ], }) + if ( + currentWork?.translatedTitle?.content || + currentWork?.translatedTitle?.languageCode + ) { + this.showTranslationTitle = true + } this.workIdentifiersFormArray = this.workForm.controls .workIdentifiers as FormArray @@ -365,8 +371,12 @@ export class WorkModalComponent implements OnInit { value: this.workForm.value.subtitle, }, translatedTitle: { - content: this.workForm.value.translatedTitleContent, - languageCode: this.workForm.value.translatedTitleLanguage, + content: this.showTranslationTitle + ? this.workForm.value.translatedTitleContent + : '', + languageCode: this.showTranslationTitle + ? this.workForm.value.translatedTitleLanguage + : '', }, workCategory: { value: this.workForm.value.workCategory, diff --git a/src/locale/properties/works/works.ca.properties b/src/locale/properties/works/works.ca.properties index e4019f5d82..e2b23c30e2 100644 --- a/src/locale/properties/works/works.ca.properties +++ b/src/locale/properties/works/works.ca.properties @@ -1,7 +1,7 @@ work.works=Works works.citation=Citation works.workType=Work type -works.addTranslatedTitle=add translated title +works.addTranslatedTitle=Add translated title works.citationType=Citation type works.description=Description works.type=Identifier type diff --git a/src/locale/properties/works/works.en.properties b/src/locale/properties/works/works.en.properties index 5df107f911..3ede19c988 100644 --- a/src/locale/properties/works/works.en.properties +++ b/src/locale/properties/works/works.en.properties @@ -9,7 +9,7 @@ works.workType=Work type works.selectWorkType=Select a work type works.setAWorkTitle=Set a work title works.addTranslatedTitle=add translated title -works.hideTranslatedTitle=hide translation title +works.hideTranslatedTitle=Hide translation title works.translatedTitle=Work translated title works.subtitle=Work Subtitle works.invalidUrl=Invalid url From 01a35ddf79c69d00ce43e2652a7b81aedcbd2e39 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Fernadez Date: Tue, 14 Sep 2021 16:19:17 -0600 Subject: [PATCH 2/2] Fix translations for CI --- src/locale/properties/works/works.ca.properties | 2 +- src/locale/properties/works/works.en.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/locale/properties/works/works.ca.properties b/src/locale/properties/works/works.ca.properties index e2b23c30e2..e4019f5d82 100644 --- a/src/locale/properties/works/works.ca.properties +++ b/src/locale/properties/works/works.ca.properties @@ -1,7 +1,7 @@ work.works=Works works.citation=Citation works.workType=Work type -works.addTranslatedTitle=Add translated title +works.addTranslatedTitle=add translated title works.citationType=Citation type works.description=Description works.type=Identifier type diff --git a/src/locale/properties/works/works.en.properties b/src/locale/properties/works/works.en.properties index 3ede19c988..f209eeec54 100644 --- a/src/locale/properties/works/works.en.properties +++ b/src/locale/properties/works/works.en.properties @@ -8,7 +8,7 @@ works.selectACategory=Select a work category works.workType=Work type works.selectWorkType=Select a work type works.setAWorkTitle=Set a work title -works.addTranslatedTitle=add translated title +works.addTranslatedTitle=Add translated title works.hideTranslatedTitle=Hide translation title works.translatedTitle=Work translated title works.subtitle=Work Subtitle