-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from midas-isg/public-routes
Added public-route for about page
- Loading branch information
Showing
5 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package controllers; | ||
|
||
import play.Configuration; | ||
import play.Play; | ||
import play.db.jpa.Transactional; | ||
import play.mvc.Result; | ||
import play.mvc.Controller; | ||
|
||
|
||
public class UnsecuredApplication extends Controller { | ||
|
||
private static String INFO = null; | ||
|
||
public static String info() { | ||
init(); | ||
return INFO; | ||
} | ||
|
||
private static void init(){ | ||
if (INFO == null){ | ||
final Configuration cfg = Play.application().configuration(); | ||
String version = "Version: " + cfg.getString("app.version"); | ||
String dbName = "Database: " + cfg.getString("db.default.url"); | ||
INFO = "Copyright 2014-2016 - University of Pittsburgh, " | ||
+ version + ", " + dbName; | ||
} | ||
} | ||
|
||
|
||
public Result about() { | ||
return ok(views.html.about.render("about", info())); | ||
} | ||
|
||
@Transactional | ||
public Result index() { | ||
return ok(views.html.search.render("location search", info())); | ||
} | ||
|
||
@Transactional | ||
public Result concept() { | ||
return ok(views.html.concept.render("location services", info())); | ||
} | ||
|
||
@Transactional | ||
public Result browser() { | ||
return ok(views.html.browser.render("location browser", info())); | ||
} | ||
|
||
@Transactional | ||
public Result resolver() { | ||
return ok(views.html.resolver.render("location resolver", info())); | ||
} | ||
|
||
@Transactional | ||
public Result create() { | ||
return ok(views.html.create.render("location creator", info())); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@(message: String, version:String) | ||
|
||
@imports = { | ||
<!-- <script src='@routes.Assets.at("javascripts/browser.js")' defer></script> --> | ||
|
||
<link href='@routes.Assets.at("stylesheets/about.css")' rel='stylesheet'> | ||
} | ||
|
||
@main(message, imports, version) { | ||
<iframe class="center-block full-width full-height" src="https://docs.google.com/document/d/1aBj5Vkxmme6MiAPmAF71xDLKHxPfVK8gbf6l0eoxTSA/pub?embedded=true"></iframe> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters