mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-03 19:57:29 +01:00
Prompt users to leave approval thread comment when re-submitting
This commit is contained in:
parent
2303e70a8e
commit
8367fd14a8
@ -419,6 +419,7 @@ def move_to_state(package):
|
|||||||
flash(gettext("You don't have permission to do that"), "danger")
|
flash(gettext("You don't have permission to do that"), "danger")
|
||||||
return redirect(package.get_url("packages.view"))
|
return redirect(package.get_url("packages.view"))
|
||||||
|
|
||||||
|
old_state = package.state
|
||||||
package.state = state
|
package.state = state
|
||||||
msg = "Marked {} as {}".format(package.title, state.value)
|
msg = "Marked {} as {}".format(package.title, state.value)
|
||||||
|
|
||||||
@ -451,6 +452,10 @@ def move_to_state(package):
|
|||||||
return redirect(package.review_thread.get_view_url())
|
return redirect(package.review_thread.get_view_url())
|
||||||
else:
|
else:
|
||||||
return redirect(url_for('threads.new', pid=package.id, title='Package approval comments'))
|
return redirect(url_for('threads.new', pid=package.id, title='Package approval comments'))
|
||||||
|
elif (package.review_thread and
|
||||||
|
old_state == PackageState.CHANGES_NEEDED and package.state == PackageState.READY_FOR_REVIEW):
|
||||||
|
flash(gettext("Please comment in the approval thread so editors know what you have changed"), "warning")
|
||||||
|
return redirect(package.review_thread.get_view_url())
|
||||||
|
|
||||||
return redirect(package.get_url("packages.view"))
|
return redirect(package.get_url("packages.view"))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user