-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
106 lines (103 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>xim-config-cloud</title>
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/jquery.dataTables.min.css" rel="stylesheet" />
<style>
body {
padding-top: 50px;
}
.starter-template {
padding: 40px 15px;
text-align: center;
}
</style>
<script data-main="scripts/main" src="scripts/require.js"></script>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">xim-cloud-config</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<!--<li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>-->
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<div class="container">
<div class="starter-template">
<!--<h1>Bootstrap starter template</h1>
<p class="lead">Use this document as a way to quickly start any new project.<br> All you get is this text and a mostly barebones HTML document.</p>-->
<div class="configs-list"></div>
<div id="modal" class="modal fade" role="dialog"></div>
</div>
</div>
<script type="text/template" id="config-list-template">
<table>
<thead>
<tr>
<th>Game</th>
<th>System</th>
<th>Device</th>
<th>Creator</th>
<th>Rating</th>
</tr>
</thead>
<tbody>
<% _.each(configs, function(config) { %>
<tr>
<td><a href="#/edit/<%= config.id %>"><%- config.game == null ? "Game Not Set" : config.game %></a></td>
<td><%- config.system == null ? "System Not Set" : config.system %></td>
<td><%- config.device == null ? "Device Not Set" : config.device %></td>
<td><%- config.creator == null ? "Creator Not Set" : config.creator %></td>
<td><%- (config.positive_votes - config.negative_votes) %></td>
</tr>
<% }); %>
</tbody>
</table>
</script>
<script type="text/template" id="config-edit-template">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">Configuration Details</h4>
</div>
<div class="modal-body">
<form role="form">
<div class="form-group">
<p>Creator: <%- config.creator %></p>
<label for="game">Game</label>
<input type="text" id="game" value="<%- config.game %>" class="form-control" />
<label for="device">Device</label>
<input type="text" id="device" value="<%- config.device %>" class="form-control" />
<label for="system">System</label>
<input type="text" id="system" value="<%- config.system %>" class="form-control" />
<label for="ballistics">Ballistics</label>
<textarea id="ballistics" class="form-control" rows="4"><%- config.value %></textarea>
<p>Rating: <%- (config.positive_votes - config.negative_votes) %></p>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<!--<button type="button" class="btn btn-primary">Save changes</button>-->
</div>
</div>
</div>
</script>
</body>
</html>