diff --git a/doc/install.html b/doc/install.html index cd048e367..22932f888 100644 --- a/doc/install.html +++ b/doc/install.html @@ -745,6 +745,21 @@ +
false
, which
- means that a cached copy of each template will be used for 60 seconds
- before the disk is checked for a new version.
- false
, which means that the language file is
- read when VIVO starts up, or when a new theme is selected.
- false
.
- false
, which means
-# that a cached copy of each template will be used for 60 seconds before
-# the disk is checked for a new version.
-#
-# developer.defeatFreemarkerCache = true
-
-#
-# For developers only: Setting this option to "true" slows down Vitro performance.
-#
-# Defeat the cache of language-specific text strings, so the language file
-# is read from disk on each request. This permits developers to immediately
-# see the effect of changes to the text strings. The default is
-# false
, which means that the language file is read when
-# VIVO starts up, or when a new theme is selected.
-#
-# developer.defeatI18nCache = true
-
-#
-# For developers only: Setting this option to "true" slows down Vitro performance.
-#
-# Add starting and ending delimiters to each Freemarker template, so you can see
-# which template were invoked by viewing the generated HTML. The default is
-# false
.
-#
-# developer.insertFreemarkerDelimiters = true
-
diff --git a/webapp/languages/example/i18n/all_es.properties b/webapp/languages/es_GO/i18n/all_es_GO.properties
similarity index 100%
rename from webapp/languages/example/i18n/all_es.properties
rename to webapp/languages/es_GO/i18n/all_es_GO.properties
diff --git a/webapp/languages/example/templates/freemarker/search-help_es.ftl b/webapp/languages/es_GO/templates/freemarker/search-help_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/search-help_es.ftl
rename to webapp/languages/es_GO/templates/freemarker/search-help_es_GO.ftl
diff --git a/webapp/languages/example/templates/freemarker/termsOfUse_es.ftl b/webapp/languages/es_GO/templates/freemarker/termsOfUse_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/termsOfUse_es.ftl
rename to webapp/languages/es_GO/templates/freemarker/termsOfUse_es_GO.ftl
diff --git a/webapp/languages/example/templates/freemarker/userAccounts-acctCreatedEmail.ftl b/webapp/languages/es_GO/templates/freemarker/userAccounts-acctCreatedEmail_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/userAccounts-acctCreatedEmail.ftl
rename to webapp/languages/es_GO/templates/freemarker/userAccounts-acctCreatedEmail_es_GO.ftl
diff --git a/webapp/languages/example/templates/freemarker/userAccounts-acctCreatedExternalOnlyEmail.ftl b/webapp/languages/es_GO/templates/freemarker/userAccounts-acctCreatedExternalOnlyEmail_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/userAccounts-acctCreatedExternalOnlyEmail.ftl
rename to webapp/languages/es_GO/templates/freemarker/userAccounts-acctCreatedExternalOnlyEmail_es_GO.ftl
diff --git a/webapp/languages/example/templates/freemarker/userAccounts-confirmEmailChangedEmail.ftl b/webapp/languages/es_GO/templates/freemarker/userAccounts-confirmEmailChangedEmail_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/userAccounts-confirmEmailChangedEmail.ftl
rename to webapp/languages/es_GO/templates/freemarker/userAccounts-confirmEmailChangedEmail_es_GO.ftl
diff --git a/webapp/languages/example/templates/freemarker/userAccounts-firstTimeExternalEmail.ftl b/webapp/languages/es_GO/templates/freemarker/userAccounts-firstTimeExternalEmail_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/userAccounts-firstTimeExternalEmail.ftl
rename to webapp/languages/es_GO/templates/freemarker/userAccounts-firstTimeExternalEmail_es_GO.ftl
diff --git a/webapp/languages/example/templates/freemarker/userAccounts-passwordCreatedEmail.ftl b/webapp/languages/es_GO/templates/freemarker/userAccounts-passwordCreatedEmail_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/userAccounts-passwordCreatedEmail.ftl
rename to webapp/languages/es_GO/templates/freemarker/userAccounts-passwordCreatedEmail_es_GO.ftl
diff --git a/webapp/languages/example/templates/freemarker/userAccounts-passwordResetCompleteEmail.ftl b/webapp/languages/es_GO/templates/freemarker/userAccounts-passwordResetCompleteEmail_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/userAccounts-passwordResetCompleteEmail.ftl
rename to webapp/languages/es_GO/templates/freemarker/userAccounts-passwordResetCompleteEmail_es_GO.ftl
diff --git a/webapp/languages/example/templates/freemarker/userAccounts-passwordResetPendingEmail.ftl b/webapp/languages/es_GO/templates/freemarker/userAccounts-passwordResetPendingEmail_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/userAccounts-passwordResetPendingEmail.ftl
rename to webapp/languages/es_GO/templates/freemarker/userAccounts-passwordResetPendingEmail_es_GO.ftl
diff --git a/webapp/rdf/auth/everytime/permission_config.n3 b/webapp/rdf/auth/everytime/permission_config.n3
index 9b61615f2..c4a88018a 100644
--- a/webapp/rdf/auth/everytime/permission_config.n3
+++ b/webapp/rdf/auth/everytime/permission_config.n3
@@ -24,6 +24,7 @@ auth:ADMIN
auth:hasPermission simplePermission:UseMiscellaneousAdminPages ;
auth:hasPermission simplePermission:UseSparqlQueryPage ;
auth:hasPermission simplePermission:PageViewableAdmin ;
+ auth:hasPermission simplePermission:EnableDeveloperPanel ;
# permissions for CURATOR and above.
auth:hasPermission simplePermission:EditOntology ;
diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/permissions/SimplePermission.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/permissions/SimplePermission.java
index cf0a7e272..33c609c5b 100644
--- a/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/permissions/SimplePermission.java
+++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/permissions/SimplePermission.java
@@ -76,6 +76,8 @@ public class SimplePermission extends Permission {
NAMESPACE + "UseAdvancedDataToolsPages");
public static final SimplePermission USE_SPARQL_QUERY_PAGE = new SimplePermission(
NAMESPACE + "UseSparqlQueryPage");
+ public static final SimplePermission ENABLE_DEVELOPER_PANEL = new SimplePermission(
+ NAMESPACE + "EnableDeveloperPanel");
// ----------------------------------------------------------------------
diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/DefaultAddMissingIndividualFormGenerator.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/DefaultAddMissingIndividualFormGenerator.java
index 2f53d3619..0a8a866a3 100644
--- a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/DefaultAddMissingIndividualFormGenerator.java
+++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/DefaultAddMissingIndividualFormGenerator.java
@@ -56,7 +56,10 @@ public class DefaultAddMissingIndividualFormGenerator implements EditConfigurati
public static boolean isCreateNewIndividual(VitroRequest vreq, HttpSession session) {
String command = vreq.getParameter("cmd");
String predicateUri = EditConfigurationUtils.getPredicateUri(vreq);
- ObjectProperty objProp = vreq.getWebappDaoFactory().getObjectPropertyDao().getObjectPropertyByURI(predicateUri);
+ //This method also looks at domain and range uris and so is different than just getting the
+ //object property based on predicate uri alone
+ ObjectProperty objProp = EditConfigurationUtils.getObjectPropertyForPredicate(vreq,
+ predicateUri);
if(objProp != null) {
return(objProp.getOfferCreateNewOption() &&
(
diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/filters/RequestModelsPrep.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/filters/RequestModelsPrep.java
index d4da08f70..032795028 100644
--- a/webapp/src/edu/cornell/mannlib/vitro/webapp/filters/RequestModelsPrep.java
+++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/filters/RequestModelsPrep.java
@@ -336,11 +336,11 @@ public class RequestModelsPrep implements Filter {
}
/**
- * Language awareness is enabled unless they explicitly disable it.
+ * Language awareness is disabled unless they explicitly enable it.
*/
private Boolean isLanguageAwarenessEnabled() {
return Boolean.valueOf(props.getProperty("RDFService.languageFilter",
- "true"));
+ "false"));
}
private RDFService addLanguageAwareness(HttpServletRequest req,
diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/freemarker/config/FreemarkerConfiguration.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/freemarker/config/FreemarkerConfiguration.java
index 17ad1fd0b..7872974bb 100644
--- a/webapp/src/edu/cornell/mannlib/vitro/webapp/freemarker/config/FreemarkerConfiguration.java
+++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/freemarker/config/FreemarkerConfiguration.java
@@ -18,7 +18,6 @@ import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import edu.cornell.mannlib.vitro.webapp.config.ConfigurationProperties;
import edu.cornell.mannlib.vitro.webapp.config.RevisionInfoBean;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.DelimitingTemplateLoader;
@@ -27,6 +26,8 @@ import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.EditConfigurationConstants;
import edu.cornell.mannlib.vitro.webapp.i18n.freemarker.I18nMethodModel;
import edu.cornell.mannlib.vitro.webapp.startup.StartupStatus;
+import edu.cornell.mannlib.vitro.webapp.utils.developer.DeveloperSettings;
+import edu.cornell.mannlib.vitro.webapp.utils.developer.DeveloperSettings.Keys;
import edu.cornell.mannlib.vitro.webapp.web.directives.IndividualShortViewDirective;
import edu.cornell.mannlib.vitro.webapp.web.directives.UrlDirective;
import edu.cornell.mannlib.vitro.webapp.web.directives.WidgetDirective;
@@ -55,18 +56,17 @@ import freemarker.template.TemplateModelException;
* own locale, etc.
*
* Each time a request asks for the configuration, check to see whether the
- * cache is still valid, and whether the theme has changed (needs a new
- * TemplateLoader). Store the request info to the ThreadLocal.
+ * cache is still valid, whether the theme has changed (needs a new
+ * TemplateLoader), and whether the DeveloperSettings have changed (might need a
+ * new TemplateLoader). Store the request info to the ThreadLocal.
*/
public abstract class FreemarkerConfiguration {
private static final Log log = LogFactory
.getLog(FreemarkerConfiguration.class);
- private static final String PROPERTY_DEFEAT_CACHE = "developer.defeatFreemarkerCache";
- private static final String PROPERTY_INSERT_DELIMITERS = "developer.insertFreemarkerDelimiters";
-
private static volatile FreemarkerConfigurationImpl instance;
private static volatile String previousThemeDir;
+ private static volatile Map