mirror of
https://github.com/postgres/pgweb.git
synced 2025-07-25 16:02:27 +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;
|
||||
}
|
||||
|
||||
.btn-double-width {
|
||||
width: 28em;
|
||||
}
|
||||
|
||||
.btn-center {
|
||||
text-align: center;
|
||||
display: block;
|
||||
|
@ -182,7 +182,7 @@ def redirect_root(request, version):
|
||||
def root(request):
|
||||
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', {
|
||||
'versions': versions,
|
||||
'versions': [_VersionPdfWrapper(v) for v in versions],
|
||||
})
|
||||
|
||||
|
||||
@ -216,10 +216,8 @@ class _VersionPdfWrapper(object):
|
||||
|
||||
|
||||
def manuals(request):
|
||||
versions = Version.objects.filter(Q(supported=True) | Q(testing__gt=0, tree__gt=0)).order_by('-tree')
|
||||
return render_pgweb(request, 'docs', 'docs/manuals.html', {
|
||||
'versions': [_VersionPdfWrapper(v) for v in versions],
|
||||
})
|
||||
# Legacy URL for manuals, redirect to the main docs page
|
||||
return HttpResponsePermanentRedirect('/docs/')
|
||||
|
||||
|
||||
def manualarchive(request):
|
||||
|
@ -30,12 +30,8 @@ sitenav = {
|
||||
],
|
||||
'docs': [
|
||||
{'title': 'Documentation', 'link': '/docs/'},
|
||||
{'title': 'Manuals', 'link': '/docs/manuals/', 'submenu': [
|
||||
{'title': 'Manuals', 'link': '/docs/', 'submenu': [
|
||||
{'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': '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">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>Online Version</th>
|
||||
<th class="w-25">Online Version</th>
|
||||
<th>PDF Version</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{%for v in versions%}
|
||||
<tr{%if forloop.last%}{%endif%}>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/docs/{{v.numtree}}/{{v.indexname}}">{{v.treestring}}</a>
|
||||
</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.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%}
|
||||
{%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%}
|
||||
</td>
|
||||
</tr>
|
||||
{%endfor%}
|
||||
|
@ -7,35 +7,58 @@
|
||||
<section>
|
||||
<h1>Documentation <i class="far fa-file-alt"></i></h1>
|
||||
</section>
|
||||
<p>This section contains <a href="/docs/manuals/">current</a>
|
||||
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>
|
||||
written about PostgreSQL.</p>
|
||||
<p>
|
||||
<a class="btn btn-primary btn-double-width" href="/docs/current/">View the manual</a>
|
||||
</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 class="col-md-3">
|
||||
<section>
|
||||
<h2>Online Manuals</h2>
|
||||
<h2>Translated Manuals</h2>
|
||||
</section>
|
||||
<dl>
|
||||
<dd>
|
||||
<ul>
|
||||
{% for version in versions %}
|
||||
<li>
|
||||
<a href="/docs/{{ version.numtree }}/index.html">{{ version.treestring }}</a>
|
||||
</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>
|
||||
<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>
|
||||
</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