Add submission time to applymsg.
This commit is contained in:
parent
af90488927
commit
8dfe21acd4
|
@ -247,12 +247,14 @@ class ApplyMsg(db.Model):
|
||||||
number = db.Column(db.Integer)
|
number = db.Column(db.Integer)
|
||||||
reason = db.Column(db.String(600))
|
reason = db.Column(db.String(600))
|
||||||
status = db.Column(db.String(10))
|
status = db.Column(db.String(10))
|
||||||
|
time = db.Column(db.String(10))
|
||||||
|
|
||||||
def __init__(self,username, number, reason):
|
def __init__(self,username, number, reason):
|
||||||
self.username = username
|
self.username = username
|
||||||
self.number = number
|
self.number = number
|
||||||
self.reason = reason
|
self.reason = reason
|
||||||
self.status = "Processing"
|
self.status = "Processing"
|
||||||
|
self.time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "{\"id\":\"%d\", \"username\":\"%s\", \"number\": \"%d\", \"reason\":\"%s\", \"status\":\"%s\"}" % (self.id, self.username, self.number, self.reason, self.status)
|
return "{\"id\":\"%d\", \"username\":\"%s\", \"number\": \"%d\", \"reason\":\"%s\", \"status\":\"%s\", \"time\":\"%s\"}" % (self.id, self.username, self.number, self.reason, self.status, self.time)
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<p>
|
<p>
|
||||||
<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#AddApplication"><i class="fa fa-plus"></i> Add Application</button>
|
<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#AddApplication"><i class="fa fa-plus"></i> Apply For Beans</button>
|
||||||
</p>
|
</p>
|
||||||
<div class="modal inmodal" id="AddApplication" tabindex="-1" role="dialog" aria-hidden="true">
|
<div class="modal inmodal" id="AddApplication" tabindex="-1" role="dialog" aria-hidden="true">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
|
@ -74,6 +74,7 @@
|
||||||
<th>Application ID</th>
|
<th>Application ID</th>
|
||||||
<th>Username</th>
|
<th>Username</th>
|
||||||
<th>Number</th>
|
<th>Number</th>
|
||||||
|
<th>Submission Time</th>
|
||||||
<th>Reason</th>
|
<th>Reason</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -83,7 +84,8 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ application.id }}</td>
|
<td>{{ application.id }}</td>
|
||||||
<td>{{ application.username }}</td>
|
<td>{{ application.username }}</td>
|
||||||
<td>{{ application.number }} beans</td>
|
<td>{{ application.number }} <img src='/static/img/bean.png'></td>
|
||||||
|
<td>{{ application.time }}</td>
|
||||||
<td>{{ application.reason }}</td>
|
<td>{{ application.reason }}</td>
|
||||||
<td>{{ application.status }}</td>
|
<td>{{ application.status }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -227,6 +227,7 @@
|
||||||
<th>Application ID</th>
|
<th>Application ID</th>
|
||||||
<th>Username</th>
|
<th>Username</th>
|
||||||
<th>Number</th>
|
<th>Number</th>
|
||||||
|
<th>Submission Time</th>
|
||||||
<th>Reason</th>
|
<th>Reason</th>
|
||||||
<th>Command</th>
|
<th>Command</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -237,6 +238,7 @@
|
||||||
<td>{{ application.id }}</td>
|
<td>{{ application.id }}</td>
|
||||||
<td>{{ application.username }}</td>
|
<td>{{ application.username }}</td>
|
||||||
<td>{{ application.number }} beans</td>
|
<td>{{ application.number }} beans</td>
|
||||||
|
<td>{{ application.time }}</td>
|
||||||
<td>{{ application.reason }}</td>
|
<td>{{ application.reason }}</td>
|
||||||
<td><a class="btn btn-xs btn-info" href="/beans/admin/{{ application.id }}/agree/">Agree</a>
|
<td><a class="btn btn-xs btn-info" href="/beans/admin/{{ application.id }}/agree/">Agree</a>
|
||||||
<a class="btn btn-xs btn-danger" href="/beans/admin/{{ application.id }}/reject/">Reject</a></td>
|
<a class="btn btn-xs btn-danger" href="/beans/admin/{{ application.id }}/reject/">Reject</a></td>
|
||||||
|
|
Loading…
Reference in New Issue