@@ -131,11 +133,13 @@ } {% else %} + {% if request.path != '/' %} {% endif %} + {% endif %} {% block extra_js %}{% endblock %} \ No newline at end of file diff --git a/nonpacks/templates/library/_project_card.html b/nonpacks/templates/library/_project_card.html index 5f15804..bed1fd9 100644 --- a/nonpacks/templates/library/_project_card.html +++ b/nonpacks/templates/library/_project_card.html @@ -21,6 +21,7 @@ {{ latest.version_name|default:"no versions" }} {% endwith %} {{ project.downloads }} + {{ project.rating_score }} diff --git a/nonpacks/templates/library/browse.html b/nonpacks/templates/library/browse.html index adef34a..b8f537b 100644 --- a/nonpacks/templates/library/browse.html +++ b/nonpacks/templates/library/browse.html @@ -57,6 +57,8 @@ diff --git a/nonpacks/templates/library/project_detail.html b/nonpacks/templates/library/project_detail.html index 9eaa742..9155074 100644 --- a/nonpacks/templates/library/project_detail.html +++ b/nonpacks/templates/library/project_detail.html @@ -81,6 +81,8 @@ {% if skins_manifest %}{% endif %} {% if mod_manifest %}{% endif %} + +
@@ -517,6 +519,105 @@
+
+
+

Rating

+ {% if rating_stats.total %} +
+ {{ rating_stats.percent }}% positive + {{ rating_stats.total }} vote{{ rating_stats.total|pluralize }} · {{ rating_stats.positive }} up · {{ rating_stats.negative }} down +
+
+
+
+
+ {% else %} +

No ratings yet — be the first to vote.

+ {% endif %} + + {% if can_comment %} +
+
+ {% csrf_token %} + + +
+
+ {% csrf_token %} + + +
+ {% if user_rating is not None %} +
+ {% csrf_token %} + + +
+ {% endif %} +
+ {% else %} +

Log in to rate this pack.

+ {% endif %} +
+
+ +
+
+

Forum

+ + {% if can_comment %} +
+ {% csrf_token %} + + +
+ {% else %} +

Log in to join the discussion.

+ {% endif %} + +
+ {% for comment in comments %} +
+
+ {{ comment.user.username }} + {{ comment.created_at|timesince }} ago + {% if comment.updated_at != comment.created_at %}· edited{% endif %} + {% if can_comment and comment.user == request.user %} + + Edit +
+ {% csrf_token %} + +
+
+ {% elif can_comment and request.user.is_staff %} + +
+ {% csrf_token %} + +
+
+ {% endif %} +
+
{{ comment.body|markdown }}
+ {% if can_comment and comment.user == request.user %} + + {% endif %} +
+ {% empty %} +

No comments yet.

+ {% endfor %} +
+
+
+