-
Notifications
You must be signed in to change notification settings - Fork 4
/
taskList.html
114 lines (113 loc) · 5.8 KB
/
taskList.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>BlockSense——Blockchain Based Trust Crowd-sensing Platform</title>
<link rel="stylesheet" type="text/css" href="dist/css/bootstrap.min.css">
<style type="text/css">pre{white-space: pre-wrap;word-wrap: break-word;}</style>
</head>
<body style="overflow: hidden;">
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<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="./index.html">BlockSense</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="./account.html">Profile <span class="sr-only">(current)</span></a></li>
<li class="active"><a href="#">Task List</a></li>
<li><a href="./receivedTask.html">Your Accepted Task(s)</a></li>
<li><a href="./publishTask.html">Your Published Task(s)</a></li>
</ul>
<form class="navbar-form navbar-right">
<div class="form-group">
<input type="text" class="form-control" placeholder="Contract address">
</div>
<button type="submit" class="btn btn-default">Search</button>
</form>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div style="height: 595px;width: 100%;padding: 0 20px 0;">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Published Task List</h3>
</div>
<div class="panel-body" style="overflow-y: auto;height: 545px;" ms-controller="taskList">
<div class="list-group">
<a href="#" class="list-group-item" ms-for="el in @data">
<h4 class="list-group-item-heading">
<span class="label label-success" ms-if="el.status==1">Unfinished</span>
<span class="label label-danger" ms-if="el.status==3">Finished</span>
<span class="label label-warning" ms-if="el.status==2">Aborted</span>
{{el.name}}
</h4>
<p class="list-group-item-text">Smart Contract Address: <span style="color: #3498db">{{el.contract}}</span></p>
<p class="list-group-item-text">Task Description: {{el.description}}</p>
<button type="button" class="btn btn-primary taskDetailInfo" style="position: absolute;right: 10px;top: 10px">View Details</button>
</a>
</div>
</div>
</div>
</div>
<!-- Modal -->
<button type="button" class="btn btn-primary" id="clickToAppear" style="display: none" data-toggle="modal" data-target="#myModal"></button>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" ms-controller="singleTask">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel"><span class="label label-success" ms-if="@data.status==1">Unfinished</span>
<span class="label label-danger" ms-if="@data.status==3">Finished</span>
<span class="label label-warning" ms-if="@data.status==2">Aborted</span>
{{@data.name}}
</h4>
</div>
<div class="modal-body">
<dl class="dl-horizontal">
<dt>Requester's Address</dt>
<dd>{{@data.requester}}</dd>
<dt>Contract Address</dt>
<dd>{{@data.contract}}</dd>
<dt>Task Description</dt>
<dd>{{@data.description}}</dd>
<dt># Required Data</dt>
<dd>{{@data.rewardNum}}</dd>
<dt># Collected Data</dt>
<dd>{{@data.dataCount}}</dd>
<dt>Task Rewards</dt>
<dd>{{@data.rewardUnit}} Wei</dd>
</dl>
<hr>
<strong>Contract ABI</strong>
<pre>
{{@data.abi}}
</pre>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="acceptTask">Accept Task</button>
</div>
</div>
</div>
</div>
</body>
<!-- Insert this line above script imports -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<script type="text/javascript" src="dist/js/web3.min.js"></script>
<script type="text/javascript" src="dist/js/avalon.min.js"></script>
<script type="text/javascript" src="dist/js/jquery.min.js"></script>
<script type="text/javascript" src="dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="dist/js/sweetalert2.all.min.js"></script>
<script type="text/javascript" src="dist/js/taskList.js"></script>
<!-- Insert this line after script imports -->
<script>if (window.module) module = window.module;</script>
</html>