mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00
Update layout of documentation navigation pages
* Move links to current manuals to /docs/, decommission /docs/manuals/ * Add link to /docs/current/ with a large button * Add links to /docs/devel/ at the bottom of the version table * Remove translated manuals from left nav menu, since they are in the right one * Remove redundant wording around "comprehensive manual" * Clean up some incorrect template tags Discussion: https://www.postgresql.org/message-id/CABUevEymaWDL4JywHxBDBATUUPPrAf4_tGwin4CtGFdQ5tx5Hg@mail.gmail.com
This commit is contained in:
@ -1161,6 +1161,10 @@ hr.eventseparator {
|
|||||||
margin: 1em auto;
|
margin: 1em auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-double-width {
|
||||||
|
width: 28em;
|
||||||
|
}
|
||||||
|
|
||||||
.btn-center {
|
.btn-center {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -182,7 +182,7 @@ def redirect_root(request, version):
|
|||||||
def root(request):
|
def root(request):
|
||||||
versions = Version.objects.filter(Q(supported=True) | Q(testing__gt=0, tree__gt=0)).order_by('-tree')
|
versions = Version.objects.filter(Q(supported=True) | Q(testing__gt=0, tree__gt=0)).order_by('-tree')
|
||||||
return render_pgweb(request, 'docs', 'docs/index.html', {
|
return render_pgweb(request, 'docs', 'docs/index.html', {
|
||||||
'versions': versions,
|
'versions': [_VersionPdfWrapper(v) for v in versions],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@ -216,10 +216,8 @@ class _VersionPdfWrapper(object):
|
|||||||
|
|
||||||
|
|
||||||
def manuals(request):
|
def manuals(request):
|
||||||
versions = Version.objects.filter(Q(supported=True) | Q(testing__gt=0, tree__gt=0)).order_by('-tree')
|
# Legacy URL for manuals, redirect to the main docs page
|
||||||
return render_pgweb(request, 'docs', 'docs/manuals.html', {
|
return HttpResponsePermanentRedirect('/docs/')
|
||||||
'versions': [_VersionPdfWrapper(v) for v in versions],
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
def manualarchive(request):
|
def manualarchive(request):
|
||||||
|
@ -30,12 +30,8 @@ sitenav = {
|
|||||||
],
|
],
|
||||||
'docs': [
|
'docs': [
|
||||||
{'title': 'Documentation', 'link': '/docs/'},
|
{'title': 'Documentation', 'link': '/docs/'},
|
||||||
{'title': 'Manuals', 'link': '/docs/manuals/', 'submenu': [
|
{'title': 'Manuals', 'link': '/docs/', 'submenu': [
|
||||||
{'title': 'Archive', 'link': '/docs/manuals/archive/'},
|
{'title': 'Archive', 'link': '/docs/manuals/archive/'},
|
||||||
{'title': 'Chinese', 'link': 'http://www.postgres.cn/docs'},
|
|
||||||
{'title': 'French', 'link': 'https://docs.postgresql.fr/'},
|
|
||||||
{'title': 'Japanese', 'link': 'https://www.postgresql.jp/document/'},
|
|
||||||
{'title': 'Russian', 'link': 'https://postgrespro.ru/docs/postgresql'},
|
|
||||||
]},
|
]},
|
||||||
{'title': 'Release Notes', 'link': '/docs/release/'},
|
{'title': 'Release Notes', 'link': '/docs/release/'},
|
||||||
{'title': 'Books', 'link': '/docs/books/'},
|
{'title': 'Books', 'link': '/docs/books/'},
|
||||||
|
@ -10,20 +10,23 @@ If you are still using any of these releases, you are strongly advised to upgrad
|
|||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead class="thead-light">
|
<thead class="thead-light">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Online Version</th>
|
<th class="w-25">Online Version</th>
|
||||||
<th>PDF Version</th>
|
<th>PDF Version</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{%for v in versions%}
|
{%for v in versions%}
|
||||||
<tr{%if forloop.last%}{%endif%}>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="/docs/{{v.numtree}}/{{v.indexname}}">{{v.treestring}}</a>
|
<a href="/docs/{{v.numtree}}/{{v.indexname}}">{{v.treestring}}</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{%if v.a4pdf%}Comprehensive Manual: <a href="/files/documentation/pdf/{{v.numtree}}/postgresql-{{v.numtree}}-A4.pdf">A4 PDF</a> <span class="txtMediumGrey">({{v.a4pdf|filesizeformat}})</span>{%endif%}
|
{%if v.a4pdf or v.uspdf%}
|
||||||
{%if v.uspdf%}Comprehensive Manual: <a href="/files/documentation/pdf/{{v.numtree}}/postgresql-{{v.numtree}}-US.pdf">US PDF</a> <span class="txtMediumGrey">({{v.uspdf|filesizeformat}})</span>{%endif%}
|
{%if v.a4pdf%}<a href="/files/documentation/pdf/{{v.numtree}}/postgresql-{{v.numtree}}-A4.pdf">A4 PDF</a> <span class="txtMediumGrey">({{v.a4pdf|filesizeformat}})</span>{%endif%}
|
||||||
{%if not v.a4pdf and not v4.uspdf%}PDF version not available{%endif%}
|
{%if v.a4pdf and v.uspdf%} • {%endif%}
|
||||||
|
{%if v.uspdf%}<a href="/files/documentation/pdf/{{v.numtree}}/postgresql-{{v.numtree}}-US.pdf">US PDF</a> <span class="txtMediumGrey">({{v.uspdf|filesizeformat}})</span>{%endif%}
|
||||||
|
{%else%}PDF version not available
|
||||||
|
{%endif%}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{%endfor%}
|
{%endfor%}
|
||||||
|
@ -7,35 +7,58 @@
|
|||||||
<section>
|
<section>
|
||||||
<h1>Documentation <i class="far fa-file-alt"></i></h1>
|
<h1>Documentation <i class="far fa-file-alt"></i></h1>
|
||||||
</section>
|
</section>
|
||||||
<p>This section contains <a href="/docs/manuals/">current</a>
|
<p>
|
||||||
and <a href="/docs/manuals/archive/">archived</a> manuals for PostgreSQL users. You can read the <a href="/docs/current/release.html">release notes</a>, and view a listing of <a href="/docs/books/">books</a>
|
<a class="btn btn-primary btn-double-width" href="/docs/current/">View the manual</a>
|
||||||
written about PostgreSQL.</p>
|
</p>
|
||||||
|
|
||||||
|
<h2>Manuals <i class="fas fa-book"></i></h2>
|
||||||
|
<p>
|
||||||
|
You can view the manual for an older version or download a PDF of a manual from the below table.
|
||||||
|
</p>
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead class="thead-light">
|
||||||
|
<tr>
|
||||||
|
<th class="w-25">Online Version</th>
|
||||||
|
<th>PDF Version</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{%for v in versions%}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="/docs/{{v.numtree}}/index.html">{{v.treestring}}</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{%if v.a4pdf or v.uspdf%}
|
||||||
|
{%if v.a4pdf%}<a href="/files/documentation/pdf/{{v.numtree}}/postgresql-{{v.numtree}}-A4.pdf">A4 PDF</a> <span class="txtMediumGrey">({{v.a4pdf|filesizeformat}})</span>{%endif%}
|
||||||
|
{%if v.a4pdf and v.uspdf%}•{%endif%}
|
||||||
|
{%if v.uspdf%}<a href="/files/documentation/pdf/{{v.numtree}}/postgresql-{{v.numtree}}-US.pdf">US PDF</a> <span class="txtMediumGrey">({{v.uspdf|filesizeformat}})</span>{%endif%}
|
||||||
|
{%else%}PDF version not available
|
||||||
|
{%endif%}
|
||||||
|
</tr>
|
||||||
|
{%endfor%}
|
||||||
|
<tr>
|
||||||
|
<td><a href="/docs/devel/index.html">Development snapshot</a></td>
|
||||||
|
<td>PDF version not available</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Looking for documentation for an older, unsupported, version? Check the
|
||||||
|
<a href="/docs/manuals/archive/">archive</a> of older manuals.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<section>
|
<section>
|
||||||
<h2>Online Manuals</h2>
|
<h2>Translated Manuals</h2>
|
||||||
</section>
|
</section>
|
||||||
<dl>
|
<ul>
|
||||||
<dd>
|
<li><a href="http://www.postgres.cn/docs" target="_blank" rel="noopener">Chinese</a></li>
|
||||||
<ul>
|
<li><a href="https://docs.postgresql.fr" target="_blank" rel="noopener">French</a></li>
|
||||||
{% for version in versions %}
|
<li><a href="https://www.postgresql.jp/document/" target="_blank" rel="noopener">Japanese</a></li>
|
||||||
<li>
|
<li><a href="https://postgrespro.ru/docs/postgresql" target="_blank" rel="noopener">Russian</a></li>
|
||||||
<a href="/docs/{{ version.numtree }}/index.html">{{ version.treestring }}</a>
|
</ul>
|
||||||
</li>
|
|
||||||
{%endfor%}
|
|
||||||
</ul>
|
|
||||||
</dd>
|
|
||||||
<dt>Translated Manuals</dt>
|
|
||||||
<dd>
|
|
||||||
<ul>
|
|
||||||
<li><a href="http://www.postgres.cn/docs" target="_blank" rel="noopener">Chinese</a></li>
|
|
||||||
<li><a href="https://docs.postgresql.fr" target="_blank" rel="noopener">French</a></li>
|
|
||||||
<li><a href="https://www.postgresql.jp/document/" target="_blank" rel="noopener">Japanese</a></li>
|
|
||||||
<li><a href="https://postgrespro.ru/docs/postgresql" target="_blank" rel="noopener">Russian</a></li>
|
|
||||||
</ul>
|
|
||||||
</dd>
|
|
||||||
<dd><p></p><a href="/docs/manuals/">More manuals</a></dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
{%extends "base/page.html"%}
|
|
||||||
{%block title%}Manuals{%endblock%}
|
|
||||||
{%block contents%}
|
|
||||||
|
|
||||||
<h1>Manuals <i class="fas fa-book"></i></h1>
|
|
||||||
|
|
||||||
<table class="table table-striped">
|
|
||||||
<thead class="thead-light">
|
|
||||||
<tr>
|
|
||||||
<th>Online Version</th>
|
|
||||||
<th>PDF Version</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{%for v in versions%}
|
|
||||||
<tr{%if forloop.last%}{%endif%}>
|
|
||||||
<td>
|
|
||||||
<a href="/docs/{{v.numtree}}/index.html">{{v.treestring}}</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{%if v.a4pdf or v.uspdf%}
|
|
||||||
{%if v.a4pdf%}Comprehensive Manual: <a href="/files/documentation/pdf/{{v.numtree}}/postgresql-{{v.numtree}}-A4.pdf">A4 PDF</a> <span class="txtMediumGrey">({{v.a4pdf|filesizeformat}})</span>{%endif%}
|
|
||||||
{%if v.uspdf%}Comprehensive Manual: <a href="/files/documentation/pdf/{{v.numtree}}/postgresql-{{v.numtree}}-US.pdf">US PDF</a> <span class="txtMediumGrey">({{v.uspdf|filesizeformat}})</span>{%endif%}
|
|
||||||
{%if not v.a4pdf and not v4.uspdf%}PDF version not available{%endif%}
|
|
||||||
{%endif%}
|
|
||||||
</tr>
|
|
||||||
{%endfor%}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>Please see the <a href="/docs/manuals/archive/">manual archive</a> for documentation for older releases.
|
|
||||||
The DocBook SGML source for the manuals is available as part of the PostgreSQL source download available in
|
|
||||||
the <a href="/ftp/">FTP area</a>.</p>
|
|
||||||
{%endblock%}
|
|
Reference in New Issue
Block a user