-
Notifications
You must be signed in to change notification settings - Fork 0
/
incidents.html
177 lines (160 loc) · 7.04 KB
/
incidents.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">
<title>Simple Safety</title>
<!-- Bootstrap core CSS -->
<link href="{{ url_for('static', filename ='bootstrap.min.css') }}" rel="stylesheet">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="{{ url_for('static', filename ='ie10-viewport-bug-workaround.css') }}" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="{{ url_for('static', filename ='style.css') }}" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]
<script type="text/javascript" src="{{ url_for('static', filename = 'ie-emulation-modes-warning.js') }}"></script>-->
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<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="/dashboard/">Simple Safety Manager</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="/dashboard/">Dashboard</a></li>
{% if user_profile != None: %}
<li><a href="/profile/">Profile</a></li>
<li><a href="/gdisconnect/">Logout</a></li>
{% else: %}
<li><a href="/login/">Login</a></li>
{% endif %}
<li><a href="/resources/">Help</a></li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-md-2 sidebar">
<ul class="nav nav-sidebar">
<li><a href="/dashboard/">Dashboard</a></li>
<li class="active"><a href="/incidents/">Incidents<span class="sr-only">(current)</span></a></li>
<li><a href="/audits/">Audits</a></li>
<li><a href="/actions/">Action Items</a></li>
</ul>
{% if user_profile != None: %}
<ul class="nav nav-sidebar">
<li><a href="/incidents/new/">Submit an Incident</a></li>
<li><a href="/audits/new/">Submit an Audit</a></li>
<li><a href="/actions/new/">Submit an Action Item</a></li>
</ul>
{% endif %}
</div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<h1 class="page-header">Incident Manager</h1>
{% with messages = get_flashed_messages() %}
{% if messages %}
<hr>
<div class="flashes flash_msg">
{% for message in messages %}
{{ message }}
{% endfor %}
</div>
<hr>
{% endif %}
{% endwith %}
<h2 class="sub-header">Injury Rates</h2>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>First Aid Injury Rate</th>
<th>Recordable Injury Rate</th>
<th>Lost Time Injury Rate</th>
<th>Other Recordable Injury Rate</th>
<th>Total Incident Rate</th>
<th>Total Man Hours</th>
</tr>
</thead>
<tbody>
<tr>
<th>{{injury_rate[0]}}</th>
<th>{{injury_rate[1]}}</th>
<th>{{injury_rate[2]}}</th>
<th>{{injury_rate[3]}}</th>
<th>{{injury_rate[4]}}</th>
<th>{{manhours}}</th>
</tr>
</tbody>
</table>
</div>
<h2 class="sub-header">Incident Cases</h2>
<div class="table-responsive">
<table id = "incidents" class="table table-striped">
<thead>
<tr>
<th>Case ID</th>
<th>Date</th>
<th>Time</th>
<th>Type</th>
<th>Category</th>
<th>Injury Case</th>
<th>Property Damage</th>
<th>Description</th>
<th>Root Cause</th>
</tr>
</thead>
<tbody>
{% for i in range(length) %}
<tr>
<th><a href="/incidents/edit/{{incidents[i][0]}}">{{incidents[i][0]}}</a></th>
<th>{{incidents[i][1]}}</th>
<th>{{incidents[i][2]}}</th>
<th>{{incidents[i][3]}}</th>
<th>{{incidents[i][4]}}</th>
<th>{{incidents[i][5]}}</th>
<th>{{incidents[i][6]}}</th>
<th>{{incidents[i][7]}}</th>
<th>{{incidents[i][8]}}</th>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>window.jQuery || document.write("<script type='text/javascript' src='{{ url_for('static', filename='jquery.min.js') }}''><\/script>")</script>
<script type="text/javascript" src="{{ url_for('static', filename ='bootstrap.min.js') }}"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script type="text/javascript" src="{{ url_for('static', filename='ie10-viewport-bug-workaround.js') }}"></script>
<!-- Datatable Format -->
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.16/js/dataTables.bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#incidents').DataTable();
} );
</script>
</body>
</html>