mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00
Only show a truncated version of the news item in the archive
This removes the need for a separate include file for item contents, so remove that one as well.
This commit is contained in:
@ -1,10 +0,0 @@
|
|||||||
{%load markup%}
|
|
||||||
<div class="newsdate">Posted on <b>{{obj.date}}</b></div>
|
|
||||||
<p>
|
|
||||||
{{obj.content|markdown:"safe"}}
|
|
||||||
</p>
|
|
||||||
{%if obj.is_migrated%}
|
|
||||||
<p><i>This post has been migrated from a previous version of the PostgreSQL
|
|
||||||
website. We apologise for any formatting issues caused by the migration.</i></p>
|
|
||||||
{%endif%}
|
|
||||||
|
|
@ -1,7 +1,15 @@
|
|||||||
{%extends "base/page.html"%}
|
{%extends "base/page.html"%}
|
||||||
|
{%load markup%}
|
||||||
{%block title%}{{obj.title}}{%endblock%}
|
{%block title%}{{obj.title}}{%endblock%}
|
||||||
{%block contents%}
|
{%block contents%}
|
||||||
<h1>{{obj.title}}</h1>
|
<h1>{{obj.title}}</h1>
|
||||||
{%include "news/inc_newsitem.html"%}
|
<div class="newsdate">Posted on <b>{{obj.date}}</b></div>
|
||||||
|
<p>
|
||||||
|
{{obj.content|markdown:"safe"}}
|
||||||
|
</p>
|
||||||
|
{%if obj.is_migrated%}
|
||||||
|
<p><i>This post has been migrated from a previous version of the PostgreSQL
|
||||||
|
website. We apologise for any formatting issues caused by the migration.</i></p>
|
||||||
|
{%endif%}
|
||||||
{%endblock%}
|
{%endblock%}
|
||||||
|
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
{%extends "base/page.html"%}
|
{%extends "base/page.html"%}
|
||||||
|
{%load markup%}
|
||||||
{%block title%}News archive{%endblock%}
|
{%block title%}News archive{%endblock%}
|
||||||
{%block contents%}
|
{%block contents%}
|
||||||
<h1>News archive</h1>
|
<h1>News archive</h1>
|
||||||
{%for obj in news %}
|
{%for obj in news %}
|
||||||
<h2><a href="/about/news/{{obj.id}}/">{{obj.title}}</a></h2>
|
<h2><a href="/about/news/{{obj.id}}/">{{obj.title}}</a></h2>
|
||||||
{%include "news/inc_newsitem.html"%}
|
<div class="newsdate">Posted on <b>{{obj.date}}</b></div>
|
||||||
|
<p>
|
||||||
|
{{obj.content|markdown:"safe"|truncatewords_html:20}}
|
||||||
|
</p>
|
||||||
{%endfor%}
|
{%endfor%}
|
||||||
<p><a href="/account/news/new/">Submit news</a></p>
|
<p><a href="/account/news/new/">Submit news</a></p>
|
||||||
{%endblock%}
|
{%endblock%}
|
||||||
|
Reference in New Issue
Block a user