mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-08 15:29:20 +00:00
Frontend authentication working.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html ng-app="wrestlingdev">
|
||||
<head>
|
||||
<base href="/">
|
||||
<base href="/#/">
|
||||
<title>WrestlingDev</title>
|
||||
|
||||
<!-- Latest compiled and minified CSS -->
|
||||
@@ -21,13 +21,30 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/">WrestlingDev</a>
|
||||
<a class="navbar-brand" href="/#/">WrestlingDev</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav navbar-right navbar-custom-link">
|
||||
<li><a href="/tournaments">Browse Tournaments</a></li>
|
||||
<li><a href="/about">About</a></li>
|
||||
<li><a href="/tutorials">Tutorials</a></li>
|
||||
<li><a href="/#/tournaments">Browse Tournaments</a></li>
|
||||
<li><a href="/#/about">About</a></li>
|
||||
<li><a href="/#/tutorials">Tutorials</a></li>
|
||||
<li class="dropdown" id="menuLogin" ng-controller="loginController">
|
||||
<a ng-if="user == null" class="dropdown-toggle" data-toggle="dropdown" id="navLogin">Login</a>
|
||||
<div ng-if="user == null" class="dropdown-menu" style="padding:17px;">
|
||||
<form class="form" id="formLogin">
|
||||
<input name="username" id="username" type="text" placeholder="Email" ng-model="credentials.email">
|
||||
<input name="password" id="password" type="password" placeholder="Password" ng-model="credentials.password"><br>
|
||||
<button type="button" id="btnLogin" class="btn" ng-click="login()">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<a ng-if="user != null" class="dropdown-toggle" data-toggle="dropdown" id="navLogout">{{user.email}}</a>
|
||||
<div ng-if="user != null" class="dropdown-menu" style="padding:17px;">
|
||||
<ul style="list-style-type: none;">
|
||||
<li ng-click="logout()">Logout</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
@@ -35,6 +52,10 @@
|
||||
|
||||
<div id="page-content">
|
||||
<div class="row no-margin">
|
||||
<div ng-if="alertMessage != null" ng-class="alertClass">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
{{alertMessage}}
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<!--left sidebar-->
|
||||
</div>
|
||||
@@ -66,7 +87,7 @@
|
||||
<script type='text/javascript' src="//wurfl.io/wurfl.js"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
<br>
|
||||
<p>If you would like to run a tournament, please click log in and then click sign up.</p>
|
||||
<br>
|
||||
<a href='/tournaments' class="btn btn-large btn-primary">Browse Tournaments</a>
|
||||
<a href='/#/tournaments' class="btn btn-large btn-primary">Browse Tournaments</a>
|
||||
<p></p>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="tournament in allTournaments">
|
||||
<td><a ng-href="/tournaments/{{tournament.id}}">{{ tournament.name }}</a></td>
|
||||
<td><a ng-href="/#/tournaments/{{tournament.id}}">{{ tournament.name }}</a></td>
|
||||
<td>{{ tournament.date }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
|
||||
<a href="/tournaments" class="btn btn-default">Back to browse tournaments</a>
|
||||
<a href="/#/tournaments" class="btn btn-default">Back to browse tournaments</a>
|
||||
<h1>
|
||||
{{ tournament.name }}
|
||||
</h1>
|
||||
<h1>{{ wrestler.matches(tournament.matches,tournament.weights[0].wrestlers[0]) }}</h1>
|
||||
<p>
|
||||
<strong>Address:</strong>
|
||||
{{ tournament.address }}
|
||||
@@ -22,16 +21,19 @@
|
||||
</p>
|
||||
<br>
|
||||
<div class="panel panel-default">
|
||||
<a class="panel-heading" data-toggle="collapse" href="#Schools" aria-expanded="false" style="display: block;">
|
||||
<h3 class="panel-title">School Lineups and Team Scores<span class="pull-left clickable"><i class="glyphicon glyphicon-chevron-down"></i></span></h3>
|
||||
<a class="panel-heading" ng-click="toggleSchools()" style="display: block;">
|
||||
<h3 class="panel-title">School Lineups and Team Scores<span class="pull-left clickable"><i ng-if="showSchools == false" class="glyphicon glyphicon-chevron-down"></i>
|
||||
<i ng-if="showSchools == true" class="glyphicon glyphicon-chevron-up"></i></span></h3>
|
||||
</a>
|
||||
<div id="Schools" class="panel-collapse collapse">
|
||||
<div id="Schools" ng-if="showSchools == true">
|
||||
<div class="panel-body">
|
||||
<button ng-if="isTournamentOwner(user.id,tournament.user_id)" class="btn btn-success btn-sm">Create New School</button>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Score</th>
|
||||
<th ng-if="isTournamentOwner(user.id,tournament.user_id)">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -40,6 +42,7 @@
|
||||
<tr ng-repeat="school in tournament.schools | orderBy : 'score'">
|
||||
<td>{{ school.name }}</td>
|
||||
<td>{{ school.score }}</td>
|
||||
<td ng-if="isTournamentOwner(user.id,tournament.user_id)"><button class="btn btn-sm">Edit</button><button class="btn btn-danger btn-sm">Destroy</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -48,10 +51,11 @@
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<a class="panel-heading" data-toggle="collapse" href="#Weights" aria-expanded="false" style="display: block;">
|
||||
<h3 class="panel-title">Weights and Seeds<span class="pull-left clickable"><i class="glyphicon glyphicon-chevron-down"></i></span></h3>
|
||||
<a class="panel-heading" ng-click="toggleWeightSeeds()" style="display: block;">
|
||||
<h3 class="panel-title">Weights and Seeds<span class="pull-left clickable"><i ng-if="showWeightSeeds == false" class="glyphicon glyphicon-chevron-down"></i>
|
||||
<i ng-if="showWeightSeeds == true" class="glyphicon glyphicon-chevron-up"></i></span></h3>
|
||||
</a>
|
||||
<div id="Weights" class="panel-collapse collapse">
|
||||
<div id="Weights" ng-if="showWeightSeeds == true">
|
||||
<div class="panel-body">
|
||||
<p>Click weight class for seeds</p>
|
||||
<br>
|
||||
@@ -75,10 +79,11 @@
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<a class="panel-heading" data-toggle="collapse" href="#Mats" aria-expanded="false" style="display: block;" >
|
||||
<h3 class="panel-title">Mats and Bout Board<span class="pull-left clickable"><i class="glyphicon glyphicon-chevron-down"></i></span></h3>
|
||||
<a class="panel-heading" ng-click="toggleBoutBoard()" style="display: block;" >
|
||||
<h3 class="panel-title">Mats and Bout Board<span class="pull-left clickable"><i ng-if="showBoutBoard == false" class="glyphicon glyphicon-chevron-down"></i>
|
||||
<i ng-if="showBoutBoard == true" class="glyphicon glyphicon-chevron-up"></i></span></h3>
|
||||
</a>
|
||||
<div id="Mats" class="panel-collapse collapse">
|
||||
<div id="Mats" ng-if="showBoutBoard == true">
|
||||
<div class="panel-body">
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
||||
Reference in New Issue
Block a user