Show jobs in progress on mod page
parent
03fc23a036
commit
c40adba111
|
@ -38,12 +38,13 @@ router.get("/mod/:author/:modname", function(req, res) {
|
||||||
include: [{
|
include: [{
|
||||||
model: db.User,
|
model: db.User,
|
||||||
where: { username: req.params.author }
|
where: { username: req.params.author }
|
||||||
}]
|
}, db.Work]
|
||||||
}).then(function(mod) {
|
}).then(function(mod) {
|
||||||
if (mod) {
|
if (mod) {
|
||||||
var mod_c = db.convertRowToMod(mod)
|
var mod_c = db.convertRowToMod(mod)
|
||||||
switch (req.accepts("html", "json")) {
|
switch (req.accepts("html", "json")) {
|
||||||
case "html":
|
case "html":
|
||||||
|
mod_c.works = mod.works
|
||||||
res.render("mod", {
|
res.render("mod", {
|
||||||
title: mod.title,
|
title: mod.title,
|
||||||
mod: mod_c
|
mod: mod_c
|
||||||
|
|
|
@ -14,4 +14,15 @@ by
|
||||||
<a href="{{ mod.forum_url }}">Forum Topic</a> |
|
<a href="{{ mod.forum_url }}">Forum Topic</a> |
|
||||||
<a href="/mods/?a={{ mod.author }}">{{ mod.author }}'s mods</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" %}
|
{% include "footer" %}
|
||||||
|
|
Loading…
Reference in New Issue