-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.html
146 lines (124 loc) · 5.9 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
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
<!DOCTYPE html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"></script>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" />
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script src="grv.js"></script>
</head>
<body>
<a href="https://github.com/bduggan/gcis-report-viewer"><img style="position: absolute; z-index:10;top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png"></a>
<nav class="navbar navbar-default" role="navigation" style='margin-bottom:0px;'>
<div class='colllapse navbar-collapse'>
<span class='navbar-brand'>GCIS Report Viewer</span>
<div class="navbar-form navbar-left">
<span class='btn btn-default btn-sm'data-toggle="modal" data-target="#settings">
<span class="glyphicon glyphicon-cog"></span> settings
</span>
</div>
</div>
</nav>
<small>powered by the Global Change Information System on <span id='server'></span></small>
<br>
<div class="modal" id="settings">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Settings</h4>
</div>
<div class="modal-body">
<form role="form" class="form-horizontal">
<div class="form-group">
<label for="inputServer" class="col-sm-2 control-label">Server</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="input_server" placeholder="Server URL">
</div>
</div>
<div class="form-group">
<label for="inputReport" class="col-sm-2 control-label">Report</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="input_report_identifier" placeholder="report identifier">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" onclick='update_settings();'>apply changes</button>
<button type="button" class="btn btn-default" data-dismiss="modal">close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<h4><span id='report_identifier'></span> report : <span id='report_title'></span></h4>
<div id='main'>
</div>
<script id='report_button' type='text/template'>
<div id='report'><h3>report</h3>
<span class="btn btn-default report_link" id="report_<%= identifier %>" report_identifier="<%= identifier %>"><%= identifier %> : <%= title %></span>
</div>
</script>
<script id='chapter_button' type='text/template'>
<span class="btn btn-default chapter_link" id="chapter_<%= identifier %>" chapter_identifier="<%= identifier %>" href="<%- uri %>"><%= number %> <%= identifier %></a>
</script>
<script id='finding_button' type='text/template'>
<span class="btn btn-default finding_link" id='finding_<%= identifier %>' finding_identifier="<%= identifier %>" href="<%- uri %>"><%= ordinal %> <%= identifier %></a>
</script>
<script id='table_button' type='text/template'>
<span class="btn btn-default table_link" id='table_<%= identifier %>' table_identifier="<%= identifier %>" href="<%- uri %>"><%= ordinal %> <%= identifier %></a>
</script>
<script id='figure_button' type='text/template'>
<span class="btn btn-default figure_link" id='figure_<%= identifier %>' figure_identifier="<%= identifier %>" href="<%- uri %>"><%= ordinal %> <%= identifier %></a>
</script>
<script id='chapter_contents' type='text/template'>
<div id='chapter_contents_list'>
<h3>chapter <%= number %> : <%= title %></h3>
<span class="btn btn-default findings" id='category_findings'>findings</span>
<span class="btn btn-default figures" id='category_figures'>figures</span>
<span class="btn btn-default tables" id='category_tables'>tables</span>
<span class="btn btn-default references" id='category_references'>references</span>
</div>
</script>
<script id='show_finding' type='text/template'>
<div id='shown_finding'>
<h3>finding <%= ordinal %>: <%= identifier %></h3>
<div class='well'>
<dl>
<dt>statement</dt>
<dd><%= statement %></dd>
</dl>
</div>
</div>
</script>
<script id='show_table' type='text/template'>
<div id='shown_table'>
<h3>table <%= ordinal %>: <%= identifier %></h3>
<% if (typeof(files) != "undefined") { %>
<div class='row-fluid'>
<% _.each(files,function(item){ %>
<img src="<%= server %><%= item.url %>" class="img-responsive" />
<% }) %>
</div>
<% } %>
</div>
</script>
<script id='show_figure' type='text/template'>
<div id='shown_figure'>
<h3>figure <%= ordinal %>: <%= title %></h3>
<div class='row-fluid'>
<% _.each(files,function(item){ %>
<% console.log(item); %>
<img class="img-responsive col-md-3" src="<%= item.href %>" style='border:1px solid black;' />
<% }) %>
</div>
<div class='row-fluid'>
<% _.each(images,function(item){ %>
<div class='col-md-3 image_identifier' image_identifier="<%= item.identifier %>">
<%= item.identifier %>
</div>
<% }) %>
</div>
</div>
</script>
</body>
</html>