-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
92 lines (84 loc) · 4.71 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html>
<html lang="en-us">
<head>
<title>Places</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta charset="UTF-8">
<!-- load styles -->
<link rel="stylesheet" href="lib/bootstrap.min.css" />
<link rel="stylesheet" href="styles.css" />
<!-- load scripts -->
<script src="lib/angular.min.js"></script>
<script src="http://code.angularjs.org/1.3.0-rc.2/angular-resource.min.js"></script>
<script src="lib/jquery-1.11.3.min.js"></script>
<script src="app.js"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAJeBlk2_T9wCCeSGzcS3hKooo-24HMjf0&libraries=places"></script>
</head>
<body ng-app="placesApp">
<header class="header">
<h3 class="container">Nearby Places</h3>
</header>
<div class="container">
<section class="section-list section col-lg-4 col-md-4 col-sm-4" ng-class="{'section-border': !nearbyPlaces.list || nearbyPlaces.list.length == 0}" id="searchPlaces" ng-controller="searchPlacesController">
<form ng-submit="submitForm()">
<div class="input-group">
<input class="form-control" ng-model="searchString" type="text" placeholder="Enter keyword to search, e.g Pizza">
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">Search</button>
</span>
</div>
<div>
<ul class="list-group places-list">
<li class="list-group-item" ng-repeat="place in nearbyPlaces.list" ng-class="{selected: $index === selected}">
<a class="places-list" href="#" ng-click="getPlaceDetails(place.place_id, $index)">
<b class="list-name">{{ place.name }}</b>
<span class="list-address">{{ place.formatted_address }}</span>
</a>
</li>
</ul>
<div ng-if="!nearbyPlaces.list || nearbyPlaces.list.length == 0">
<div class="no-results">
<p>No Search Results</p>
</div>
</div>
</div>
</form>
</section>
<section class="section-details section col-lg-8 col-md-8 col-sm-8" id="placeDetails" ng-controller="placeDetailsController">
<div id="map" class="map"></div>
<div ng-if="!(details | isEmpty)" class="place-details">
<h4 class="well header">{{ details.name }}</h4>
<div class="row">
<div class="col-lg-7 col-md-12 col-sm-12">
<div class="subsection address">
<b class="subheader">Address</b>
<p>{{ details.formatted_address }}</p>
<p>{{ details.formatted_phone_number }}</p>
</div>
<div class=" subsection websites">
<b class="subheader">Websites</b>
<p><a href="{{ details.website }}">{{ details.website }}</a></p>
<p><a href="{{ details.website }}">{{ details.url }}</a></p>
</div>
</div>
<div ng-if="(details.opening_hours.weekday_text.length > 0)" class="col-lg-5 col-md-12 col-sm-12">
<b class="subheader">Timings</b>
<ul>
<li ng-repeat="weekday in details.opening_hours.weekday_text">{{ weekday }}</li>
</ul>
</div>
</div>
<div ng-if="(details.reviews.length > 0)" class="row subsection">
<div class="col-lg-12 col-md-12 col-sm-12">
<b class="subheader">Reviews</b>
<p ng-if="!(details.rating | isEmpty)">Average Rating: {{ details.rating }}</p>
<ul class="reviews">
<li ng-repeat="review in details.reviews">{{ review.text }}</li>
</ul>
</div>
</div>
</div>
</section>
</div>
</body>
</html>