-
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 #90 from midas-isg/front-end-updates
Front end updates
- Loading branch information
Showing
215 changed files
with
104,775 additions
and
68,992 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 |
---|---|---|
@@ -1,53 +1,75 @@ | ||
package controllers; | ||
|
||
import play.Configuration; | ||
import play.Logger; | ||
import play.Play; | ||
import play.db.jpa.Transactional; | ||
import play.mvc.Controller; | ||
import play.mvc.Http.Context; | ||
import play.mvc.Result; | ||
import security.controllers.UserController; | ||
|
||
|
||
public class Application extends UserController { | ||
|
||
private static String INFO = null; | ||
private static String INFO = null; | ||
|
||
public static String info() { | ||
init(); | ||
return INFO; | ||
} | ||
public static String info() { | ||
init(); | ||
return INFO; | ||
} | ||
|
||
private static void init(){ | ||
if (INFO == null){ | ||
final Configuration cfg = Play.application().configuration(); | ||
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; | ||
} | ||
} | ||
|
||
@Transactional | ||
String dbName = "Database: " + cfg.getString("db.default.url"); | ||
INFO = "Copyright 2014-2016 - University of Pittsburgh, " | ||
+ version + ", " + dbName; | ||
} | ||
} | ||
|
||
public Result index() { | ||
return ok(views.html.search.render("location search", info())); | ||
return basicSearch(); | ||
} | ||
|
||
@Transactional | ||
public Result concept() { | ||
return ok(views.html.concept.render("location services", info())); | ||
|
||
public Result basicSearch() { | ||
return ok(views.html.index.render("search", info())); | ||
} | ||
|
||
public Result mapSearch() { | ||
return ok(views.html.map_search.render("map search", info())); | ||
} | ||
|
||
public Result advancedSearch() { | ||
return ok(views.html.advanced_search.render("advanced search", info())); | ||
} | ||
|
||
public Result translate() { | ||
return ok(views.html.translate.render("translator", info())); | ||
} | ||
|
||
public Result results() { | ||
return ok(views.html.results.render("refine search", info())); | ||
} | ||
|
||
@Transactional | ||
public Result browser() { | ||
return ok(views.html.browser.render("location browser", info())); | ||
return ok(views.html.browser.render("browser", info())); | ||
} | ||
|
||
@Transactional | ||
public Result resolver() { | ||
return ok(views.html.resolver.render("location resolver", info())); | ||
return ok(views.html.resolver.render("resolver", info())); | ||
} | ||
|
||
@Transactional | ||
public Result create() { | ||
return ok(views.html.create.render("location creator", info())); | ||
return ok(views.html.create.render("creator", info())); | ||
} | ||
|
||
@Transactional | ||
public Result concept() { | ||
Logger.warn("\nWARNING! " + Context.current().request().uri() + " is deprecated and may stop being available in the future!\n"); | ||
return ok(views.html.concept.render("concept", 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
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
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
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,25 @@ | ||
<div id="advanced-searchbar-form" style="margin-bottom: 5px; padding-left: 5px; padding-right: 5px;"> | ||
<div class="roundbox"> | ||
<div class="form-inline"> | ||
<div class="form-group horizontal-padding"> | ||
<label for="latitude">Latitude</label> | ||
<input id="latitude" class="form-control" type="number" min="-90" max="90" value="0" step="0.000001"> | ||
</div> | ||
|
||
<div class="form-group horizontal-padding"> | ||
<label for="longitude">Longitude</label> | ||
<input id="longitude" class="form-control" type="number" min="-180" max="180" value="0" step="0.000001"> | ||
</div> | ||
|
||
<div class="pull-right"> | ||
<div class="form-group"> | ||
<button id="search-button" class="btn btn-primary">Search</button> | ||
</div> | ||
</div> | ||
|
||
<div class="clear-both"></div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script src='@routes.Assets.at("javascripts/advanced-map.js")'></script> |
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,25 @@ | ||
@(search_type: String) | ||
|
||
<div style="display: inline-block; padding: 2px;"> | ||
<button id="advanced-options-toggle" class="btn btn-sm btn-default"> | ||
<span class="glyphicon glyphicon-menu-hamburger"></span> | ||
</button> | ||
</div> | ||
|
||
<div class="clear-both"></div> | ||
|
||
<div id="advanced-options" style="display: none; margin-top: 2px;"> | ||
@{ | ||
if(search_type == "searchbar") { | ||
advanced_searchbar() | ||
} | ||
else if(search_type == "map") { | ||
advanced_map() | ||
} | ||
else { | ||
<h1>DOGS RULE!</h1> | ||
} | ||
} | ||
</div> | ||
|
||
<script src='@routes.Assets.at("javascripts/advanced-options.js")'></script> |
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,61 @@ | ||
@(message: String, version: String) | ||
|
||
@imports = { | ||
<link href='@routes.Assets.at("stylesheets/index.css")' rel='stylesheet'> | ||
<link href='@routes.Assets.at("stylesheets/search.css")' rel='stylesheet'> | ||
|
||
<!-- | ||
<script src='@routes.Assets.at("external_packages/fancytree/jquery.fancytree.js")'></script> | ||
<script src='@routes.Assets.at("javascripts/search-map.js")'></script> | ||
<script src='@routes.Assets.at("javascripts/search-results.js")' type='text/javascript'></script> | ||
<script src='@routes.Assets.at("javascripts/search-rank.js")' type='text/javascript'></script> | ||
<link href='@routes.Assets.at("external_packages/fancytree/ui.fancytree.css")' rel='stylesheet'> | ||
<link href='@routes.Assets.at("stylesheets/fancytree-ext.css")' rel='stylesheet'> | ||
--> | ||
} | ||
|
||
@main(message, imports, version) { | ||
<div class="center-block"> | ||
<div class="vertical-spaced center-block"> | ||
<!-- POST /api/locations/find-bulk --> | ||
<div class="roundbox extra-bottom-space"> | ||
<div class="form-group horizontal-padding"> | ||
<label for="location-codes-list">Location codes list</label> | ||
<textarea id="location-codes-list" class="form-control" placeholder="ex: '1216' or '1423, 1600, 1900, ...' or (leave empty to query by country)"></textarea> | ||
</div> | ||
|
||
<div class="form-group horizontal-padding"> | ||
<label for="code-type">Input code type</label> | ||
<select id="code-type" class="form-control"> | ||
<option disabled selected value="-1">(not selected)</option> | ||
</select> | ||
</div> | ||
</div> | ||
|
||
<!-- GET /api/locations/find-by-coordinate --> | ||
<div class="roundbox extra-bottom-space"> | ||
<div class="form-group horizontal-padding"> | ||
<label for="location-codes-list">Location codes list</label> | ||
<textarea id="location-codes-list" class="form-control" placeholder="ex: '1216' or '1423, 1600, 1900, ...' or (leave empty to query by country)"></textarea> | ||
</div> | ||
|
||
<div class="form-group horizontal-padding"> | ||
<label for="code-type">Input code type</label> | ||
<select id="code-type" class="form-control"> | ||
<option disabled selected value="-1">(not selected)</option> | ||
</select> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
<div id="search-options" class="center-block"> | ||
<button class="btn btn-default" onclick="location.assign(CONTEXT)">Name Search</button> | ||
<button class="btn btn-default" onclick="location.assign(CONTEXT + '/map-search');">Map Search</button> | ||
</div> | ||
</div> | ||
} |
Oops, something went wrong.