diff --git a/README.md b/README.md index 8dc588b..6a4f38c 100644 --- a/README.md +++ b/README.md @@ -60,5 +60,5 @@ rm db.sqlite && python setup.py -t && FLASK_CONFIG=../config.cfg FLASK_APP=app/_ FLASK_CONFIG=../config.cfg FLASK_APP=app/__init__.py flask db migrate # Run migration -FLASK_CONFIG=../config.cfg FLASK_APP=app/__init__.py flask db migrate +FLASK_CONFIG=../config.cfg FLASK_APP=app/__init__.py flask db upgrade ``` diff --git a/app/templates/todo/list.html b/app/templates/todo/list.html index 20e8f4f..f2172a6 100644 --- a/app/templates/todo/list.html +++ b/app/templates/todo/list.html @@ -5,8 +5,10 @@ {% endblock %} {% block content %} - {% if canApproveNew %} -

Packages Awaiting Approval

+

Awaiting Approval

+ + {% if canApproveNew and packages %} +

Packages

{% endif %} - {% if canApproveScn %} -

Screenshots Awaiting Approval

+ {% if canApproveScn and screenshots %} +

Screenshots

{% endif %} - {% if canApproveRel %} -

Releases Awaiting Approval

+ {% if canApproveRel and releases %} +

Releases

{% endif %} -

Forum Topics without a Package

+ {% if not (packages or screenshots or releases) %} +

+ All done! +

+ {% endif %} + +

Unadded Topic List

There are {{ topics_to_add }} packages - to be added to cdb. + to be added to cdb, based on forum topics picked up by Krock's mod search.

{% endblock %} diff --git a/app/templates/users/user_profile_page.html b/app/templates/users/user_profile_page.html index 7181fc2..5c5113b 100644 --- a/app/templates/users/user_profile_page.html +++ b/app/templates/users/user_profile_page.html @@ -100,24 +100,31 @@ {% if topics_to_add %}
-

Topics to Add

+

Unadded Packages

- - - - - - - - {% for topic in topics_to_add %} +
+

+ List of your topics without a matching package. + Powered by Krock's Mod Search. +

+ +
IdTitleNameLink
- - - - + + + + - {% endfor %} -
{{ topic.topic_id }}[{{ topic.getType().value }}] {{ topic.title }}{{ topic.name or ""}}{{ topic.link | domain }}IdTitleNameLink
+ {% for topic in topics_to_add %} + + {{ topic.topic_id }} + [{{ topic.getType().value }}] {{ topic.title }} + {{ topic.name or ""}} + {{ topic.link | domain }} + + {% endfor %} + +
{% endif %} diff --git a/app/views/packages/todo.py b/app/views/packages/todo.py index 9553ef2..d4526ee 100644 --- a/app/views/packages/todo.py +++ b/app/views/packages/todo.py @@ -58,6 +58,7 @@ def todo_topics_page(): topics = KrockForumTopic.query \ .filter(~ db.exists().where(Package.forums==KrockForumTopic.topic_id)) \ + .order_by(db.asc(KrockForumTopic.title)) \ .all() return render_template("todo/topics.html", topics=topics, total=total) diff --git a/app/views/users.py b/app/views/users.py index 86219f9..51efd1d 100644 --- a/app/views/users.py +++ b/app/views/users.py @@ -101,6 +101,7 @@ def user_profile_page(username): topics_to_add = KrockForumTopic.query \ .filter_by(author_id=user.id) \ .filter(~ db.exists().where(Package.forums==KrockForumTopic.topic_id)) \ + .order_by(db.asc(KrockForumTopic.title)) \ .all() # Process GET or invalid POST