1
restaurant-search/client/index.html

130 lines
6.2 KiB
HTML
Raw Normal View History

2014-09-30 08:40:31 +00:00
<!DOCTYPE html>
<html>
<head>
<title>Reactive Search</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
2014-09-30 08:40:31 +00:00
</head>
<body>
<div class="container">
<!-- busy spinner -->
<div class="page-header">
2014-10-05 10:00:17 +00:00
<h1><img id="spinner" alt="loading" class="pull-right" src="images/spinner.gif" style="display: none;" width="32" height="32">Reactive Search</h1>
2014-09-30 08:40:31 +00:00
</div>
2015-03-09 11:18:50 +00:00
<!-- profile dialog -->
2015-03-09 13:56:19 +00:00
<div id="profileDlg" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="model-header">
<div class="modal-header">
2015-03-09 14:14:04 +00:00
<button type="button" class="close" data-dismiss="modal">&times;</button>
2015-03-09 22:47:34 +00:00
<h3 class="modal-title">User Profile Editor</h3>
2015-03-09 13:56:19 +00:00
</div>
<div class="modal-body">
<iframe src="/profile.html" width="100%" height="250" frameborder="0"></iframe>
</div>
<div class="modal-footer">
<button class="btn btn-default" data-dismiss="modal">OK</button>
</div>
</div>
</div>
2015-03-09 11:18:50 +00:00
</div>
</div>
2014-11-08 09:54:39 +00:00
<div class="row">
<!-- query -->
2015-03-09 09:49:47 +00:00
<div class="col-md-3">
2014-11-08 09:54:39 +00:00
<div class="panel panel-default">
<div class="panel-heading">
<big>Query</big>
</div>
<div class="panel-body">
2015-01-05 07:26:47 +00:00
<div class="form-group">
<label for="walkingDist">Walking distance (km)</label>
<input class="form-control" type="number" step="0.1" min="0.1" value="1.0" id="walkingDist">
2015-01-05 07:26:47 +00:00
</div>
2014-11-08 09:28:14 +00:00
<div class="form-group">
<label for="minScore">Minimum score</label>
<input class="form-control" type="number" step="0.01" value="0.25" id="minScore">
2014-11-08 09:28:14 +00:00
</div>
<div class="form-group">
<label for="hintSteps">Hint steps</label>
<input class="form-control" type="number" value="20" min="1" id="hintSteps">
2014-11-08 09:28:14 +00:00
</div>
<div class="form-group">
<label for="maxResults">Max results</label>
<input class="form-control" type="number" value="100" id="maxResults">
</div>
2014-09-30 08:40:31 +00:00
<div class="checkbox">
<label><input type="checkbox" id="useLocalScale" checked="checked">Use local scale</label>
</div>
<div class="checkbox">
<label><input type="checkbox" id="useRelativeScale" checked="checked">Use relative scale</label>
</div>
2015-03-09 13:56:19 +00:00
<button type="button" data-toggle="modal" data-target="#profileDlg" class="btn btn-primary">Edit profile</button>
2014-09-30 08:40:31 +00:00
</div>
</div>
</div>
2015-03-09 09:49:47 +00:00
<!-- visualizer -->
<div class="col-md-9">
<div class="panel panel-default">
<div class="panel-heading">
<big>Visualizer</big>
</div>
<div class="panel-body">
<svg id="svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800" height="500"></svg>
</div>
</div>
</div>
2014-09-30 08:40:31 +00:00
</div>
2014-11-08 09:28:14 +00:00
<!-- result listing -->
2014-11-08 10:16:35 +00:00
<div class="panel panel-default" style="display: none;" id="resultPanel">
2014-11-08 09:28:14 +00:00
<div class="panel-heading">
2014-11-08 10:16:35 +00:00
<big>Results (<span id="resultCount"></span>)</big>
2014-11-08 09:28:14 +00:00
</div>
<div class="panel-body">
<script id="template" type="text/x-handlers-template">
{{#if results}}
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>Name</th>
2015-01-05 11:28:39 +00:00
<th>Distance to user</th>
<th>Closest station</th>
<th>Distance to station</th>
2014-11-08 09:28:14 +00:00
<th>Score</th>
</tr>
</thead>
{{#each results}}
<tr>
2015-03-09 10:20:19 +00:00
<td><a href="javascript:accessReview({{id}});">{{name}}</a></td>
<th>{{distanceToUser}} km</th>
<th>{{closestStn}}</th>
<th>{{distanceToStn}} km</th>
2014-11-08 09:28:14 +00:00
<td>{{score}}</td>
</tr>
{{/each}}
</table>
{{/if}}
</script>
<div id="results"></div>
</div>
</div>
2014-11-08 09:54:39 +00:00
2014-09-30 08:40:31 +00:00
</div>
2015-03-09 09:50:24 +00:00
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/handlebars/handlebars.js"></script>
<script src="bower_components/underscore/underscore.js"></script>
<script src="bower_components/tinycolor/tinycolor.js"></script>
<script src="bower_components/snap.svg/dist/snap.svg-min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
2015-02-27 08:32:15 +00:00
<script src="scripts/search.js"></script>
<script src="scripts/grapher.js"></script>
2015-03-09 09:50:24 +00:00
2014-09-30 08:40:31 +00:00
</body>
</html>