Show jobs in progress on mod page

master
rubenwardy 2017-01-19 23:00:42 +00:00
parent 03fc23a036
commit c40adba111
2 changed files with 13 additions and 1 deletions

View File

@ -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

View File

@ -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" %}