From 6375f9e2fcd690e2468f22d13146e3b29277236b Mon Sep 17 00:00:00 2001 From: Philip Durbin Date: Fri, 2 Jun 2017 13:44:18 -0400 Subject: [PATCH 01/17] remove " Dataverse", suggest in watermark on create #3611 Places changed: - header - breadcrumbs - search cards - in-app notifications - widgets footer - MyData cards Note that reindexing is required because the citation is in Solr. --- src/main/java/Bundle.properties | 3 ++- .../edu/harvard/iq/dataverse/DatasetVersion.java | 2 +- .../java/edu/harvard/iq/dataverse/Dataverse.java | 2 +- .../edu/harvard/iq/dataverse/DataversePage.java | 4 ++++ .../iq/dataverse/dataverse/DataverseUtil.java | 16 ++++++++++++++++ src/main/webapp/dataverse.xhtml | 11 ++++------- src/main/webapp/dataverse_header.xhtml | 2 +- .../webapp/mydata_templates/cards_minimum.html | 6 +++--- src/main/webapp/search-include-fragment.xhtml | 6 +++--- .../dataverse/dataverse/DataverseUtilTest.java | 16 ++++++++++++++++ .../iq/dataverse/util/BundleUtilTest.java | 2 +- 11 files changed, 52 insertions(+), 18 deletions(-) create mode 100644 src/main/java/edu/harvard/iq/dataverse/dataverse/DataverseUtil.java create mode 100644 src/test/java/edu/harvard/iq/dataverse/dataverse/DataverseUtilTest.java diff --git a/src/main/java/Bundle.properties b/src/main/java/Bundle.properties index 5c3fd33a754..d890926324d 100755 --- a/src/main/java/Bundle.properties +++ b/src/main/java/Bundle.properties @@ -1,4 +1,5 @@ dataverse=Dataverse +suggestedDataverseNameEnding=Dataverse newDataverse=New Dataverse hostDataverse=Host Dataverse dataverses=Dataverses @@ -154,7 +155,7 @@ wasReturnedByReviewer=, was returned by the curator of toReview=Don't forget to publish it or send it back to the contributor! worldMap.added=dataset had a WorldMap layer data added to it. # Bundle file editors, please note that "notification.welcome" is used in a unit test. -notification.welcome=Welcome to {0} Dataverse! Get started by adding or finding data. Have questions? Check out the {1}. Want to test out Dataverse features? Use our {2}. Also, check for your welcome email to verify your address. +notification.welcome=Welcome to {0}! Get started by adding or finding data. Have questions? Check out the {1}. Want to test out Dataverse features? Use our {2}. Also, check for your welcome email to verify your address. notification.demoSite=Demo Site notification.requestFileAccess=File access requested for dataset: {0}. notification.grantFileAccess=Access granted for files in dataset: {0}. diff --git a/src/main/java/edu/harvard/iq/dataverse/DatasetVersion.java b/src/main/java/edu/harvard/iq/dataverse/DatasetVersion.java index c30b2db0f28..90c827b6104 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DatasetVersion.java +++ b/src/main/java/edu/harvard/iq/dataverse/DatasetVersion.java @@ -809,7 +809,7 @@ public String getRootDataverseNameforCitation(){ } String rootDataverseName = root.getName(); if (!StringUtil.isEmpty(rootDataverseName)) { - return rootDataverseName + " Dataverse"; + return rootDataverseName; } else { return ""; } diff --git a/src/main/java/edu/harvard/iq/dataverse/Dataverse.java b/src/main/java/edu/harvard/iq/dataverse/Dataverse.java index c1c1d26cc13..d8dc09f2154 100644 --- a/src/main/java/edu/harvard/iq/dataverse/Dataverse.java +++ b/src/main/java/edu/harvard/iq/dataverse/Dataverse.java @@ -721,7 +721,7 @@ public String getDepositTermsOfUse() { @Override public String getDisplayName() { - return getName() + " Dataverse"; + return getName(); } @Override diff --git a/src/main/java/edu/harvard/iq/dataverse/DataversePage.java b/src/main/java/edu/harvard/iq/dataverse/DataversePage.java index 9cf07d2080b..bb7a1e50497 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DataversePage.java +++ b/src/main/java/edu/harvard/iq/dataverse/DataversePage.java @@ -4,6 +4,7 @@ import edu.harvard.iq.dataverse.authorization.Permission; import edu.harvard.iq.dataverse.authorization.users.AuthenticatedUser; import edu.harvard.iq.dataverse.authorization.users.User; +import edu.harvard.iq.dataverse.dataverse.DataverseUtil; import edu.harvard.iq.dataverse.engine.command.Command; import edu.harvard.iq.dataverse.engine.command.DataverseRequest; import edu.harvard.iq.dataverse.engine.command.exception.CommandException; @@ -1013,4 +1014,7 @@ public void validateAlias(FacesContext context, UIComponent toValidate, Object v } } + public String getSuggestedDataverseNameOnCreate() { + return DataverseUtil.getSuggestedDataverseNameOnCreate(session.getUser()); + } } diff --git a/src/main/java/edu/harvard/iq/dataverse/dataverse/DataverseUtil.java b/src/main/java/edu/harvard/iq/dataverse/dataverse/DataverseUtil.java new file mode 100644 index 00000000000..56605f8adaa --- /dev/null +++ b/src/main/java/edu/harvard/iq/dataverse/dataverse/DataverseUtil.java @@ -0,0 +1,16 @@ +package edu.harvard.iq.dataverse.dataverse; + +import edu.harvard.iq.dataverse.authorization.users.User; +import edu.harvard.iq.dataverse.util.BundleUtil; + +public class DataverseUtil { + + public static String getSuggestedDataverseNameOnCreate(User user) { + if (user == null) { + return null; + } + // getDisplayInfo() is never null. + return user.getDisplayInfo().getTitle() + " " + BundleUtil.getStringFromBundle("suggestedDataverseNameEnding"); + } + +} diff --git a/src/main/webapp/dataverse.xhtml b/src/main/webapp/dataverse.xhtml index 82f7f4c8de2..339240c82b5 100644 --- a/src/main/webapp/dataverse.xhtml +++ b/src/main/webapp/dataverse.xhtml @@ -12,7 +12,7 @@ - + @@ -57,11 +57,8 @@
-
- -
#{bundle.dataverse}
-
- + +
@@ -399,7 +396,7 @@
-
+
#{DataversePage.dataverse.alias}
diff --git a/src/main/webapp/dataverse_header.xhtml b/src/main/webapp/dataverse_header.xhtml index 94b9d5df2f3..2b634ae7680 100644 --- a/src/main/webapp/dataverse_header.xhtml +++ b/src/main/webapp/dataverse_header.xhtml @@ -186,7 +186,7 @@ #{dataverse.name} #{bundle.dataverse} diff --git a/src/main/webapp/mydata_templates/cards_minimum.html b/src/main/webapp/mydata_templates/cards_minimum.html index c0dd50db7f1..601186e35b8 100644 --- a/src/main/webapp/mydata_templates/cards_minimum.html +++ b/src/main/webapp/mydata_templates/cards_minimum.html @@ -16,7 +16,7 @@
{% if card_info.type == "dataverse" %} - {{ card_info.name }} Dataverse + {{ card_info.name }} {# (Affiliation)#} {% elif card_info.type == "dataset" %} @@ -46,7 +46,7 @@ {{ card_info.date_to_display_on_card }} {% if card_info.parentId %} {% if card_info.parentId != card_info.identifier %} - - {{ card_info.parentName }} Dataverse + - {{ card_info.parentName }} {% endif %} {% endif %} @@ -60,7 +60,7 @@
{{ card_info.date_to_display_on_card }} - - {{ card_info.parentName }} Dataverse + - {{ card_info.parentName }} {%if card_info.citationHtml %}{{ card_info.citationHtml|safe }}{% else %}{{ card_info.citation|safe }}{% endif %} diff --git a/src/main/webapp/search-include-fragment.xhtml b/src/main/webapp/search-include-fragment.xhtml index 792383d2a45..2a29187e2a2 100644 --- a/src/main/webapp/search-include-fragment.xhtml +++ b/src/main/webapp/search-include-fragment.xhtml @@ -445,8 +445,8 @@ - - + + @@ -526,7 +526,7 @@ - +
diff --git a/src/test/java/edu/harvard/iq/dataverse/dataverse/DataverseUtilTest.java b/src/test/java/edu/harvard/iq/dataverse/dataverse/DataverseUtilTest.java new file mode 100644 index 00000000000..3a0e14f607a --- /dev/null +++ b/src/test/java/edu/harvard/iq/dataverse/dataverse/DataverseUtilTest.java @@ -0,0 +1,16 @@ +package edu.harvard.iq.dataverse.dataverse; + +import edu.harvard.iq.dataverse.mocks.MocksFactory; +import static org.junit.Assert.assertEquals; +import org.junit.Test; + +public class DataverseUtilTest { + + @Test + public void testGetSuggestedDataverseNameOnCreate() { + System.out.println("getSuggestedDataverseNameOnCreate"); + assertEquals(null, DataverseUtil.getSuggestedDataverseNameOnCreate(null)); + assertEquals("Homer Simpson Dataverse", DataverseUtil.getSuggestedDataverseNameOnCreate(MocksFactory.makeAuthenticatedUser("Homer", "Simpson"))); + } + +} diff --git a/src/test/java/edu/harvard/iq/dataverse/util/BundleUtilTest.java b/src/test/java/edu/harvard/iq/dataverse/util/BundleUtilTest.java index b5682e82b06..5790f47b8ea 100644 --- a/src/test/java/edu/harvard/iq/dataverse/util/BundleUtilTest.java +++ b/src/test/java/edu/harvard/iq/dataverse/util/BundleUtilTest.java @@ -63,7 +63,7 @@ public void testGetStringFromBundleWithArguments() { + "converted to use your institutional log in. After converting, you will only need to use your institutional log in.", BundleUtil.getStringFromBundle("shib.welcomeExistingUserMessage", Arrays.asList(BundleUtil.getStringFromBundle("shib.welcomeExistingUserMessageDefaultInstitution")))); - assertEquals("Welcome to Root Dataverse! Get started by adding or finding data. " + assertEquals("Welcome to Root! Get started by adding or finding data. " + "Have questions? Check out the User Guide." + " Want to test out Dataverse features? Use our Demo Site." + " Also, check for your welcome email to verify your address.", From e855b8a5491950fb5026195d14260d8ac997de44 Mon Sep 17 00:00:00 2001 From: Philip Durbin Date: Fri, 2 Jun 2017 14:04:45 -0400 Subject: [PATCH 02/17] optionally, append " Dataverse" to name in dataverse table #3611 --- scripts/database/upgrades/upgrade_v4.6.2_to_v4.7.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 scripts/database/upgrades/upgrade_v4.6.2_to_v4.7.sql diff --git a/scripts/database/upgrades/upgrade_v4.6.2_to_v4.7.sql b/scripts/database/upgrades/upgrade_v4.6.2_to_v4.7.sql new file mode 100644 index 00000000000..901b013a104 --- /dev/null +++ b/scripts/database/upgrades/upgrade_v4.6.2_to_v4.7.sql @@ -0,0 +1,2 @@ +--Uncomment to preserve "Dataverse" at end of each dataverse name. +--UPDATE dataverse SET name = name || ' Dataverse'; From d3b53c995c2c540904ebca7d6cdb34378f7c6ba2 Mon Sep 17 00:00:00 2001 From: Michael Heppler Date: Mon, 5 Jun 2017 13:57:28 -0400 Subject: [PATCH 03/17] Removed "Dataverse" as part of a dataverse name in page title, help text, notifications and other various messages. [ref #3611] --- src/main/java/Bundle.properties | 17 ++++++++--------- .../iq/dataverse/AbstractIdServiceBean.java | 2 +- .../iq/dataverse/dataverse/DataverseUtil.java | 2 +- .../iq/dataverse/search/IndexServiceBean.java | 8 ++++---- .../harvard/iq/dataverse/util/SystemConfig.java | 2 +- .../iq/dataverse/util/json/JsonPrinter.java | 2 +- src/main/webapp/403.xhtml | 2 +- src/main/webapp/404.xhtml | 2 +- src/main/webapp/500.xhtml | 2 +- src/main/webapp/ThemeAndWidgets.xhtml | 2 +- src/main/webapp/confirmemail.xhtml | 2 +- src/main/webapp/dashboard.xhtml | 2 +- src/main/webapp/dataset.xhtml | 4 ++-- src/main/webapp/dataverse.xhtml | 14 +++++++------- src/main/webapp/dataverse_header.xhtml | 12 ++++++------ src/main/webapp/dataverseuser.xhtml | 4 ++-- src/main/webapp/harvestclients.xhtml | 4 ++-- src/main/webapp/harvestsets.xhtml | 2 +- src/main/webapp/loginpage.xhtml | 2 +- src/main/webapp/manage-templates.xhtml | 2 +- src/main/webapp/mydata_page.xhtml | 2 +- src/main/webapp/oauth2/callback.xhtml | 2 +- src/main/webapp/oauth2/convert.xhtml | 2 +- src/main/webapp/oauth2/firstLogin.xhtml | 2 +- src/main/webapp/passwordreset.xhtml | 2 +- src/main/webapp/role_permission_helper.xhtml | 2 +- src/main/webapp/search-include-fragment.xhtml | 2 +- src/main/webapp/search/advanced.xhtml | 2 +- src/main/webapp/superuser.xhtml | 2 +- src/main/webapp/template.xhtml | 2 +- src/main/webapp/themeAndWidgetsFragment.xhtml | 4 ++-- .../harvard/iq/dataverse/api/DatasetsIT.java | 2 +- 32 files changed, 57 insertions(+), 58 deletions(-) diff --git a/src/main/java/Bundle.properties b/src/main/java/Bundle.properties index d890926324d..e810515d9a4 100755 --- a/src/main/java/Bundle.properties +++ b/src/main/java/Bundle.properties @@ -1,5 +1,4 @@ dataverse=Dataverse -suggestedDataverseNameEnding=Dataverse newDataverse=New Dataverse hostDataverse=Host Dataverse dataverses=Dataverses @@ -517,16 +516,16 @@ notification.email.verifyEmail.subject=Dataverse: Verify your email address notification.email.greeting=Hello, \n # Bundle file editors, please note that "notification.email.welcome" is used in a unit test -notification.email.welcome=Welcome to Dataverse! Get started by adding or finding data. Have questions? Check out the User Guide at {0}/{1}/user/ or contact Dataverse Support for assistance. Want to test out Dataverse features? Use our Demo Site at https://demo.dataverse.org +notification.email.welcome=Welcome to Dataverse! Get started by adding or finding data. Have questions? Check out the User Guide at {0}/{1}/user/ or contact Dataverse Support for assistance. Want to test out Dataverse features? Use our Demo Site at https://demo.dataverse.org. notification.email.welcomeConfirmEmailAddOn=\n\nPlease verify your email address at {0}. Note, the verify link will expire after {1}. Send another verification email by visiting your account page. notification.email.requestFileAccess=File access requested for dataset: {0}. Manage permissions at {1}. notification.email.grantFileAccess=Access granted for files in dataset: {0} (view at {1}). notification.email.rejectFileAccess=Access rejected for requested files in dataset: {0} (view at {1}). # Bundle file editors, please note that "notification.email.createDataverse" is used in a unit test -notification.email.createDataverse=Your new dataverse named {0} (view at {1} ) was created in {2} (view at {3} ). To learn more about what you can do with your dataverse, check out the Dataverse Management - Dataverse User Guide at {4}/{5}/user/dataverse-management.html . +notification.email.createDataverse=Your new dataverse named {0} (view at {1}) was created in {2} (view at {3}). To learn more about what you can do with your dataverse, check out the Dataverse Management - User Guide at {4}/{5}/user/dataverse-management.html. # Bundle file editors, please note that "notification.email.createDataset" is used in a unit test -notification.email.createDataset=Your new dataset named {0} (view at {1} ) was created in {2} (view at {3} ). To learn more about what you can do with a dataset, check out the Dataset Management - Dataset User Guide at {4}/{5}/user/dataset-management.html . -notification.email.wasSubmittedForReview={0} (view at {1}) was submitted for review to be published in {2} (view at {3}). Don't forget to publish it or send it back to the contributor\! +notification.email.createDataset=Your new dataset named {0} (view at {1}) was created in {2} (view at {3}). To learn more about what you can do with a dataset, check out the Dataset Management - User Guide at {4}/{5}/user/dataset-management.html. +notification.email.wasSubmittedForReview={0} (view at {1}) was submitted for review to be published in {2} (view at {3}). Don't forget to publish it or send it back to the contributor\! notification.email.wasReturnedByReviewer={0} (view at {1}) was returned by the curator of {2} (view at {3}). notification.email.wasPublished={0} (view at {1}) was published in {2} (view at {3}). notification.email.worldMap.added={0} (view at {1}) had WorldMap layer data added to it. @@ -952,7 +951,7 @@ dataset.manageTemplates.tab.action.btn.delete.dialog.header=Delete Template dataset.manageTemplates.tab.action.btn.view.dialog.header=Dataset Template Preview dataset.manageTemplates.tab.action.btn.view.dialog.datasetTemplate=Dataset Template dataset.manageTemplates.tab.action.btn.view.dialog.datasetTemplate.title=The dataset template which prepopulates info into the form automatically. -dataset.manageTemplates.tab.action.noedit.createdin=Template created at {0} Dataverse +dataset.manageTemplates.tab.action.noedit.createdin=Template created at {0} dataset.manageTemplates.delete.usedAsDefault=This template is the default template for the following dataverse(s). It will be removed as default as well. dataset.manageTemplates.info.message.notEmptyTable=Create, clone, edit, view, or delete dataset templates. Create a dataset template to prefill metadata fields with standard values, such as author affiliation, to help users create datasets in this dataverse. You can also add help text directly into the metadata fields to give users more information on what to add to these metadata fields. @@ -1035,7 +1034,7 @@ dataset.manageGuestbooks.tab.action.btn.view.dialog.datasetGuestbook=Guestbook N dataset.manageGuestbooks.tab.action.btn.viewCollectedData.dialog.header=Dataset Guestbook Collected Data dataset.manageGuestbooks.tab.action.btn.view.dialog.userCollectedData.title=User data collected by the guestbook. dataset.manageGuestbooks.tab.action.btn.view.dialog.userCollectedData=Collected Data -dataset.manageGuestbooks.tab.action.noedit.createdin=Guestbook created at {0} Dataverse +dataset.manageGuestbooks.tab.action.noedit.createdin=Guestbook created at {0} dataset.manageGuestbooks.message.deleteSuccess=The guestbook has been deleted. dataset.manageGuestbooks.message.deleteFailure=The guestbook cannot be deleted. dataset.manageGuestbooks.message.editSuccess=The guestbook has been updated. @@ -1384,11 +1383,11 @@ file.dataFilesTab.terms.list.termsOfAccess.addInfo.studyCompletion.title=Relatio file.dataFilesTab.terms.list.guestbook=Guestbook file.dataFilesTab.terms.list.guestbook.title=User information (i.e., name, email, institution, and position) will be collected when files are downloaded. file.dataFilesTab.terms.list.guestbook.noSelected.tip=No guestbook is assigned to this dataset, you will not be prompted to provide any information on file download. -file.dataFilesTab.terms.list.guestbook.noSelected.admin.tip=There are no guestbooks available in {0} Dataverse to assign to this dataset. +file.dataFilesTab.terms.list.guestbook.noSelected.admin.tip=There are no guestbooks available in {0} to assign to this dataset. file.dataFilesTab.terms.list.guestbook.inUse.tip=The following guestbook will prompt a user to provide additional information when downloading a file. file.dataFilesTab.terms.list.guestbook.viewBtn=Preview Guestbook file.dataFilesTab.terms.list.guestbook.select.tip=Select a guestbook to have a user provide additional information when downloading a file. -file.dataFilesTab.terms.list.guestbook.noAvailable.tip=There are no guestbooks enabled in {0} Dataverse. To create a guestbook, return to {0} Dataverse, click the "Edit" button and select the "Dataset Guestbooks" option. +file.dataFilesTab.terms.list.guestbook.noAvailable.tip=There are no guestbooks enabled in {0}. To create a guestbook, return to {0}, click the "Edit" button and select the "Dataset Guestbooks" option. file.dataFilesTab.terms.list.guestbook.clearBtn=Clear Selection file.dataFilesTab.versions=Versions diff --git a/src/main/java/edu/harvard/iq/dataverse/AbstractIdServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/AbstractIdServiceBean.java index 9142893f7cb..1ee5fabbbcc 100644 --- a/src/main/java/edu/harvard/iq/dataverse/AbstractIdServiceBean.java +++ b/src/main/java/edu/harvard/iq/dataverse/AbstractIdServiceBean.java @@ -53,7 +53,7 @@ protected HashMap addBasicMetadata(Dataset datasetIn, HashMap indexDataverse(Dataverse dataverse) { solrInputDocument.addField(SearchFields.SOURCE, HARVESTED); } else { (this means that all dataverses are "local" - should this be removed? */ solrInputDocument.addField(SearchFields.IS_HARVESTED, false); - solrInputDocument.addField(SearchFields.METADATA_SOURCE, findRootDataverseCached().getName() + " " + BundleUtil.getStringFromBundle("dataverse")); //rootDataverseName); + solrInputDocument.addField(SearchFields.METADATA_SOURCE, findRootDataverseCached().getName()); //rootDataverseName); /*}*/ addDataverseReleaseDateToSolrDoc(solrInputDocument, dataverse); @@ -679,7 +679,7 @@ private String addOrUpdateDataset(IndexableDataset indexableDataset) { solrInputDocument.addField(SearchFields.METADATA_SOURCE, HARVESTED); } else { solrInputDocument.addField(SearchFields.IS_HARVESTED, false); - solrInputDocument.addField(SearchFields.METADATA_SOURCE, findRootDataverseCached().getName() + " " + BundleUtil.getStringFromBundle("dataverse")); //rootDataverseName); + solrInputDocument.addField(SearchFields.METADATA_SOURCE, findRootDataverseCached().getName()); //rootDataverseName); } DatasetVersion datasetVersion = indexableDataset.getDatasetVersion(); @@ -907,7 +907,7 @@ private String addOrUpdateDataset(IndexableDataset indexableDataset) { datafileSolrInputDocument.addField(SearchFields.METADATA_SOURCE, HARVESTED); } else { datafileSolrInputDocument.addField(SearchFields.IS_HARVESTED, false); - datafileSolrInputDocument.addField(SearchFields.METADATA_SOURCE, findRootDataverseCached().getName() + " " + BundleUtil.getStringFromBundle("dataverse")); + datafileSolrInputDocument.addField(SearchFields.METADATA_SOURCE, findRootDataverseCached().getName()); } } if (fileSortByDate == null) { diff --git a/src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java b/src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java index 9b43a38f375..e6d747aee7b 100644 --- a/src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java +++ b/src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java @@ -607,7 +607,7 @@ public String getDefaultAuthProvider() { } public String getNameOfInstallation() { - return dataverseService.findRootDataverse().getName() + " Dataverse"; + return dataverseService.findRootDataverse().getName(); } public AbstractOAuth2AuthenticationProvider.DevOAuthAccountType getDevOAuthAccountType() { diff --git a/src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java b/src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java index 94272a64f2a..d557aac924d 100644 --- a/src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java +++ b/src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java @@ -350,7 +350,7 @@ private static String getRootDataverseNameforCitation(Dataset dataset) { } String rootDataverseName = root.getName(); if (!StringUtil.isEmpty(rootDataverseName)) { - return rootDataverseName + " Dataverse"; + return rootDataverseName; } else { return ""; } diff --git a/src/main/webapp/403.xhtml b/src/main/webapp/403.xhtml index 7fd725cc46b..7cfb1502361 100644 --- a/src/main/webapp/403.xhtml +++ b/src/main/webapp/403.xhtml @@ -11,7 +11,7 @@ - + diff --git a/src/main/webapp/404.xhtml b/src/main/webapp/404.xhtml index 43c80a1d5f5..dfa8a33227e 100644 --- a/src/main/webapp/404.xhtml +++ b/src/main/webapp/404.xhtml @@ -12,7 +12,7 @@ - + diff --git a/src/main/webapp/500.xhtml b/src/main/webapp/500.xhtml index 8e07c3c85da..f617691d65e 100644 --- a/src/main/webapp/500.xhtml +++ b/src/main/webapp/500.xhtml @@ -10,7 +10,7 @@ - + diff --git a/src/main/webapp/ThemeAndWidgets.xhtml b/src/main/webapp/ThemeAndWidgets.xhtml index da229c2b436..dca392d8344 100644 --- a/src/main/webapp/ThemeAndWidgets.xhtml +++ b/src/main/webapp/ThemeAndWidgets.xhtml @@ -12,7 +12,7 @@ - + diff --git a/src/main/webapp/confirmemail.xhtml b/src/main/webapp/confirmemail.xhtml index 3b7a283382f..06f23ed7c1f 100644 --- a/src/main/webapp/confirmemail.xhtml +++ b/src/main/webapp/confirmemail.xhtml @@ -11,7 +11,7 @@ - + diff --git a/src/main/webapp/dashboard.xhtml b/src/main/webapp/dashboard.xhtml index ac170efe593..69af5b4a53b 100644 --- a/src/main/webapp/dashboard.xhtml +++ b/src/main/webapp/dashboard.xhtml @@ -11,7 +11,7 @@ - + diff --git a/src/main/webapp/dataset.xhtml b/src/main/webapp/dataset.xhtml index 04b82f0d8ad..6113ab87a49 100755 --- a/src/main/webapp/dataset.xhtml +++ b/src/main/webapp/dataset.xhtml @@ -14,7 +14,7 @@ - + @@ -361,7 +361,7 @@
- + diff --git a/src/main/webapp/dataverse.xhtml b/src/main/webapp/dataverse.xhtml index 339240c82b5..8734213d7c9 100644 --- a/src/main/webapp/dataverse.xhtml +++ b/src/main/webapp/dataverse.xhtml @@ -530,22 +530,22 @@ diff --git a/src/main/webapp/dataverse_header.xhtml b/src/main/webapp/dataverse_header.xhtml index 2b634ae7680..e3a36f9f8dd 100644 --- a/src/main/webapp/dataverse_header.xhtml +++ b/src/main/webapp/dataverse_header.xhtml @@ -179,11 +179,11 @@
#{dataverse.name} @@ -244,10 +244,10 @@
diff --git a/doc/sphinx-guides/source/user/account.rst b/doc/sphinx-guides/source/user/account.rst index 9e5c9565d1f..5c704b90157 100755 --- a/doc/sphinx-guides/source/user/account.rst +++ b/doc/sphinx-guides/source/user/account.rst @@ -99,7 +99,7 @@ If you already have a Dataverse account associated with the Username/Email log i Convert your Dataverse account away from your Institutional Log In ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you are leaving your institution and need to convert your Dataverse account to the Dataverse Username/Email log in option, you will need to contact support for the Dataverse installation you are using. On your account page, there is a link for "Dataverse Support" that will open the popup form to contact support for assistance. +If you are leaving your institution and need to convert your Dataverse account to the Dataverse Username/Email log in option, you will need to contact support for the Dataverse installation you are using. On your account page, there is a link that will open a popup form to contact support for assistance. ORCID Log In ~~~~~~~~~~~~~ @@ -132,7 +132,7 @@ If you already have a Dataverse account associated with the Username/Email log i Convert your Dataverse account away from ORCID for log in ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you don't want to log in to Dataverse using ORCID any more, you will want to convert your Dataverse account to the Dataverse Username/Email log in option. To do this, you will need to contact support for the Dataverse installation you are using. On your account page, there is a link for "Dataverse Support" that will open the popup form to contact support for assistance. +If you don't want to log in to Dataverse using ORCID any more, you will want to convert your Dataverse account to the Dataverse Username/Email log in option. To do this, you will need to contact support for the Dataverse installation you are using. On your account page, there is a link that will open a popup form to contact support for assistance. GitHub and Google Log In ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/scripts/api/setup-optional-harvard.sh b/scripts/api/setup-optional-harvard.sh index 4bcae4c8685..c1815998e6e 100755 --- a/scripts/api/setup-optional-harvard.sh +++ b/scripts/api/setup-optional-harvard.sh @@ -21,7 +21,7 @@ echo "- Enabling Geoconnect" curl -s -X PUT -d true "$SERVER/admin/settings/:GeoconnectCreateEditMaps" curl -s -X PUT -d true "$SERVER/admin/settings/:GeoconnectViewMaps" echo "- Setting system email" -curl -X PUT -d "Dataverse Support " http://localhost:8080/api/admin/settings/:SystemEmail +curl -X PUT -d "Harvard Dataverse Support " http://localhost:8080/api/admin/settings/:SystemEmail curl -X PUT -d ", The President & Fellows of Harvard College" http://localhost:8080/api/admin/settings/:FooterCopyright echo "- Setting up the Harvard Shibboleth institutional group" curl -s -X POST -H 'Content-type:application/json' --upload-file data/shibGroupHarvard.json "$SERVER/admin/groups/shib?key=$adminKey" diff --git a/src/main/webapp/contactFormFragment.xhtml b/src/main/webapp/contactFormFragment.xhtml index ce546a8dcb7..33565e21e8f 100644 --- a/src/main/webapp/contactFormFragment.xhtml +++ b/src/main/webapp/contactFormFragment.xhtml @@ -8,7 +8,7 @@ - +
diff --git a/src/main/webapp/resources/iqbs/messages.xhtml b/src/main/webapp/resources/iqbs/messages.xhtml index e795f5ddd0f..c8b72ecfe15 100644 --- a/src/main/webapp/resources/iqbs/messages.xhtml +++ b/src/main/webapp/resources/iqbs/messages.xhtml @@ -21,9 +21,6 @@
- -  #{bundle['messages.error']} – @@ -69,8 +66,7 @@  #{msg.summary}  - - Please contact Dataverse Support for assistance. + Please contact #{settingsWrapper.supportTeamName} for assistance. Date/Time: diff --git a/src/test/java/edu/harvard/iq/dataverse/util/MailUtilTest.java b/src/test/java/edu/harvard/iq/dataverse/util/MailUtilTest.java index 9cc643103b7..b2995e2f2a6 100644 --- a/src/test/java/edu/harvard/iq/dataverse/util/MailUtilTest.java +++ b/src/test/java/edu/harvard/iq/dataverse/util/MailUtilTest.java @@ -18,16 +18,16 @@ public void setUp() { @Test public void testParseSystemAddress() { - assertEquals("support@dataverse.org", MailUtil.parseSystemAddress("support@dataverse.org").getAddress()); - assertEquals("support@dataverse.org", MailUtil.parseSystemAddress("Dataverse Support ").getAddress()); - assertEquals("Dataverse Support", MailUtil.parseSystemAddress("Dataverse Support ").getPersonal()); - assertEquals("support@dataverse.org", MailUtil.parseSystemAddress("\"Dataverse Support\" ").getAddress()); - assertEquals("Dataverse Support", MailUtil.parseSystemAddress("\"Dataverse Support\" ").getPersonal()); + assertEquals("support@librascholar.edu", MailUtil.parseSystemAddress("support@librascholar.edu").getAddress()); + assertEquals("support@librascholar.edu", MailUtil.parseSystemAddress("LibraScholar Support Team ").getAddress()); + assertEquals("LibraScholar Support Team", MailUtil.parseSystemAddress("LibraScholar Support Team ").getPersonal()); + assertEquals("support@librascholar.edu", MailUtil.parseSystemAddress("\"LibraScholar Support Team\" ").getAddress()); + assertEquals("LibraScholar Support Team", MailUtil.parseSystemAddress("\"LibraScholar Support Team\" ").getPersonal()); assertEquals(null, MailUtil.parseSystemAddress(null)); assertEquals(null, MailUtil.parseSystemAddress("")); - assertEquals(null, MailUtil.parseSystemAddress("Dataverse Support support@dataverse.org")); - assertEquals(null, MailUtil.parseSystemAddress("\"Dataverse Support ")); - assertEquals(null, MailUtil.parseSystemAddress("support1@dataverse.org, support2@dataverse.org")); + assertEquals(null, MailUtil.parseSystemAddress("LibraScholar Support Team support@librascholar.edu")); + assertEquals(null, MailUtil.parseSystemAddress("\"LibraScholar Support Team ")); + assertEquals(null, MailUtil.parseSystemAddress("support1@dataverse.org, support@librascholar.edu")); } @Test From 9ffc6b5abd6da96a99064a4df3628aae07b75d51 Mon Sep 17 00:00:00 2001 From: Brian Silverstein Date: Fri, 9 Jun 2017 12:20:16 -0400 Subject: [PATCH 15/17] fixed bundle; added tests for email subjects --- src/main/java/Bundle.properties | 12 +-- src/main/webapp/resources/iqbs/messages.xhtml | 3 +- .../iq/dataverse/util/MailUtilTest.java | 78 +++++++++++++++++++ 3 files changed, 85 insertions(+), 8 deletions(-) diff --git a/src/main/java/Bundle.properties b/src/main/java/Bundle.properties index 7d3b65dba2a..a778ca538cb 100755 --- a/src/main/java/Bundle.properties +++ b/src/main/java/Bundle.properties @@ -501,13 +501,13 @@ harvestserver.viewEditDialog.btn.save=Save Changes notification.email.create.dataverse.subject={0}: Your dataverse has been created notification.email.create.dataset.subject={0}: Your dataset has been created notification.email.request.file.access.subject={0}: Access has been requested for a restricted file -notification.email.grant.file.access.subject={0}: You have been granted access to restricted file -notification.email.rejected.file.access.subject={0}: Your request for access to restricted file has been rejected -notification.email.update.maplayer=Dataverse: WorldMap layer added to dataset -notification.email.maplayer.deletefailed.subject=Failed to delete WorldMap layer +notification.email.grant.file.access.subject={0}: You have been granted access to a restricted file +notification.email.rejected.file.access.subject={0}: Your request for access to a restricted file has been rejected +notification.email.update.maplayer={0}: WorldMap layer added to dataset +notification.email.maplayer.deletefailed.subject={0}: Failed to delete WorldMap layer notification.email.maplayer.deletefailed.text=We failed to delete the WorldMap layer associated with the restricted file {0}, and any related data that may still be publicly available on the WorldMap site. Please try again, or contact WorldMap and/or Dataverse support. (Dataset: {1}) notification.email.submit.dataset.subject={0}: Your dataset has been submitted for review -notification.email.publish.dataset.subject={}): Your dataset has been published +notification.email.publish.dataset.subject={0}: Your dataset has been published notification.email.returned.dataset.subject={0}: Your dataset has been returned notification.email.create.account.subject={0}: Your account has been created notification.email.assign.role.subject={0}: You have been assigned a role @@ -537,7 +537,7 @@ hours=hours hour=hour minutes=minutes minute=minute -notification.email.checksumfail.subject={0}: Your upload failed checksum validation. +notification.email.checksumfail.subject={0}: Your upload failed checksum validation notification.email.import.filesystem.subject={0}: Your file import job has completed notification.email.import.checksum.subject={0}: Your file checksum job has completed diff --git a/src/main/webapp/resources/iqbs/messages.xhtml b/src/main/webapp/resources/iqbs/messages.xhtml index c8b72ecfe15..8a24a2d1c93 100644 --- a/src/main/webapp/resources/iqbs/messages.xhtml +++ b/src/main/webapp/resources/iqbs/messages.xhtml @@ -66,8 +66,7 @@  #{msg.summary}  - Please contact #{settingsWrapper.supportTeamName} for assistance. - Date/Time: + Please contact #{settingsWrapper.supportTeamName} for assistance. Date/Time: diff --git a/src/test/java/edu/harvard/iq/dataverse/util/MailUtilTest.java b/src/test/java/edu/harvard/iq/dataverse/util/MailUtilTest.java index b2995e2f2a6..06772c858f7 100644 --- a/src/test/java/edu/harvard/iq/dataverse/util/MailUtilTest.java +++ b/src/test/java/edu/harvard/iq/dataverse/util/MailUtilTest.java @@ -47,4 +47,82 @@ public void testSubjectCreateDataverse() { userNotification.setType(UserNotification.Type.CREATEDV); assertEquals("LibraScholar: Your dataverse has been created", MailUtil.getSubjectTextBasedOnNotification(userNotification, rootDataverseName)); } + + @Test + public void testSubjectRevokeRole() { + userNotification.setType(UserNotification.Type.REVOKEROLE); + assertEquals("LibraScholar: Your role has been revoked", MailUtil.getSubjectTextBasedOnNotification(userNotification, rootDataverseName)); + } + + @Test + public void testSubjectRequestFileAccess() { + userNotification.setType(UserNotification.Type.REQUESTFILEACCESS); + assertEquals("LibraScholar: Access has been requested for a restricted file", MailUtil.getSubjectTextBasedOnNotification(userNotification, rootDataverseName)); + } + + @Test + public void testSubjectGrantFileAccess() { + userNotification.setType(UserNotification.Type.GRANTFILEACCESS); + assertEquals("LibraScholar: You have been granted access to a restricted file", MailUtil.getSubjectTextBasedOnNotification(userNotification, rootDataverseName)); + } + + @Test + public void testSubjectRejectFileAccess() { + userNotification.setType(UserNotification.Type.REJECTFILEACCESS); + assertEquals("LibraScholar: Your request for access to a restricted file has been rejected", MailUtil.getSubjectTextBasedOnNotification(userNotification, rootDataverseName)); + } + + @Test + public void testSubjectMapLayerUpdated() { + userNotification.setType(UserNotification.Type.MAPLAYERUPDATED); + assertEquals("LibraScholar: WorldMap layer added to dataset", MailUtil.getSubjectTextBasedOnNotification(userNotification, rootDataverseName)); + } + + @Test + public void testSubjectMapLayerDeleteFailed() { + userNotification.setType(UserNotification.Type.MAPLAYERDELETEFAILED); + assertEquals("LibraScholar: Failed to delete WorldMap layer", MailUtil.getSubjectTextBasedOnNotification(userNotification, rootDataverseName)); + } + + @Test + public void testSubjectCreateDataset() { + userNotification.setType(UserNotification.Type.CREATEDS); + assertEquals("LibraScholar: Your dataset has been created", MailUtil.getSubjectTextBasedOnNotification(userNotification, rootDataverseName)); + } + + @Test + public void testSubjectSubmittedDS() { + userNotification.setType(UserNotification.Type.SUBMITTEDDS); + assertEquals("LibraScholar: Your dataset has been submitted for review", MailUtil.getSubjectTextBasedOnNotification(userNotification, rootDataverseName)); + } + + @Test + public void testSubjectPublishedDS() { + userNotification.setType(UserNotification.Type.PUBLISHEDDS); + assertEquals("LibraScholar: Your dataset has been published", MailUtil.getSubjectTextBasedOnNotification(userNotification, rootDataverseName)); + } + + @Test + public void testSubjectReturnedDS() { + userNotification.setType(UserNotification.Type.RETURNEDDS); + assertEquals("LibraScholar: Your dataset has been returned", MailUtil.getSubjectTextBasedOnNotification(userNotification, rootDataverseName)); + } + + @Test + public void testSubjectChecksumFail() { + userNotification.setType(UserNotification.Type.CHECKSUMFAIL); + assertEquals("LibraScholar: Your upload failed checksum validation", MailUtil.getSubjectTextBasedOnNotification(userNotification, rootDataverseName)); + } + + @Test + public void testSubjectFileSystemImport() { + userNotification.setType(UserNotification.Type.FILESYSTEMIMPORT); + assertEquals("LibraScholar: Your file import job has completed", MailUtil.getSubjectTextBasedOnNotification(userNotification, rootDataverseName)); + } + + @Test + public void testSubjectChecksumImport() { + userNotification.setType(UserNotification.Type.CHECKSUMIMPORT); + assertEquals("LibraScholar: Your file checksum job has completed", MailUtil.getSubjectTextBasedOnNotification(userNotification, rootDataverseName)); + } } From 1831c83baa3f9a09b06e8c223df5eade987eba11 Mon Sep 17 00:00:00 2001 From: Brian Silverstein Date: Fri, 9 Jun 2017 13:04:33 -0400 Subject: [PATCH 16/17] fixed nesting of Date/Time from line 69 to 70 --- src/main/webapp/resources/iqbs/messages.xhtml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/resources/iqbs/messages.xhtml b/src/main/webapp/resources/iqbs/messages.xhtml index 8a24a2d1c93..6ff17f92beb 100644 --- a/src/main/webapp/resources/iqbs/messages.xhtml +++ b/src/main/webapp/resources/iqbs/messages.xhtml @@ -66,7 +66,8 @@  #{msg.summary}  - Please contact #{settingsWrapper.supportTeamName} for assistance. Date/Time: + Please contact #{settingsWrapper.supportTeamName} for assistance. + Date/Time: @@ -77,4 +78,4 @@ #{msg.rendered()} - \ No newline at end of file + From 4f131f03b301eeef2eb91fe9b81e10a7c87f74bd Mon Sep 17 00:00:00 2001 From: Philip Durbin Date: Mon, 12 Jun 2017 14:27:14 -0400 Subject: [PATCH 17/17] dataverse name initial text should be real, not watermark #3611 --- src/main/java/edu/harvard/iq/dataverse/DataversePage.java | 6 +++--- src/main/webapp/dataverse.xhtml | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/DataversePage.java b/src/main/java/edu/harvard/iq/dataverse/DataversePage.java index bb7a1e50497..c10bc5724a0 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DataversePage.java +++ b/src/main/java/edu/harvard/iq/dataverse/DataversePage.java @@ -303,6 +303,9 @@ public String init() { dataverse.setAffiliation(session.getUser().getDisplayInfo().getAffiliation()); setupForGeneralInfoEdit(); // FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Create New Dataverse", " - Create a new dataverse that will be a child dataverse of the parent you clicked from. Asterisks indicate required fields.")); + if (dataverse.getName() == null) { + dataverse.setName(DataverseUtil.getSuggestedDataverseNameOnCreate(session.getUser())); + } } return null; @@ -1014,7 +1017,4 @@ public void validateAlias(FacesContext context, UIComponent toValidate, Object v } } - public String getSuggestedDataverseNameOnCreate() { - return DataverseUtil.getSuggestedDataverseNameOnCreate(session.getUser()); - } } diff --git a/src/main/webapp/dataverse.xhtml b/src/main/webapp/dataverse.xhtml index 8734213d7c9..48f96328a10 100644 --- a/src/main/webapp/dataverse.xhtml +++ b/src/main/webapp/dataverse.xhtml @@ -58,7 +58,6 @@
-