]> git.lizzy.rs Git - cheatdb.git/blobdiff - app/templates/threads/view.html
Add more obvious edit buttons for reviews
[cheatdb.git] / app / templates / threads / view.html
index 13097feabc7a2f94d9fb38e031b4ffc5e6bf3c77..b10d1e1d20649d82c7b4d91c9bfd595c15fc6067 100644 (file)
@@ -19,12 +19,29 @@ Threads
                {% endif %}
        {% endif %}
 
-       <h1>{% if thread.private %}&#x1f512; {% endif %}{{ thread.title }}</h1>
+       {% if current_user == thread.author and thread.review %}
+               <a class="btn btn-primary ml-1 float-right mr-2"
+                               href="{{ thread.review.package.getReviewURL() }}">
+                       <i class="fas fa-edit"></i>
+                       {{ _("Edit Review") }}
+               </a>
+       {% endif %}
 
-       {% if thread.package or current_user.is_authenticated %}
-               {% if thread.package %}
-                       <p>Package: <a href="{{ thread.package.getDetailsURL() }}">{{ thread.package.title }}</a></p>
+       <h1>
+               {% if thread.review %}
+                       {% if thread.review.recommends %}
+                               <i class="fas fa-thumbs-up mr-2" style="color:#6f6;"></i>
+                       {% else %}
+                               <i class="fas fa-thumbs-down mr-2" style="color:#f66;"></i>
+                       {% endif %}
                {% endif %}
+               {% if thread.private %}&#x1f512; {% endif %}{{ thread.title }}
+       </h1>
+
+       {% if thread.package %}
+               <p>
+                       Package: <a href="{{ thread.package.getDetailsURL() }}">{{ thread.package.title }}</a>
+               </p>
        {% endif %}
 
        {% if thread.private %}