diff options
author | rubenwardy <rw@rubenwardy.com> | 2019-01-28 19:41:24 +0000 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2019-01-28 19:41:24 +0000 |
commit | e9fe936aa98e9325034750f2f327ad4271c7e55d (patch) | |
tree | a506ff83efbdd886ef6e65e2cff7053ab244b01c | |
parent | 8afe17b984cae3d1e934f92024bbc683d4668c48 (diff) | |
download | cheatdb-e9fe936aa98e9325034750f2f327ad4271c7e55d.tar.xz |
Increase visibility of thread creation
-rw-r--r-- | app/flatpages/help/reporting.md | 2 | ||||
-rw-r--r-- | app/templates/packages/view.html | 7 | ||||
-rw-r--r-- | app/templates/threads/new.html | 9 | ||||
-rw-r--r-- | app/views/threads.py | 2 |
4 files changed, 18 insertions, 2 deletions
diff --git a/app/flatpages/help/reporting.md b/app/flatpages/help/reporting.md index 2ab7586..1b1beef 100644 --- a/app/flatpages/help/reporting.md +++ b/app/flatpages/help/reporting.md @@ -5,4 +5,4 @@ laws. We take copyright violation and other offenses very seriously. -<a href="https://rubenwardy.com/contact/" class="button btn_green">Contact</a> +<a href="https://rubenwardy.com/contact/" class="btn btn-success">Contact</a> diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html index d97e376..bd49a87 100644 --- a/app/templates/packages/view.html +++ b/app/templates/packages/view.html @@ -289,6 +289,13 @@ {{ render_threadlist(threads, list_group=True) }} </ul> </div> + + {% if package.approved and package.checkPerm(current_user, "CREATE_THREAD") and current_user != package.author and not current_user.rank.atLeast(current_user.rank.EDITOR) %} + <a class="float-right" + href="{{ url_for('new_thread_page', pid=package.id) }}"> + Report a problem with this listing + </a> + {% endif %} </aside> {% if not package.approved and (package.author == current_user or package.checkPerm(current_user, "APPROVE_NEW")) %} diff --git a/app/templates/threads/new.html b/app/templates/threads/new.html index fec4468..ffe6532 100644 --- a/app/templates/threads/new.html +++ b/app/templates/threads/new.html @@ -6,6 +6,15 @@ {% block content %} +{% if package and current_user != package.author and not current_user.rank.atLeast(current_user.rank.EDITOR) %} + {% if package.issueTracker %} + <div class="alert alert-warning"> + Found a bug? Post on the <a href="{{ package.issue_tracker }}">issue tracker</a> instead.<br /> + If the package shouldn't be on CDB - for example, if it doesn't work at all - then please let us know here. + </div> + {% endif %} +{% endif %} + {% from "macros/forms.html" import render_field, render_submit_field, render_checkbox_field %} <form method="POST" action="" enctype="multipart/form-data"> {{ form.hidden_tag() }} diff --git a/app/views/threads.py b/app/views/threads.py index c168a23..4972abd 100644 --- a/app/views/threads.py +++ b/app/views/threads.py @@ -209,4 +209,4 @@ def new_thread_page(): return redirect(url_for("thread_page", id=thread.id)) - return render_template("threads/new.html", form=form, allow_private_change=allow_change) + return render_template("threads/new.html", form=form, allow_private_change=allow_change, package=package) |