mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-13 13:12:42 +00:00
Don't allow docs comments on unsupported versions
This commit is contained in:
@ -128,6 +128,11 @@ def manualarchive(request):
|
||||
|
||||
@login_required
|
||||
def commentform(request, itemid, version, filename):
|
||||
v = get_object_or_404(Version, tree=version)
|
||||
if not v.supported:
|
||||
# No docs comments on unsupported versions
|
||||
return HttpResponseRedirect("/docs/{0}/static/{1}".format(version, filename))
|
||||
|
||||
if request.method == 'POST':
|
||||
form = DocCommentForm(request.POST)
|
||||
if form.is_valid():
|
||||
|
@ -88,6 +88,7 @@ This page in other versions:
|
||||
{{page.content|safe}}
|
||||
</div>
|
||||
|
||||
{%if page.version.supported%}
|
||||
<div id="docComments">
|
||||
|
||||
<h2>Submit correction</h2>
|
||||
@ -99,6 +100,7 @@ please use
|
||||
to report a documentation issue.
|
||||
</p>
|
||||
</div>
|
||||
{%endif%}
|
||||
|
||||
<div id="docFooter">
|
||||
<a href="{{link_root}}/about/privacypolicy">Privacy Policy</a> |
|
||||
|
Reference in New Issue
Block a user