diff --git a/Kitodo/src/main/java/org/kitodo/production/forms/CalendarForm.java b/Kitodo/src/main/java/org/kitodo/production/forms/CalendarForm.java index 96679d5fbe8..c1855455af9 100644 --- a/Kitodo/src/main/java/org/kitodo/production/forms/CalendarForm.java +++ b/Kitodo/src/main/java/org/kitodo/production/forms/CalendarForm.java @@ -65,6 +65,7 @@ import org.kitodo.production.process.NewspaperProcessesGenerator; import org.kitodo.production.services.ServiceManager; import org.kitodo.production.services.calendar.CalendarService; +import org.kitodo.production.services.data.ImportService; import org.primefaces.PrimeFaces; import org.primefaces.model.DefaultStreamedContent; import org.primefaces.model.StreamedContent; @@ -883,7 +884,7 @@ public String getTextMetadataValue(CountableMetadata metadata, LocalDate date, I * @param block the block to get the metadata for * @return list of pairs containing the metadata type and the date of its earliest occurrence */ - public List> getMetadataSummary(Block block) { + public List> getMetadataSummary(Block block) { return CalendarService.getMetadataSummary(block); } @@ -902,6 +903,17 @@ public String getMetadataTranslation(String key) { } } + /** + * Get the value of the given processDetail. + * + * @param processDetail + * as ProcessDetail + * @return the value as a java.lang.String + */ + public String getMetadataValue(ProcessDetail processDetail) { + return ImportService.getProcessDetailValue(processDetail); + } + /** * Check if process with the same processtitle already exists. */ diff --git a/Kitodo/src/main/java/org/kitodo/production/model/bibliography/course/Block.java b/Kitodo/src/main/java/org/kitodo/production/model/bibliography/course/Block.java index 31e220aec3f..f462ce3500b 100644 --- a/Kitodo/src/main/java/org/kitodo/production/model/bibliography/course/Block.java +++ b/Kitodo/src/main/java/org/kitodo/production/model/bibliography/course/Block.java @@ -137,7 +137,7 @@ public Issue addIssue() { * metadata to add */ public void addMetadata(CountableMetadata countableMetadata) { - metadata.add(countableMetadata); + metadata.add(0, countableMetadata); } /** diff --git a/Kitodo/src/main/java/org/kitodo/production/services/calendar/CalendarService.java b/Kitodo/src/main/java/org/kitodo/production/services/calendar/CalendarService.java index 089cfc714e7..95e598b91b3 100644 --- a/Kitodo/src/main/java/org/kitodo/production/services/calendar/CalendarService.java +++ b/Kitodo/src/main/java/org/kitodo/production/services/calendar/CalendarService.java @@ -46,6 +46,7 @@ import org.kitodo.production.model.bibliography.course.metadata.MetadataEditMode; import org.kitodo.production.security.SecurityUserDetails; import org.kitodo.production.services.ServiceManager; +import org.kitodo.production.services.data.ImportService; public class CalendarService { @@ -123,7 +124,7 @@ public static List getAddableMetadata(Process completeEdi */ public static String getMetadataTranslation(List metadataList, String metadataKey) { for (ProcessDetail selectItem : metadataList) { - if (selectItem.getLabel().equals(metadataKey)) { + if (selectItem.getMetadataID().equals(metadataKey)) { return selectItem.getLabel(); } } @@ -159,16 +160,16 @@ public static List getMetadata(Block block, LocalDate date, I * @param block the block to get the metadata for * @return list of pairs containing the metadata type and the date of its earliest occurrence */ - public static List> getMetadataSummary(Block block) { - Map metadataMap = new HashMap<>(); + public static List> getMetadataSummary(Block block) { + Map metadataMap = new HashMap<>(); if (Objects.nonNull(block)) { for (CountableMetadata metadata : block.getMetadata()) { if (metadataMap.containsKey(metadata.getMetadataType())) { if (metadata.getCreate().getLeft().isBefore(metadataMap.get(metadata.getMetadataType()))) { - metadataMap.replace(metadata.getMetadataType(), metadata.getCreate().getKey()); + metadataMap.replace(metadata.getMetadataDetail(), metadata.getCreate().getKey()); } } else { - metadataMap.put(metadata.getMetadataType(), metadata.getCreate().getKey()); + metadataMap.put(metadata.getMetadataDetail(), metadata.getCreate().getKey()); } } } diff --git a/Kitodo/src/main/resources/messages/errors_de.properties b/Kitodo/src/main/resources/messages/errors_de.properties index 1f2c1539b49..c0b697192bc 100644 --- a/Kitodo/src/main/resources/messages/errors_de.properties +++ b/Kitodo/src/main/resources/messages/errors_de.properties @@ -39,7 +39,7 @@ docketMissing=Die Konfigurationsdatei zur Laufzettelgenerierung existiert nicht docketNotFound=Die angegebene Datei konnte nicht gefunden werden. docketTitleDuplicated=Der Laufzettel mit den gleichen Titel existiert schon. docTypeNotFound=docType ''{0}'' wurde nicht im selektierten Regelsatz gefunden -duplicatedTitles=Es wurden duplizierte Titel gefunden +duplicatedTitles=Es wurden dublette Ausgabe-Bezeichnungen gefunden. Dies erzeugt gegebenenfalls dublette Vorgangstitel! emptySourceFolder=Der Quellordner zur Bildgenerierung ist leer errorDataIncomplete=Unvollst\u00E4ndige Daten\: errorDatabaseReading=Fehler beim Datenbanklesen von ''{0}'' with ID {1}. diff --git a/Kitodo/src/main/resources/messages/errors_en.properties b/Kitodo/src/main/resources/messages/errors_en.properties index 6af66c9d872..8d8bcbf2bf5 100644 --- a/Kitodo/src/main/resources/messages/errors_en.properties +++ b/Kitodo/src/main/resources/messages/errors_en.properties @@ -40,7 +40,7 @@ docketMissing=the configuration file for docket creation is missing docketNotFound=The specified file could not be found. docketTitleDuplicated=The docket with the same title exists already. docTypeNotFound=docType ''{0}'' could not be found in selected ruleset -duplicatedTitles=Duplicated titles found +duplicatedTitles=Duplicate issue designations were found. This may produce duplicate process titles! emptySourceFolder=The source folder is empty errorDataIncomplete=Incomplete data\: errorDatabaseReading=Error on reading database for ''{0}'' with ID {1}. diff --git a/Kitodo/src/main/resources/messages/messages_de.properties b/Kitodo/src/main/resources/messages/messages_de.properties index 0dae421056e..2e61210ea4e 100644 --- a/Kitodo/src/main/resources/messages/messages_de.properties +++ b/Kitodo/src/main/resources/messages/messages_de.properties @@ -119,9 +119,10 @@ calendar.issue.add=Ausgabe hinzuf\u00FCgen calendar.issue.delete=Ausgabe l\u00F6schen calendar.issue.delete.query=Wollen Sie die Augabe l\u00F6schen? calendar.jumpToDay=Zu Tag springen -calendar.metadata.add=Metadatum hinzuf\u00FCgen -calendar.metadata.global.add=Metadatum zu allen erschienen Ausgaben hinzuf\u00FCgen -calendar.metadata.issue.add=Metadatum zu allen erschienen Ausgaben ab dieser hinzuf\u00FCgen +calendar.metadata.global.add=Metadatum allen Ausgaben hinzuf\u00FCgen +calendar.metadata.issue.add=Metadatum hinzuf\u00FCgen +calendar.metadata.global.add.tooltip=Metadatum zu allen erschienen Ausgaben hinzuf\u00FCgen +calendar.metadata.issue.add.tooltip=Metadatum zu allen erschienen Ausgaben ab dieser hinzuf\u00FCgen calendar.metadata.currentValue=Aktueller Wert calendar.metadata.firstAppearance=von calendar.metadata.lastAppearance=bis diff --git a/Kitodo/src/main/resources/messages/messages_en.properties b/Kitodo/src/main/resources/messages/messages_en.properties index 614aff3999d..0a26429b151 100644 --- a/Kitodo/src/main/resources/messages/messages_en.properties +++ b/Kitodo/src/main/resources/messages/messages_en.properties @@ -123,9 +123,10 @@ calendar.issue.add=Add issue calendar.issue.delete=Delete issue calendar.issue.delete.query=Do you want to delete the issue? calendar.jumpToDay=Jump to day -calendar.metadata.add=Add metadata -calendar.metadata.global.add=Add metadata to all appeared issues -calendar.metadata.issue.add=Add metadata to all appeared issues from this one onwards +calendar.metadata.global.add=Add metadata to all issues +calendar.metadata.issue.add=Add metadata +calendar.metadata.global.add.tooltip=Add metadata to all appeared issues +calendar.metadata.issue.add.tooltip=Add metadata to all appeared issues from this one onwards calendar.metadata.currentValue=Current value calendar.metadata.firstAppearance=from calendar.metadata.lastAppearance=up to diff --git a/Kitodo/src/main/webapp/WEB-INF/resources/css/kitodo.css b/Kitodo/src/main/webapp/WEB-INF/resources/css/kitodo.css index 03c941e6da1..0652f2944ab 100644 --- a/Kitodo/src/main/webapp/WEB-INF/resources/css/kitodo.css +++ b/Kitodo/src/main/webapp/WEB-INF/resources/css/kitodo.css @@ -1458,7 +1458,6 @@ h3#headerText.calendar-heading { #editForm\:calendarTabView .metadata-list .ui-dataview-row { border: solid var(--default-border-width) var(--cloudy-gray); - height: calc(var(--input-height) + 2 * var(--default-border-width)); line-height: calc(var(--input-height) + 2 * var(--default-border-width)); } @@ -1604,6 +1603,17 @@ h3#headerText.calendar-heading { color: var(--carbon-blue); } +#calendarDayDialog { + width: 80% !important; + height: 80% !important; + overflow-y: hidden ; +} + +#calendarDayDialog_content { + height: 100% !important; + overflow-y: hidden ; +} + #calendarDayDialog .ui-dialog-content, #calendarDayDialog form, #calendarDayDialog form > .ui-panelgrid, @@ -1613,20 +1623,30 @@ h3#headerText.calendar-heading { #calendarDayDialog form { height: calc(100% - 100px); - overflow-y: scroll; + overflow-y: auto; } #calendarDayDialog .dialogButtonWrapper { bottom: var(--default-full-size); + display: inline-block; + height: 60px; position: absolute; width: calc(100% - var(--default-double-size)); } #calendarDayDialog .dialogFieldWrapper { + min-height: 100%; margin-bottom: 0; overflow-y: hidden; } +#calendarDayDialogHeader { + width: 100%; + padding-left: var(--default-double-size); + padding-right: var(--default-double-size); + padding-bottom: var(--default-full-size); +} + #calendarDayDialog .issue-wrapper:not(:last-child) { border-bottom: solid var(--default-border-width) var(--cloudy-gray); } diff --git a/Kitodo/src/main/webapp/WEB-INF/templates/includes/calendarEdit/calendarBlocks.xhtml b/Kitodo/src/main/webapp/WEB-INF/templates/includes/calendarEdit/calendarBlocks.xhtml index 367f1716876..cdf3a861581 100644 --- a/Kitodo/src/main/webapp/WEB-INF/templates/includes/calendarEdit/calendarBlocks.xhtml +++ b/Kitodo/src/main/webapp/WEB-INF/templates/includes/calendarEdit/calendarBlocks.xhtml @@ -189,7 +189,9 @@ value="#{CalendarForm.getMetadataSummary(block)}"> - - + +

#{msgs['calendar.day.'.concat(date.dayOfWeek.value)]} #{date.toString()} @@ -39,15 +36,15 @@ - + @@ -65,12 +62,12 @@ icon="#{issue.isMatch(date) ? 'fa fa-trash' : 'fa fa-plus'}" iconPos="right" styleClass="secondary" - update="editForm:calendarTabView:calendarDetailsLayout header calendarDayForm"/> + update="editForm:calendarTabView:calendarDetailsLayout calendarDayDialogHeader calendarDayForm"/> + + - +