Show jobs in progress on mod page
This commit is contained in:
parent
03fc23a036
commit
c40adba111
@ -38,12 +38,13 @@ router.get("/mod/:author/:modname", function(req, res) {
|
||||
include: [{
|
||||
model: db.User,
|
||||
where: { username: req.params.author }
|
||||
}]
|
||||
}, db.Work]
|
||||
}).then(function(mod) {
|
||||
if (mod) {
|
||||
var mod_c = db.convertRowToMod(mod)
|
||||
switch (req.accepts("html", "json")) {
|
||||
case "html":
|
||||
mod_c.works = mod.works
|
||||
res.render("mod", {
|
||||
title: mod.title,
|
||||
mod: mod_c
|
||||
|
@ -14,4 +14,15 @@ by
|
||||
<a href="{{ mod.forum_url }}">Forum Topic</a> |
|
||||
<a href="/mods/?a={{ mod.author }}">{{ mod.author }}'s mods</a>
|
||||
|
||||
<h3>Jobs</h3>
|
||||
|
||||
<ul>
|
||||
{% for work in mod.works %}
|
||||
<li>{{ work.work_type }}
|
||||
[{% if work.workerId %}assigned to worker {{ work.workerId}}{% else %}Queued{% endif %}]</li>
|
||||
{% else %}
|
||||
<li><i>No jobs in progress</i></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% include "footer" %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user