diff --git a/conf/dependencies.yml b/conf/dependencies.yml index 6397ec7..c8179d4 100644 --- a/conf/dependencies.yml +++ b/conf/dependencies.yml @@ -1,4 +1,4 @@ -self: play -> scalate 0.2 +self: play -> scalate 0.2.5 require: - play @@ -8,4 +8,7 @@ require: - javax.servlet -> * - com.sun.jersey -> * - org.osgi -> * - - org.fusesource.scalate -> scalate-util 1.5.3-scala_2.8.2 + - org.scala-lang -> * + - org.fusesource.scalate -> scalate-util 1.5.3-scala_2.8.2: + exclude: + - org.scala-lang -> * diff --git a/src/play/modules/scalate/ScalateTemplate.scala b/src/play/modules/scalate/ScalateTemplate.scala index 3eddfc1..9af41e6 100644 --- a/src/play/modules/scalate/ScalateTemplate.scala +++ b/src/play/modules/scalate/ScalateTemplate.scala @@ -18,13 +18,13 @@ object ScalateTemplate { lazy val scalateEngine = { val engine = new TemplateEngine - engine.resourceLoader = new FileResourceLoader(Some(Play.getFile("/app/views"))) + engine.resourceLoader = new FileResourceLoader(Some(Play.getFile("/app/pages"))) engine.classpath = Play.getFile("/tmp/classes").getAbsolutePath engine.workingDirectory = Play.getFile("tmp") engine.combinedClassPath = true engine.classLoader = Play.classloader engine.layoutStrategy = new DefaultLayoutStrategy(engine, - Play.getFile("/app/views/layouts/default" + scalateType).getAbsolutePath) + Play.getFile("/app/pages/layouts/default" + scalateType).getAbsolutePath) engine.bindings = List( Binding("context", SourceCodeHelper.name(classOf[DefaultRenderContext]), true) @@ -43,8 +43,8 @@ object ScalateTemplate { try { val baseName = name.replaceAll(".html","") // for when Template() is used instead of render - val templatePath = new File(Play.applicationPath+"/app/views","/"+baseName).toString - .replace(new File(Play.applicationPath+"/app/views").toString,"") + val templatePath = new File(Play.applicationPath+"/app/pages","/"+baseName).toString + .replace(new File(Play.applicationPath+"/app/pages").toString,"") scalateEngine.layout(templatePath + scalateType, argsMap) } catch { case ex:TemplateNotFoundException => { @@ -107,8 +107,8 @@ object ScalateTemplate { } private def errorTemplate:String = { - val fullPath = new File(Play.applicationPath,"/app/views/errors/500.scaml").toString - fullPath.replace(new File(Play.applicationPath+"/app/views").toString,"") + val fullPath = new File(Play.applicationPath,"/app/pages/errors/500.scaml").toString + fullPath.replace(new File(Play.applicationPath+"/app/pages").toString,"") } // --- ROUTERS def action(action: => Any) = {