diff --git a/app/models.py b/app/models.py index 338b4f0..39a8647 100644 --- a/app/models.py +++ b/app/models.py @@ -768,6 +768,8 @@ class ForumTopic(db.Model): author_id = db.Column(db.Integer, db.ForeignKey("user.id"), nullable=False) author = db.relationship("User") + wip = db.Column(db.Boolean, server_default="0") + type = db.Column(db.Enum(PackageType), nullable=False) title = db.Column(db.String(200), nullable=False) name = db.Column(db.String(30), nullable=True) diff --git a/app/scss/components.scss b/app/scss/components.scss index aac5e26..a90a510 100644 --- a/app/scss/components.scss +++ b/app/scss/components.scss @@ -451,3 +451,7 @@ table.fancyTable tfoot td { .table-topalign td { vertical-align: top; } + +.wiptopic a { + color: #7ac; +} diff --git a/app/tasks/forumtasks.py b/app/tasks/forumtasks.py index 5513fb2..338ffa2 100644 --- a/app/tasks/forumtasks.py +++ b/app/tasks/forumtasks.py @@ -87,8 +87,10 @@ def importTopicList(): links_by_id = getLinksFromModSearch() info_by_id = {} - getTopicsFromForum(11, out=info_by_id, extra={ 'type': PackageType.MOD }) - getTopicsFromForum(15, out=info_by_id, extra={ 'type': PackageType.GAME }) + getTopicsFromForum(11, out=info_by_id, extra={ 'type': PackageType.MOD, 'wip': False }) + getTopicsFromForum(9, out=info_by_id, extra={ 'type': PackageType.MOD, 'wip': True }) + getTopicsFromForum(15, out=info_by_id, extra={ 'type': PackageType.GAME, 'wip': False }) + getTopicsFromForum(50, out=info_by_id, extra={ 'type': PackageType.GAME, 'wip': True }) # Caches username_to_user = {} @@ -131,6 +133,7 @@ def importTopicList(): topic.title = title topic.name = name topic.link = link + topic.wip = info["wip"] topic.posts = info["posts"] topic.views = info["views"] topic.created_at = info["date"] diff --git a/app/templates/macros/topictable.html b/app/templates/macros/topictable.html index 7ae8a35..8a6b31c 100644 --- a/app/templates/macros/topictable.html +++ b/app/templates/macros/topictable.html @@ -2,6 +2,7 @@
Id | +Title | {% if show_author %}Author | {% endif %}Name | @@ -9,9 +10,15 @@Actions | |
---|---|---|---|---|---|
{{ topic.topic_id }} | -[{{ topic.type.value }}] {{ topic.title }} | ++ [{{ topic.type.value }}] + | ++ {{ topic.title }} + {% if topic.wip %}[WIP]{% endif %} + | {% if show_author %}{{ topic.author.display_name}} | {% endif %} diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html index f69b5cf..df31ce1 100644 --- a/app/templates/packages/view.html +++ b/app/templates/packages/view.html @@ -296,6 +296,7 @@ {{ t.title }} by {{ t.author.display_name }} + {% if t.wip %}[WIP]{% endif %} {% endfor %} diff --git a/app/templates/todo/list.html b/app/templates/todo/list.html index f2172a6..5e50c2e 100644 --- a/app/templates/todo/list.html +++ b/app/templates/todo/list.html @@ -65,6 +65,6 @@