]> git.lizzy.rs Git - cheatdb.git/blobdiff - app/templates/packages/view.html
Add comment system
[cheatdb.git] / app / templates / packages / view.html
index 6ed5bbe68b732b76f02c9ce38376d80023b4763b..3a83995907b4566d4cb723291f478b3926b59a8b 100644 (file)
                        {% endif %}
                        <div style="clear: both;"></div>
                </div>
+
+               {% if package.author == current_user or package.checkPerm(current_user, "APPROVE_NEW") %}
+                       {% if review_thread %}
+                               {% from "macros/threads.html" import render_thread %}
+                               {{ render_thread(review_thread, current_user) }}
+                       {% else %}
+                               <div class="box box_grey alert alert-info">
+                                       Privately ask a question or give feedback
+
+                                       <a class="alert_right button" href="{{ url_for('new_thread_page', pid=package.id, title='Package approval comments') }}">Open Thread</a>
+                               </div>
+                       {% endif %}
+               {% endif %}
        {% endif %}
 
        <h1>{{ package.title }} by {{ package.author.display_name }}</h1>
                        {% endfor %}
                </ul>
        {% endif %}
+
+       {% if similar_topics %}
+               <h3>Similar Forum Topics</h3>
+               {% if not package.approved and package.type == package.type.MOD %}
+                       <div class="box box_grey alert alert-warning">
+                               Please make sure that this package has the right to
+                               the name '{{ package.name }}'.
+                               See the
+                               <a href="/policy_and_guidance/">Inclusion Policy</a>
+                               for more info.
+                       </div>
+               {% endif %}
+               <ul>
+                       {% for t in similar_topics %}
+                               <li>
+                                       [{{ t.getType().value }}]
+                                       <a href="https://forum.minetest.net/viewtopic.php?t={{ t.topic_id }}">
+                                               {{ t.title }} by {{ t.author.display_name }}
+                                       </a>
+                               </li>
+                       {% endfor %}
+               </ul>
+       {% endif %}
 {% endblock %}