Skip to content

Commit

Permalink
Merge pull request #83 from midas-isg/public-routes
Browse files Browse the repository at this point in the history
Added public-route for about page
  • Loading branch information
JohnLevander authored Jul 27, 2017
2 parents cd8952f + d8c7b42 commit 87819d6
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 0 deletions.
58 changes: 58 additions & 0 deletions app/controllers/UnsecuredApplication.java
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()));
}
}
11 changes: 11 additions & 0 deletions app/views/about.scala.html
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>
}
1 change: 1 addition & 0 deletions conf/routes
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ GET /logout security.auth0.Auth0Controller
GET /callback security.auth0.Auth0Controller.callback(code)

# Deprecated
GET /about controllers.UnsecuredApplication.about()
GET /concept controllers.Application.concept()
GET /read-only controllers.Application.browser()
GET /browser controllers.Application.browser()
Expand Down
Empty file added public/stylesheets/about.css
Empty file.
29 changes: 29 additions & 0 deletions public/stylesheets/main.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
@media only screen and (min-height: 1024px) {
.full-height {
height: 800px;
}
}

@media only screen and (max-height: 944px) {
.full-height {
height: 700px;
}
}

@media only screen and (max-height: 700px) {
.full-height {
height: 400px;
}
}

@media only screen and (max-height: 412px) {
.full-height {
height: 200px;
}
}


body {
background-color: rgb(237, 238, 247);
}
Expand Down Expand Up @@ -29,6 +54,10 @@ legend {
text-indent: 5px;
}

.full-width {
width: 100%;
}

.azure {
background-color: #F0FFFF;
}
Expand Down

0 comments on commit 87819d6

Please sign in to comment.