Add a banner to documentation pages for unsupported versions
authorMagnus Hagander <magnus@hagander.net>
Mon, 5 Aug 2019 09:54:07 +0000 (11:54 +0200)
committerMagnus Hagander <magnus@hagander.net>
Mon, 5 Aug 2019 09:54:07 +0000 (11:54 +0200)
This banner tells people, well, that it's an unsupported version and
they might want to look at more updated docs.

templates/docs/docspage.html

index c0adc0fe8a928ae3159ca88478dacaaab9668046..bafe193b33f4bfcc3d65308d805e7168fbc4f4f6 100644 (file)
               </form>
             </div>
           </div>
+{%if not page.version.supported%}
+         <div class="text-center alert-warning">
+           This documentation is for an unsupported version of PostgreSQL.<br/>
+           You may want to view the same page for the
+           <a href="/docs/current/{{page.file}}" title="PostgreSQL {{page.version.display_version}} - {{page.title}}">current</a>
+           version, or one of the supported versions lised above instead.
+         </div>
+{%endif%}
           <div id="docContent">
             {{page.content|safe}}
           </div>