-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
114 lines (109 loc) · 5.89 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<html>
<head>
<title>MArge Fifa</title>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="app.js"></script>
<link rel="stylesheet" href="app.css">
</head>
<body ng-app="fifa" ng-controller="MainCtrl">
<div style="width:800px" class="center-block">
<img src="http://www.medallia.com/wp-content/uploads/2013/07/medallia-logo-2013.png">
<img src="http://www.fifplay.com/images/public/fifa-15-logo.jpg" style="width:10%;height:10%;">
<ul class="nav nav-tabs" role="tablist">
<li ng-repeat="tournament in tournaments" ng-class="{active:theTournament===tournament}">
<a href="#" ng-click="selectTournament(tournament)" >{{tournament}}</a>
</li>
</ul>
<ul class="nav nav-justified" >
<li ng-repeat="phase in tournamentsConfig[theTournament].phases" ng-class="{active:thePhase===phase}">
<a href="#" ng-click="selectPhase(phase)" ng-class="{active:thePhase===phase}" >{{phase}}</a>
</li>
</ul>
<br>
<a ng-repeat="player in players" ng-click="removePlayer(player)" class="filterLabel label label-primary" href="#" role="button" > {{player}} </a>
<a ng-repeat="tagFilter in tagFilters | filter: '!'+thePhase" ng-click="removeTagFilter(tagFilter)" class="filterLabel label label-info" href="#" role="button" > {{tagFilter}} </a>
<table class="table table-hover center-block middleData" style="width:800px">
<thead>
<tr>
<th class="text-left">Date</th>
<th colspan="3" class="text-right">Home</th>
<th colspan="3">Away</th>
<!--th>Tags</th-->
</tr>
</thead>
<tbody>
<tr ng-repeat="match in filteredMatches = (matches | tagFilter: [theTournament] | matchFilter:players | tagFilter: tagFilters)">
<td>
{{match.date | date:'yyyy-MM-dd'}}
</td>
<td>
<img class="img-circle player {{match.home.players[0]}}" ng-click="addPlayer(match.home.players[0])" title="{{match.home.players[0]}}" >
<img class="img-circle player {{match.home.players[1]}}" ng-click="addPlayer(match.home.players[1])" title="{{match.home.players[1]}}">
</td>
<td>
<div class="team {{match.home.team}}"></div>
</td>
<td class="{{homeResulsClass(match)}}">
{{match.home.goals}}
<span ng-if="match.home.penalties">({{match.home.penalties}})</span>
</td>
<td class="{{awayResulsClass(match)}}">
{{match.away.goals}}
<span ng-if="match.away.penalties">({{match.away.penalties}})</span>
</td>
<td>
<div class="team {{match.away.team}}"></div>
</td>
<td>
<img class="img-circle player {{match.away.players[0]}}" ng-click="addPlayer(match.away.players[0])" title="{{match.away.players[0]}}">
<img class="img-circle player {{match.away.players[1]}}" ng-click="addPlayer(match.away.players[1])" title="{{match.away.players[1]}}">
</td>
<!--td>
<a ng-repeat="tag in match.tags | filter: '!'+theTournament | filter: '!'+thePhase" ng-click="addTagFilter(tag)" class="filterLabel label label-info" href="#" role="button" >{{tag}}</a>
</td -->
</tr>
<tr ng-hide="filteredMatches.length"><td colspan="8">Nada por aqui!</td></tr>
</tbody>
</table>
<table class="table table-hover center-block middleData" style="width:800px"
ng-show="hasStandings(theTournament, thePhase)">
<thead>
<tr>
<th>Posicion</th>
<th>Equipo</th>
<th>PJ</th>
<th>PG</th>
<th>PE</th>
<th>PP</th>
<th>GF</th>
<th>GC</th>
<th>DG</th>
<th class="points" >Puntos</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="position in calculateStandings(theTournament, thePhase, filteredMatches)">
<td>{{$index + 1}}</td>
<td>
<div ng-if="position.team" class="team {{position.team}}"></div>
<img class="img-circle player {{position.players[0]}}">
<img ng-if="position.players[1]" class="img-circle player {{position.players[1]}}">
</td>
<td>{{position.matchesPlayed}}</td>
<td>{{position.matchesWon}}</td>
<td>{{position.matchesTied}}</td>
<td>{{position.matchesLost}}</td>
<td>{{position.goalsScored}}</td>
<td>{{position.goalsReceived}}</td>
<td>{{position.goalsDiff}}</td>
<td class="points" >{{position.points}}</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>