1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-09 23:44:52 +00:00

Added a search to both api and frontend

This commit is contained in:
2016-03-02 14:08:14 +00:00
parent 817e1fb0c1
commit 9bd36d2cb0
4 changed files with 46 additions and 10 deletions

View File

@@ -36,24 +36,27 @@
</div>
<div class="col-md-8" style="padding-left: 2%;">
<div class="container" ui-view="main" ng-controller="tournamentsController">
<h2>All Tournaments</h2>
<h2>Upcoming Tournaments</h2>
<br>
<form ng-submit="searchTournaments()">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search by name or date YYYY-MM-DD" ng-model="searchTerms">
<span class="input-group-btn">
<button class="btn btn-default" type="submit" id="submit">Search</button>
</span>
</div>
</form>
<br>
<table class="table">
<thead class="font-spot-color">
<tr>
<th>Name</th>
<th>Address</th>
<th>Director</th>
<th>Director Email</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="tournament in allTournaments">
<td>{{ tournament.name }}</td>
<td>{{ tournament.address }}</td>
<td>{{ tournament.director }}</td>
<td>{{ tournament.director_email }}</td>
<td>{{ tournament.date }}</td>
</tr>
</tbody>