Skip to content

Commit

Permalink
change default to be "Copyright © [YYYY]" #3379
Browse files Browse the repository at this point in the history
Also use `settingsWrapper.get` for better performance.
  • Loading branch information
pdurbin committed Sep 29, 2016
1 parent 86195c7 commit d78a834
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions doc/sphinx-guides/source/installation/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ This is the email address that "system" emails are sent from such as password re
:FooterCopyright
++++++++++++++++

By default the footer says "Copyright © [YYYY], The President & Fellows of Harvard College" but the text after the year can be customized.
By default the footer says "Copyright © [YYYY]" but you can add text after the year, as in the example below.

``curl -X PUT -d "The President & Fellows of Harvard College" http://localhost:8080/api/admin/settings/:FooterCopyright``
``curl -X PUT -d ", The President & Fellows of Harvard College" http://localhost:8080/api/admin/settings/:FooterCopyright``

:DoiProvider
++++++++++++
Expand Down
1 change: 1 addition & 0 deletions scripts/api/setup-optional-harvard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ 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 <support@dataverse.org>" http://localhost:8080/api/admin/settings/:SystemEmail
curl -X PUT -d ", The President &#38; 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"
echo
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ footer.dataverseOnGitHub=Dataverse On GitHub
footer.dataverseProjectOn=Dataverse Project on
footer.Twitter=Twitter
footer.dataScienceIQSS=Developed at the <a href="http://www.iq.harvard.edu/" title="Institute for Quantitative Social Science" target="_blank">Institute for Quantitative Social Science</a>
footer.copyright=Copyright &#169; {0},
footer.copyright=Copyright &#169; {0}
footer.widget.datastored=Data is stored at {0}.
footer.widget.login=Log in to
footer.privacyPolicy=Privacy Policy
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,7 @@ public boolean isTimerServer() {
return false;
}

public String getFooterCopyright() {
String copyrightYear = BundleUtil.getStringFromBundle("footer.copyright", Arrays.asList(Year.now().getValue() + ""));
String extraText = settingsService.getValueForKey(SettingsServiceBean.Key.FooterCopyright, "The President &#38; Fellows of Harvard College");
return copyrightYear + extraText;
public String getFooterCopyrightAndYear() {
return BundleUtil.getStringFromBundle("footer.copyright", Arrays.asList(Year.now().getValue() + ""));
}
}
2 changes: 1 addition & 1 deletion src/main/webapp/dataverse_footer.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h:outputText value="#{bundle['footer.dataScienceIQSS']}" escape="false"/> &#160;|&#160; #{bundle['footer.dataverseProjectOn']} <a href="https://twitter.com/dataverseorg" target="_blank" title="#{bundle['footer.dataverseProjectOn']} #{bundle['footer.Twitter']}"><span class="socicon socicon-twitter" title="#{bundle['footer.dataverseProjectOn']} #{bundle['footer.Twitter']}"/></a> &#160;|&#160; #{bundle['footer.codeAvailable']} <a href="https://github.com/IQSS/dataverse" target="_blank" title="#{bundle['footer.dataverseOnGitHub']}"><span class="socicon socicon-github" title="#{bundle['footer.dataverseOnGitHub']}"/></a>
</p>
<p>
<h:outputText value="#{systemConfig.footerCopyright}" escape="false"/> <ui:fragment rendered="#{!empty settingsWrapper.get(':ApplicationPrivacyPolicyUrl')}">&#160;|&#160; <h:outputLink value="#{settingsWrapper.get(':ApplicationPrivacyPolicyUrl')}" target="_blank">#{bundle['footer.privacyPolicy']}</h:outputLink></ui:fragment>
<h:outputText value="#{systemConfig.footerCopyrightAndYear}#{settingsWrapper.get(':FooterCopyright')}" escape="false"/> <ui:fragment rendered="#{!empty settingsWrapper.get(':ApplicationPrivacyPolicyUrl')}">&#160;|&#160; <h:outputLink value="#{settingsWrapper.get(':ApplicationPrivacyPolicyUrl')}" target="_blank">#{bundle['footer.privacyPolicy']}</h:outputLink></ui:fragment>
</p>
</div>
<div class="col-xs-7 small" jsf:rendered="#{widgetView}">
Expand Down

0 comments on commit d78a834

Please sign in to comment.