From 3c574515591896bd7b3150c84715da0244d3a344 Mon Sep 17 00:00:00 2001 From: Ikram Maalej Date: Thu, 21 Oct 2021 14:08:51 +0200 Subject: [PATCH 1/4] Combine the first two tabs into one tab in 'processFromTemplate.xhtml' --- .../createprocess/CatalogImportDialog.java | 2 +- .../createprocess/CreateProcessForm.java | 17 ++++++------ .../createprocess/MetadataImportDialog.java | 3 +-- .../forms/createprocess/ProcessDataTab.java | 8 +++--- ...sMetadataTab.java => ProcessMetadata.java} | 6 ++--- .../resources/messages/messages_de.properties | 1 + .../resources/messages/messages_en.properties | 1 + .../processFromTemplate/dataEdit.xhtml | 13 +++++++++ .../processFromTemplate/processMetadata.xhtml | 27 ------------------- .../webapp/pages/processFromTemplate.xhtml | 3 --- 10 files changed, 32 insertions(+), 49 deletions(-) rename Kitodo/src/main/java/org/kitodo/production/forms/createprocess/{ProcessMetadataTab.java => ProcessMetadata.java} (95%) delete mode 100644 Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/processMetadata.xhtml diff --git a/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/CatalogImportDialog.java b/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/CatalogImportDialog.java index f50298cf048..0362e4c3578 100644 --- a/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/CatalogImportDialog.java +++ b/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/CatalogImportDialog.java @@ -250,7 +250,7 @@ public LinkedList getExemplarRecords() { public void setSelectedExemplarRecord(ExemplarRecord selectedExemplarRecord) { try { ImportService.setSelectedExemplarRecord(selectedExemplarRecord, this.hitModel.getSelectedCatalog(), - this.createProcessForm.getProcessMetadataTab().getProcessDetailsElements()); + this.createProcessForm.getProcessMetadata().getProcessDetailsElements()); String summary = Helper.getTranslation("newProcess.catalogueSearch.exemplarRecordSelectedSummary"); String detail = Helper.getTranslation("newProcess.catalogueSearch.exemplarRecordSelectedDetail", selectedExemplarRecord.getOwner(), selectedExemplarRecord.getSignature()); diff --git a/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/CreateProcessForm.java b/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/CreateProcessForm.java index ee7b497981d..6308b65ed63 100644 --- a/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/CreateProcessForm.java +++ b/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/CreateProcessForm.java @@ -66,9 +66,9 @@ public class CreateProcessForm extends BaseForm implements RulesetSetupInterface private final CatalogImportDialog catalogImportDialog = new CatalogImportDialog(this); private final FileUploadDialog fileUploadDialog = new FileUploadDialog(this); private final ProcessDataTab processDataTab = new ProcessDataTab(this); - private final ProcessMetadataTab processMetadataTab = new ProcessMetadataTab(this); private final SearchTab searchTab = new SearchTab(this); private final TitleRecordLinkTab titleRecordLinkTab = new TitleRecordLinkTab(this); + private final ProcessMetadata processMetadata = new ProcessMetadata(this); private RulesetManagementInterface rulesetManagement; private final List priorityList = ServiceManager.getUserService() @@ -82,8 +82,7 @@ public class CreateProcessForm extends BaseForm implements RulesetSetupInterface private String referringView = ""; private int progress; - static final int ADDITIONAL_FIELDS_TAB_INDEX = 1; - static final int TITLE_RECORD_LINK_TAB_INDEX = 3; + static final int TITLE_RECORD_LINK_TAB_INDEX = 1; /** * Returns the ruleset management to access the ruleset. @@ -173,8 +172,8 @@ public ProcessDataTab getProcessDataTab() { * * @return value of processMetadataTab */ - public ProcessMetadataTab getProcessMetadataTab() { - return processMetadataTab; + public ProcessMetadata getProcessMetadata() { + return processMetadata; } /** @@ -485,14 +484,14 @@ private void processAncestors() throws ProcessGenerationException { ProcessService.setParentRelations(this.processes.get(index + 1).getProcess(), process); } if (index == 0) { - List processDetails = processMetadataTab.getProcessDetailsElements(); + List processDetails = processMetadata.getProcessDetailsElements(); process.setSortHelperImages(processDataTab.getGuessedImages()); // FIXME: this always triggers 'processTitleAlreadyInUse' now, because the process has already been saved // with this title in ImportService.processProcessChildren (line 884)! if (!ProcessValidator.isContentValid(process.getTitle(), processDetails, true)) { throw new ProcessGenerationException("Error creating process hierarchy: invalid process content!"); } - processMetadataTab.preserve(); + processMetadata.preserve(); ImportService.addProperties(process, template, processDetails, processDataTab.getDocType(), processDataTab.getTiffHeaderImageDescription()); ImportService.updateTasks(process); @@ -516,7 +515,7 @@ private void saveProcessHierarchyMetadata() { // save ancestor processes meta.xml files for (TempProcess tempProcess : this.processes) { if (this.processes.indexOf(tempProcess) == 0) { - processMetadataTab.preserve(); + processMetadata.preserve(); } saveTempProcessMetadata(tempProcess); } @@ -567,7 +566,7 @@ public void initializeProcesses() { processGenerator.generateProcess(template.getId(), project.getId()); this.processes = new LinkedList<>(Collections.singletonList( new TempProcess(processGenerator.getGeneratedProcess(), new Workpiece()))); - this.processMetadataTab.initializeProcessDetails(getProcesses().get(0).getWorkpiece().getLogicalStructure()); + this.processMetadata.initializeProcessDetails(getProcesses().get(0).getWorkpiece().getLogicalStructure()); } catch (ProcessGenerationException e) { logger.error(e.getLocalizedMessage()); } diff --git a/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/MetadataImportDialog.java b/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/MetadataImportDialog.java index c202f122ad7..4778151d729 100644 --- a/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/MetadataImportDialog.java +++ b/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/MetadataImportDialog.java @@ -67,7 +67,6 @@ void showRecord() { if (Objects.nonNull(parentTempProcess)) { this.createProcessForm.getProcesses().add(parentTempProcess); } - this.createProcessForm.setEditActiveTabIndex(CreateProcessForm.ADDITIONAL_FIELDS_TAB_INDEX); } } @@ -117,7 +116,7 @@ void fillCreateProcessForm(LinkedList processes) { && firstProcess.getMetadataNodes().getLength() > 0) { Collection metadata = ImportService.importMetadata(firstProcess.getMetadataNodes(), MdSec.DMD_SEC); - createProcessForm.getProcessMetadataTab().getProcessDetails().setMetadata(metadata); + createProcessForm.getProcessMetadata().getProcessDetails().setMetadata(metadata); } } } diff --git a/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessDataTab.java b/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessDataTab.java index 4f9a05aee34..b5baa3027ff 100644 --- a/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessDataTab.java +++ b/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessDataTab.java @@ -71,11 +71,11 @@ public void setDocType(String docType) { if (!this.createProcessForm.getProcesses().isEmpty()) { this.createProcessForm.getProcesses().get(0).getWorkpiece().getLogicalStructure().setType(this.docType); if (this.docType.isEmpty()) { - this.createProcessForm.getProcessMetadataTab().setProcessDetails(ProcessFieldedMetadata.EMPTY); + this.createProcessForm.getProcessMetadata().setProcessDetails(ProcessFieldedMetadata.EMPTY); } else { - ProcessFieldedMetadata metadata = this.createProcessForm.getProcessMetadataTab() + ProcessFieldedMetadata metadata = this.createProcessForm.getProcessMetadata() .initializeProcessDetails(this.createProcessForm.getProcesses().get(0).getWorkpiece().getLogicalStructure()); - this.createProcessForm.getProcessMetadataTab().setProcessDetails(metadata); + this.createProcessForm.getProcessMetadata().setProcessDetails(metadata); } } } @@ -197,7 +197,7 @@ void setAllDocTypes(List allDocTypes) { * Generate process titles and other details. */ public void generateProcessTitleAndTiffHeader() { - List processDetails = this.createProcessForm.getProcessMetadataTab().getProcessDetailsElements(); + List processDetails = this.createProcessForm.getProcessMetadata().getProcessDetailsElements(); Process process = this.createProcessForm.getMainProcess(); try { StructuralElementViewInterface docTypeView = createProcessForm.getRulesetManagement().getStructuralElementView( diff --git a/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessMetadataTab.java b/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessMetadata.java similarity index 95% rename from Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessMetadataTab.java rename to Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessMetadata.java index 99475bcf6a3..f4c6847fbce 100644 --- a/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessMetadataTab.java +++ b/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessMetadata.java @@ -21,14 +21,14 @@ import org.kitodo.production.services.data.ImportService; import org.primefaces.model.TreeNode; -public class ProcessMetadataTab { - private static final Logger logger = LogManager.getLogger(ProcessMetadataTab.class); +public class ProcessMetadata { + private static final Logger logger = LogManager.getLogger(ProcessMetadata.class); private final CreateProcessForm createProcessForm; private ProcessFieldedMetadata processDetails = ProcessFieldedMetadata.EMPTY; - public ProcessMetadataTab(CreateProcessForm createProcessForm) { + public ProcessMetadata(CreateProcessForm createProcessForm) { this.createProcessForm = createProcessForm; } diff --git a/Kitodo/src/main/resources/messages/messages_de.properties b/Kitodo/src/main/resources/messages/messages_de.properties index a3eb4f20ea3..c99d05e5fed 100644 --- a/Kitodo/src/main/resources/messages/messages_de.properties +++ b/Kitodo/src/main/resources/messages/messages_de.properties @@ -65,6 +65,7 @@ author=Autor available=Verf\u00fcgbar back=Zur\u00FCck backToTask=Zur\u00FCck zu Aufgabe +basicData=Basisdaten batch=Batch batchProperties=Batch Eigenschaften batchStep=Batch Schritt diff --git a/Kitodo/src/main/resources/messages/messages_en.properties b/Kitodo/src/main/resources/messages/messages_en.properties index 871586f0db6..c997a5745cd 100644 --- a/Kitodo/src/main/resources/messages/messages_en.properties +++ b/Kitodo/src/main/resources/messages/messages_en.properties @@ -69,6 +69,7 @@ author=Author available=Available back=Back backToTask=Back to task +basicData=Basic data batch=Batch batchProperties=Batch properties batchStep=Batch task diff --git a/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/dataEdit.xhtml b/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/dataEdit.xhtml index a642fc34213..bda45b06abc 100644 --- a/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/dataEdit.xhtml +++ b/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/dataEdit.xhtml @@ -18,6 +18,9 @@ xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:p="http://primefaces.org/ui"> +
+ +
@@ -103,4 +106,14 @@ +
+ +
+ + + + + + + diff --git a/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/processMetadata.xhtml b/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/processMetadata.xhtml deleted file mode 100644 index af3c3154e69..00000000000 --- a/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/processMetadata.xhtml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Kitodo/src/main/webapp/pages/processFromTemplate.xhtml b/Kitodo/src/main/webapp/pages/processFromTemplate.xhtml index 3b74bfa84d3..e7d2696f8f9 100644 --- a/Kitodo/src/main/webapp/pages/processFromTemplate.xhtml +++ b/Kitodo/src/main/webapp/pages/processFromTemplate.xhtml @@ -84,9 +84,6 @@ - - - From 19513d9d20e690245f115548b81136f01de0d212 Mon Sep 17 00:00:00 2001 From: Ikram Maalej Date: Thu, 28 Oct 2021 14:13:49 +0200 Subject: [PATCH 2/4] Transform 'Process from template' tab to a dialog --- .../createprocess/CreateProcessForm.java | 14 ++-- .../createprocess/ProcessFieldedMetadata.java | 4 +- .../{SearchTab.java => SearchDialog.java} | 11 ++-- .../webapp/WEB-INF/resources/css/kitodo.css | 2 +- .../dialogs/searchEdit.xhtml | 66 +++++++++++++++++++ .../processFromTemplate/searchEdit.xhtml | 45 ------------- .../webapp/pages/processFromTemplate.xhtml | 14 +++- 7 files changed, 91 insertions(+), 65 deletions(-) rename Kitodo/src/main/java/org/kitodo/production/forms/createprocess/{SearchTab.java => SearchDialog.java} (89%) create mode 100644 Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/dialogs/searchEdit.xhtml delete mode 100644 Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/searchEdit.xhtml diff --git a/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/CreateProcessForm.java b/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/CreateProcessForm.java index 6308b65ed63..af1aa37e53e 100644 --- a/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/CreateProcessForm.java +++ b/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/CreateProcessForm.java @@ -65,8 +65,8 @@ public class CreateProcessForm extends BaseForm implements RulesetSetupInterface private final CatalogImportDialog catalogImportDialog = new CatalogImportDialog(this); private final FileUploadDialog fileUploadDialog = new FileUploadDialog(this); + private final SearchDialog searchDialog = new SearchDialog(this); private final ProcessDataTab processDataTab = new ProcessDataTab(this); - private final SearchTab searchTab = new SearchTab(this); private final TitleRecordLinkTab titleRecordLinkTab = new TitleRecordLinkTab(this); private final ProcessMetadata processMetadata = new ProcessMetadata(this); @@ -168,21 +168,21 @@ public ProcessDataTab getProcessDataTab() { } /** - * Get processMetadataTab. + * Get processMetadata. * - * @return value of processMetadataTab + * @return value of processMetadata */ public ProcessMetadata getProcessMetadata() { return processMetadata; } /** - * Get searchTab. + * Get searchDialog. * - * @return value of searchTab + * @return value of searchDialog */ - public SearchTab getSearchTab() { - return searchTab; + public SearchDialog getSearchDialog() { + return searchDialog; } /** diff --git a/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessFieldedMetadata.java b/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessFieldedMetadata.java index 248b154215c..8f5371d6265 100644 --- a/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessFieldedMetadata.java +++ b/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessFieldedMetadata.java @@ -102,7 +102,7 @@ public ProcessFieldedMetadata() { /** * Creates a new root metadata group representing the metadata table - * content in the processMetadataTab. + * content in the processMetadata. * * @param structure * structure selected by the user @@ -502,7 +502,7 @@ public boolean isValid() { } /** - * Reads the contents of the processMetadataTab and stores the values in the + * Reads the contents of the processMetadata and stores the values in the * appropriate place. If the line is used to edit a field of the METS * structure, this field is set, otherwise the metadata will be stored in * the list. The hidden metadata is also written back there again. diff --git a/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/SearchTab.java b/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/SearchDialog.java similarity index 89% rename from Kitodo/src/main/java/org/kitodo/production/forms/createprocess/SearchTab.java rename to Kitodo/src/main/java/org/kitodo/production/forms/createprocess/SearchDialog.java index b03b8b14a52..1b211fcf3b9 100644 --- a/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/SearchTab.java +++ b/Kitodo/src/main/java/org/kitodo/production/forms/createprocess/SearchDialog.java @@ -11,8 +11,6 @@ package org.kitodo.production.forms.createprocess; -import static org.elasticsearch.index.query.QueryBuilders.matchQuery; - import java.io.IOException; import java.net.URI; import java.util.ArrayList; @@ -32,14 +30,14 @@ import org.kitodo.production.helper.Helper; import org.kitodo.production.services.ServiceManager; -public class SearchTab { +public class SearchDialog { - private static final Logger logger = LogManager.getLogger(SearchTab.class); + private static final Logger logger = LogManager.getLogger(SearchDialog.class); private final CreateProcessForm createProcessForm; private Process originalProcess; - SearchTab(CreateProcessForm createProcessForm) { + SearchDialog(CreateProcessForm createProcessForm) { this.createProcessForm = createProcessForm; } @@ -96,8 +94,7 @@ public void copyMetadata() { if (Objects.nonNull(originalProcess.getParent())) { this.createProcessForm.getTitleRecordLinkTab().setParentAsTitleRecord(originalProcess.getParent()); } - this.createProcessForm.getProcessMetadataTab().getProcessDetails().setMetadata(root.getMetadata()); - this.createProcessForm.setEditActiveTabIndex(CreateProcessForm.ADDITIONAL_FIELDS_TAB_INDEX); + this.createProcessForm.getProcessMetadata().getProcessDetails().setMetadata(root.getMetadata()); } catch (IOException e) { Helper.setErrorMessage(CreateProcessForm.ERROR_READING, new Object[] {"template-metadata" }, logger, e); } 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 c7ee6a4cff4..8f18da077a6 100644 --- a/Kitodo/src/main/webapp/WEB-INF/resources/css/kitodo.css +++ b/Kitodo/src/main/webapp/WEB-INF/resources/css/kitodo.css @@ -1312,7 +1312,7 @@ Import form padding-right: var(--default-half-size); } -#fileUploadForm { +#fileUploadForm, #searchEditForm { padding: 0 var(--default-double-size); } diff --git a/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/dialogs/searchEdit.xhtml b/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/dialogs/searchEdit.xhtml new file mode 100644 index 00000000000..0e90d736055 --- /dev/null +++ b/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/dialogs/searchEdit.xhtml @@ -0,0 +1,66 @@ + + + + + +

#{msgs.processTemplate}

+ + + + + + +
+ + + + + + +
+
+
+ + + + +
+
+
diff --git a/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/searchEdit.xhtml b/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/searchEdit.xhtml deleted file mode 100644 index 8d1596df815..00000000000 --- a/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/searchEdit.xhtml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - -
- - - - -
-
- -
-
-
-
diff --git a/Kitodo/src/main/webapp/pages/processFromTemplate.xhtml b/Kitodo/src/main/webapp/pages/processFromTemplate.xhtml index e7d2696f8f9..da2a7639280 100644 --- a/Kitodo/src/main/webapp/pages/processFromTemplate.xhtml +++ b/Kitodo/src/main/webapp/pages/processFromTemplate.xhtml @@ -70,6 +70,16 @@ styleClass="secondary"> + + + - - - @@ -101,6 +108,7 @@ + From 3828b3bd137e03dad8ef6fa4a41c5df20e6cb6fa Mon Sep 17 00:00:00 2001 From: Ikram Maalej Date: Thu, 25 Nov 2021 13:11:43 +0100 Subject: [PATCH 3/4] Group buttons --- .../resources/messages/messages_de.properties | 1 + .../resources/messages/messages_en.properties | 1 + .../webapp/WEB-INF/resources/css/kitodo.css | 6 ++ .../WEB-INF/resources/css/pattern-library.css | 3 + .../processFromTemplate/dataEdit.xhtml | 2 +- .../dialogs/searchEdit.xhtml | 2 +- .../webapp/pages/processFromTemplate.xhtml | 63 ++++++++++--------- 7 files changed, 46 insertions(+), 32 deletions(-) diff --git a/Kitodo/src/main/resources/messages/messages_de.properties b/Kitodo/src/main/resources/messages/messages_de.properties index c99d05e5fed..35f451cc5ec 100644 --- a/Kitodo/src/main/resources/messages/messages_de.properties +++ b/Kitodo/src/main/resources/messages/messages_de.properties @@ -259,6 +259,7 @@ currentFolder=Aktueller Ordner currentPageReportTemplate={currentPage} von {totalPages} currentRepresentative=Aktueller Repr\u00E4sentant\: currentTask=Aktuelle Aufgabe +dataTransfer=Daten\u00FCbernahme dataCopier.runtimeException=Fehler beim Kopieren der Daten\: dataEditor.addElement.assignPagesToSingleDocStruc=Seiten k\u00F6nnen nur zu einem einzelnen Strukturelement hinzugef\u00FCgt werden! dataEditor.addElement.createMultipleDocStrucWithoutPages=Mehrere Strukturelemente k\u00F6nnen nur erzeugt werden, wenn keine Seiten f\u00FCr eine automatische Zuweisung ausgew\u00E4hlt sind! diff --git a/Kitodo/src/main/resources/messages/messages_en.properties b/Kitodo/src/main/resources/messages/messages_en.properties index c997a5745cd..781dc4514d5 100644 --- a/Kitodo/src/main/resources/messages/messages_en.properties +++ b/Kitodo/src/main/resources/messages/messages_en.properties @@ -263,6 +263,7 @@ currentFolder=Current folder currentPageReportTemplate={currentPage} of {totalPages} currentRepresentative=Current representative\: currentTask=Current task +dataTransfer=Data transfer dataCopier.runtimeException=Copying the data failed\: dataEditor.addElement.assignPagesToSingleDocStruc=Pages can only be assigned to a single element! dataEditor.addElement.createMultipleDocStrucWithoutPages=Multiple elements can only be created at once when no pages are selected for assignment! 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 8f18da077a6..f681646ccab 100644 --- a/Kitodo/src/main/webapp/WEB-INF/resources/css/kitodo.css +++ b/Kitodo/src/main/webapp/WEB-INF/resources/css/kitodo.css @@ -669,6 +669,7 @@ section#content-section { .content-header .ui-panel-content > form, .content-header .ui-panel-content > button, +.ui-menubutton, .ui-selectbooleanbutton { float: right; margin-left: var(--default-full-size); @@ -3134,6 +3135,11 @@ footer { width: calc(100% - 64px); } +.basicDataTitle { + font-weight: bold; + padding: var(--default-half-size) var(--default-full-size); +} + #tasksTabView\:actionForm { padding: 0 var(--default-full-size); } diff --git a/Kitodo/src/main/webapp/WEB-INF/resources/css/pattern-library.css b/Kitodo/src/main/webapp/WEB-INF/resources/css/pattern-library.css index 864496f2624..1baa208dc9b 100644 --- a/Kitodo/src/main/webapp/WEB-INF/resources/css/pattern-library.css +++ b/Kitodo/src/main/webapp/WEB-INF/resources/css/pattern-library.css @@ -192,6 +192,7 @@ input.ui-state-error { .ui-button.secondary, .ui-widget-content .ui-button.secondary, +.ui-menubutton.secondary > button, .ui-selectcheckboxmenu.secondary .ui-selectcheckboxmenu-label { background: var(--pure-white); border: solid var(--default-border-width) var(--light-blue); @@ -199,11 +200,13 @@ input.ui-state-error { } .ui-button.secondary .ui-icon, +ui-menubutton.secondary .ui-icon, .ui-widget-content .ui-button.secondary .ui-icon { color: var(--light-blue); } .ui-button.secondary.ui-state-hover, +.ui-menubutton.secondary > button.ui-state-hover, .ui-widget-content .ui-button.secondary.ui-state-hover { background: var(--pure-white); border: solid var(--default-border-width) var(--focused-blue); diff --git a/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/dataEdit.xhtml b/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/dataEdit.xhtml index bda45b06abc..198d80f1912 100644 --- a/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/dataEdit.xhtml +++ b/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/dataEdit.xhtml @@ -18,7 +18,7 @@ xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:p="http://primefaces.org/ui"> -
+
diff --git a/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/dialogs/searchEdit.xhtml b/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/dialogs/searchEdit.xhtml index 0e90d736055..551557b11d7 100644 --- a/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/dialogs/searchEdit.xhtml +++ b/Kitodo/src/main/webapp/WEB-INF/templates/includes/processFromTemplate/dialogs/searchEdit.xhtml @@ -27,7 +27,7 @@ - +
diff --git a/Kitodo/src/main/webapp/pages/processFromTemplate.xhtml b/Kitodo/src/main/webapp/pages/processFromTemplate.xhtml index da2a7639280..4df53b005fe 100644 --- a/Kitodo/src/main/webapp/pages/processFromTemplate.xhtml +++ b/Kitodo/src/main/webapp/pages/processFromTemplate.xhtml @@ -50,36 +50,39 @@ onclick="setConfirmUnload(false);PF('notifications').renderMessage({'summary':'#{msgs.validatingData}','detail':'','severity':'info'});" update="notifications, sticky-notifications" styleClass="secondary"/> - - - - - - - - - + + + + + + + + + + + Date: Thu, 25 Nov 2021 13:41:15 +0100 Subject: [PATCH 4/4] Fix tests --- .../testframework/pages/ProcessFromTemplatePage.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Kitodo/src/test/java/org/kitodo/selenium/testframework/pages/ProcessFromTemplatePage.java b/Kitodo/src/test/java/org/kitodo/selenium/testframework/pages/ProcessFromTemplatePage.java index f1d8c64782a..a0d9d376e36 100644 --- a/Kitodo/src/test/java/org/kitodo/selenium/testframework/pages/ProcessFromTemplatePage.java +++ b/Kitodo/src/test/java/org/kitodo/selenium/testframework/pages/ProcessFromTemplatePage.java @@ -140,13 +140,11 @@ public String createProcess() throws Exception { await("Page ready").pollDelay(150, TimeUnit.MILLISECONDS).atMost(10, TimeUnit.SECONDS).ignoreExceptions() .until(() -> isDisplayed.test(processFromTemplateTabView)); - switchToTabByIndex(1); titleInput.sendKeys("TestProcess"); titleSortInput.sendKeys("TestProcess"); ppnAnalogInput.sendKeys("12345"); ppnDigitalInput.sendKeys("12345"); - switchToTabByIndex(0); guessImagesInput.sendKeys("299"); generateTitleButton.click(); await("Wait for title generation").pollDelay(3, TimeUnit.SECONDS).atMost(10, TimeUnit.SECONDS) @@ -173,19 +171,17 @@ public String createProcessAsChild(String parentProcessTitle) throws Exception { await("Page ready").pollDelay(150, TimeUnit.MILLISECONDS).atMost(10, TimeUnit.SECONDS).ignoreExceptions() .until(() -> isDisplayed.test(processFromTemplateTabView)); - switchToTabByIndex(1); titleInput.sendKeys("TestProcessChild"); titleSortInput.sendKeys("TestProcessChild"); ppnAnalogInput.sendKeys("123456"); ppnDigitalInput.sendKeys("123456"); - switchToTabByIndex(0); generateTitleButton.click(); await("Wait for title generation").pollDelay(3, TimeUnit.SECONDS).atMost(10, TimeUnit.SECONDS) .ignoreExceptions().until(() -> isInputValueNotEmpty.test(processTitleInput)); final String generatedTitle = processTitleInput.getAttribute("value"); - switchToTabByIndex(3); + switchToTabByIndex(1); searchForParentInput.sendKeys(parentProcessTitle); searchParentButton.click(); await("Wait for search").pollDelay(500, TimeUnit.MILLISECONDS).atMost(10, TimeUnit.SECONDS).ignoreExceptions() @@ -213,18 +209,16 @@ public boolean createProcessAsChildNotPossible() throws Exception { await("Page ready").pollDelay(150, TimeUnit.MILLISECONDS).atMost(10, TimeUnit.SECONDS).ignoreExceptions() .until(() -> isDisplayed.test(processFromTemplateTabView)); - switchToTabByIndex(1); titleInput.sendKeys("TestProcessChildNotPossible"); titleSortInput.sendKeys("TestProcessChildNotPossible"); ppnAnalogInput.sendKeys("1234567"); ppnDigitalInput.sendKeys("1234567"); - switchToTabByIndex(0); generateTitleButton.click(); await("Wait for title generation").pollDelay(3, TimeUnit.SECONDS).atMost(10, TimeUnit.SECONDS) .ignoreExceptions().until(() -> isInputValueNotEmpty.test(processTitleInput)); - switchToTabByIndex(3); + switchToTabByIndex(1); searchForParentInput.sendKeys("Second"); searchParentButton.click(); await("Wait for search").pollDelay(500, TimeUnit.MILLISECONDS).atMost(10, TimeUnit.SECONDS).ignoreExceptions() @@ -255,7 +249,6 @@ public String createProcessFromCatalog() throws Exception { titleSortInput.sendKeys("Test"); ppnAnalogInput.sendKeys("12345"); - switchToTabByIndex(1); guessImagesInput.sendKeys("299"); generateTitleButton.click(); await("Wait for title generation").pollDelay(3, TimeUnit.SECONDS).atMost(10, TimeUnit.SECONDS)